# QUAK/ESR analysis utility
This is work in progress.
This repository contains a collection of classes and utilities to handle
and work with QUAK/ESR data files.
## Installation
```
pip install quakesranalysis-tspspi
```
### Upgrading
```
pip install --upgrade quakesranalysis-tspspi
```
## Utilities
### ```quakesrplot```
The ```quakesrplot``` is capable of generating standard plots for single peak
scans and 1D scans. Those include:
* ```iqmean``` is just a standard plot of the mean values and standard deviations
of all captured I/Q samples in scan, zero scan and difference
* ```apmean``` calculated amplitude and phase out of I/Q samples and plots
them for scan, zero scan and difference
* ```wndnoise``` provides a sliding window noise calculation by calculating the
standard deviation inside this configurable sliding window to show how noise
changes over time.
* ```offsettime``` plots the offset of all three captured signal types over time
* ```allan``` calculates the Allan deviation of the system for all samples points
along the main axis (frequency, B0, ...) as well as a worst case Allan deviation
* ```decompose``` decomposes the found signal, zero signal and difference signal
into a mixture of Gaussians (this can be inspected by setting ```decomposedebug```)
* ```mixfit``` does the same as decompose but for more different function types (Gaussian,
Cauchy, Difference of Gaussian, Difference of Cauchy, Constant, ...). Inspection
of the fitting behaviour is also possible using ```mixfitdebug```
* ```metrics``` outputs collected metrics into a JSON data file. This should be
run at the end.
All plots are stored along the source datafile and named with the same prefix.
Example usage:
```
quakesrplot -iqmean -apmean -wndnoise 10 -wndnoise 3 -offsettime -mixfit -allan *_peak.npz
```
To see a list of all supported features execute without arguments:
```
quakesrplot
```
When outputting debug plots for ```decompose``` or ```mixfit``` the ```QtAgg``` backend
of ```matplotlib``` tends to crash sometimes. One can then launch the application using
a different backend such as ```TkAgg``` on via the ```MPLBACKEND``` environment variable:
```
env MPLBACKEND=tkagg quakesrplot -iqmean -apmean -wndnoise 10 -wndnoise 3 -offsettime -mixfitdebug -allan *_peak.npz
```
Raw data
{
"_id": null,
"home_page": "https://github.com/tspspi/quakesranalysis",
"name": "quakesranalysis-tspspi",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "Thomas Spielauer",
"author_email": "pypipackages01@tspi.at",
"download_url": "https://files.pythonhosted.org/packages/42/36/89c8b3bc48a5107417f0be571cc2ff0acfd922f6938c85a6fe585a88af09/quakesranalysis-tspspi-0.0.6.tar.gz",
"platform": null,
"description": "# QUAK/ESR analysis utility\n\nThis is work in progress.\n\nThis repository contains a collection of classes and utilities to handle\nand work with QUAK/ESR data files.\n\n## Installation\n\n```\npip install quakesranalysis-tspspi\n```\n\n### Upgrading\n\n```\npip install --upgrade quakesranalysis-tspspi\n```\n\n## Utilities\n\n### ```quakesrplot```\n\nThe ```quakesrplot``` is capable of generating standard plots for single peak\nscans and 1D scans. Those include:\n\n* ```iqmean``` is just a standard plot of the mean values and standard deviations\n of all captured I/Q samples in scan, zero scan and difference\n* ```apmean``` calculated amplitude and phase out of I/Q samples and plots\n them for scan, zero scan and difference\n* ```wndnoise``` provides a sliding window noise calculation by calculating the\n standard deviation inside this configurable sliding window to show how noise\n changes over time.\n* ```offsettime``` plots the offset of all three captured signal types over time\n* ```allan``` calculates the Allan deviation of the system for all samples points\n along the main axis (frequency, B0, ...) as well as a worst case Allan deviation\n* ```decompose``` decomposes the found signal, zero signal and difference signal\n into a mixture of Gaussians (this can be inspected by setting ```decomposedebug```)\n* ```mixfit``` does the same as decompose but for more different function types (Gaussian,\n Cauchy, Difference of Gaussian, Difference of Cauchy, Constant, ...). Inspection\n of the fitting behaviour is also possible using ```mixfitdebug```\n* ```metrics``` outputs collected metrics into a JSON data file. This should be\n run at the end.\n\nAll plots are stored along the source datafile and named with the same prefix.\n\nExample usage:\n\n```\nquakesrplot -iqmean -apmean -wndnoise 10 -wndnoise 3 -offsettime -mixfit -allan *_peak.npz\u00a0\n```\n\nTo see a list of all supported features execute without arguments:\n\n```\nquakesrplot\n```\n\nWhen outputting debug plots for ```decompose``` or ```mixfit``` the ```QtAgg``` backend\nof ```matplotlib``` tends to crash sometimes. One can then launch the application using\na different backend such as ```TkAgg``` on via the ```MPLBACKEND``` environment variable:\n\n```\nenv MPLBACKEND=tkagg quakesrplot -iqmean -apmean -wndnoise 10 -wndnoise 3 -offsettime -mixfitdebug -allan *_peak.npz\u00a0\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "Analysis package for QUAK/ESR runs",
"version": "0.0.6",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0393f64dabc13591ff4b8d67063ec7c3b2335b5475ca4213ea10e2a2c88a61e1",
"md5": "b08b8cc238b0b55144276b0ce3453455",
"sha256": "d3b61ba243e6f0f43193be24b716e06c3baaed4cb1221d0e7cf3a909278ab3fb"
},
"downloads": -1,
"filename": "quakesranalysis_tspspi-0.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b08b8cc238b0b55144276b0ce3453455",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 23983,
"upload_time": "2023-02-01T06:23:20",
"upload_time_iso_8601": "2023-02-01T06:23:20.292731Z",
"url": "https://files.pythonhosted.org/packages/03/93/f64dabc13591ff4b8d67063ec7c3b2335b5475ca4213ea10e2a2c88a61e1/quakesranalysis_tspspi-0.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "423689c8b3bc48a5107417f0be571cc2ff0acfd922f6938c85a6fe585a88af09",
"md5": "ce3c50a4a8963a1e21cdcb73f902647d",
"sha256": "748462f5811cf29401766a70297c9a4285d3bc1ee21420417a1f30460ad66cd4"
},
"downloads": -1,
"filename": "quakesranalysis-tspspi-0.0.6.tar.gz",
"has_sig": false,
"md5_digest": "ce3c50a4a8963a1e21cdcb73f902647d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 22989,
"upload_time": "2023-02-01T06:23:22",
"upload_time_iso_8601": "2023-02-01T06:23:22.491472Z",
"url": "https://files.pythonhosted.org/packages/42/36/89c8b3bc48a5107417f0be571cc2ff0acfd922f6938c85a6fe585a88af09/quakesranalysis-tspspi-0.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-02-01 06:23:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "tspspi",
"github_project": "quakesranalysis",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "quakesranalysis-tspspi"
}