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

DM-22299: Speed up specific diaCalculation plugins using fast pandas functionality #65

Merged
merged 3 commits into from Dec 3, 2019

Conversation

morriscb
Copy link
Contributor

@morriscb morriscb commented Dec 2, 2019

No description provided.

Edit skew unittest. Was originally biased skew, now unbiased.
Copy link
Contributor

@eggls6 eggls6 left a comment

Choose a reason for hiding this comment

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

Approved with the optional comment of checking agg functions on numpy.

diaObjects.loc[:, "{}TOTFluxSigma".format(filterName)] = \
filterDiaSources.apply(_sigma)
filterDiaSources.totFlux.agg(np.nanstd)
Copy link
Contributor

Choose a reason for hiding this comment

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

check to see if std is nan safe and statistically unbiased / pandas function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checked and the pandas functions are nan-safe and unbiased. I have thus changed to using these functions directly rather than agg. Checked for any performance difference using timeit and found the run time to be nearly identical with slightly less variance per loop for the pandas builtin.

@morriscb morriscb merged commit 4a127a2 into master Dec 3, 2019
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