nectarchain.makers.component.photostatistic_algorithm.PhotoStatisticAlgorithm#
- class PhotoStatisticAlgorithm(pixels_id, FFcharge_hg, FFcharge_lg, Pedcharge_hg, Pedcharge_lg, coefCharge_FF_Ped, SPE_resolution, SPE_high_gain, config=None, parent=None, **kwargs)[source]#
Bases:
ComponentMethods
add_traitsDynamically add trait attributes to the HasTraits instance.
class_config_rst_docGenerate rST documentation for this class' config options.
class_config_sectionGet the config section for this class.
class_get_helpGet the help string for this class in ReST format.
class_get_trait_helpGet the helptext string for a single trait.
class_own_trait_eventsGet a dict of all event handlers defined on this class, not a parent.
class_own_traitsGet a dict of all the traitlets defined on this class, not a parent.
class_print_helpGet the help string for a single trait and print it.
class_trait_namesGet a list of all the names of this class' traits.
class_traitsGet a
dictof all the traits of this class.create_from_chargesContainerfrom_nameObtain an instance of a subclass via its name
get_current_configreturn the current configuration as a dict (e.g. the values of all traits, even if they were not set during configuration).
has_traitReturns True if the object has a trait with the specified name.
hold_trait_notificationsContext manager for bundling trait change notifications and cross validation.
non_abstract_subclassesGet a dict of all non-abstract subclasses of this class.
notify_changeNotify observers of a change event
observeSetup a handler to be called when a trait changes.
on_trait_changeDEPRECATED: Setup a handler to be called when a trait changes.
Plot the correlation between the photo statistic gain and the single photoelectron (SPE) gain.
runsection_namesreturn section names as a list
set_traitForcibly sets trait attribute, including read-only attributes.
setup_instancetrait_defaultsReturn a trait's default value or a dictionary of them
trait_eventsGet a
dictof all the event handlers of this class.trait_has_valueReturns True if the specified trait has a value.
trait_metadataGet metadata values for trait by key.
trait_namesGet a list of all the names of this class' traits.
trait_valuesA
dictof trait names and their values.traitsGet a
dictof all the traits of this class.unobserveRemove a trait change handler.
unobserve_allRemove trait change handlers of any type for the specified name.
update_configUpdate config and load the new values
Attributes
Calculates and returns the BHG value.
Calculates and returns the BLG value.
Returns a deep copy of the SPE resolution.
configA trait whose value must be an instance of a specified class.
cross_validation_lockA contextmanager for running a block with our cross validation lock set to True.
Calculates and returns the gain for high gain charge data.
Calculates and returns the gain for high gain charge data.
Calculates and returns the gain for low gain charge data.
Calculates and returns the gain for high gain charge data.
Calculates and returns the mean of FFcharge_hg minus meanPedHG.
Calculates and returns the mean of FFcharge_lg minus meanPedLG.
Calculates and returns the mean of Pedcharge_hg multiplied by coefCharge_FF_Ped.
Calculates and returns the mean of Pedcharge_lg multiplied by coefCharge_FF_Ped.
npixelsparentA trait whose value must be an instance of a specified class.
resultsCalculates and returns the standard deviation of FFcharge_hg minus meanPedHG.
Calculates and returns the standard deviation of FFcharge_lg minus meanPedLG.
Calculates and returns the standard deviation of Pedcharge_hg multiplied by the square root of coefCharge_FF_Ped.
Calculates and returns the standard deviation of Pedcharge_lg multiplied by the square root of coefCharge_FF_Ped.
- property SPE_resolution: float#
Returns a deep copy of the SPE resolution.
- Returns:
float: The SPE resolution.
- property gainHG: float#
Calculates and returns the gain for high gain charge data.
- Returns:
float: The gain for high gain charge data.
- property gainHG_err: float#
Calculates and returns the gain for high gain charge data.
- Returns:
float: The gain for high gain charge data.
- property gainLG: float#
Calculates and returns the gain for low gain charge data.
- Returns:
float: The gain for low gain charge data.
- property gainLG_err: float#
Calculates and returns the gain for high gain charge data.
- Returns:
float: The gain for high gain charge data.
- property meanChargeHG: float#
Calculates and returns the mean of FFcharge_hg minus meanPedHG.
- Returns:
float: The mean of FFcharge_hg minus meanPedHG.
- property meanChargeLG: float#
Calculates and returns the mean of FFcharge_lg minus meanPedLG.
- Returns:
float: The mean of FFcharge_lg minus meanPedLG.
- property meanPedHG: float#
Calculates and returns the mean of Pedcharge_hg multiplied by coefCharge_FF_Ped.
- Returns:
float: The mean of Pedcharge_hg.
- property meanPedLG: float#
Calculates and returns the mean of Pedcharge_lg multiplied by coefCharge_FF_Ped.
- Returns:
float: The mean of Pedcharge_lg.
- static plot_correlation(photoStat_gain, SPE_gain)[source]#
Plot the correlation between the photo statistic gain and the single photoelectron (SPE) gain.
- Return type:
Figure
- Args:
photoStat_gain (np.ndarray): Array of photo statistic gain values. SPE_gain (np.ndarray): Array of SPE gain values.
- Returns:
fig (plt.Figure): The figure object containing the scatter plot and the linear fit line.
- property sigmaChargeHG: float#
Calculates and returns the standard deviation of FFcharge_hg minus meanPedHG.
- Returns:
float: The standard deviation of FFcharge_hg minus meanPedHG.
- property sigmaChargeLG: float#
Calculates and returns the standard deviation of FFcharge_lg minus meanPedLG.
- Returns:
float: The standard deviation of FFcharge_lg minus meanPedLG.