Skip to content

Re-wrote analyzer block with Bartlett method #6

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 1 commit into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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