Closed tmancal74 closed 5 years ago
we will use: save_data(filename) load_data(filename)
With the latest commit, only save_data() and load_data() for TwoDSpectrum remains to be implemented.
save and load methods are now inherited from Saveable class. Data saving is now implemented individually in different classes. It would make sense to also implement it centrally in a special class from which other inherit. Something like: DataSaveable, which would provide methods save_data and load_data.
now load and save methods are available through Savable class from the quantarhei.core package, and save_data and load_data are available thought DataSavable class of the quantarhei.core package. Various formats like .dat, .txt, .mat, .npy are available for all classes which subclass DataSavable class. Currently, TwoDSpectrum and AbsSpectrum can be saved like this.
methods save and load should save and load the whole object with its details (perhaps load should be create an instance of the object and use its _load() method, which fills it? - in both cases an init method to create an empty object is needed). Methods savedata and loaddata, just save and read data from an into the existing object.