nectarchain.makers.component.spe.spe_algorithm.SPEHHValgorithm#
- class SPEHHValgorithm(pixels_id, charge, counts, config=None, parent=None, **kwargs)[source]#
Bases:
SPEnominalalgorithmClass to perform fit of the SPE HHV signal with
nandppfree.Initializes the FlatFieldSingleHHVSPEMaker object.
- Parameters:
- chargenp.ma.masked_array or array-like
The charge data.
- countsnp.ma.masked_array or array-like
The counts data.
- ``*args``
Additional positional arguments.
- ``**kwargs``
Additional keyword arguments.
Methods
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_chargesContainerCreates an instance of FlatFieldSingleHHVSPEMaker using charge and counts data from a ChargesContainer object.
displayDisplay and save the plot for each specified pixel ID.
from_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_single_matplotlibGenerate a plot of the data and a model fit for a specific pixel.
plot_single_pyqtgraphread_param_from_yamlReads parameters from a YAML file and updates the internal parameters of the FlatFieldSPEMaker class.
runrun_fitPerform a fit on a specific pixel using the Minuit package.
section_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
chargeReturns a deep copy of the
__chargeattribute.chunksizeThe chunk size for multi-processing
configA trait whose value must be an instance of a specified class.
countsReturns a deep copy of the
__countsattribute.cross_validation_lockA contextmanager for running a block with our cross validation lock set to True.
multiprocflag to active multi-processing
npixelsnprocThe Number of cpu used for SPE fit
orderThe order of the polynome used in the savgol filter algorithm
parametersThe name of the SPE fit parameters file
parentA trait whose value must be an instance of a specified class.
pixels_idresultsThe tolerance used for minuit
window_lengthThe windows leght used for the savgol filter algorithm
- parameters_file#
The name of the SPE fit parameters file
- tol#
The tolerance used for minuit