Rohde-Schwarz / RsWaveform

Load, manipulate and save R&S waveform files
http://rswaveform.readthedocs.io/
MIT License
4 stars 1 forks source link

npz `Loader` and `Saver` #18

Closed casabre closed 4 months ago

casabre commented 4 months ago

Loading and saving from numpy npz files would be helpful.

The data should be stored in the i and q format in the numpy file, e.g.

np.savez_compressed("file.npz", i=np.real(data), q=np.imag(data))

file = np.load("file.npz")
restored_data = file["i"] + 1j * file["q"]

assert np.array_equal(data, restored_data)

Additionally, the following parameter for the Saver would be beneficial: