semvec/pypi-packages huggingface dataset:
czt 0.0.7
Chirp Z-transform
License: MIT
Keywords: z-transform,signal-processing,dsp

Chirp Z-Transform (CZT)
=======================

[![PyPI version](https://badge.fury.io/py/czt.svg)](https://badge.fury.io/py/czt)

From [Wikipedia](https://en.wikipedia.org/wiki/Chirp_Z-transform):

> The chirp Z-transform (CZT) is a generalization of the discrete Fourier transform (DFT). While the DFT samples the Z plane at uniformly-spaced points along the unit circle, the chirp Z-transform samples along spiral arcs in the Z-plane, corresponding to straight lines in the S plane. The DFT, real DFT, and zoom DFT can be calculated as special cases of the CZT.

Getting Started
---------------

You can install the CZT package using ``pip``:

   ```bash
   # to install the latest release (from PyPI)
   pip install czt

   # to install the latest version (from GitHub)
   git clone https://github.com/garrettj403/CZT.git
   cd CZT
   pip install -e .

   # to install dependencies for examples
   pip install -e .[examples]
   ```

Example
-------

Consider the following time-domain signal:

<p align="center">
<img src="https://raw.githubusercontent.com/garrettj403/CZT/main/examples/results/signal.png" width="500">
</p>

This is an exponentially decaying sine wave with some distortion from higher-order frequencies. We can convert this signal to the frequency-domain to investigate the frequency content using the Chirp Z-Transform (CZT):

<p align="center">
<img src="https://raw.githubusercontent.com/garrettj403/CZT/main/examples/results/freq-domain.png" width="500">
</p>

Note that the CZT also allows us to calculate the frequency response over an arbitrary frequency range:

<p align="center">
<img src="https://raw.githubusercontent.com/garrettj403/CZT/main/examples/results/zoom-czt.png" width="500">
</p>

We can see that the signal has frequency components at 1 kHz, 2.5 kHz and 3.5 kHz. To remove the distortion and isolate the 1 kHz signal, we can apply a simple window in the frequency-domain:

<p align="center">
<img src="https://raw.githubusercontent.com/garrettj403/CZT/main/examples/results/windowed-freq-domain.png" width="500">
</p>

Finally, we can use the Inverse Chirp Z-Transform (ICZT) to transform back to the time domain:

<p align="center">
<img src="https://raw.githubusercontent.com/garrettj403/CZT/main/examples/results/windowed-time-domain.png" width="500">
</p>

As we can see, we were able to remove the higher-order frequencies that were distorting our 1 kHz signal.

You can find this example and others in the [``examples/``](https://github.com/garrettj403/CZT/blob/main/examples/)  directory.

References
----------

- [Rabiner, L., Schafer, R., Rader, C. The Chirp z-Transform Algorithm. IEEE Trans. Audio Electroacoustics, Au-17, 2, Jun. 1969.](https://web.ece.ucsb.edu/Faculty/Rabiner/ece259/Reprints/015_czt.pdf)

- [Sukhoy, V., Stoytchev, A. Generalizing the inverse FFT off the unit circle. Sci Rep 9, 14443 (2019).](https://doi.org/10.1038/s41598-019-50234-9)

- [Chirp Z-Transform (Wikipedia)](https://en.wikipedia.org/wiki/Chirp_Z-transform)

- [Discrete Fourier Transform (Wikipedia)](https://en.wikipedia.org/wiki/Discrete_Fourier_transform)
cloudendure-sdk 0.0.15
A python wrapper for the CloudEndure API
License: MIT
Requires Python: >=3.6

**CloudEndure SDK**
# Python Package
**Compatability:** <br>
![Python Version 3.8](https://img.shields.io/badge/Python-3.8-blue.svg)

## Using CloudEndureSDK

<span style="color:DarkRed">**DOCUMENTATION WORK IN PROGRESS...**</span>

###### Example - Backup All Blueprints:
````python
from cloudendure import CloudendureSDK

userApiToken = "{TOKEN}"

client = CloudendureSDK(userApiToken)
client.export_all_bp_csv('blueprint_backup.csv')

````
###### Example - List All Projects
````python
from cloudendure import CloudendureSDK

userApiToken = 'token'
projectId = 'projectId'

client = CloudendureSDK(userApiToken)
projects = client.list_projects()
print(projects)

````


###### Example - List all project blueprints:
````python
from cloudendure import CloudendureSDK

userApiToken = 'token'
projectId = 'projectId'

client = CloudendureSDK(userApiToken)
blueprints = client.list_blueprint(projectId)

````

###### Example - List all machines in a project
````python
from cloudendure import CloudendureSDK

userApiToken = 'token'
projectId = 'projectId'

client = CloudendureSDK(userApiToken)
machines = client.list_machines(projectId)
print(machines)

````

###### Example - Get a machine blueprint and export to csv
````python
from cloudendure import CloudendureSDK

userApiToken = 'token'
projectId = 'projectId'
client = CloudendureSDK(userApiToken)

machine = client.get_machine_by_name(machineName='MyMachineName', projectId=projectId)
blueprint = [client.get_blueprint_by_machine(machineId=machine['id'], projectId=projectId)]
print(blueprint)
client.export_bp_csv(filename='export.csv', blueprint=blueprint)

````

###### Example - Get Machine by Name
````python
from cloudendure import CloudendureSDK

userApiToken = 'token'
projectId = 'projectId'
client = CloudendureSDK(userApiToken)

machine = client.get_machine_by_name(machineName='MyMachine', projectId=projectId)
print(machine)


````

###### Example - Mass update blueprints from csv
````python
from cloudendure import CloudendureSDK

userApiToken = 'token'
projectId = 'projectId'
client = CloudendureSDK(userApiToken)

# Backup All Blueprints
client.export_all_bp_csv('backup.csv') 

r = client.update_machine_blueprint_csv(fileName='update.csv')
print(r)


````


---

<br>