Skip to content
Merged
Changes from all commits
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
8 changes: 5 additions & 3 deletions fink_filters/rubin/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,16 @@ def b_is_fading(
return is_fading


def b_is_new(midpointMjdTai: pd.Series, midpointMjdTaiFink: pd.Series) -> pd.Series:
def b_is_new(
midpointMjdTai: pd.Series, firstDiaSourceMjdTaiFink: pd.Series
) -> pd.Series:
"""Return alerts for which the underlying object is seen for the first time by Rubin

Parameters
----------
midpointMjdTai: pd.Series
Alert emission date
midpointMjdTaiFink: pd.Series
firstDiaSourceMjdTaiFink: pd.Series
MJD for the first detection by Rubin. Temporary
replacement for diaObject.firstDiaSourceMjdTai
which is not yet populated by the project.
Expand All @@ -244,5 +246,5 @@ def b_is_new(midpointMjdTai: pd.Series, midpointMjdTaiFink: pd.Series) -> pd.Ser
out: pd.Series of booleans
True if new. False otherwise
"""
is_new = (midpointMjdTai - midpointMjdTaiFink) == 0
is_new = (midpointMjdTai - firstDiaSourceMjdTaiFink) == 0
return is_new