NPredModel#
- class jolideco.models.NPredModel(exposure, psf=None, rmf=None, upsampling_factor=None)[source]#
Bases:
ModulePredicted counts model with multiple components
- Parameters:
exposure (~torch.Tensor) – Exposure tensor
psf (~torch.Tensor) – Point spread function
rmf (~torch.Tensor) – Energy redistribution matrix.
upsampling_factor (int) – Upsampling factor.
Initialize internal Module state, shared by both nn.Module and ScriptModule.
Attributes Summary
Shape of the NPred model
Shape of the NPred model
Methods Summary
forward(flux)Forward folding model evaluation.
from_dataset_numpy(dataset[, ...])Create NPred model from dataset
from_numpy(exposure, psf, upsampling_factor)Create NPred model from numpy arrays
Attributes Documentation
- shape#
Shape of the NPred model
- shape_upsampled#
Shape of the NPred model
Methods Documentation
- forward(flux)[source]#
Forward folding model evaluation.
- Parameters:
flux (~torch.Tensor) – Flux tensor
- Returns:
npred – Predicted number of counts
- Return type:
~torch.Tensor
- classmethod from_dataset_numpy(dataset, upsampling_factor=None, correct_exposure_edges=True)[source]#
Create NPred model from dataset
- Parameters:
- Returns:
npred_model – Predicted counts model
- Return type:
NPredModel