-
Notifications
You must be signed in to change notification settings - Fork 0
Selecting transitions and transition pairs
Daniel Berke edited this page Sep 1, 2022
·
5 revisions
This is necessary to run select_line_pairs.py. Run the following command in varconlib/data/linelists:
$ curl -O http://kurucz.harvard.edu/linelists/gfnew/gfallvac08oct17.dat
The file is about 359 MB, so it might take a few minutes to download.
The file NIST_formatted_transitions_with_blends.txt can be downloaded using the following command. It should go into the varconlib/data directory.
$ curl -OL https://www.dropbox.com/s/f76d0la4z7yvp9p/NIST_formatted_transitions_with_blends.txt
Before running select_line_pairs.py, make sure the directory varconlib/data/pickles exists, as this is where much of the output will be saved to. (You may need to create it.)
-
$ select_line_pairs.py --match-lines -dw 3000 -de 100000- This will match transitions from the BRASS list
BRASS_Vac_Line_Depths_All.csvwith those in the Kurucz listgfallvac08oct17.dat. The-dwand-deflags refer to the tolerance in wavelength and lower energy level between the two lists, respectively (the BRASS list only reports the lower energy level). The units of both are in m/s. - The output will be a pickled list of Transition objects representing transitions matched between BRASS and Kurucz linelists. The file will be located at
data/pickles/transitions.pkl.
- This will match transitions from the BRASS list
-
$ select_line_pairs.py --pair-lines- This will read the
transitions.pklfile previously output, and create a list of TransitionPair objects from it using the following criteria. Currently, these values are hard-coded within the script.- Minimum normalized depth: 0.15
- Maximum normalized depth: 0.90
- Maximum depth difference: 0.2
- Maximum separation: 800 km/s
- The output from this script will be a list of pairs at
data/pickles/transition_pairs.pkl. A list of unique transitions from which these pairs were formed (since not every transitions fromtransitions.pklwill end up in a pair) will be saved atdata/pickles/pair_transitions.pkl.
- This will read the
-
$ select_line_pairs.py --query-nist- This step reads
pair_transitions.pkland queries the National Institute of Science and Technology (NIST) data base of atomic transitions. - It will output a pickled list of Transition objects at
data/pickles/transitions_NIST_returned.pkl.
- This step reads
-
$ select_line_pairs.py --match-nist -dw 3300 -de 100000- This step reads
transitions_NIST_returned.pklandpairs_transitions.pkl, and matches the previously-output list of transitions with the list returned from NIST. The-dwand-deflags are the same as for--match-lines, with a slightly wider tolerance in wavelength found from testing. The purpose of this step is to retrieve additional information about the quantum mechanical configuration of each transition, since the Kurucz list unfortunately has incomplete information. - It will output a list of transitions matched with NIST at
data/pickles/transitions_NIST_matched.pkl.
- This step reads
-
$ select_line_pairs.py --format-lines- This step reads
transition_NIST_matched.pklandpair_transitions.pkl. It returns text files with information formatted in the style of the NIST online transition browser. - It returns two files as output:
- For transitions matched:
data/NIST_formatted_transitions.txt - For all transitions:
data/NIST_formatted_transitions_all.txt
- For transitions matched:
- This step reads
- The next step must be performed manually, and is to add "blendedness" information to
NIST_formatted_transitions.txt. This involves adding an additional column at the end called "blendedness", with an integer between 0 and 5 representing the blendedness of the transition. Save this new file asdata/NIST_formatted_transitions_with_blends.txt. -
$ select_line_pairs.py --incorporate-blendedness- This step reads
NIST_formatted_transitions_with_blends.txt(or an alternative file given with the--blend-fileflag), and incorporates the blendedness information into the TransitionPair objects. - The output from this script overwrites
data/pickles/transition_pairs.pkl.
- This step reads
-
$ select_line_pairs.py --rate-pairs- Reads "transition_pairs.pkl" and, originally, selected only pairs with blendedness of (2, 2) or lower. It now selects all blendedness values up to (5, 5), so is less useful for this purpose, but it does output human-readable text files of the final selection of both transitions and pairs.
- The output for this script is the following files, all within
varconlib/data:NIST_formatted_best_transitions.txtNIST_formatted_best_pairs.txtfinal_transitions_selection.pklfinal_pairs_selection.pkl
- These "final_X_selection.pkl" files are used in pretty much all other scripts that need lists of pairs or transitions.
-
$ select_line_pairs.py --incorporate-position-information- This step reads the
.pklfiles above, and rewrites them with a final selection of pairs taking into account their positions on the CCD. Specifically, it checks that a transition is more than 100 km/s away from both edges of the CCD. It will find transitions present on two adjacent echelle orders automatically. It then proceeds to check, for each pair, how many orders it can be measured in such that both transition measurements were made in same order. If this number is 0 (i.e., the pair is truly "cross order"), the pair is rejected (though this is quite rare). Otherwise, a pair may be fitted on 1 or 2 orders. Any transitions appearing only in cross order pairs are also removed (though in practice this is only one transition with HARPS). - This script will output the same files as the step above it, overwriting them if they exist.
- This step reads the