DataStore¶
- class scqubits.core.storage.DataStore(system_params, param_name=None, param_vals=None, **kwargs)[source]¶
Base class for storing and processing spectral data and custom data from parameter sweeps.
- Parameters:
system_params (
Dict
[str
,Any
]) – info about system parametersparam_name (
str
) – name of parameter being variesparam_vals (
ndarray
) – parameter values for which spectrum data are stored**kwargs – keyword arguments for data to be stored:
dataname=data
, where data should be an array-like object
Methods
DataStore.__init__
(system_params[, ...])DataStore.add_data
(**kwargs)Adds one or several data sets to the DataStorage object.
DataStore.create_from_file
(filename)Read initdata and spectral data from file, and use those to create a new SpectrumData object.
DataStore.deserialize
(io_data)Take the given IOData and return an instance of the described class, initialized with the data stored in io_data.
DataStore.filewrite
(filename)Convenience method bound to the class.
Convert the content of the current class instance into IOData format.
- add_data(**kwargs)[source]¶
Adds one or several data sets to the DataStorage object.
- Parameters:
**kwargs –
dataname=data
withdata
an array-like object. The data set will be accessible through<DataStorage>.dataname
.- Return type:
None
- classmethod create_from_file(filename)¶
Read initdata and spectral data from file, and use those to create a new SpectrumData object.
- Returns:
new SpectrumData object, initialized with data read from file
- Return type:
- Parameters:
filename (str)
- classmethod deserialize(io_data)¶
Take the given IOData and return an instance of the described class, initialized with the data stored in io_data.
- Return type:
TypeVar
(SerializableType
, bound= Serializable)- Parameters:
io_data (IOData)
- filewrite(filename)¶
Convenience method bound to the class. Simply accesses the write function.
- Return type:
None
- Parameters:
filename (str)