Python tools for data visualization and spectral analysis.
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
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.
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/.
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
You can specify the number of rows at the top of the files you want to skip
-s SKIPROWS option, the number of points per segment you want to use
-n NPERSEF option, or the windowing function using
For time-series visualization and spectral analysis, you can hide the legend
--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
psd -s 500 -n 10000 --window nuttall my_file.npy --title "This is an example"
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
option. You can specify the output file name using
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
convert -d file*.txt
Other options are available, use
psd --help or
convert --help to show
Developped by Jean-Baptiste Bayle (APC/CNES/CNRS), firstname.lastname@example.org.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.