The function models a spectrum by solving the radiative transfer equation for an isothermal object in one dimension, called detection equation. Furthermore, non-extended sources and dust attenuation is considered.
Input parameters:
-
FreqMin: start frequency of simulated spectrum (in MHz), (default: 0).
-
FreqMax: end frequency of simulated spectrum (in MHz), (default: 1e8).
-
FreqStep: step frequency of simulated spectrum (in MHz), (default: 1).
-
vLSR: velocity (local standard of rest) in km s-1 (default: 0) used in the calculation of the synthetic spectra, i.e. all velocity offsets described in the molfit file have to be defined relative to the vLSR parameter. Additionally, XCLASS considers the vLSR parameter for the determination of the transition frequencies contained in the database: For each frequency range, XCLASS shifts the lowest and highest frequency by vLSR (e.g. to describe lines in high-redshifted galaxies) and expands each range by taking the lowest and highest velocity offset defined in the molfit file into account. This offers the possibility to describe lines which are located at the edges of the frequency ranges.
-
TelescopeSize: for single dish observations (Inter_Flag = F): TelescopeSize describes the size of telescope (in m), (default: 1); for interferometric observations (Inter_Flag = T): TelescopeSize describes the interferometric beam FWHM size (in arcsec), (default: 1).
-
t_back_flag (T/F): defines, if the user defined background temperature Tbg and temperature slope Tslope given by the input parameters tBack and tslope describe the continuum contribution completely (t_back_flag = T) or not (t_back_flag = F) (default: T).
-
tBack: background temperature (in K), (default: 0).
-
tslope: temperature slope (dimensionless), (default: 0).
-
nH_flag (T/F): defines, if column density, spectral index for dust and kappa are given by the molfit file (F) or if nH_flag is set to T, the following three parameters define the H density, spectral index for dust and kappa for all components (default: T).
-
N_H (has to be given only if nH_flag is set to T): Hydrogen column density (in cm-2 ), (default: 1e24 ).
-
beta_dust (has to be given only if nH_flag is set to T): spectral index for dust (dimensionless), (default: 0.1).
-
kappa_1300 (has to be given only if nH_flag is set to T): kappa at 1.3 mm (cm2 g-1 ), (default: 0.01).
-
MolfitsFileName: ABSOLUTE path and name of the molfit file, including the source_size (in arcsec), T_rot (rotation temperature in K), N_tot (total column density in cm−2 ), V_width (velocity width in km s-1 ), V_off (velocity offset in km s-1 ), AbsorptionFlag (core or foreground).
-
iso_flag: use isotopologues (T/F). If iso_flag is set to T isotopologues defined in the iso ratio file are used (default: F).
-
IsoTableFileName (has to be given only if iso_flag is set to T): ABSOLUTE path and file name of an ASCII file including the iso ratios between certain molecules. The so-called "iso ratio file" defines the iso ratios between molecules. The ASCII file consists of three columns, where the first two columns indicates the molecules, respectively. The third column defines the ratio for both molecules. The columns are separated by blanks or tabs. So, the names of the molecules must not contain blanks. Comments have to be marked with the "%" sign, i.e. all characters on the right side of a "%" sign are ignored.
-
RestFreq: rest frequency in MHz (default: 0). (If this parameter is unequal zero, the intensity is also plotted against velocity (in km s−1 ) using parameter vLSR, see above.
Output parameters:
-
myXCLASSspectrum: contains the calculated myXCLASS spectrum. If RestFreq is unequal zero, the myXCLASS function adds a column to the output parameter myXCLASSspectrum which contains the velocities. So, for a rest frequency unequal zero, the parameter myXCLASSspectrum represents a python array with three columns, where the first column describes the frequencies, the second column describes the velocities and the third column the corresponding intensities.
-
myXCLASSlog: contains the corresponding log file.
-
myXCLASSTrans: (python) list containing the transition frequencies (in MHz) from the last myXCLASS run, the Doppler-shifted transition frequencies (in MHz), the corresponding absolute and integrated intensities (in K), the energy of the lower level (in K and K MHz), the upper state degeneracy, the Einstein A coefficient (in s-1), and the molecule names within the defined range.
-
myXCLASSIntOptical: contains intensities and optical depths for each molecule and component.
-
myXCLASSJobDir: absolute path of the job directory created for the current run.
Examples:
- generate a synthetic spectrum
# In CASA: FreqMin = 210000.0 FreqMax = 230000.0 FreqStep = 0.1 t_back_flag = True tBack = 0.0 tslope = 0.0 nH_flag = True N_H = 1.e24 beta_dust = 0.0 kappa_1300 = 0.00 iso__flag = True IsoTableFileName = "my_isotopologues_ratio.txt" MolfitsFileName = "molecules.molfit" model, log, trans, IntOptical, JobDir = myXCLASS()
Output:
Start function myXCLASS: Creating job directory for current myXCLASS run: XCLASS/run/myXCLASS/job__14-06-2017__21-02-05__59697553/ .. done! All files of the current myXCLASS run are stored here! Copy molfits file to temp directory XCLASS/run/myXCLASS/job__14-06-2017__21-02-05__59697553/ .. done! Reading command line parameters .. done! Frequency minimum = 2.100000000000000E+05 Frequency maximum = 2.300000000000000E+05 Frequency stepsize = 1.000000000000000E-01 telescope size = 1.000000000000000E+00 Interferrometer flag = F Background temperature flag = T Background temperature = 0.000000000000000E+00 Temperature slope = 0.000000000000000E+00 N_H flag = T N_H = 1.000000000000000E+24 beta dust = 0.000000000000000E+00 kappa = 0.000000000000000E+00 v_LSR = 0.000000000000000E+00 Instance filename = XCLASS/run/myXCLASS/job__14-06-2017__21-02-05__59697553/parameter.xml Iso flag = F dbName = XCLASS/Database/cdms_sqlite.db Reading parameters from file .. done! Reading partition functions for all molecules from sqlite3 database .. done! Number of entries = 1 Molecule in database: CH3CN;v=0; Reading parameters for radiative transitions for all molecules from sqlite database .. done! Number of transitions for each frequency range and molecule: Frequency range: 2.100000000000000E+05 MHz - 2.300000000000000E+05 MHz: Number of transitions for molecule "CH3CN;v=0;": 36 myXCLASS finished! Import calculated myXCLASS spectrum .. done! Read in intensities for each molecule and for each component .. done! Read in optical depths for each molecule and for each component .. done! All files of the current myXCLASS run are stored in the job directory XCLASS/run/myXCLASS/job__14-06-2017__21-02-05__59697553/!
Example scripts:
"my_plot_INcasa.py", "my_plot_OUTcasa.py"