Skip to content

Conversation

@opkuhn
Copy link
Contributor

@opkuhn opkuhn commented Dec 19, 2025

The modsdocs1 branch stems from pypeit/develop and adds a doc/tutorials/mods_howto.rst and associated figures in doc/figures/mods/

It walks the user through reduction of the lbt_mods1b_proc/dual_grating_longslit_qso and lbt_mods1r_proc/dual_grating_longslit_qso datasets, up to the telluric correction.

There were some questions about the flux calibration and telluric correction. The qso was observed at airmass 1.96 and the standard star at airmass 1.35, so the flux calibration is sensitive to methods used for treating extinction -- whether an extinction file is used or the extinction is inferred from a telluric model. Using UVIS and an extinction file seemed to provide the best match of the blue and red channel spectra, and good agreement with results from IRAF, but when the telluric correction is made with pypeit_tellfit, then the blue- and red-channel fluxes no longer match in the spectral region of overlap, so this step has not been added to the documentation.

There are still questions, but the basic setup and run could still be useful for MODS users.

@kbwestfall kbwestfall changed the base branch from release to develop December 19, 2025 18:28
Copy link
Collaborator

@kbwestfall kbwestfall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These docs are great! Thanks for adding this detail. I have a few minor suggestions for your consideration. The main one is to add the doc to the list of tutorials and make sure that the docs compile without any warnings. Thanks!

@@ -0,0 +1,589 @@
.. include:: ../include/links.rst

.. _mods_howto:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add this to the list of instrument-specific tutorials in tutorials/tutorials.rst. I.e., in that list add: LBT MODS <mods_howto>.

Also, make sure that the docs build correctly by running make htmlonly in the doc/ directory.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this to the list in tutorials.rst.

flux calibration, coaddition of the extracted 1D spectra and correction of telluric
absorption.

There are two sets of MODS spectrograph classes: (1) the original ones (mods1b, mods1r, mods2b
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of, e.g., mods1b, I would use the full pypeit spectrograph names (lbt_mods1b and lbt_mods1b_proc, etc).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


The proc classes work in ADUs and not electrons (the conversion gain, which is ~2 e-/ADU, is not applied),
so snr_thresh = 10/sqrt(2) will find sources above 10-sigma.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a comment here just noting that this is what the top of the pypeit file would look like with the options discussed above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added the sentence: "The box below, which shows the top of the pypeit file used to reduce the sample dataset, illustrates the use of the user-defined parameters mentioned in item 3 above."

--------------------

The pipeline has been run for binned spectra which have been pre-processed by modsCCDRed.
Please contact the developers if there are issues.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might point people specifically to the Users Slack or to submit a GitHub issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added these references/links.

Wavelengths
+++++++++++

To check the quality of the wavelength calibration, open the QA/MF_A.html file and view the Arc_1D_Fit_A_DETO1.html to insure that the lines have been identified and the RMS is low, ideally < 0.1 pixel, or run :ref:`pypeit_chk_wavecalib`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would point people directly to the PNG files. We have been bad about maintaining the html output files; e.g., there are many PNGs that aren't included in the html.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced the reference to the MF_A.html file with one to the appropriate PNG file.


.. figure:: ../figures/mods/mods1b_identify.png

Remember, the default calibration is in vacuum wavelengths. The line lists provided on the `LBTO Sciops MODS webpages <https://scienceops.lbto.org/mods/>`__ have been converted to vacuum wavelengths for use by pypeit.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might highlight this in a .. important:: box.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put the following in an "important" box, trying to clarify the difference between these and the standard lists already in pypeit and that these lists are used by default for MODS reductions in pypeit. Hopefully it is clear. After-the-fact, I don't think they make much difference, but it is cleaner just to use the lines which have been identified in the arc spectra.

"Remember, the default calibration is in vacuum wavelengths. The line lists provided on the LBTO Sciops MODS webpages <https://scienceops.lbto.org/mods/>__, which contain air wavelengths for lines positively identified
in MODS comparison lamp spectra, have been regenerated from NIST in vacuum wavelengths and are part of the default instrument-specific parameters for the lbt_mods#c and lbt_mods#c_proc classes in pypeit."


spec = specobjs.SpecObjs.from_fitsfile(spec1dfits)
plt.plot(spec[0]['BOX_WAVE'],spec[0]['BOX_COUNTS']
plt.plot(spec[0]['OPT_WAVE'],spec[0]['OPT_COUNTS']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need a closing parenthesis on this line and the one above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed this.

@kbwestfall kbwestfall requested a review from debora-pe January 5, 2026 23:52
@kbwestfall kbwestfall added this to the v2.0.0 milestone Jan 6, 2026
Copy link
Collaborator

@debora-pe debora-pe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants