BGlib.be.analysis.Fitter¶
- class BGlib.be.analysis.Fitter(h5_main, proc_name, variables=None, **kwargs)[source]¶
Creates a new instance of the abstract Fitter class
- Parameters:
h5_main (h5py.Dataset or pyUSID.io.USIDataset object) – Main datasets whose one or dimensions will be reduced
proc_name (str or unicode) – Name of the child process
variables (str or list, optional) – List of spectroscopic dimension names that will be reduced
h5_target_group (h5py.Group, optional. Default = None) – Location where to look for existing results and to place newly computed results. Use this kwarg if the results need to be written to a different HDF5 file. By default, this value is set to the parent group containing h5_main
kwargs (dict) – Keyword arguments that will be passed on to pyUSID.processing.process.Process
- __init__(h5_main, proc_name, variables=None, **kwargs)[source]¶
Creates a new instance of the abstract Fitter class
- Parameters:
h5_main (h5py.Dataset or pyUSID.io.USIDataset object) – Main datasets whose one or dimensions will be reduced
proc_name (str or unicode) – Name of the child process
variables (str or list, optional) – List of spectroscopic dimension names that will be reduced
h5_target_group (h5py.Group, optional. Default = None) – Location where to look for existing results and to place newly computed results. Use this kwarg if the results need to be written to a different HDF5 file. By default, this value is set to the parent group containing h5_main
kwargs (dict) – Keyword arguments that will be passed on to pyUSID.processing.process.Process
Methods
__init__
(h5_main, proc_name[, variables])Creates a new instance of the abstract Fitter class
compute
([override])Creates placeholders for the results, applies the
_unit_computation()
to chunks of the datasetdo_fit
(*args[, override])Computes the Fit
do_guess
(*args[, override])Computes the Guess
set_up_fit
([h5_partial_fit, h5_guess])Performs necessary book-keeping before do_fit can be called
set_up_guess
([h5_partial_guess])Performs necessary book-keeping before do_guess can be called
test
(**kwargs)Tests the process on a subset (for example a pixel) of the whole data.
use_partial_computation
([h5_partial_group])Extracts the necessary parameters from the provided h5 group to resume computation
Attributes
parms_dict
The name of the HDF5 dataset that should be present to signify which positions have already been computed This is NOT a fully private variable so that multiple processes can be run within a single group - Eg Fitter In the case of Fitter - this name can be changed from 'completed_guesses' to 'completed_fits' check_for_duplicates will be called by the Child class where they have the opportunity to change this variable before checking for duplicates