Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions docs/changes/567.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed conditional logic to display the limit only when magnitude is not present.
1 change: 1 addition & 0 deletions src/goats_tom/brokers/antares.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ def process_lightcurve_data(self, alert=None):
"ant_passband": "filter",
}
)
lightcurve["limit"] = lightcurve["limit"].where(lightcurve["magnitude"].isna())

try:
survey = alert_dict.get("properties", {}).get("survey", {})
Expand Down
2 changes: 1 addition & 1 deletion tests/goats_tom/brokers/test_antares.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def test_process_lightcurve_data_success(broker):

def test_process_lightcurve_data_telescope_unknown(broker):
alert = {
"lightcurve": [{"ant_mjd": 1.0, "ant_mag": 18.0}],
"lightcurve": [{"ant_mjd": 1.0, "ant_mag": 18.0, "ant_maglim": 19}],
"properties": {},
}

Expand Down