PSD Module
This module provides easy-to-use tools for quick data visualization and spectral analysis.
Data must be stored on text, Numpy or HDF5 files, and all formats compatible with
the standard numpy.loadtxt and numpy.load are accepted. First dimension, or
rows, is used for time and second dimension, or columns, for series. The first
column is always assumed to represent the times associated with each row.
Installation
Make sure that Python 3 is available on your machine, and run
pip3 install psd
The package is also available at https://pypi.org/project/psd/.
Getting Started
Time-Series Visualization
You can visualize time-series from Numpy or text files using
psd --time-series my_file.npy another_file.txt ...
You can read HDF5 files as well by specifying the path to the dataset inside your file using
psd --time-series my_hdf5_file.hdf5:mygroup/mydataset ...
Power Spectrum Estimation
To compute Power Spectral Density (PSD) estimates for each series using the Welch method, simply use
psd my_file.npy
You can specify the number of rows at the top of the files you want to skip
using -s SKIPROWS option, the number of points per segment you want to use
with -n NPERSEF option, or the windowing function using --window WINDOW.
For time-series visualization and spectral analysis, you can hide the legend
with the --no-legend option, specify a title with --title TITLE, or save
the output as a text file, a Numpy file or an image using -o OUTPUT. You
can specify line and marker aspect using matplotlib notation with --aspect.
psd -s 500 -n 10000 --window nuttall my_file.npy --title "This is an example"
Format Conversion
You can easily convert from text files to Numpy binary files using the quick
convert command-line tool included in this package, i.e.
convert my_file1.txt my_file2.text
To reverse the conversion and get a text file from a Numpy file, use the -r
option. You can specify the output file name using -o OUTPUT.
convert -r my_numpy.npy -o my_text_file.txt
The tool can also remove original files as soon as they are converted if you
specify the --delete or -d option.
convert -d file*.txt
Documentation
Other options are available, use psd --help or convert --help to show
documentation.
Developped by Jean-Baptiste Bayle (APC/CNES/CNRS), bayle@apc.in2p3.fr.
Release files for psd 1.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| psd-1.5.2.tar.gz | 6.8 kB | Details |
Release files / psd-1.5.2.tar.gz
| Download URL | psd-1.5.2.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0259a7885eb138b327aa62cb0ef2e8913e63c111ab74e6ae1289f8d0fab3a6a
|
|
BLAKE2b-256 checksum How to use checksums |
67312ca5986d9c43fb10649d71f8ecb1f1388eb632fe3e82ff8c6f774007096d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
|