Skip to content

Commit

Permalink
fix size
Browse files Browse the repository at this point in the history
  • Loading branch information
FusRoman committed Dec 11, 2023
1 parent cd3c8ce commit afaff59
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
10 changes: 6 additions & 4 deletions fink_fat/streaming_associations/fitroid_assoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,14 @@ def fitroid_association(
logger.warning("files containing the kalman filters not found", exc_info=1)
return flags, estimator_id, ffdistnr

if len(fit_to_keep) == 0:
if len(fit_pdf) != 0:
# filter the polyfit estimators to keep only those inside the current exposures.
fit_to_keep = fit_filter(fit_pdf, ra_mask, dec_mask)
if len(fit_to_keep) == 0:
return flags, estimator_id, ffdistnr
else:
return flags, estimator_id, ffdistnr

# filter the polyfit estimators to keep only those inside the current exposures.
fit_to_keep = fit_filter(fit_pdf, ra_mask, dec_mask)

fit_pred = fitroid_prediction(fit_to_keep, jd_unique)

next_assoc, pred_assoc, sep = night_to_night_separation_association(
Expand Down
8 changes: 5 additions & 3 deletions fink_fat/streaming_associations/orbit_assoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,13 @@ def orbit_association(
logger.warning("files containing the orbits not found", exc_info=1)
return flags, estimator_id, ffdistnr

if len(orbit_to_keep) == 0:
if len(orbit_pdf) != 0:
orbit_to_keep = orbit_window(orbit_pdf, coord_alerts, jd_unique, orbit_tw)
if len(orbit_to_keep) == 0:
return flags, estimator_id, ffdistnr
else:
return flags, estimator_id, ffdistnr

orbit_to_keep = orbit_window(orbit_pdf, coord_alerts, jd_unique, orbit_tw)

# compute ephem from the latest orbits and find the matching alerts coordinates
ephem = compute_ephem(orbit_to_keep, jd_unique)
ephem_coord = SkyCoord(ephem["RA"], ephem["DEC"], unit=u.degree)
Expand Down

0 comments on commit afaff59

Please sign in to comment.