Skip to content

0.2.0 #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
0fbd9c3
Re-wrote analyzer block with Bartlett method
fronzbot Apr 24, 2024
9b208f7
Bump black from 23.7.0 to 24.3.0
dependabot[bot] Apr 24, 2024
bc33208
Bump pygments from 2.15.1 to 2.17.2
dependabot[bot] Apr 24, 2024
06558ec
Bump matplotlib from 3.7.2 to 3.8.4
dependabot[bot] Apr 24, 2024
c53c3be
Bump pylint from 2.17.4 to 3.1.0
dependabot[bot] Apr 24, 2024
3965d28
Merge pull request #7 from fronzbot/dependabot/pip/black-24.3.0
fronzbot Apr 24, 2024
0817977
Merge pull request #12 from fronzbot/dependabot/pip/pylint-3.1.0
fronzbot Apr 24, 2024
a4f02f1
Merge pull request #8 from fronzbot/dependabot/pip/pygments-2.17.2
fronzbot Apr 24, 2024
1de7ed1
Bump tox from 4.6.4 to 4.14.2
dependabot[bot] Apr 24, 2024
2623334
Bump black from 23.7.0 to 24.4.1
dependabot[bot] Apr 24, 2024
ed477bd
Bump coverage from 7.2.7 to 7.5.0
dependabot[bot] Apr 24, 2024
f20435f
Merge pull request #11 from fronzbot/dependabot/pip/matplotlib-3.8.4
fronzbot Apr 24, 2024
de91134
Merge pull request #10 from fronzbot/dependabot/pip/black-24.4.1
fronzbot Apr 24, 2024
9026488
Merge branch 'dev' into dependabot/pip/coverage-7.5.0
fronzbot Apr 24, 2024
eb6179a
Bump ruff from 0.0.278 to 0.4.1
dependabot[bot] Apr 24, 2024
f27ddd5
Migrate to lint for ignore, select, and mccabe
fronzbot Apr 24, 2024
a95f316
Merge pull request #13 from fronzbot/dependabot/pip/coverage-7.5.0
fronzbot Apr 24, 2024
de1e92f
Merge pull request #14 from fronzbot/dependabot/pip/tox-4.14.2
fronzbot Apr 24, 2024
8214fb6
Merge branch 'dev' into dependabot/pip/ruff-0.4.1
fronzbot Apr 24, 2024
f960dc5
Merge pull request #9 from fronzbot/dependabot/pip/ruff-0.4.1
fronzbot Apr 24, 2024
53fda3e
Merge pull request #6 from fronzbot/analyze-rewrite
fronzbot Apr 24, 2024
178ccef
Update publish.yml
fronzbot Apr 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
__pycache__
.tox
python_adc_eval.egg-info
Expand Down
37 changes: 13 additions & 24 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,16 @@ A python-based ADC evaluation tool, suitable for standalone or library-based usa
Details
--------

Package based on
Inspired by
`esynr3z/adc-eval <https://github.com/esynr3z/adc-eval>`__

Tiny tools collection (Python
`NumPy <https://numpy.org/>`__\ +\ `Matplotlib <https://matplotlib.org/>`__
based) to do spectral analysis and calculate the key performance
parameters of an ADC. Just collect some data from the ADC, specify basic
ADC parameters and run analysis. See `example.ipynb <example.ipynb>`__
(you will need `Jupyter Notebook <https://jupyter.org/>`__ to be
installed).
Performs spectral analysis of a dataset utilizing the Bartlett method. Calculates SFDR, SNDR, as well as harmonics.

.. figure:: analyser.png
:alt: analyser

analyser

References: - `Analog Devices MT-003 TUTORIAL “Understand SINAD, ENOB,
SNR, THD, THD + N, and SFDR so You Don’t Get Lost in the Noise
Floor” <https://www.analog.com/media/en/training-seminars/tutorials/MT-003.pdf>`__
- `National Instruments Application Note 041 “The Fundamentals of
FFT-Based Signal Analysis and
Measurement” <http://www.sjsu.edu/people/burford.furman/docs/me120/FFT_tutorial_NI.pdf>`__

Inspired by Linear Technology (now Analog Devices)
`PScope <https://www.analog.com/en/technical-articles/pscope-basics.html>`__
tool.


USAGE
=======
Expand All @@ -50,13 +33,19 @@ Given an array of values representing the output of an ADC, the spectrum can be

import adc_eval

adc_eval.spectrum.analyze(<adc list>, <adc_bits>, <adc vref>, <adc fsamp>, window='hanning', no_plot=<True/False>)

adc_eval.spectrum.analyze(
<data>,
<fft bins>,
fs=<sample frequency>,
dr=<dynamicrange/vref>,
harmonics=<num of harmonics to find>,
leak=<adjacent bins to filter>,
window=<window type (rectangular/hanning)>,
no_plot=<True/False>,
yaxis=<"power"/"fullscale">
)

|pscope| Image source: `Creating an ADC Using FPGA Resources WP -
Lattice <https://www.latticesemi.com/-/media/LatticeSemi/Documents/WhitePapers/AG/CreatingAnADCUsingFPGAResources.ashx?document_id=36525>`__

.. |pscope| image:: pscope.png
.. |Lint| image:: https://github.com/fronzbot/python-adc-eval/workflows/Lint/badge.svg
:target: https://github.com/fronzbot/python-adc-eval/actions?query=workflow%3ALint
.. |PyPi Version| image:: https://img.shields.io/pypi/v/spithon.svg
Expand Down
Binary file added adc_eval/analyser.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading