magrittetorch.model.model

Class encompassing the entire model.

class magrittetorch.model.model.Model(save_location: str)
__init__(save_location: str) None

Initializes the model, and specifies the location to save/read the model to/from.

Parameters:

save_location (str) – Location of the hdf5 file to save/read the model to/from

get_boundary_intensity(point_indices: Tensor, freqhelper: FrequencyEvalHelper, doppler_shift: Tensor, device: device) Tensor

Computes the boundary intensity for the given boundary points and frequencies

Parameters:
  • point_indices (torch.Tensor) – Indices of the boundary points. Has dimensions [NPOINTS]

  • freqhelper (FrequencyEvalHelper) – Frequencies to evaluate. Has dimensions [NPOINTS, NFREQS]

  • doppler_shift (torch.Tensor) – Doppler shift with respect to the boundary points. Has dimensions [NPOINTS]

  • device (torch.device) – Device on which to compute and return the result

Returns:

The boundary intensity. Has dimensions [NPOINTS, NFREQS]

Return type:

torch.Tensor

read(legacy_mode: bool = False) None

Reads the model from the save location

Parameters:

legacy_mode (bool, optional) – If False, reads a Magrittetorch model. If True, reads a Magritte model. Defaults to False.

write() None

Writes the model to the save location

chemistry: Chemistry

Chemistry module

dataCollection: DataCollection

DataCollection

geometry: Geometry

Geometry module

images: list[Image]

List of images

io: IO

IO module

parameters: Parameters

Model parameters

sources: Sources

Sources module

thermodynamics: Thermodynamics

Thermodynamics module