Skip to content

Commit a3f5533

Browse files
authored
Merge pull request #2 from fronzbot/dev
Release 0.1.0
2 parents 7c30146 + 55e300b commit a3f5533

21 files changed

+693
-395
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Bug Report
3+
about: Create a bug report about an issue with the library
4+
5+
---
6+
7+
8+
**Describe the bug**
9+
10+
<INSERT TEXT HERE>
11+
12+
**To Reproduce**
13+
14+
Steps to reproduce the behavior:
15+
16+
1.
17+
2.
18+
3.
19+
20+
**Expected Behavior**
21+
22+
<INSERT TEXT HERE>
23+
24+
**python-adc-eval version:** <Library version>
25+
26+
**Additional Information**
27+
28+
<Any other information relevent to the bug report>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
name: Feature request
3+
about: Suggest a new feature for this library to support
4+
5+
---
6+
7+
**Description**
8+
9+
<Clear and concise description of the feature>
10+
11+
**Additional Information**
12+
13+
<Additional information relevent to the feature request.>

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 10
8+
reviewers:
9+
- fronzbot

.github/workflows/lint.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [main, dev]
6+
pull_request:
7+
branches: [main, dev]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [3.9]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v1
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -r requirements.txt
26+
pip install -r requirements_test.txt
27+
- name: Lint
28+
run: |
29+
tox -r -e lint

.github/workflows/publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up Python
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: '3.9'
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install twine build
20+
- name: Build and publish
21+
env:
22+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
23+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
24+
run: |
25+
python -m build
26+
twine upload dist/*

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
__pycache__
1+
__pycache__
2+
.tox
3+
python_adc_eval.egg-info
4+
dist

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Kevin Fronczak
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include README.rst
2+
include LICENSE
3+
include requirements.txt

README.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

README.rst

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
python-adc-eval |Lint| |PyPi Version| |Codestyle|
2+
===================================================
3+
4+
A python-based ADC evaluation tool, suitable for standalone or library-based usage
5+
6+
Details
7+
--------
8+
9+
Package based on
10+
`esynr3z/adc-eval <https://github.com/esynr3z/adc-eval>`__
11+
12+
Tiny tools collection (Python
13+
`NumPy <https://numpy.org/>`__\ +\ `Matplotlib <https://matplotlib.org/>`__
14+
based) to do spectral analysis and calculate the key performance
15+
parameters of an ADC. Just collect some data from the ADC, specify basic
16+
ADC parameters and run analysis. See `example.ipynb <example.ipynb>`__
17+
(you will need `Jupyter Notebook <https://jupyter.org/>`__ to be
18+
installed).
19+
20+
.. figure:: analyser.png
21+
:alt: analyser
22+
23+
analyser
24+
25+
References: - `Analog Devices MT-003 TUTORIAL “Understand SINAD, ENOB,
26+
SNR, THD, THD + N, and SFDR so You Don’t Get Lost in the Noise
27+
Floor” <https://www.analog.com/media/en/training-seminars/tutorials/MT-003.pdf>`__
28+
- `National Instruments Application Note 041 “The Fundamentals of
29+
FFT-Based Signal Analysis and
30+
Measurement” <http://www.sjsu.edu/people/burford.furman/docs/me120/FFT_tutorial_NI.pdf>`__
31+
32+
Inspired by Linear Technology (now Analog Devices)
33+
`PScope <https://www.analog.com/en/technical-articles/pscope-basics.html>`__
34+
tool.
35+
36+
37+
USAGE
38+
=======
39+
40+
To load the library in a module:
41+
42+
.. code-block:: python
43+
44+
import adc_eval
45+
46+
47+
Given an array of values representing the output of an ADC, the spectrum can be analyzed with the following:
48+
49+
.. code-block:: python
50+
51+
import adc_eval
52+
53+
adc_eval.spectrum.analyze(<adc list>, <adc_bits>, <adc vref>, <adc fsamp>, window='hanning', no_plot=<True/False>)
54+
55+
56+
|pscope| Image source: `Creating an ADC Using FPGA Resources WP -
57+
Lattice <https://www.latticesemi.com/-/media/LatticeSemi/Documents/WhitePapers/AG/CreatingAnADCUsingFPGAResources.ashx?document_id=36525>`__
58+
59+
.. |pscope| image:: pscope.png
60+
.. |Lint| image:: https://github.com/fronzbot/python-adc-eval/workflows/Lint/badge.svg
61+
:target: https://github.com/fronzbot/python-adc-eval/actions?query=workflow%3ALint
62+
.. |PyPi Version| image:: https://img.shields.io/pypi/v/spithon.svg
63+
:target: https://pypi.org/project/python-adc-eval
64+
.. |Codestyle| image:: https://img.shields.io/badge/code%20style-black-000000.svg
65+
:target: https://github.com/psf/black

0 commit comments

Comments
 (0)