Skip to content

Add LDT/RIMAS#2070

Draft
tbowers7 wants to merge 54 commits intopypeit:developfrom
tbowers7:ldt_rimas
Draft

Add LDT/RIMAS#2070
tbowers7 wants to merge 54 commits intopypeit:developfrom
tbowers7:ldt_rimas

Conversation

@tbowers7
Copy link
Collaborator

@tbowers7 tbowers7 commented Feb 9, 2026

Add the LDT/RIMAS near-IR spectrograph to PypeIt.

This PR is marked as "draft" while development continues -- I am primarily using it to keep track of non-RIMAS changes made w.r.t. develop as I work with @MatthewPrem.

tbowers7 and others added 30 commits July 7, 2025 11:43
Start outlining the structure of the LDT/RIMAS spectrograph class and
figure out how to divide up the parameter definitions between the
various possible spectrographic modes.

	new file:   pypeit/spectrographs/ldt_rimas.py
Putting common methods in parent-type classes, so that the 4 spectroscopic
modes of RIMAS have classes that just contain configuration parameters
specific to those modes, and otherwise inherit everything else from
further up the food chain.

	modified:   pypeit/spectrographs/__init__.py
	modified:   pypeit/spectrographs/ldt_rimas.py
Next step will be to look at VLT/X-Shooter to see how its data products
are arranged and how PypeIt is used to reduce the three arms.  I will want
to follow a similar approach for RIMAS, I think.

	modified:   pypeit/spectrographs/ldt_rimas.py
	modified:   pypeit/spectrographs/ldt_rimas.py
To deal with instrument-specific software issues at the telescope,
LDT/NIHTS needs a method for changing metadata table values to match
temporally adjacent frames.

This commit adds a new Spectrograph method called "validate_fitstbl()"
that can be used for this purpose.  The base class implementation of
this method simply returns the metadata table unchanged.  As such, all
spectrographs that do not implement this new method will not be affected
by the addition.  The new method is called from within `pypeitsetup.py`
as part of building the metadata table in the first place.

	modified:   pypeit/pypeitsetup.py
	modified:   pypeit/spectrographs/spectrograph.py
In `pypeit/core/gui/edge_inspector.py`, move the bookkeeping for
adding slits until after their positions have been established (note:
this is only important if no PCA of slit edges exists).

In `pypeit/metadata.py`, save the vetted framebits.

In `pypeit/pypeitsetup.py` clarify that the `build_fitstbl()` doesn't
actually return anything (or rather, the return value was ignored),
but instead it updates the class attribute.

	modified:   pypeit/core/gui/edge_inspector.py
	modified:   pypeit/metadata.py
	modified:   pypeit/pypeitsetup.py
All RIMAS files are dropped into one directory per night.  This
commit sorts through the files and includes in each .pypeit file
just the frames associated with the desired arm (YJ / HK) and
spectroscopic mode (single-order / echelle).

In order to reduce all four combinations, the user will need to
run pypeit_setup four times, once for each combo... but the
resulting setup files will be specific for that arm/mode making
the rest of the reduction process go much smoother.

	modified:   pypeit/spectrographs/ldt_rimas.py
If the input array of ``type_bits`` to
``pypeit.metadata.PypeItMetaData.frame_paths()`` is empty, the
resulting Column data type is returned as a float64.  Since the
self-proclaimed kludge checking of dtype is looking for unicode
strings, this causes an unusual error.  By forcing the Column
to have a string data type, the kludge checking works fine and
life goes on.

	modified:   pypeit/metadata.py
This was pulled from NIHTS development branch, but is not relevant
to RIMAS.

	modified:   pypeit/core/gui/edge_inspector.py
	modified:   pypeit/spectrographs/ldt_rimas.py
	modified:   pypeit/spectrographs/ldt_rimas.py
@tbowers7 tbowers7 marked this pull request as draft February 9, 2026 20:49
@tbowers7 tbowers7 added this to the v2.1.0 milestone Feb 9, 2026
@tbowers7 tbowers7 added the New Spectrograph Adds a new spectrograph and/or modes of an existing to PypeIt label Feb 9, 2026
tbowers7 and others added 7 commits February 25, 2026 17:55
Add a method for pre-defining various instrument configurations in way
that they always appear in the same way each time.  This is particularly
useful for instruments which produce >=2 configurations each night.  It
would be helpful for them to be the same each time, instead of switching
back and forth between "A" and "B" depending on the whim of the file
creation order.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Spectrograph Adds a new spectrograph and/or modes of an existing to PypeIt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants