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

Remove an assert from modshift #58

wants to merge 2 commits into from

Conversation

mustaric
Copy link
Collaborator

An assert in modshift would be better as as warning and returning a default value.

@mustaric mustaric requested a review from fergalm April 26, 2021 13:42
@codecov
Copy link

codecov bot commented Apr 26, 2021

Codecov Report

Merging #58 (e0e74ec) into master (cfe722b) will decrease coverage by 0.05%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #58      +/-   ##
==========================================
- Coverage   80.75%   80.70%   -0.06%     
==========================================
  Files          18       18              
  Lines        1195     1197       +2     
==========================================
+ Hits          965      966       +1     
- Misses        230      231       +1     
Impacted Files Coverage Δ
exovetter/modshift/modshift.py 89.18% <50.00%> (-0.54%) ⬇️
exovetter/model.py 90.32% <0.00%> (ø)
exovetter/vetters.py 86.13% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cfe722b...e0e74ec. Read the comment docs.

@@ -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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants