nectarchain.data.container.gain_container.PhotostatContainer#

class PhotostatContainer(prefix=None, **fields)[source]#

Bases: GainContainer

Class representing a PhotoStatistic container.

This class inherits from the GainContainer class, providing additional fields needed for Flat Field calibration.

Attributes:

charge_hg (np.ndarray): Array of high-gain charges values. charge_hg_std (np.ndarray): Array of standard deviations of high-gain charges.

Attributes:
is_validField(default=None, dtype=bool, ndim=1, type=ndarray)

is_valid

high_gainField(default=None, dtype=float64, ndim=2, type=ndarray)

high gain

low_gainField(default=None, dtype=float64, ndim=2, type=ndarray)

low gain

pixels_idField(default=None, dtype=uint16, ndim=1, type=ndarray)

pixel ids

charge_hgField(default=None, dtype=float64, ndim=1, type=ndarray)

high-gain charge

charge_hg_stdField(default=None, dtype=float64, ndim=1, type=ndarray)

standard deviation of high-gain charge

metadict

dict of attached metadata

prefixstr

Prefix attached to column names when saved to a table or file

Methods

as_dict

Convert the Container into a dictionary

from_hdf5

Class method to read a GainContainer from an HDF5 file.

items

Generator over (key, value) pairs for the items

keys

Get the keys of the container

reset

Reset all values back to their default values

update

update more than one parameter at once (e.g. update(x=3,y=4) or update(**dict_of_values)).

validate

Check that all fields in the Container have the expected characteristics (as defined by the Field metadata).

values

Get the keys of the container

Attributes

charge_hg

charge_hg_std

meta

prefix

default_prefix

fields

high_gain

is_valid

low_gain

pixels_id

classmethod from_hdf5(path, group_name='data')[source]#

Class method to read a GainContainer from an HDF5 file.

Args:

path (str or Path): The path to the HDF5 file.

Yields:

GainContainer: The container from the data in the HDF5 file.