Skip to content

Commit

Permalink
Merge pull request #15 from fronzbot/dev
Browse files Browse the repository at this point in the history
0.2.0
  • Loading branch information
fronzbot authored Apr 24, 2024
2 parents 3e943e6 + 178ccef commit c0974e5
Show file tree
Hide file tree
Showing 10 changed files with 293 additions and 345 deletions.
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

0 comments on commit c0974e5

Please sign in to comment.