magrittetorch.model.sources.lineproducingspecies
Contains all species which produce lines.
- class magrittetorch.model.sources.lineproducingspecies.LineProducingSpecies(params: Parameters, dataCollection: DataCollection, lineproducingspeciesindex: int)
- compute_line_cooling(current_level_pops: Tensor, device: device, indices: Tensor | None = None) Tensor
- Computes the line cooling rate for each point, based on the given level populations
TODO: test whether memory error might occur for NLTE models with many levels; if so, consider adding memory management
- Parameters:
current_level_pops (torch.Tensor) – The current level populations. Has dimensions [parameters.npoints, linedata.nlev].
device (torch.device) – The device on which to compute.
indices (Optional[torch.Tensor], optional) – The indices of the points to consider. Defaults to None.
- Returns:
The line cooling rate. Has dimensions [parameters.npoints] and units W/m^3
- Return type:
torch.Tensor
- line_opacities: InferredTensorPerNLTEIter
Line opacities for this species, for all positions and all line transitions; dtype =
Types.FrequencyInfo, dims = [Parameters.npoints,Linedata.nrad], units = units.Hz*units.m**-1
- linequadrature: LineQuadrature
Line quadrature for this species
- population: InferredTensor
Level populations of this species; dtype =
Types.LevelPopsInfo, dims = [Parameters.npoints,Linedata.nlev], units = units.m**-3
- population_tot: InferredTensor
Number density of this species; dtype =
Types.LevelPopsInfo, dims = [Parameters.npoints], units = units.m**-3
- sorted_linefreqs: InferredTensor
Frequencies of the lines, sorted in ascending order; dtype =
Types.FrequencyInfo, dims = [Linedata.nrad], units = units.Hz
- sorted_linewidths: InferredTensorPerNLTEIter
Widths of the lines, sorted in according to the line frequencies; dtype =
Types.FrequencyInfo, dims = [Parameters.npoints,Linedata.nrad], units = units.Hz