Skip to content

Latest commit

 

History

History
36 lines (22 loc) · 2.7 KB

README.md

File metadata and controls

36 lines (22 loc) · 2.7 KB

MC Metallicity Output

Monte Carlo sampling to calculate metallicity uncertainty from strong line flux data.

==================== Output

All the results will be saved in this direcoty by the name of the input file (e.g. exampledata for input exampledata_meas.txt and exampledata_err.txt), which will be created upon running the code in the directory provided by the --path argument.

For a given file and nsample, the following output files are generated:

<fname>_n<nsample>.pkl": (e.g. exampledata_n2000.pkl) the metallicities and their uncertainties calculated and stored in binary (pickled) format in a python dictionary

<fname>_boxplot_n<nsample>_<measurement>.pdf": (e.g. exampledata_boxplot_n2000_1.pdf, exampledata_boxplot2000_m2.pdf) box and whiskers plot showing all metallicities and their uncertainties in a single plot, one plot (and one PDF file) for each measurement in input

"hist" folder, containing all the histograms generated. For each scale calculated, scale <scale_name>, and each input set of lines, or measurement, the distribution histogram is saved in a PDF file <fname>_<nsample>_<scale>_<measurement>.pdf (e.g. exampledata_n2000_KD02_N2O2_1.pdf for scale KD02_N2O2, measurement 1)

if the keyword --asciiout is set, a text file <fname>_n<nsample>_<measurement>.txt (e.g. exampledata_n2000_1.txt) stores the distribution's 50th, 16th and 84th percentiles in the format: E(B-V) 0.121000 0.014000 0.019000 logR23 0.428000 0.003000 0.004000 ...

if the keyword --asciidistrib is set, a csv file <fname>_n<nsample>_<scale>_<measurement>.txt (e.g. exampledata_n2000_KD02_N2O2_1.csv) is created for each scale and each measurement, containing the full distribution of metallicities.

if the keyword --binmode is set to 'kd' (kernel density), the kernel density distribution is saved in a binary (pickle) file <fname>_n<nsample>_<scale>_KDE_<measurement>.pkl (e.g. exampledata_n2000_KD02_N2O2_1_KDE.pkl), having been created for each scale and each measurement. The kernel density is saved as a python sklearn KernelDensity object.

==================== Interpret the Output Values

'-1' means: the emissions lines don't satisfy some sort of minimum criteria to derive metallicity

0.000 (no distribution) means no distribution was generated for some reason: you may have selected nsample=0, or have errors = 0.0, and that is the appropriate behavior in this case. Otherwise the distribution may be really screwed up and take a single value, or a shape such that the 16th and 84th percentiles cannot be calculated (e.g. two values), and you should definitely not trust the output.