gcfit.core.data.Dataset#

class gcfit.core.data.Dataset(group)#

Read-only container for all variables associated with a single dataset.

Contains all data representing a single observational dataset, i.e. all `Variable`s associated to a single physical process, from a single source, along with all relevant metadata.

Should not be initialized directly, but from an Observations instance, using the base data file’s relevant group.

Parameters:
grouph5py.Group

HDF5 group object corresponding to this dataset.

Attributes:
variables

Dictionary of all `Variables`s contained in this class.

mdatadict

Dictionary of all “cluster-level” metadata.

Methods

__init__(group)

build_err(varname, model_r, model_val)

Return the most relevant uncertainties associated with a variable.

cite()

Return the literature source (citation) of this Dataset.

Attributes

size

Number of datapoints in this dataset.

variables

Dictionary of all `Variables`s contained in this class.

build_err(varname, model_r, model_val)#

Return the most relevant uncertainties associated with a variable.

Determines and returns the uncertainty (error) variables corresponding to the varname variable, which must also exist within this dataset.

As some uncertainties are not symmetric (i.e. not equal in the positive and negative directions), which side of the error bars to utilize must be determined. To accomplish this, the given model_r values are interpolated onto this dataset’s radial r profile, and for each point the closest error bar to each model_val is chosen.

Parameters:
varnamestr

Name of the variable to retrieve the errors for.

model_rastropy.Quantity

Quantity representing the desired radial profile to interpolate on. Only used for assymetric errors. Must have equivalent units to the dataset r.

model_valastropy.Quantity

Quantity representing the desired values to interpolate on. Only used for assymetric errors. Must have equivalent units to the given varname.

Returns:
astropy.Quantity

The error variable corresponding to this varname.

cite()#

Return the literature source (citation) of this Dataset.

property size#

Number of datapoints in this dataset.

property variables#

Dictionary of all `Variables`s contained in this class.