Metadata-Version: 2.1
Name: vtofg
Version: 0.9.4
Summary: Vibration Test Object Function Generator
Author: Zack Ravetz
License: BSD 3-Clause License
        
        Copyright (c) 2022, Zack Ravetz
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Homepage, https://gitlab.com/zravetz/vtofg
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: pyaudio
Requires-Dist: matplotlib

# VTOFG: Vibration Test Object Function Generator

## Introduction

A function generator that uses the audio output (3.5mm port, speaker, or usb-c) on a computer, for use with a vibration test object (VTO) for testing of doppler ultrasound. This can be used as a general function generator if plot is set to False.

When the function generator is ran it has the following inputs:
-- Master amplitude: the overall amplitude of the signal (essentially the volume when played through a speaker)
- Generator frequency: the frequency of the audio frames in the signal
- Resolution: the resolution of each audio frame
- Buffer time: the length of each segment that is calculated/played (the next segment is calculated while the previous one is being played)
- Transducer Frequency: The ultrasound wave frequency in kHz
- Pulse Repetition Frequency: The Pulse Repetition Frequency that the scanner is using in Hz
- Display Time: The time period displayed
- Display Samples: The number of lines per time period
- Wall Filter: The wall filter frequency used (A simple cutoff mask is used)
- Gain: Arbitrary value use to scale the displayed signal
- Display Speed: used to control the display speed if it is out of sync with the signal
- For each sweep wave:
  - Wave amplitude: relative to each other, changing this will not change the overall signal amplitude
  - Start Frequency: the frequency to start the sweep
  - End Frequency: the frequency to end the sweep
  - Sweep Time: the period of the sweep

## Installation Instructions

### Windows

Use pip to install the vtofg package:

`pip install vtofg`

Run the following python script:
```
import vtofg

gen = vtofg.FunctionGenerator(plot=True)
gen.mainloop()
```

Set plot to False if you don't want the plotter.

See Example.PNG for expected output when ran with settings shown in image.

### Mac and others

Installation of the package is largely the same, except you will need to run `pip3 install vtofg` instead of `pip install vtofg`. You may also need to manually install a version of python through your package manager which includes tkinter, as the default version of python3 preloaded onto your system may not contain this.

### Python Version
An installation of python 3.7.9 is recommended, other versions have not been tested.

## Roadmap
- Adding functionality to save/load waves
- Add functionaality to run .wav files

## Contributing
Contributions are welcome

## Contributors
- Zack Ravetz

## License
This project is licensed under the BSD license.
