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
tickets/DM-29728 Introduce configurable actions for DataFrames #523
Conversation
@@ -0,0 +1,3 @@ | |||
from ._actions import * | |||
from ._baseDataFrameActions import DataFrameAction | |||
from ._evalColumnExpression import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these star imports legit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is pretty normal for a __init__
file, especially if the sub modules are "private"
with np.warnings.catch_warnings(): | ||
np.warnings.filterwarnings('ignore', r'invalid value encountered') | ||
np.warnings.filterwarnings('ignore', r'divide by zero') | ||
return -2.5 * np.log10(df[self.column] / fluxMag0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the plotting code runs on the object tables do you think it is worth making MagColumn by default operate on nanojanskies? The plotting code is currently the main user of these functions but I don't know if it will be forever.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to MagColumnDN to leave room for something from Janskeys or something
python/lsst/pipe/tasks/dataFrameActions/_baseDataFrameActions.py
Outdated
Show resolved
Hide resolved
# look up to see if the value is in cache already | ||
if result := self._actionCache.get(key): | ||
print("returning cache") | ||
return result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this print statement still be here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, good catch
This commit introduces a base class for configurable actions that works on Data Frames, basic concrete actions, and some supporting functions.
04a8a6f
to
fd1f42a
Compare
This commit introduces a base class for configurable actions that
works on Data Frames, basic concrete actions, and some supporting
functions.