Scripts Manual
User Manual: Pdf
Open the PDF directly: View PDF .
Page Count: 4
Download | ![]() |
Open PDF In Browser | View PDF |
Working Procedures for MOOG Prep Scripts rev. 07/21/2014 IMPORTANT: For all scripts, check the output file to make sure generates a script for all stars – it looks like sometimes you get outputs (.csv and .txt files) with a trailing newline which silently breaks the script. I/O here assumes the scripts are located on desktop. I/O already has extensions built in (so inputme.csv can be input as inputme) robocreator Generates ROBOSPECT terminal input lines in .fits input format: robospect -L-F -f 3 -M pre -P . --fits_row --rad_vel -i 25 Input: Tab delimited .csv on desktop with columns titled in the following manner and order: starnum, aperture, imagenum, roboimagenum, roborad_vel, outputname, config, inputname • • Note that the radial velocities need to be in the format xx.x and be negative what they are measured to be. Also roboimagenum = imagenum-1, where imagenum is the line in the .fits image. This reflects the fact that robospect starts numbering at 0 for some reason. • • inputname does need the .fits extension specified The .robolines files from ROBOSPECT will be titled for example: A.1002_order025.robolines, if A is the config, 1002 is the outputname, and 025 is the robospect line number. Output: Script in .txt format on the desktop. eqwgrabber Collates the equivalent widths from a set of .robolines files. Input: Folder on desktop containing .robolines files in .txt format. Linelist on desktop in tab-delimited .csv format. • Windows doesn't natively read files as .txt. To change all files in a folder to .txt format: in elevated command prompt, navigate to the folder the lines are in, then type: ren *.robolines *.robolines.txt • • The linelist should only have lines I actually care to have stripped (so filler lines should be deleted). Linelist should have the following columns: wavelength, excitation potential, element, ionization state (titles are unimportant, but need to be present). Output: Space delimited .txt file with columns named for example: A.1002 for the robocreator example above. Eqws are sorted by wavelength in ascending value • Works by matching wavelengths and species in the linelist to lines in the .robolines files. • Has the ability (commented out for use in generating moogfiles) to automatically remove negative eqws from output for graphing, etc. • Will inform the user if a line isn't found for a given star. moogcreator Generates moog eqw files adhering to moog's trademark finicky formatting needs. Input: Tab delimited .csv file containing sorted eqws (eqwgrabber output with modifications noted below) (on desktop). Tab delimited .csv with sorted linelist including atomic numbers and tweaked loggf values (on desktop). • The linelist must have two extra columns in addition to those noted in eqwgrabber: the first 'AN' which has the atomic number, and the second called 'loggf' which has tweaked (calibrated to sun) loggf values for each species. • The linelist must be sorted by atomic number (ascending). • The equivalent width input sheet must also be sorted by ascending atomic number and also only have columns of equivalent widths with title (no wavelength column). • Both input files must have the correct number of characters and decimal places: XX.X for atomic numbers, XXX.XX for equivalent widths, XXXX.XX for wavelengths, X.XX for excitation potentials, X.XXX for loggf. This can be done in Libre Office through cell>format>user-defined – set the format in the box at the bottom (i.e. 00.0 for XX.X). Output: A user-specified folder on desktop containing the correctly formatted moog eqw files in .txt extension. The files will be titled the same as the columns in the input spreadsheet. The header inside the files will be the same. • The script will automatically ignore any negative eqws when writing the moog files. modelcreator Generates atmospheric models with the same naming scheme (i.e A.1002) used elsewhere, provided “outputname” and “config” are the same as used before. Input: Tab delimited .csv with the following columns named in this manner and in this order: outputname, config, temp, logg, posneg, initmet, microv • • • posneg is either p or m (p for positive or 0 metallicity, m for negative) Need to remove stars with incomplete params (i.e missing microturbulent velocity) Since the best way to quickly work moog is to use the filenames here as reference when editing moog parameter files, it's good to have binaries somehow distinguished in the outputname column (i.e instead of 1002, in that column, have bin1002). Output: .txt file containing the inputs to generate atmospheric models. • • The folder this script is run from must have the proper atm subdirectory. Check output – can mysteriously skip first or last star when creating script output. mopcreator Creates the MOOG “mop” files – the parameter file MOOG prompts for after initialization. Input: Folder containing models (modelcreator) and moog files (moogcreator). • This code is pretty finicky, and the input files must be of a certain form: Input models must be of the form Config.Number with no file extension specified in Windows, and can have binarity specified as Config.Numberbin (I.e models must be named A.1002 or A.1002bin and nothing else). Input moog files must be of form Config.Number.txt (.txt specified in Windows) and are allowed the 'r' flag for redo but nothing else (i.e. A.1002.txt or A.1002r.txt). • Most importantly, for a given star, Config.Number must match exactly (i.e. A.1002bin and A.1002.txt will be okay, but A.1002bin and a.1002.txt will not). • Moogcreator and modelcreator are amenable to these output styles, just be aware. Output: User specified folder containing mop files. MOOG graphing optional. • Files will be numerically designated only (i.e. A.1002bin matched with A.1002.txt will result in output of 1002bin or B.2310 and B2310.txt will result in 2310). Thus far this hasn't been a problem with degeneracy of numbering (A.1002 and B.1002 = ?) but just in case the script has built-in error checking to avoid this problem. • You will be prompted if you want to have each mop file result in graphical output or not (not is faster, graphical is more thorough). • Carpal Tunnel Donald recommends using “rename” in Linux to remove the .txt extension Windows insists on in all the mop files. Instruction: move finished mop.txt files to deneb, open terminal, navigate to folder. Type in > rename stringyouwantchanged stringtochangeto filestodothisto and enter (example: > rename .txt ' ' *.txt) • Mops will need to be in the same folder as models and moogfiles when you run MOOG. moogsifter Processes a folder of MOOG outputs and generates spreadsheets with useful and comprehensible information Input: Folder of moog output files of form *.out.txt, .csv linelist (same format as eqwgrabber). • Assumes moog outputs are of standard title form (i.e. A.10007.out.txt, C1214.out.txt) Output: Space delimited text file with line by line abundance summary with columns: wavelength, element, 10007, 1214, etc. Also gives summar yfor Fe and Ni lines in two space-delimited text files with columns: starname (i.e. A.10007), temp, [g], [Fe/H], vt, linesfe (# lines measured for a particular star), avgfe (avg abundance), stdfe, epslope_fe, rwslope_fe. • If wavelength not present in star's MOOG file (i.e. equivalent width was <0 so eqwgrabber nixed it), then this script will set the abundance for that line to be ' ' (space). SO DO NOT MERGE DELIMITERS WHEN IMPORTING INTO CALC. • • With new3680 linelist, no rwslope_ni b/c only 3 nickel lines. Tends to output a whole lot of spaces at the end of each file, which need to be trimmed off before running bvadder. bvadder Adds in B-V values to a moogsifter global output. Can be modified to add other things too. Input: Space delimited .csv, where B-V values are in column 0, starname (numeric, I.e 10007) is in column 5. Also takes in moogsifter output (space delimited .csv) where star name is in column 0 as A.10007 for example. Output: Space delimited .txt file where B-V values have been appended for each star in the moogsifter file in column 0 (moves all other columns to the right). • Works with a row of headers for each column, but does not work with trailing newlines • Works by trimming to a numeric starname in moogsifter output, compares to numeric starname in input B-V .csv, inserts B-V if there is a match. snr_grabber Calculates robospect-derived SNR values for a set of robospect outputs. Uses the average ratio of robospect-measured flux and error in the 6680-6694 angstrom range. Input: Folder containing robospect outputs, specficially the .robospect files, which have been converted to .txt files in Windows. Output: Space delimited .txt file containing the original file name and the calculated SNR.
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.4 Linearized : No Page Count : 4 Language : en-US Creator : Writer Producer : LibreOffice 4.1 Create Date : 2014:11:14 11:00:23-06:00EXIF Metadata provided by EXIF.tools