Lime¶
-
class
sf3dmodels.rt.Lime(GRID)[source] [edit on github]¶ Bases:
sf3dmodels.rt.MakeDatatabBase class for lime related objects. Contains base functions to write formatted files to perform Radiative Transfer calculations with LIME.
- Input and output units: SI (metres, kilograms, seconds).
Parameters: - GRID :
Struct Grid structure in which the model was computed.
Notes
Available grid [0,1,2,3] and physical properties for Lime, their id and description:
prop key id Description id 0 cell id x 1 x coordinate y 2 y coordinate z 3 z coordinate dens_H2 4 Molecular Hydrogen density dens_p_H2 5 ParaHydrogen density dens_o_H2 6 OrthoHydrogen density dens_e 7 Electronic density dens_H 8 Atomic Hydrogen density dens_He 9 Helium density dens_Hplus 10 Ionized Hydrogen density temp_gas 11 Gas temperature temp_dust 12 Dust temperature vel_x 13 Velocity along x-axis vel_y 14 Velocity along y-axis vel_z 15 Velocity along z-axis abundance_0 16 Molecular abundance(s) abundance_1 … abundance_n gtdratio 17 Gas-to-dust (mass) ratio doppler 18 Doppler broadening via turbulence 4242 End of file in header.dat Methods Summary
finalmodel(self, prop[, fmt, folder])Writes the final model into file. Methods Documentation
-
finalmodel(self, prop, fmt='%.6e', folder='./')[source] [edit on github]¶ Writes the final model into file. The output is ready to be read with LIME
Parameters: - prop : dict
Dictionary containing the model physical properties.
See the Notes section above for a list with the available input properties.
- fmt : str or dict, optional
If str: Format string for all the columns. Defaults to ‘%.6e’.
If dict: the input keys of the dictionary must be present in the
propkeys. The keys inpropwhich were not specified in thefmtdict, will be written with the default format ‘%.6e’.- folder : str, optional
Sets the folder to write the files in. Defaults to ‘./’.
Returns: - ‘datatab.dat’ : file
Data file made from the
prop’s content. The columns are sorted according to the id’s table in the Notes section of theLimeclass.- ‘npoints.dat’ : file
File containing the number of columns in ‘datatab.dat’, the number of cells along x,y,z, and the total number of cells.
- ‘header.dat’ : file
File specifying the column ids according to the table in the Notes section of the
Limeclass.- ‘x.dat’ : file
- ‘y.dat’ : file
- ‘z.dat’ : file
Examples
- Have a look at the following folders on the GitHub repository:
Attributes: - prop_header : dict
Dictionary relating the input prop keys to their characteristic id according to the Lime requirements.
- prop_keys : array_like
Array object containing the column names of the physical properties written into file.
- columns : array_like
Array object containing all the column names written into file. The prop columns are sorted based on their characteristic id from the Lime class.