Draft
Conversation
…endered in different coordinates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a Quicklook GUI to PypeIt.
The changes are mostly isolated to
/pypeit/display/with a few exceptions:pypeit/loggerwas changed to fix a bug where repeated invocations of pypeit's logger from the same process would not carry through a user's requested log file. This was a simple "move that block of code up a but" fix.pypeit/scripts/ql.pywas changed to accept manual extraction info as a command line argument, and pass that along appropriately.pyproject.tomlwas changed to add the HTTP packages needed to handle a remote backend as optional dependencies (i.e. they are not installed by default).The overall architecture of the plugin is described in the docstrings of
qlview.pyand at the bottom of the readthedocs page. Quick overview:ui.pyhas all the widget stuffstate.pyhas a small struct-like class for keeping GUI state neatfile_browser.pyhas the logic for file sorting/displayslit_overlay.pydraws slits over raw images and helps with clicking callbacks and the like. It's mostly stolen from show2dspec, but adapted to use Ginga slightly differently.backend.pyprovides an "abstract" interface for talking to a filesystem and pypeit. There are currently two implementation, a local backend that passes through to whatever machine Ginga is running on, and an HTTP backend that allows PypeIt and the science files to be running on another machine on the network (which will be what Keck uses operationally, eventually). I have not tested the HTTP server much at all, that's on the to-do list.servershas the HTTP server itself in it. This isn't really related to "display" per se, but there's no where else that it seemed to fit in PypeIt.qlview.pyhas the meat of the plugindisplay.pywas updated to add this plugin. I went for Eric's show1dspec implementation approachA readthedocs page has been started at
pypeit/doc/quicklook_viewer.rst, I will be adding to it over the next few days (filling out sections and providing screenshots). This page was added to the end of the "Reference" section for now, it can be moved somewhere more fitting if someone has a better idea. I tried to be thorough with docstrings, many are Claude generated, but most are mine (Claude's are probably better...).Items on my to-do list:
I am still making changes to this, but the core of the plugin is basically done and I can get feedback while adding more instruments/fixing minor stuff.
What Feedback I Need:
Generally, if people who are already familiar with PypeIt would be most helpful right now (so that I don't have to disentangle "I wish pypeit did ____" from "I wish the GUI did ____" myself) could play around with the GUI and report bugs/wanted features, that would be great. I would use a multislit dataset from DEIMOS for now - it has the highest density of slits (i.e. most places for it to go wrong) and also yields cleaner outputs than a single IR AB pair will. MOSFIRE is also a reasonable choice.
I have been using this GUI with Keck SAs and observers for a while, so the general shape of things seems OK at the moment.
There was a substantial refactor in February '26, so the commit history beyond that is a bit cluttered, apologies.