edges.analysis.datamodel¶
Data models for GSData objects.
- class edges.analysis.datamodel.GSDataLinearModel(model: Model, parameters: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | Quantity | None)[source]¶
A model of a GSData object.
- classmethod from_gsdata(model: ~edges.modeling.core.Model, gsdata: ~pygsdata.gsdata.GSData, nsamples_strategy: <NsamplesStrategy.FLAGGED_NSAMPLES: 0>, **fit_kwargs) Self[source]¶
Create a GSDataModel from a GSData object.
- Parameters:
model – The model to use. Applied separately to each time, load and pol.
gsdata (GSData object) – The GSData object to fit to.
nsamples_strategy – The strategy to use when defining the weights of each sample.
- classmethod from_h5(fl: File | Group, path: str = '') Self[source]¶
Read the object from an HDF5 file, potentially from a particular path.
- get_residuals(gsdata: GSData) ndarray[source]¶
Calculate the residuals of the model given the input GSData object.
- edges.analysis.datamodel.add_model(data: GSData, *, model: Model, nsamples_strategy: NsamplesStrategy = NsamplesStrategy.FLAGGED_NSAMPLES) GSData[source]¶
Return a new GSData instance which contains a data model.
- Parameters:
data – The GSData instance to add the model to.
model – The model to add/fit.
append_to_file – Whether to directly add the model residuals to the file that is attached to the GSData object. DON’T DO THIS.
nsamples_strategy – The strategy to use when defining the weights of each sample.