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

Outlier array fix #97

Merged
merged 2 commits into from
Dec 28, 2015
Merged

Outlier array fix #97

merged 2 commits into from
Dec 28, 2015

Conversation

dwysocki
Copy link
Member

This fixes all of the bugs described in #94.

It also fixes another bug discovered in the process: period is now only a parameter to get_lightcurve, and the internal variable _period has been brought back. The unchanged value of the input period turned out to have a subtle importance in a conditional.

I have corrected two bugs.

The first is described in part of issue #94. There was an array
dimension mismatch, that was caused by using masked arrays for some
values, and only the un-masked elements for other values. The solution
was to use masked arrays for both.

Another bug was uncovered while fixing that one. In `get_lightcurve`, I
had previously done away with the `_period` variable, and used `period`
both as the function parameter and as an internal variable. It turns out
that the distinction between `_period` and `period` actually had a
subtle importance, as `period` never changed, causing a certain
conditional to behave as expected. A new variable would need to be
introduced in order to do away with `_period`, so I changed things back
to their original form.
I have fixed the error described in issue #94, caused by a lack of
outliers. The array index error is just a symptom, the real problem is
that `matplotlib.pyplot.errorbar` will try to access element `0` in the
`yerr` array, even if it is empty. This is a bug in matplotlib.

The solution was to replace `yerr` with `None` whenever the value being
passed had length zero.
@dwysocki dwysocki added the bug label Dec 28, 2015
dwysocki added a commit that referenced this pull request Dec 28, 2015
@dwysocki dwysocki merged commit d384899 into develop Dec 28, 2015
@dwysocki dwysocki deleted the outlier-array-fix branch December 28, 2015 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant