MAPDeconvolver#
- class jolideco.core.MAPDeconvolver(n_epochs=1000, beta=1, learning_rate=0.1, compute_error=False, stop_early=False, stop_early_n_average=10, device='cpu', display_progress=True, optimizer='adam')[source]#
Bases:
objectMaximum A-Posteriori deconvolver
- stop_early#
Stop training early, once the average results on the last n test datasets do not improve any more.
- Type:
- device#
Pytorch device
- Type:
~pytorch.Device
- optimizer#
Optimizer to use
- Type:
{“adam”, “sgd”}
Methods Summary
run(datasets[, datasets_validation, ...])Run the MAP deconvolver
to_dict()Convert deconvolver configuration to dict, with simple data types.
Methods Documentation
- run(datasets, datasets_validation=None, components=None, calibrations=None)[source]#
Run the MAP deconvolver
- Parameters:
datasets (dict of [str, dict]) – Dictionary containing a name of the dataset as key and a dictionary containing, the data like “counts”, “psf”, “background” and “exposure”.
datasets_validation (dict of [str, dict]) – Dictionary containing a name of the validation dataset as key and a dictionary containing, the data like “counts”, “psf”, “background” and “exposure”.
components (FluxComponents or FluxComponent) – Flux components.
calibrations (NPredCalibrations) – Optional model calibrations.
- Returns:
flux – Reconstructed flux.
- Return type:
~numpy.ndarray