Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to the Setup GUI #1879

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions doc/api/pypeit.scripts.setup_gui.rst

This file was deleted.

6 changes: 4 additions & 2 deletions doc/releases/1.17.1dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Functionality/Performance Improvements and Additions
- The WCS for datacubes now adopts the convention of North
is up and East is left. In previous version of PypeIt,
East was right.
- Setup GUI allows resizing panels when viewing pypeit files.
- Setup GUI allows selecting which detector to view when viewing raw data.

Instrument-specific Updates
---------------------------
Expand All @@ -25,7 +27,7 @@ Instrument-specific Updates
Script Changes
--------------


- `pypeit_setup_gui` script has been removed. The Setup GUI can be started with `pypeit_setup -G`.

Datamodel Changes
-----------------
Expand All @@ -43,4 +45,4 @@ Bug Fixes
in both spatial dimensions equal to half the field of view.
- Fix the code for the extraction of the 1D flat spectrum, so that
the spectrum is extracted even when `pixelflat_model` does not exist.

- Fix Setup GUI sizing issues on MacOS.
27 changes: 6 additions & 21 deletions pypeit/scripts/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.. include:: ../include/links.rst
"""
import argparse
from datetime import datetime, timezone
Copy link
Collaborator

Choose a reason for hiding this comment

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

These aren't used, right?

from IPython import embed

from pypeit.scripts import scriptbase
Expand Down Expand Up @@ -80,9 +81,6 @@ def main(args):
from pypeit.pypeitsetup import PypeItSetup
from pypeit.calibrations import Calibrations

# Set the verbosity, and create a logfile if verbosity == 2
msgs.set_logfile_and_verbosity('setup', args.verbosity)

if args.spectrograph is None:
if args.gui is False:
raise IOError('spectrograph is a required argument. Use the -s, --spectrograph '
Expand All @@ -96,24 +94,11 @@ def main(args):
'on how to add a new instrument.')

if args.gui:
from pypeit.scripts.setup_gui import SetupGUI
# Build up arguments to the GUI
setup_gui_argv = ["-e", args.extension]
if args.spectrograph is not None:
setup_gui_argv += ["-s", args.spectrograph]

# Pass root but only if there's a spectrograph, because
# root has a default value but can't be acted upon by the GUI
# without a spectrograph.
if isinstance(args.root,list):
root_args = args.root
else:
# If the root argument is a single string, convert it to a list.
# This can happen when the default for --root is used
root_args = [args.root]
setup_gui_argv += ["-r"] + root_args
gui_args = SetupGUI.parse_args(setup_gui_argv)
SetupGUI.main(gui_args)
# Start the GUI
from pypeit.setup_gui.controller import start_gui
start_gui(args)
else:
msgs.set_logfile_and_verbosity("setup", args.verbosity)

# Initialize PypeItSetup based on the arguments
ps = PypeItSetup.from_file_root(args.root, args.spectrograph, extension=args.extension)
Expand Down
58 changes: 0 additions & 58 deletions pypeit/scripts/setup_gui.py

This file was deleted.

Loading
Loading