Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove an assert from modshift #58

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions exovetter/modshift/modshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,11 @@ def estimate_scatter(phi_days, flux, phi_pri_days, phi_sec_days,
# Measure rms of all other points
idx = ~(idx1 | idx2)
if not np.any(idx):
raise ValueError('RMS calculation failed')
rms = np.std(flux[idx])
Warning('RMS calculation failed. No points remain. \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a valid syntax. You need to import warnings first, and then use warnins.warn.

Using flux values near secondary.')
rms = np.std(flux[~idx1])
else:
rms = np.std(flux[idx])
return rms


Expand Down