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

Minor improvements to quicklook, coadd2d as well as a bug fix #1821

Merged
merged 19 commits into from
Sep 20, 2024

Conversation

jhennawi
Copy link
Collaborator

This PR is preliminary and includes changes from the combine refactor PR#1813 so wait until that clear. I'm just posting it now so that @debora-pe can look at the coadd2d changes.

@kbwestfall kbwestfall changed the base branch from develop to combine_refactor July 1, 2024 15:26
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.

Looks good. Mostly minor comments from me. Please add some short notes in the release doc (doc/releases/1.16.1dev.rst) about these updates. And we should run tests!

pypeit/coadd2d.py Show resolved Hide resolved
pypeit/coadd2d.py Outdated Show resolved Hide resolved
pypeit/coadd2d.py Show resolved Hide resolved
pypeit/coadd2d.py Show resolved Hide resolved
pypeit/coadd2d.py Outdated Show resolved Hide resolved
pypeit/par/pypeitpar.py Show resolved Hide resolved
pypeit/scripts/ql.py Outdated Show resolved Hide resolved
cfg['coadd2d']['spat_samp_fact'] = par['coadd2d']['spat_samp_fact'] \
if args.spat_samp_fact is None else args.spat_samp_fact

# TODO JFH Why are exclude_slits and only_slits set here when they are parameters in the parset?
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good question. Assuming I was the one that wrote this, my guess is that I was mimicking the fact that only_lists and exclude_slits are keyword arguments of CoAdd2D. I'm fine with having them removed as explicit keyword arguments and included as part of cfg instead.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The method below (CoAdd2D.default_par()) is creating the default parameters and there is an interplay between exclude_slits, only_slits, and other default params. I think, what we can do is to just merge/add the lines above to the CoAdd2D.default_par() method.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to deal with this now?

Copy link
Collaborator

@debora-pe debora-pe Sep 20, 2024

Choose a reason for hiding this comment

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

No, we'll leave it for another PR.

@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 11.11111% with 120 lines in your changes missing coverage. Please review.

Project coverage is 38.07%. Comparing base (3d26a0b) to head (0c27950).

Files with missing lines Patch % Lines
pypeit/coadd2d.py 9.37% 87 Missing ⚠️
pypeit/scripts/ql.py 0.00% 15 Missing ⚠️
pypeit/scripts/show_2dspec.py 0.00% 11 Missing ⚠️
pypeit/scripts/setup_coadd2d.py 0.00% 4 Missing ⚠️
pypeit/core/coadd.py 0.00% 3 Missing ⚠️

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

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1821      +/-   ##
===========================================
- Coverage    38.09%   38.07%   -0.02%     
===========================================
  Files          211      211              
  Lines        49002    49051      +49     
===========================================
+ Hits         18665    18675      +10     
- Misses       30337    30376      +39     
Flag Coverage Δ
38.07% <11.11%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

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.

Looks good to me. I just have one comment. Still, let's run the tests.

pypeit/coadd2d.py Show resolved Hide resolved
Base automatically changed from combine_refactor to develop July 22, 2024 19:34
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.

Changing my review to "Request changes" until the comments are addressed and we run tests.

@debora-pe
Copy link
Collaborator

Tests pass! Note that the PYTEST UNIT TESTS failures are still due to a problem of my machine with setup_gui. The keck_deimos/900ZD_M_6000 failure was probably a glitch in Google Drive since I re-run it without changing anything and it passed.

Test Summary
--------------------------------------------------------
--- PYTEST PYPEIT UNIT TESTS PASSED  256 passed, 62 warnings in 374.80s (0:06:14) ---
--- PYTEST UNIT TESTS FAILED  7 failed, 145 passed, 168 warnings in 5952.81s (1:39:12) ---
--- PYTEST VET TESTS PASSED  62 passed, 100 warnings in 5457.14s (1:30:57) ---
--- PYPEIT DEVELOPMENT SUITE FAILED 1/247 TESTS  ---
Failed tests:
    keck_deimos/900ZD_M_6000 pypeit
Skipped tests:
Testing Started at 2024-09-18T13:50:53.456748
Testing Completed at 2024-09-19T04:35:23.424708
Total Time: 14:44:29.967960
./pypeit_test reduce -i keck_deimos -s 900ZD_M_6000
Running reduce tests.
Running tests on the following instruments:
    keck_deimos

Reducing data from keck_deimos for the following setups:
    900ZD_M_6000

 0 passed/ 0 failed/ 0 skipped STARTED keck_deimos/900ZD_M_6000 pypeit
 1 passed/ 0 failed/ 0 skipped PASSED  keck_deimos/900ZD_M_6000 pypeit
--- PYPEIT DEVELOPMENT SUITE PASSED 1/1 TESTS  ---

Test Summary
--------------------------------------------------------
--- PYPEIT DEVELOPMENT SUITE PASSED 1/1 TESTS  ---
Testing Started at 2024-09-19T11:39:00.760448
Testing Completed at 2024-09-19T11:54:02.169846
Total Time: 0:15:01.409398

@debora-pe
Copy link
Collaborator

@kbwestfall this is ready to be merged. Please, take a look and see if you agree with it.

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.

Just a couple clean-up requests and a question about whether we deal with some keyword arguments now or later.

pypeit/core/coadd.py Outdated Show resolved Hide resolved
pypeit/scripts/ql.py Outdated Show resolved Hide resolved
cfg['coadd2d']['spat_samp_fact'] = par['coadd2d']['spat_samp_fact'] \
if args.spat_samp_fact is None else args.spat_samp_fact

# TODO JFH Why are exclude_slits and only_slits set here when they are parameters in the parset?
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to deal with this now?

@debora-pe
Copy link
Collaborator

I'm merging...unless anybody objects.

@debora-pe debora-pe merged commit 2b53647 into develop Sep 20, 2024
18 checks passed
@debora-pe debora-pe deleted the lris_jun24 branch September 20, 2024 22:02
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.

5 participants