Skip to content

Commit

Permalink
Merge pull request #19 from lsst/tickets/OPSIM-1105
Browse files Browse the repository at this point in the history
Tickets/opsim 1105
  • Loading branch information
yoachim authored Jan 4, 2024
2 parents 371ce16 + dc7fd36 commit 4d0b64e
Show file tree
Hide file tree
Showing 3 changed files with 201 additions and 165 deletions.
4 changes: 2 additions & 2 deletions rubin_scheduler/scheduler/basis_functions/basis_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,13 +874,13 @@ def __init__(self, nside=None, max_airmass=2.5, penalty=np.nan):

def _calc_value(self, conditions, indx=None):
result = self.result.copy()
valid_airmass = np.isfinite(conditions.airmass)
valid_airmass = np.where(np.isfinite(conditions.airmass) == True)[0]
good_pix = np.where(
(conditions.airmass[valid_airmass] >= 1.0)
& (IntRounded(conditions.airmass[valid_airmass]) < self.max_airmass)
& (IntRounded(np.abs(conditions.az_to_sun[valid_airmass])) < IntRounded(np.pi / 2.0))
)
result[valid_airmass][good_pix] = (
result[valid_airmass[good_pix]] = (
conditions.airmass[valid_airmass][good_pix] / self.max_airmass.initial
)
return result
Expand Down
Loading

0 comments on commit 4d0b64e

Please sign in to comment.