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

Blaze function fix #1872

Merged
merged 5 commits into from
Nov 22, 2024
Merged

Blaze function fix #1872

merged 5 commits into from
Nov 22, 2024

Conversation

debora-pe
Copy link
Collaborator

This is a small fix to the code that extracts the 1D flat spectrum. Currently, if an archival pixelflat file is used, the pixelflat_model image does not exists and the 1D flat spectrum is not extracted. These changes fix this.

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.

All good from me 👍 thanks for the fix!!

One point to note... is there something about archival pixelflats that prevents them from being used (presumably, the archival pixelflats are just the sensitivity deviations about 1)? Do we just need to recreate them with the latest version of the code, or do we need to find an alternative way of storing the archival pixelflats so that they can still be used for extracting the Flatfield spectrum?

# flat image is available also when an archival pixel flat is used.
flat_raw = flatimages.pixelflat_raw if flatimages.pixelflat_raw is not None else flatimages.illumflat_raw
if flat_raw is not None and flatimages.pixelflat_norm is not None:
# TODO: Can we just use flat_raw if flatimages.pixelflat_norm is None?
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can, but perhaps add a warning that the raw data will be used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for your input. I'll leave it as a TODO for now.

Copy link
Collaborator

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

@debora-pe
Copy link
Collaborator Author

All good from me 👍 thanks for the fix!!

One point to note... is there something about archival pixelflats that prevents them from being used (presumably, the archival pixelflats are just the sensitivity deviations about 1)? Do we just need to recreate them with the latest version of the code, or do we need to find an alternative way of storing the archival pixelflats so that they can still be used for extracting the Flatfield spectrum?

Thanks @rcooke-ast.
I don't think there is anything in the archival pixelflats that prevent them from being used. Yes, there are just a pixel to pixel variations about 1 and they are not version controlled, i.e., they do not need to be re-created with the latest version of the code.

@debora-pe
Copy link
Collaborator Author

I'll run the tests for completeness.

@debora-pe
Copy link
Collaborator Author

Tests pass. See below Summary.

  • UNIT TESTS FAILED 7 failed are related to a problem my machine has with setup_gui
  • PYPEIT UNIT TESTS FAILED 1 failed was a temporary internet connection problem. It passed today
   > pytest ../PypeIt/pypeit/tests/test_install.py::test_install_telluric
../PypeIt/pypeit/tests/test_install.py .                            [100%]
================== 1 passed in 9.19s =============================
  • VET TESTS FAILED 1 failed is unrelated to this PR
    FAILED ../../../Pypeit/PypeIt-development-suite/vet_tests/test_datacube.py::test_coadd_datacube - pypeit.pypmsgs.PypeItError: No unmasked value in iexp=1/2. Check inputs.
Test Summary
--------------------------------------------------------
--- PYTEST PYPEIT UNIT TESTS FAILED  1 failed, 256 passed, 63 warnings in 439.44s (0:07:19) ---
--- PYTEST UNIT TESTS FAILED  7 failed, 145 passed, 168 warnings in 1742.28s (0:29:02) ---
--- PYTEST VET TESTS FAILED  1 failed, 62 passed, 97 warnings in 2214.09s (0:36:54) ---
--- PYPEIT DEVELOPMENT SUITE PASSED 248/248 TESTS  ---
Testing Started at 2024-11-21T17:49:53.096124
Testing Completed at 2024-11-22T06:58:25.312261
Total Time: 13:08:32.216137

@debora-pe
Copy link
Collaborator Author

Merging.

@debora-pe debora-pe merged commit 160035a into develop Nov 22, 2024
18 checks passed
@debora-pe debora-pe deleted the fix_blaze branch November 22, 2024 21:51
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