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

Script that allows interactive editing of the slit/order edges #1713

Merged
merged 14 commits into from
Nov 27, 2023

Conversation

kbwestfall
Copy link
Collaborator

As titled. See changes to doc/calibrations/slit_tracing.rst for a description of the script.

I'm directing to the hires_trace_orders branch because I branched from there. Will redirect once that PR clears.

I should add some tests, and it would be useful for one or more volunteers to take this for a test drive.

@codecov-commenter
Copy link

codecov-commenter commented Oct 26, 2023

Codecov Report

Attention: 268 lines in your changes are missing coverage. Please review.

Comparison is base (36ceb88) 40.98% compared to head (7828a5e) 40.74%.

Files Patch % Lines
pypeit/core/gui/edge_inspector.py 0.00% 133 Missing ⚠️
pypeit/core/gui/gui_util.py 0.00% 116 Missing ⚠️
pypeit/scripts/edge_inspector.py 30.43% 16 Missing ⚠️
pypeit/edgetrace.py 40.00% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1713      +/-   ##
===========================================
- Coverage    40.98%   40.74%   -0.24%     
===========================================
  Files          190      193       +3     
  Lines        43904    44180     +276     
===========================================
+ Hits         17994    18003       +9     
- Misses       25910    26177     +267     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@rcooke-ast rcooke-ast left a comment

Choose a reason for hiding this comment

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

This is really impressive @kbwestfall! The structure of the GUI is really clear, and much better organised than what I previously implemented in identify, skysub_regions, and object_find. Eventually, we should aim to migrate these over to the same structure that you've setup to make all GUI codes a bit easier to manage in the long run.

I have mostly minor comments, but I'm a little confused why there are some unused arguments being passed to some functions (including a few *args and **kwargs as well). In some cases, there doesn't appear to be any inheritance, and I can't understand why they are needed... I'm certain that I'm about to learn something new in python that I didn't know before!

Without major comments, I'm approving - thanks again! 👍

doc/calibrations/slit_tracing.rst Outdated Show resolved Hide resolved
pypeit/core/gui/edge_inspector.py Show resolved Hide resolved
pypeit/core/gui/edge_inspector.py Show resolved Hide resolved
pypeit/core/gui/gui_util.py Outdated Show resolved Hide resolved
pypeit/core/gui/gui_util.py Show resolved Hide resolved
pypeit/core/gui/gui_util.py Outdated Show resolved Hide resolved
pypeit/scripts/edge_inspector.py Show resolved Hide resolved
Copy link
Collaborator

@rcooke-ast rcooke-ast left a comment

Choose a reason for hiding this comment

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

Now actually approving...

Copy link
Collaborator Author

@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.

Thanks @rcooke-ast ! I've written a few of these now and stackoverflow is key!

On the argument lists, as you'll see in my responses, some of these were pure laziness and others were restrictions to the required calling sequence for cursor events.

doc/calibrations/slit_tracing.rst Outdated Show resolved Hide resolved
pypeit/core/gui/edge_inspector.py Show resolved Hide resolved
pypeit/core/gui/edge_inspector.py Show resolved Hide resolved
pypeit/core/gui/edge_inspector.py Show resolved Hide resolved
pypeit/core/gui/gui_util.py Outdated Show resolved Hide resolved
pypeit/core/gui/gui_util.py Show resolved Hide resolved
pypeit/core/gui/gui_util.py Outdated Show resolved Hide resolved
pypeit/scripts/edge_inspector.py Show resolved Hide resolved
Base automatically changed from hires_trace_orders to develop November 16, 2023 23:55
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.

Solid! Thanks @kbwestfall!

@kbwestfall kbwestfall merged commit c07a31b into develop Nov 27, 2023
23 checks passed
@kbwestfall kbwestfall deleted the interactive_trace branch November 27, 2023 22:37
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.

4 participants