diff --git a/docs/overview.md b/docs/overview.md index 010f13e..22d6191 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -86,7 +86,11 @@ Next, `tabulate()` creates the table containing the measured statistical correla The last table `tabulate()` constructs lists the best-fit model parameters of the functions fit to the Lyα profiles. Starting by creating the header of the table, `tabulate()` then opens a `for` loop that iterates through each MagE spectrum (including the stacked spectra), adding the slit ID to the table row and fetching the spectrum's best-fit model parameters from `{slit_id}_mc_sim_lya_best_fit_model_parameters.txt` from `results/lya_fits/{slit_id}/`. The loop checks if the spectrum's Lyα profile is triple-peaked, adding a new column with a blank entry if the profile is not triple-peaked. Otherwise, for each model parameter of the blueshifted Lyα peak, the loop calculates the median and estimates of the upper and lower uncertainties (calculated as stated previously) from the parameter distribution, rounding them according to `round_to_uncertainties()`, and formats and adds them to the table. The loop then adds a new column and repeats the previous process for the remaining model parameters (i.e., the remaining Lyα peaks and the local continuum). If the parameter has units of a flux density, the notebook rescales the parameter by a fixed and consistent factor (except for the non-stacked spectra) in order to prevent a cumbersome scientific notation factor that would otherwise complicate formatting the parameter as a string. The loop then closes and the notebook adds a footer to the table and saves the table as `lya_best_fit_model_parameters_table.txt` in `results/tables/`. -The function `plot()` is the final function executed by `lya.ipynb`, creating plots of the Lyα profiles and the corner plot of the Lyα and LyC escape fraction measurements. `plot()` starts by obtaining the LyC escape fraction measurements made by `esc.ipynb` and creating the matplotlib `Figure` and `Axes` objects of the figure plotting the Lyα profiles of the individual MagE spectra (but not the stacked spectra). Using a `for` loop, `plot()` gets the ... +The function `plot()` is the final function executed by `lya.ipynb`, creating plots of the Lyα profiles and the corner plot of the Lyα and LyC escape fraction measurements. `plot()` starts by obtaining the LyC escape fraction measurements made by `esc.ipynb` and creating the matplotlib `Figure` and `Axes` objects of the figure plotting the Lyα profiles of the individual MagE spectra (but not the stacked spectra). Using a `for` loop, `plot()` gets the data of each spectrum, converting it to the rest frame with the spectrum's redshift. A mask applied to the spectrum just selects the Lyα profile. From the best-fit Lyα model parameters (contained in `{slit_id}_mc_sim_lya_best_fit_model_parameters.txt` in `results/lya_fits/{slit_id}/`), `plot()` calculates the median best-fit model parameters, which it uses to plot the corresponding median model fit over the spectrum. For each panel in the figure, the notebook adds a slit ID label, sets the coordinate boundaries and tick properties, and makes the aspect ratio of the panel square. `plot` concludes the figur eby adding labels to each axis, saving the figure as `lya_fits.pdf` in `figs/`. + +Next, the notebook makes a figure of the stacked Lyα spectra, near identically to the previous figure, except this time with an additional panel of the two stacked Lyα profiles plotted together in the same panel. An extra line of code eliminates the vertical space between the panels before saving the figure as `lya_fits_stack.pdf` in `figs/`. + +The last figure that `plot()` creates is the corner plot of the Lyα measurements and the LyC escape fractions. `plot()` starts the figure by fetching the statistical correlation measurements between each measurement pair tabulated in `lya_measurements_statistical_correlations_table.txt` in `results/tables/`, which it will use later to add labels to each panel. The notebook then opens a `for` loop that iterates over each row of the corner plot except for the last (which contains the LyC escape fractions, which must be treated separately). The loop adds a column title to the last subplot in the row, a row title to the first subplot in the row, and column and row unit labels. Then, for each subplot in the row, an `if` block disables the subplot if it is above the main diagonal (where a measurement pair would just be repeated from the corresponding subplot mirrored across the main diagonal). Otherwise, for each MagE slit aperture (and the stacked spectra), the notebook fetches the measurement distributions of the measurement pair displayed in the panel, calculating their medians and 16th and 84th percentiles as proxies for the upper and lower uncertainties, and plotting the resulting data points onto the appropriate panel. ...