pybode


Namepybode JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/PMSchueler/pybode
SummarySupport package for Bode diagramms
upload_time2024-02-04 19:27:18
maintainer
docs_urlNone
authorP.M.Schueler
requires_python>=3.11
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Bode Plot with DHO800/900
A python support package plots a Bode plot with gain and phase. The program is tested with DHO914 as Oscilloscope and DG1022Z as function generator.


![Bode setup](/doc/bode.jpg)

## Test setup
Connect the DG1000Z and the DHO800/900 with same Ethernet as the computer. 

### Two Pin Component Frequency Characterisation 
Generator CH1 should be connected to the oscilloscope CH1 via a BNC or SMA cable. Same connection for CH2 but the channel 2 has a T-connector in between and the component is between plus and minus of the stub. The wire length of CH1 and CH2 should be the same and the cable at the end of the oscilloscope should be terminated with 50 Ohm.

### Circuit Transfer Function
Generator CH1 should be connected to the oscilloscope CH1 via a BNC or SMA cable.  
The generator CH2 is connected to the circuit input and the circuit output directly to oscilloscope CH2.
The wire length of CH1 and CH2 should be the same and the cable at the end of the oscilloscope should be terminated with 50 Ohm.

## Python Requirements
This package needs numpy/scipy/matplotlib/pylabdevs/pydg1000z/pydho800 environment. 

## Installing 

There is a Python and PyPi packages that can be installed using

```
pip install  numpy scipy matplotlib pylabdevs pydho800 pydg1000z pybode
```

## Usage
The basic syntax is `python bode.py MIN_FREQ MAX_FREQ [FREQ_COUNT]`, so if you, for example, want to test your DUT between 1kHz and 2.2Mhz, with 100 steps (default is 50),
you can do it like this: `python bode.py 1e3 2.2e6 100`.

By default only the Amplitude diagram is measured and plotted. If you also want to get the Phase diagram, you will have to specify the `--phase` flag.

If you want to use the measured data in another software like OriginLab or Matlab, you can export it to a semicolon-seperated CSV file with the `--output` option.

So a typical command line would like this: ```python bode.py 1e3 2.2e6 100 --osc_ip 10.0.0.123 --awg_ip 10.0.0.124  --phase --output out.csv```

To see the full list of possible options call `python bode.py --help`.

## License
This program is licensed under the MIT License. See [LICENSE](https://github.com/pmschueler/pybode/blob/main/LICENSE) file for more info.

## Acknowledgements
Based on the original work by [DS1054_BodePlotter](https://github.com/jbtronics/DS1054_BodePlotter) I have re-used code parts and the method of the measurement.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PMSchueler/pybode",
    "name": "pybode",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "",
    "keywords": "",
    "author": "P.M.Schueler",
    "author_email": "peter.schueler@gmxpro.de",
    "download_url": "https://files.pythonhosted.org/packages/51/32/e93b2bdfc36c68e1e67bb4404a751bf035b935de7daedf39eefbb98969c2/pybode-0.0.1.tar.gz",
    "platform": null,
    "description": "# Bode Plot with DHO800/900\nA python support package plots a Bode plot with gain and phase. The program is tested with DHO914 as Oscilloscope and DG1022Z as function generator.\n\n\n![Bode setup](/doc/bode.jpg)\n\n## Test setup\nConnect the DG1000Z and the DHO800/900 with same Ethernet as the computer. \n\n### Two Pin Component Frequency Characterisation \nGenerator CH1 should be connected to the oscilloscope CH1 via a BNC or SMA cable. Same connection for CH2 but the channel 2 has a T-connector in between and the component is between plus and minus of the stub. The wire length of CH1 and CH2 should be the same and the cable at the end of the oscilloscope should be terminated with 50 Ohm.\n\n### Circuit Transfer Function\nGenerator CH1 should be connected to the oscilloscope CH1 via a BNC or SMA cable.  \nThe generator CH2 is connected to the circuit input and the circuit output directly to oscilloscope CH2.\nThe wire length of CH1 and CH2 should be the same and the cable at the end of the oscilloscope should be terminated with 50 Ohm.\n\n## Python Requirements\nThis package needs numpy/scipy/matplotlib/pylabdevs/pydg1000z/pydho800 environment. \n\n## Installing \n\nThere is a Python and PyPi packages that can be installed using\n\n```\npip install  numpy scipy matplotlib pylabdevs pydho800 pydg1000z pybode\n```\n\n## Usage\nThe basic syntax is `python bode.py MIN_FREQ MAX_FREQ [FREQ_COUNT]`, so if you, for example, want to test your DUT between 1kHz and 2.2Mhz, with 100 steps (default is 50),\nyou can do it like this: `python bode.py 1e3 2.2e6 100`.\n\nBy default only the Amplitude diagram is measured and plotted. If you also want to get the Phase diagram, you will have to specify the `--phase` flag.\n\nIf you want to use the measured data in another software like OriginLab or Matlab, you can export it to a semicolon-seperated CSV file with the `--output` option.\n\nSo a typical command line would like this: ```python bode.py 1e3 2.2e6 100 --osc_ip 10.0.0.123 --awg_ip 10.0.0.124  --phase --output out.csv```\n\nTo see the full list of possible options call `python bode.py --help`.\n\n## License\nThis program is licensed under the MIT License. See [LICENSE](https://github.com/pmschueler/pybode/blob/main/LICENSE) file for more info.\n\n## Acknowledgements\nBased on the original work by [DS1054_BodePlotter](https://github.com/jbtronics/DS1054_BodePlotter) I have re-used code parts and the method of the measurement.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Support package for Bode diagramms",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/PMSchueler/pybode"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7f4ebbbabb9a01967f862c88cb092e71579e2565a3a0f764b1abec4d667e453f",
                "md5": "998ba42e9e4bc080a16acfa41f181a20",
                "sha256": "6a29e57fa877708dd03d15f43f49b9f8ccdfe62b42a4c49f5d4ad03df3e84857"
            },
            "downloads": -1,
            "filename": "pybode-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "998ba42e9e4bc080a16acfa41f181a20",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 5903,
            "upload_time": "2024-02-04T19:27:16",
            "upload_time_iso_8601": "2024-02-04T19:27:16.637589Z",
            "url": "https://files.pythonhosted.org/packages/7f/4e/bbbabb9a01967f862c88cb092e71579e2565a3a0f764b1abec4d667e453f/pybode-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5132e93b2bdfc36c68e1e67bb4404a751bf035b935de7daedf39eefbb98969c2",
                "md5": "bf81dae7987f395146ed516d068de428",
                "sha256": "37c27e7901ea5e39e243aaef3887349676247a37e188d563d2f6e8f930f4d998"
            },
            "downloads": -1,
            "filename": "pybode-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "bf81dae7987f395146ed516d068de428",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 5786,
            "upload_time": "2024-02-04T19:27:18",
            "upload_time_iso_8601": "2024-02-04T19:27:18.530211Z",
            "url": "https://files.pythonhosted.org/packages/51/32/e93b2bdfc36c68e1e67bb4404a751bf035b935de7daedf39eefbb98969c2/pybode-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-04 19:27:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PMSchueler",
    "github_project": "pybode",
    "github_not_found": true,
    "lcname": "pybode"
}
        
Elapsed time: 0.58842s