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

Use metadata in remove lightleak #288

Merged
merged 28 commits into from
Sep 4, 2024
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
89796fa
Fix paths to spectral model files in temperature response
jslavin Jun 5, 2023
a4b0499
Fix atol in test_temperature_response_coronal.py
jslavin Jun 6, 2023
c059468
Fix atol in test_temperature_response_hybrid.py
jslavin Jun 6, 2023
a5e7517
Fix atol in test_temperature_response_photospheric.py
jslavin Jun 6, 2023
5e4c076
Fix atol in test_temperature_response.py
jslavin Jun 6, 2023
fa641be
Fix atol, rtol values in test_temperature_response.py
jslavin Jun 6, 2023
412903b
Fix atol, rtol values in test_temperature_response_coronal.py
jslavin Jun 6, 2023
184245a
Fix atol, rtol values in test_temperature_response_hybrid.py
jslavin Jun 6, 2023
d0f77fe
Fix atol, rtol values in test_temperature_response_photospheric.py
jslavin Jun 6, 2023
a4bcb14
Another fix to test_temperature_response_hybrid.py
jslavin Jun 6, 2023
9752563
Another fix to test_temperature_response_coronal.py
jslavin Jun 6, 2023
e7f82bd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 6, 2023
6206ce5
Merge branch 'main' of https://github.com/jslavin/xrtpy
jslavin Aug 31, 2023
04124c5
Merge branch 'main' of https://github.com/jslavin/xrtpy
jslavin Oct 6, 2023
8490dbb
Created new directory, image_correction, and moved xrt_remove_lightle…
jslavin Oct 6, 2023
5b45c12
small changes to image_correction/__init__.py
jslavin Oct 6, 2023
53d5985
resolved conflicts
jslavin Oct 13, 2023
8772fd6
Merge branch 'HinodeXRT:main' into main
jslavin Nov 22, 2023
9f8f9db
Changed from print statements to logger in temperature_from_filter_ra…
jslavin Nov 22, 2023
22b2cda
Merge branch 'HinodeXRT:main' into main
jslavin Nov 29, 2023
cbfa352
Merge branch 'HinodeXRT:main' into main
jslavin Feb 1, 2024
1796ca2
Merge branch 'HinodeXRT:main' into main
jslavin Feb 23, 2024
5bcd1e2
Merge branch 'HinodeXRT:main' into main
jslavin Feb 23, 2024
cab492c
Merge branch 'HinodeXRT:main' into main
jslavin Apr 29, 2024
fc76550
Merge branch 'HinodeXRT:main' into main
jslavin May 17, 2024
88b8381
Merge branch 'HinodeXRT:main' into main
jslavin Sep 4, 2024
1f1ba61
Update remove_lightleak.py
jslavin Sep 4, 2024
d862b5d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 4, 2024
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
14 changes: 7 additions & 7 deletions xrtpy/image_correction/remove_lightleak.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,22 +98,22 @@ def _get_stray_light_phase(date_obs):
def _select_lightleak_file(filter_wheel_1, filter_wheel_2, date):
phase = _get_stray_light_phase(date)
file_dict = {
("open", "al mesh"): {
("open", "al_mesh"): {
2: "term_p2am_20150718_160913.fits",
3: "term_p3am_20170808_180126.fits",
4: "term_p4am_20180712_171919.fits",
5: "term_p5am_20220709_180901.fits",
},
("al poly", "open"): {
("al_poly", "open"): {
2: "term_p2ap_20150620_172818.fits",
3: "term_p3ap_20170809_183821.fits",
4: "term_p4ap_20180712_171928.fits",
5: "term_p5ap_20220709_180910.fits",
},
("c poly", "open"): {
("c_poly", "open"): {
2: "term_p2cp_20150620_190645.fits",
},
("open", "ti poly"): {
("open", "ti_poly"): {
1: "term_p1tp_20140515_182503.fits",
2: "term_p2tp_20150718_160921.fits",
},
Expand Down Expand Up @@ -206,9 +206,9 @@ def remove_lightleak(in_map, scale=1.0, leak_map=None):
warnings.warn("HISTORY indicates light leak subtraction already done on image.") # noqa: B028

if leak_map is None:
leak_filename = _select_lightleak_file(
*in_map.measurement.split("-"), in_map.date
)
fw1 = in_map.meta["EC_FW1_"]
fw2 = in_map.meta["EC_FW2_"]
leak_filename = _select_lightleak_file(fw1, fw2, in_map.date)

# NOTE: This function is being defined inline because the filename is only known once
# the date and filter wheel combination are known.
Expand Down
Loading