Skip to content

Commit

Permalink
Update nrc_utils.py
Browse files Browse the repository at this point in the history
add assert messages
  • Loading branch information
JarronL committed Jul 12, 2019
1 parent dac10ab commit 53fddde
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pynrc/nrc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ def psf_coeff(filter_or_bp, pupil=None, mask=None, module='A',
opd = (opd, 0)
# Default WFE drift
wfe_drift = 0 if wfe_drift is None else wfe_drift
assert wfe_drift >= 0
assert wfe_drift >= 0, "wfe_drift must not be negative"

# Get filter throughput and create bandpass
if isinstance(filter_or_bp, six.string_types):
Expand Down Expand Up @@ -4396,8 +4396,8 @@ def sp_accr(mmdot, rin=2, dist=10, truncated=False,
mdot_vals = np.unique(tbl['MMdot'])
nmdot = len(mdot_vals)

assert (rin >=rin_vals.min()) & (rin <=rin_vals.max())
assert (mmdot>=mdot_vals.min()) & (mmdot<=mdot_vals.max())
assert (rin >=rin_vals.min()) & (rin <=rin_vals.max()), "rin is out of range"
assert (mmdot>=mdot_vals.min()) & (mmdot<=mdot_vals.max()), "mmdot is out of range"

if truncated:
mag_names = ('J2', 'H2', 'K2', 'L2', 'M2', 'N2')
Expand Down

0 comments on commit 53fddde

Please sign in to comment.