Skip to content

Commit

Permalink
Return scalar gamma for scalar inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
skhrg committed Apr 2, 2024
1 parent 030b8c9 commit dfecc08
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sotodlib/coords/optics.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import logging
from functools import lru_cache, partial
import numpy as np
from numpy.core.numeric import isscalar
from scipy.interpolate import interp1d, bisplrep, bisplev
from scipy.spatial.transform import Rotation as R
from sotodlib import core
Expand Down Expand Up @@ -445,6 +446,8 @@ def LAT_focal_plane(aman, zemax_path, x=None, y=None, pol=None, roll=0, tube_slo
pol_x, pol_y, sec2elev, sec2xel, array2secx, array2secy, roll
)
gamma = get_gamma(pol_xi, pol_eta)
if np.isscalar(xi):
gamma = gamma[0]

if aman is not None:
focal_plane = core.AxisManager(aman.dets)
Expand Down Expand Up @@ -545,6 +548,8 @@ def SAT_focal_plane(aman, x=None, y=None, pol=None, roll=0, mapping_data=None):
pol_xi = _xi * np.cos(np.deg2rad(roll)) - _eta * np.sin(np.deg2rad(roll))
pol_eta = _eta * np.cos(np.deg2rad(roll)) + _xi * np.sin(np.deg2rad(roll))
gamma = get_gamma(pol_xi, pol_eta)
if np.isscalar(xi):
gamma = gamma[0]

if aman is not None:
focal_plane = core.AxisManager(aman.dets)
Expand Down

0 comments on commit dfecc08

Please sign in to comment.