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

Add the keyword POLANGLE to VL-image FITS headers

parent 60040876
Branches
Tags
No related merge requests found
......@@ -158,6 +158,32 @@ pro metis_l2_prep_vl_generic
sxdelpar, primary_header, 'BLANK'
; read the calibration curve to convert pmp raw voltages (dacpol) into effective polarization angles
dacpol_cal = cal_pack.vl_channel.dacpol_cal
if header.pol_id ne 5 then begin
if fix(header.hdr_vers) le 4 then begin
case header.pol_id of
0: dacpol = header.dac1pol1
1: dacpol = header.dac1pol1
2: dacpol = header.dac1pol2
3: dacpol = header.dac1pol3
4: dacpol = header.dac1pol4
endcase
endif
if fix(header.hdr_vers) ge 5 then begin
dacpol = header.dac1pol1
endif
k = where(dacpol_cal.dacpol eq dacpol)
angle = dacpol_cal.angle[k]
angle = float(angle[0])
fxaddpar, primary_header, 'POLANGLE', angle, '[deg] Polarization angle', after = 'POL_ID'
endif
; append wcs keywords
wcs = metis_wcs(header, cal_pack, ref_detector = ref_detector)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment