Skip to content

Commit

Permalink
Updated the functions
Browse files Browse the repository at this point in the history
  • Loading branch information
s0larish authored Nov 2, 2023
1 parent e118d0f commit 1d5aaa6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions solpolpy/polarizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ def npol_to_mzp(input_cube):

if input_cube['angle_1'].meta['OBSRVTRY'] == 'STEREO_B':
offset_angle = -18 * u.degree * conv_fact # STEREOB
if input_cube['angle_1'].meta['OBSRVTRY'] == 'STEREO_A':
elif input_cube['angle_1'].meta['OBSRVTRY'] == 'STEREO_A':
offset_angle = 45.8 * u.degree * conv_fact # STEREOA
else:
offset_angle = 0

for p_angle in in_list:
if p_angle == "alpha":
Expand All @@ -33,7 +35,7 @@ def npol_to_mzp(input_cube):
mzp_ang = [-60, 0, 60]
Bmzp = {}
for ang in mzp_ang: Bmzp[ang * u.degree] = (1 / 3) * np.sum(
[ith_polarizer_brightness * (1 + 2 * np.cos(2 * (ang * u.degree * conv_fact - (ith_angle-offset_angle))))
[ith_polarizer_brightness * (1 + 2 * np.cos(2 * (ang * u.degree * conv_fact - (ith_angle-offset_angle* u.degree * conv_fact))))
for ith_angle, ith_polarizer_brightness in input_dict.items()], axis=0)

# todo: update header properly; time info?
Expand Down

0 comments on commit 1d5aaa6

Please sign in to comment.