semvec/pypi-packages huggingface dataset:
python-graspfile 0.4.1
A package for reading, manipulating and eventually writing files output from TICRA Tools GRASP and CHAMP software using numpy etc.
License: MIT
Requires Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*

========
Overview
========



A package for reading, manipulating and eventually writing files output from TICRA Tools GRASP and CHAMP software using
numpy etc.

* Free software: MIT license

Installation
============

::

    pip install python-graspfile

You can also install the latest release candidate version with::

    pip install --index-url https://test.pypi.org/simple/ python-graspfile

You can install the latest in-development version with::

    pip install https://github.com/Smithsonian/python-graspfile/archive/master.zip


Documentation
=============


https://python-graspfile.readthedocs.io/


Development
===========

To run the all tests run::

    tox

Note, to combine the coverage data from all the tox environments run:

.. list-table::
    :widths: 10 90
    :stub-columns: 1

    - - Windows
      - ::

            set PYTEST_ADDOPTS=--cov-append
            tox

    - - Other
      - ::

            PYTEST_ADDOPTS=--cov-append tox


Changelog
=========

0.3.5 (2020-10-01)
------------------

* Add functions for calculating reflectance and transmission - useful for correcting for lack of AR coatings in
  GRASP PO calculations of lens and dielectrics.

0.3.4 (2020-10-01)
------------------

* Add scaling of fields and grids by factors

0.3.3 (2020-09-30)
------------------

* Bug fixes to plot

0.3.2 (2020-09-30)
------------------

* Add useful functions and functionality for plotting and combining different grids and fields in `plot` submodule.

0.3.1 (2020-09-21)
------------------

* Adds a method for summing fields within a grid object (e.g. to make an incoherent sum over frequencies)
  and a function for adding grid (e.g. to add one analysis output to another).

0.3.0 (2020-06-21)
------------------

* Introduce analysis submodule

0.2.0 (2020-04-28)
------------------

* Change ownership of repo to Smithsonian GitHub team
* Incorporate `.tor` file parsing

0.1.3 (2020-03-10)
------------------

* Packaging changes to allow automated pushes to PyPI and TestPyPI

0.1.2 (2020-03-10)
------------------

* More bug fixes to work with older GRASP 10.0 cut files

0.1.1 (2020-03-18)
------------------

* Initial bug fixes to work with older GRASP 10.0 cut files

0.1.0 (2020-03-18)
------------------

* Initial attempts to work with older GRASP 10.0 files

0.0.1 (2020-02-04)
------------------

* Initial creation from PaulKGrimes/GraspFile and PaulKGrimes/CHAMPEdxFile repos
pghipy 0.1.1
STFT/ISTFT transforms and phase recovery using Phase Gradient Heap Integration
License: MIT
Requires Python: >=3.6
Keywords: pghi,stft,istft,spectrogram,phase recovery

# pghipy: Phase Gradient Heap Integration in Python

A Python implementation of STFT/ISTFT transforms and phase recovery using [Phase Gradient Heap Integration](https://arxiv.org/abs/1609.00291). Based on code from [phase-reconstruction](https://github.com/rrlyman/phase-reconstruction) and [tifgan/phase_recovery](https://github.com/tifgan/phase-recovery). The package does not require installation of ltfatpy and works in Windows/MacOS/Linux.

## Installation

```bash
pip install pghipy
```
## Usage

```python
import librosa
import numpy as np
from pghipy import get_default_window, calculate_synthesis_window
from pghipy import stft, pghi, istft

NFFT = 1024
HOP = NFFT//8   # Increasing overlap improves phase recovery

# Create Gaussian windows
winpghi, gamma = get_default_window(NFFT)
winsynth = calculate_synthesis_window(NFFT, HOP, winpghi)

# Magnitude spectrogram
y, sr = librosa.load(librosa.example('trumpet'))
S = np.abs(stft(y,win_length=NFFT,hop_length=HOP,window=winpghi))

# Estimate phase
phase = pghi(S,win_length=NFFT,hop_length=HOP,gamma=gamma)

# Invert
S = S*np.exp(1.0j*phase)
y_inv = istft(S,win_length=NFFT,hop_length=HOP,synthesis_window=winsynth)

```
Note: Uses [numba](https://numba.pydata.org/) JIT compiler to obtain a significant speed-up in phase recovery. Compilation is deferred until the first execution of the function pghi (i.e., lazy compilation).

## Dependencies
* numpy
* scipy
* numba    

## Thanks
Richard Lyman [rrlyman](https://github.com/rrlyman)

Andr&eacute;s Marafioti [andimarafioti](https://github.com/andimarafioti)

## License
[The MIT License (MIT)](https://choosealicense.com/licenses/mit/)