It appears that most of the code needed to perform a fit on source weights, spectral index and number of source weights is already included in the flarestack.core.minimisation.FitWeightMinimisationHandler class. The minimization is performed in the run_trial method, and is called during execution of submitter.analyse(). Another class that is relevant to this execution is the flarestack.core.multiprocess_wrapper.MultiProcessor class. Two methods of this class in particular are relevant to creation and execution of the minimizer, __init__ where process instances are created and started, and run_trial which ultimately calls run_trial and performs the minimization.
In short, adding something to the effect of the following should put us in the right direction towards adding HMC to Flarestack.
@MinimisationHandler.register_subclass("fit_weights_hmc")
class FitWeightHMCMinimisationHandler(FitWeightMinimisationHandler):
def run_trial(self, full_dataset):
...
return ...
It appears that most of the code needed to perform a fit on source weights, spectral index and number of source weights is already included in the
flarestack.core.minimisation.FitWeightMinimisationHandler
class. The minimization is performed in therun_trial
method, and is called during execution ofsubmitter.analyse()
. Another class that is relevant to this execution is theflarestack.core.multiprocess_wrapper.MultiProcessor
class. Two methods of this class in particular are relevant to creation and execution of the minimizer,__init__
where process instances are created and started, andrun_trial
which ultimately callsrun_trial
and performs the minimization.In short, adding something to the effect of the following should put us in the right direction towards adding HMC to Flarestack.