NPredCalibration#

class jolideco.models.NPredCalibration(shift_x=0.0, shift_y=0.0, background_norm=1.0, frozen=False)[source]#

Bases: Module

Dataset calibration parameters

shift_x#

Shift in x direction

Type:

~torch.Tensor

shift_y#

Shift in y direction

Type:

~torch.Tensor

background_norm#

Background normalisation parameter

Type:

~torch.Tensor

frozen#

Whether to freeze component.

Type:

bool

Initialize internal Module state, shared by both nn.Module and ScriptModule.

Attributes Summary

background_norm

Background norm

Methods Summary

__call__(flux, scale)

Apply affine transform to calibrate position.

from_dict(data)

Create calibration model from dict

parameters([recurse])

Parameter list

to_dict()

Convert calibration model to dict, with simple data types.

Attributes Documentation

background_norm#

Background norm

Methods Documentation

__call__(flux, scale)[source]#

Apply affine transform to calibrate position.

Parameters:
  • flux (~torch.Tensor) – Flux tensor

  • scale (float) – Upsampling factor scale.

Returns:

flux – Flux tensor

Return type:

~torch.Tensor

classmethod from_dict(data)[source]#

Create calibration model from dict

Parameters:

data (dict) – Parameter dict.

Returns:

calibration – Calibration model.

Return type:

NPredCalibration

parameters(recurse=True)[source]#

Parameter list

to_dict()[source]#

Convert calibration model to dict, with simple data types.

Returns:

data – Parameter dict.

Return type:

dict