Skip to content
Snippets Groups Projects
Commit 750fe3b2 authored by Roberto Susino's avatar Roberto Susino
Browse files

Manage new bad-pixel maps including ref. rows

parent b1444aed
No related branches found
No related tags found
No related merge requests found
...@@ -205,6 +205,13 @@ pro metis_l1_prep ...@@ -205,6 +205,13 @@ pro metis_l1_prep
bad_pixel_map = readfits(cal_pack.path + channel.bad_pixel_map[0].file_name, /silent) bad_pixel_map = readfits(cal_pack.path + channel.bad_pixel_map[0].file_name, /silent)
; adjust the map based on the presence of the reference rows
map_size = size(bad_pixel_map)
ref_rows = fxpar(primary_header, 'REF_ROWS', missing = -1)
if ref_rows ge 0 then first_row = ref_rows ? 2 : 0 else first_row = 0
bad_pixel_map = bad_pixel_map[*, first_row : first_row + map_size[1] - 1]
; rebin the bad-pixel map to the size of the image to be corrected ; rebin the bad-pixel map to the size of the image to be corrected
bad_pixel_map = rebin(bad_pixel_map, naxis1, naxis2) * bin_fact^2 bad_pixel_map = rebin(bad_pixel_map, naxis1, naxis2) * bin_fact^2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment