Home | Trees | Indices | Help |
---|
|
Star class maintains information about a stellar model and its properties.
Inherits from dict.
|
|||
Star() |
|
||
any |
|
||
bool |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
string |
|
||
string |
|
||
Molecule() |
|
||
Transition() |
|
||
|
|||
list[Transition()] |
|
||
str |
|
||
array |
|
||
array |
|
||
array |
|
||
array or (array,string) |
|
||
array |
|
||
array |
|
||
array |
|
||
array |
|
||
str |
|
||
array |
|
||
|
|||
float or (array,array) |
|
||
(array,array) |
|
||
tuple(str) |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
Inherited from |
|
|||
Inherited from |
|
Initiate an instance of the STAR class.
|
Overriding the standard dictionary __getitem__ method.
|
Overriding the standard dictionary __cmp__ method. A parameter set (dictionary of any type) is compared with this instance of Star(). An attempt is made to create keys with values in each dict, if the other has keys that are not present in the first. If this fails, False is returned.
|
When requesting the list of dust species, all dust species with nonzero abundance are returned. The list is created here, and remembered. When this is done, the dust properties are also read for those species. The info is saved in self.dust. The dust list itself can be accessed through getDustList(). This method also calls the readDustProperties method to ensure all info is always available. self.dust_list has a fixed order of appearance, according to Dust.dat. Important for, e.g., MCMax.py. |
Add Star parameters from the cooling database. Any existing parameters are overwritten! |
Write dust mass density and n(h2) profile (in Rstar). Only if MCMax or GASTRoNOoM model_id is available! |
Remove mutable parameters after an MCMax run. This method is accessed by the ComboCode package whenever necessary. The user should not have to do this.
|
Remove mutable parameters after a GASTRoNOoM run. This method is accessed by the ComboCode package whenever necessary. The user should not have to do this.
|
Update variable information in the molecule instances of this star.
|
Normalize the dust abundances such that they add up to a total of 1. If the MRN_DUST keyword for MCMax is nonzero, all nonzero abundances are set to 1. The abundance given in the inputfile does not matter in this case. |
Take molecular transitions from a line list and wavelength range. Based on the GASTRoNOoM radiat and indices data files. See Molecule.py for more info. |
Search input list for minimum temperature. Method prints the actual minimum T for which the model was calculated. Note that the density drops to zero gradually and that the criterium has to be sudden change of slope. Check criterium if the printed T is not good enough as determination of max radius IS correct. |
Get the full name of a molecule, based on it's short name, if it is present in the GAS_LIST.
|
Get the short name of a molecule, based on it's full name, if it is present in the GAS_LIST.
|
Get a Molecule() object based on the molecule name. A Star() object always has only one version of one molecule.
|
Return a Transition() object that has the same parameters as sample. The comparison is done based on the str representation of the trans. This excludes the dictionary entries of the transition! The actual model ids or data are not included in this comparison! None is returned if no match is found.
|
Return a list of all transitions associated with a single molecule.
|
Return the dust output filename for density and temperature. You can choose the species for which the output file is retrieved. Unless thermal contact for this model is on.
|
Return the dust radial grid in cm, au or Rstar.
|
Return the dust theta grid in radians. This is the angular grid goin from pole at zero radians to equator at pi/2 radians.
|
Return the dust density profile from the file made for MCMax. self.getDustRad returns the radial grid associated with this profile. self.getDustTheta returns the angular grid associated with this profile if angular averaging is off. An empty array is returned if the model does not exist. Note that MCMax is a 2D code. By default, the theta coordinate (angle pole-equator) is averaged out. This can be turned off, in which case the full density grid is returned giving rho at (r_0,t_0),...,(r_0,t_n), (r_1,t_0),...,(r_1,t_n),...,(r_n,t_0),...,(r_n,t_n).
|
Return the dust temperature profile from MCMax model. self.getDustRad returns the radial grid associated with this profile. self.getDustTheta returns the angular grid associated with this profile if angular averaging is off. An empty array is returned if the model does not exist. The total dust temperature without separate components for the different dust species is returned if no species is requested or if thermal contact is on. Note that MCMax is a 2D code. By default, the theta coordinate (angle pole-equator) is averaged out. This can be turned off, in which case the full temperature grid is returned giving T at (r_0,t_0),..., (r_0,t_n),(r_1,t_0),...,(r_1,t_n),...,(r_n,t_0),...,(r_n,t_n).
|
Give the n(h2) number density profile of the gas read from a GASTRoNOoM model. Additional input keywords for self.getCoolFn() can be passed along. An empty is returned in case no model is available.
|
Give the velocity profile of the gas read from a GASTRoNOoM model. Additional input keywords for self.getCoolFn() can be passed along. An empty is returned in case no model is available.
|
Give the temperature profile of the gas read from a GASTRoNOoM model. Additional input keywords for self.getCoolFn() can be passed along. An empty is returned in case no model is available.
|
Return the gas radial grid in cm, AU or Rstar. Additional input keywords for self.getCoolFn() can be passed along. An empty is returned in case no model is available.
|
Return the cooling output filename. You can define the type of cooling file you want, as well as an additional identification string for the molecule/sampling.
|
Read the n_h2 number density profile and calculate the total gas or dust density profile from that. This requires a GASTRoNOoM cooling model to have been calculated. The gas density is simply calculated by multiplying with the mass of molecular hydrogen. The dust density is calculated by multiplying the H_2 density with the dust-to-gas ratio. The radial dependence of the velocity profiles is taken into account. Not the radial dependence of the mass-loss rate, but CC assumes the d2g ratio remains constant in case of variable mass-loss rate.
|
Calculate the optical depth. If wavelength keyword is given, tau at wavelength is returned. Otherwise, the full wavelength array is returned.
|
Return the wavelength and kappas weighted with their respective dust mass fractions. Typically you only want the absorption coefficients because GASTRoNOoM does not take into account scattering. You could try approximating the effect of scattering on the acceleration, but at this point this is not taken into account accurately.
|
Return (and initialize) the list of nonzero abundance dust species in the model.
|
Set the default value of N_QUAD to 100. Only used when auto selecting transition based on a wavelength range. |
Set the default value of LS_OFFSET to 0.0. Only used when auto selecting transitions based on a wavelength range. |
Stefan-Boltzmann's law. Star() object needs to have at least 2 out of 3 parameters (T,L,R), with in L and R in solar values and T in K. The one missing parameter is calculated. This method does nothing if all three are present. |
Set the default value of F_CONT_TYPE to MCMax. This is the type of derivation of measured continuum fluxes. Can be: ISO, MSX, PHOT, MCMax |
Calculate the outflow rate of H2O, by multiplying the H2O abundance with the mass-loss rate. Value is set in units of Msun/yr |
Find the dust temperature at the inner radius in Kelvin. Taken from last mcmax model, and defined by the dust species able to exist at the highest temperature; if no mcmax model is present, the temperature is taken to be zero, indicating no inner radius T is available. |
Set default value of sphinx/mline specific d2g ratio to the semi-empirical d2g ratio, ie based on MDOT_DUST and MDOT_GAS. In order to turn this off, set this parameter to 0 in the input file, in which case the iterated acceleration d2g ratio is used. Both MDOT_GAS and MDOT_DUST have to be defined explicitly if this parameter is not. This parameter has to be defined explicitly if one of MDOT_GAS and MDOT_DUST is not defined explicitly. Note that the DUST_TO_GAS keyword is the internal representation of the dust_to_gas ratio and should never be explicitly defined. For all practical purposes, use DUST_TO_GAS_CHANGE_ML_SP. |
Calculate the inner radius from MCMax output in stellar radii. If no MCMax model is calculated yet, R_{i,d} is the stellar radius. Else, the inner dust radius is taken where the density reaches a threshold, defined by R_INNER_DUST_MODE:
Unless defined in the CC input file, the dust radius is updated every time a new iteration starts. If no MCMax model is known, and destruction temperature iteration is off, the inner radius is 2 stellar radii for calculation time reasons. |
The mode of calculating the inner radius from MCMax output, if present. Can be ABSOLUTE (dens>10**-50) or RELATIVE (dens[i]>dens[i+1]*0.01). CLASSIC reproduces the old method. Set here to the default value of ABSOLUTE. |
The mode of determining the dust temp profile. Only for testing purposes.
|
Calculating average specific density of dust shell. This is based on the input dust species abundances and their specific densities. |
Sets to None if not present yet. Note that this is an index if it IS present, and can be zero. Always check with None instead of boolean. |
Set the type of drift between dust and gas taken into account. Is either consistent (from momentum transfer calculation or zero). |
Find terminal drift velocity from last calculated GASTRoNOoM model. Units are km/s and is given for grain size 0.25 micron. If no GASTRoNOoM model exists, the drift is taken to be 0. |
Calculate the total dust mass based on the requested denstype prescription. The dust mass is set in solar masses. If Denstype == 'POW': Find total dust mass, based on sigma_0 in the case of a power law. In all other cases, the dust mass is calculated from the density profile of the GASTRoNOoM model after correcting for d2g ratio, for now. Note that in the latter case the dust mass will be an upper limit when compared to the actual dust mass determined by MCMax, if tdesiter is on: Some of the dust in the density profile will be destroyed based on the condensation temperature. Only in the case of denstypes POW and MEIXNER this dust mass is actually used as input for MCMax. This never takes into account the MCMax output. To retrieve the dust mass calculated with MCMax, check the MCMax log file. Currently GASTRoNOoM is never calculated first, so giving this as input does not yet work for any denstype other than POW. The value returned is correct, however. When implemented, 2 iterations will be required. |
Calculate the value of MDOT_DUST from the DUST_TO_GAS_RATIO_ML_SP. Requires MDOT_GAS and VEL_INFINITY_GAS to be defined. This parameter is recalculated after every iteration and updates V_EXP_DUST in the equation. MDOT_DUST can be given explicitly in the inputfile in which case it remains unchanged. MDOT_DUST is used to calculate the real DUST_TO_GAS ratio parameter. So through explicit definition of 2 parameters out of MDOT_GAS, MDOT_DUST and DUST_TO_GAS_CHANGE_ML_SP you can control what the internal dust-to-gas ratio should be. If DUST_TO_GAS_CHANGE_ML_SP is not given, MDOT_DUST and MDOT_GAS have to be defined explicitly. |
Calculate the value of MDOT_GAS from the DUST_TO_GAS_RATIO_ML_SP. Requires MDOT_DUST and VEL_INFINITY_GAS to be defined. This parameter is recalculated after every iteration and updates V_EXP_DUST in the equation. MDOT_GAS can be given explicitly in the inputfile in which case it remains unchanged. MDOT_GAS is used to calculate the real DUST_TO_GAS ratio parameter. So through explicit definition of 2 parameters out of MDOT_GAS, MDOT_DUST and DUST_TO_GAS_CHANGE_ML_SP you can control what the internal dust-to-gas ratio should be. If DUST_TO_GAS_CHANGE_ML_SP is not given, MDOT_GAS has to be defined explicitly. |
Set the order of magnitude of SHELLMASS = Mdot/v_inf. 0: Mdot/v_inf < 5e-8 1: 5e-8 <= Mdot/v_inf < 2e-7 2: 2e-7 <= Mdot/v_inf < 5e-7 3: 5e-7 <= Mdot/v_inf |
Set the order of magnitude of MDOT. 0: Mdot < 3e-7 1: 3e-7 <= Mdot < 3e-6 2: 3e-6 <= Mdot < 1e-5 3: 1e-5 <= Mdot |
Set the order of magnitude of SHELLCOLDENS. 0: scd < 0.06 1: 0.06 <= scd < 0.15 2: 0.15 <= scd < 0.4 3: 0.4 <= scd |
Set the order of magnitude of L_STAR. 0: lstar < 6000 1: 6000 <= lstar < 8000 2: 8000 <= lstar < 10000 3: 10000 <= lstar |
Set the default scattering type for MCMax to 'ISOTROPIC'. Can also be 'NONE', or 'FULL'. 'FULL' requires dust opacity .particle files with full scattering matrices. |
Set the order of magnitude of T_STAR. 0: tstar < 2000 1: 2000 <= tstar < 2200 2: 2200 <= tstar < 2500 3: 2500 <= tstar |
Set the order of magnitude of VEL_INFINITY_GAS 0: vg < 10 1: 10 <= vg < 15 2: 15 <= vg < 20 3: 20 <= vg |
Calculate dust terminal velocity from gas terminal velocity and drift. Given in km/s. |
A boolean flag for applying interstellar reddening or not. This is model (read: distance) dependent, hence belongs in Star() objects. Having this available here makes it possible to compare using reddening or not. Default value is set to 0. |
The interstellar extinction map used for determining the interstellar extinction in K-band at a given distance, in the direction of given longitude and latitude (set in Star.dat). Default is Marshall et al. 2006 (marshall), but is replaced by Drimmel et al. 2003 (drimmel) in case ll and bb are outside the range of availability in Marshall. Alternatives are Arenou et al. 1992 (arenou) and Schlegel et al. 1998 (schlegel). |
The extinction law used to redden model spectra. Default is the combination of the laws by Fitzpatrick et al. 2004 (Optical) and Chiar & Tielens 2006 (IR), see IvS repo for more details at cc.ivs.sed.reddening. Alternatives include cardelli1989, donnell1994, fitzpatrick1999, fitzpatrick2004, chiar2006. |
Set the default value of MCMax ray-tracing outputfolder to empty. The output model observations are then saved in the model output folder. |
Calculate the maximum existence radii for dust species. Based on T_MIN_SPECIES for the species, and derived from mcmax output. If not MCMax model available, a power law is assumed. If T_MIN is not given, no boundaries are assumed. Is given in solar radii.
|
Find the max temperature at which a dust species can exist. First, the CC inputfile is searched for T_MAX_SPECIES, in which case the sublimation temperature is constant. T_MAX is never made by Star()! If not present, Dust.dat info is taken, being either a sublimation temperature, or the coefficients to calculate a pressure dependent sublimation temperature. These are set using T_DESA_ and T_DESB_SPECIES Note that tdesa and tdesb from Dust.dat are the coefficients given in Kama et al 2009. MCMax uses a slightly different definition, and the notation has crossed that of the paper. In any case, MCMax's definition of tdesa and tdesb is defined as shown here. This assumes TDESITER to be on.
|
Define the type of density distribution. Default is 'MASSLOSS' for first iteration, otherwise SHELLFILE. If second iteration, a DENSFILE is created taking into account the acceleration zone. This file is only created if not already present. The dust density profile is calculated from the h2 number density, after scaling to the dust mass-loss rate and correcting for the dust velocity profile. |
Calculate the average mass per shell of the circumstellar envelope. Calculated by Mdot_gas/vexp. |
Calculate a proxy for the average column density of the circumstellar shell. This is (intuitively) rho * R_STAR, which is important for radiative excitation (density tracing the source of the radiation, R_STAR setting the scale of the envelope). Two types of radiative excitation can be related to this: direct stellar light, and thermal dust emission. Especially important for water, but in a balance with other excitation mechanisms. Note that this quantity is also related to the optical depth through tau = kappa*coldens. |
Calculate a proxy for the average degree of collisional excitation in the circumstellar shell. This is (intuitively) sqrt(rho * rho * R_STAR): two density factors tracing both collisional partners, and R_STAR setting the scale of the envelope. Sqrt is taken for easy comparison between this and the mass-loss rate to which it is directly proportional. Especially important for CO, but also to some degree for water where it is in balance with other excitation mechanisms. Calculated by taking SHELLDENS**2*R_STAR ~ R_STAR^3/2. |
Set the default balue for MRN_NGRAINS to the max number of dust species involved. This means that all dust species are treated in the mrn treatment of MCMax. If the max is set to less species, then the extra species are treated as normal, with manually set abundances. |
Set the default value for the maximum grain size in micron. Abundances of bigger grains will be set to 0. |
Set the default value for the minimum grain size in micron. Abundances of smaller grains will be set to 0. |
Set default of self-consistent settling to True. Only relevant if SCSET == 1. |
Set the GAS_LIST keyword based on the MOLECULE keyword. The input MOLECULE format from the CC input is converted into Molecule() objects. |
Set KEYWORD_DUST_TEMPERATURE_TABLE to False for now. If it was not yet defined, there is not ftemperature file anyway. |
Set NUMBER_INPUT_DUST_TEMP_VALUES to length of input file for dust temp If it does not exist set to 0. |
Look for the temperature stratification of the star. If a last mcmax model is available, the filename is given, (for now 2d). Else an empty string is given, and a power law is used in GASTRoNOoM. |
Making transition line input for gas data (auto search) and additional no-data lines. The Transition() objects are created then for these lines and added to the GAS_LINES list. |
Set the keyword INCLUDE_SCAT_GAS to 0. The keyword decides whether to take into account the scattering coefficients in GASTRoNOoM as if they contributed to the absorption coefficients. |
Making extinction efficiency input files for GASTRoNOoM from MCMax output mass extinction coefficients. If no MCMax output available, this file is temdust.kappa, the standard. In units of cm^-1, Q_ext/a. |
Calculate the radial OH maser peak distance in cm. Taken from Netzer & Knapp 1987, eq. 29. The interstellar radiation factor is taken as A = 5.4 (avg Habing Field) |
Try to resolve a missing key.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Mon Nov 7 18:01:57 2016 | http://epydoc.sourceforge.net |