Observation
Input object for AMPy
Observation
class Observation(data, offsets=None, hosts=None, groups=None)
A time series of flux measurements.
The Observation class is designed to be used for MCMC fitting. To reduce the fitting time as much as possible, I made the decision that once the object is instantiated with data, it cannot be updated. This means that you should not add or remove data dynamically.
I did this so that I can store the positions of data at the time of instantiation. This saves quite a bit of time when fitting with MCMC since I reference these locations multiple times in the likelihood calculations.
Parameters
data: np.ndarray ofSpectralFlux,IntegratedFlux,SpectralIndexThe observational data.
offsets: dict, optionalKey, value pairs of <offset names> : <np.ndarray of where to apply offsets>.
hosts: dict, optionalKey, value pairs of <host names> : <np.ndarray of where to apply host corrections>.
groups: dict, optionalKey, value pairs of <group names> : <np.ndarray of where to the group is defined>.
Attributes
as_arrays: ObsArrayArray representation of the
Observationobject. It is highly recommended to use the arrays when performance is important.
data_regimes: dict of BoundThe time bounds for each data group in
groups.
length: floatThe number of data points.
Properties
flux_loc: np.ndarray of boolThe location of
SpectralFluxandIntegratedFluxdata.
sflux_loc: np.ndarray of boolThe location of
SpectralFluxdata.
iflux_loc: np.ndarray of boolThe location of
IntegratedFluxdata.
sindex_loc: np.ndarray of boolThe location of
SpectralIndexdata.
extinguishable: np.ndarray of boolThe location of data that is affected by dust extinction.
Methods
Observation.from_csv(path)
Instantiates an Observation from a CSV.
See ?? for the CSV schema.
Parameters
path: str orPathThe path to the
CSVfile.
Returns
Observation
Last updated