MakeDatatab

class sf3dmodels.rt.MakeDatatab(GRID)[source] [edit on github]

Bases: object

Base class for rt (radiative transfer) classes.

Methods Summary

submodel(self, prop[, output, fmt, folder, …]) Writes a preliminary model.

Methods Documentation

submodel(self, prop, output='0.dat', fmt='%.6e', folder='./Subgrids', lime_npoints=False, lime_header=False)[source] [edit on github]

Writes a preliminary model. This method must be used either from the radiative transfer class Lime or Radmc3d.

Motivation: the written submodel will tipically suffer further modifications from an external code or will be read back by sf3dmodels and merged in a global grid with other submodels. See Overlap.

Parameters:
prop : dict

Dictionary containing the model physical properties.

See the Notes section of Lime or Radmc3d for available physical properties.

output : str, optional

Submodel output file. Defaults to ‘0.dat’

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 prop keys. The keys in prop which were not specified in the fmt dict, will be written with the default format ‘%.6e’.

folder : str, optional

Sets the folder to write the files in. Defaults to ‘./Subgrids’.

Returns:
Data file with sorted columns according to the id’s table at the Notes section
of Lime or Radmc3d.
Attributes:
prop_header : dict

Dictionary relating the prop keys to their characteristic id according to the invoked radiative transfer class.

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 radiative transfer class.