Commit 342b1454 authored by Roberto Susino's avatar Roberto Susino
Browse files

Add demodulation angles in history after demodulation

parent 7e3d55ed
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -167,6 +167,7 @@ pro metis_l2_prep_vl_polariz

	demod_tensor = fltarr(header.naxis1, header.naxis2, 4)
	
	angles = !null
	stokes_name = ['I', 'Q', 'U']
	stokes = dblarr(header.naxis1, header.naxis2, 3)
	stokes_subdark = dblarr(header.naxis1, header.naxis2, 3)
@@ -193,6 +194,10 @@ pro metis_l2_prep_vl_polariz
			angle = dacpol_cal.angle[k]
			angle = angle[0]

			if isa(angles) then begin
				if n_elements(angles) lt 4 then  angles = [angles, angle]
			endif else angles = angle

			journal, '  pol. angle = ' + string(angle, format = '(F0.1)')

			n = where(demod_info.angle eq angle and demod_info.stokes eq stokes_name[i], count)
@@ -231,6 +236,11 @@ pro metis_l2_prep_vl_polariz
			demod_tensor[*, *, 3] * data_subdark[*, *, 3]
	endfor

	demod_history = 'Demodulation performed for angles ' + string(angles, format = '(3(f0.1, ", "), f0.1)') + ' deg'

	tb_history = [tb_history, demod_history]
	pb_history = demod_history

	; compute the tb from the dark-subtracted stokes i and apply other calibrations

	journal, 'Calibrating total brightness...'