Tutorial: GetTransitions function

Similar to the ListDatabase function, the GetTransitions function displays informations from the embedded database about transitions within a user-defined frequency range. Here, the frequency range selection is done in an interactive way. Therefore, the GetTransitions function starts a graphical user interface (GUI) which describes observational data (defined by parameter expdata) within a frequency range defined by the parameters FreqMin and FreqMax. Additionally, the functions offers the possibility to plot a synthetic spectrum (defined by parameter modeldata) of a previous myXCLASS or myXCLASSFit function call as well.
 

Input parameters:

  • expdata: 2D numpy array containing the observational data.

  • modeldata: 2D numpy array containing the synthetic spectrum.

  • FreqMin: minimum frequency (in MHz) for the observational data (default: 0).

  • FreqMax: maximum frequency (in MHz) for transitions in the transitions table (default: 1.e8)

  • SelectMolecule: a (python) list containing the names of all molecules which should be considered or a string defining the path and the name of an ASCII file including the molecules which should be selected.

  • FrequencyWidth: defines the width of the frequency interval in MHz (selected central frequency ±FrequencyWidth where the line informations are printed out to the screen. (default: 5).

  • ElowMin: minimum for lower energy (in K) (default: 0),

  • ElowMax: maximum for lower energy (in K) (default: 1.e6)

Output parameters:

  • None

Examples:

  • list all transitions within given frequency range

    # In CASA:
    expdata = LoadASCIIFile()
    FreqMin = 580102.0
    FreqMax = 580546.5
    SelectMolecule = ""
    FrequencyWidth = 5.0
    ElowMin = 0.0
    ElowMax = 1000.0
    GetTransitions()

    GUI:

    GetTransitionGUI

    Output:

     
    Analyze selected molecules ..
     
    Connection to sqlite3 database Database/cdms_sqlite.db established.
     
     
    Press right mouse button to select central frequency.
    Close plot window to exit GetTransition function.
    
    
    
    Please wait ..
    
    
    Contents of the database between 580224.513343 MHz and 580234.513343 MHz:
    
                        Name:          quantum number upper state:          quantum number lower state:  Frequency [MHz]:  Error Frequency [MHz]:    Einstein A coefficient:     Energy_low [K]:
                      S4;v=0;   X; vibSym = +; J = 38; Ka = 11;...   X; vibSym = -; J = 37; Ka = 6; ...      580227.90040              3.7350e-01                  2.525e-09             127.270 
                      S4;v=0;   X; vibSym = -; J = 40; Ka = 24;...   X; vibSym = +; J = 40; Ka = 19;...      580225.24760              1.9000e-01                  2.021e-09             196.205 
                  ClOOCl;v=0;          X; J = 47; Ka = 7; Kc = 40;          X; J = 46; Ka = 4; Kc = 43;      580226.50930              9.4270e-01                  1.725e-06             242.975 
                    CaOH;v=0;                 X; J = 29.5; N = 29;                 X; J = 28.5; N = 28;      580227.59020              1.5150e-01                  2.399e-03             387.547 
                    HDCO;v=0;            X; J = 9; Ka = 6; Kc = 3;            X; J = 8; Ka = 6; Kc = 2;      580226.76300              2.5000e-02                  3.249e-03             394.488 
                    HDCO;v=0;            X; J = 9; Ka = 6; Kc = 4;            X; J = 8; Ka = 6; Kc = 3;      580226.76300              2.5000e-02                  3.249e-03             394.488 
                     HO3;v=0;   X; J = 29.5; N = 29; Ka = 4; Kc...   X; J = 29.5; N = 29; Ka = 2; Kc...      580225.26910              9.0636e+00                  2.622e-06             407.360 
                     HO3;v=0;   X; J = 29.5; N = 29; Ka = 4; Kc...   X; J = 29.5; N = 29; Ka = 2; Kc...      580224.93870              9.0635e+00                  2.622e-06             407.360 
               s-C2H5CHO;v=0;         X; J = 54; Ka = 14; Kc = 41;         X; J = 53; Ka = 14; Kc = 40;      580229.92520              2.5520e-01                  3.076e-03             831.091 
               C2H3CHO;v=0;#1          X; J = 68; Ka = 0; Kc = 68;          X; J = 67; Ka = 0; Kc = 67;      580225.83900              5.0000e-02                  1.050e-02             933.522 
                   CCCO;v5=1;   X; v5 = 1; l5 = 1; J = 60; kron...   X; v5 = 1; l5 = 1; J = 59; kron...      580232.58400              2.0000e-02                  6.444e-03             986.363 
             GA-n-C4H9CN;v=0;          X; J = 54; Ka = 51; Kc = 3;          X; J = 54; Ka = 50; Kc = 4;      580230.71520              5.7111e+00                  7.890e-04             999.983 
             GA-n-C4H9CN;v=0;          X; J = 54; Ka = 51; Kc = 4;          X; J = 54; Ka = 50; Kc = 5;      580230.71520              5.7111e+00                  7.890e-04             999.983

Example scripts:

"my_transitions_INcasa.py", "my_transitions_OUTcasa.py"