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
2 changes: 1 addition & 1 deletion fink_filters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "7.8"
__version__ = "7.9"
12 changes: 8 additions & 4 deletions fink_filters/ztf/livestream/filter_early_kn_candidates/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
from fink_filters import __file__
from fink_filters.tester import spark_unit_tests

log = logging.Logger("Kilonova filter")


def perform_classification(
drb,
Expand Down Expand Up @@ -143,7 +145,12 @@ def perform_classification(
)
# for a test on "many" objects, you may wait 1s to stay under the
# query limit.
table = SDSS.query_region(pos, fields=["type"], radius=5 * u.arcsec)
try:
table = SDSS.query_region(pos, fields=["type"], radius=5 * u.arcsec)
except requests.exceptions.ReadTimeout:
log.warning("Timeout when querying SDSS servers")
table = None

type_close_objects = []
if table is not None:
type_close_objects = table["type"]
Expand Down Expand Up @@ -454,7 +461,6 @@ def early_kn_candidates(
headers={"Content-Type": "application/json"},
)
else:
log = logging.Logger("Kilonova filter")
log.warning(error_message.format(url_name))

# Grandma amateur channel
Expand All @@ -475,7 +481,6 @@ def early_kn_candidates(
headers={"Content-Type": "application/json"},
)
else:
log = logging.Logger("Kilonova filter")
log.warning(error_message.format("KNWEBHOOK_AMA_GALAXIES"))

# DWF channel and requirements
Expand All @@ -490,7 +495,6 @@ def early_kn_candidates(
headers={"Content-Type": "application/json"},
)
else:
log = logging.Logger("Kilonova filter")
log.warning(error_message.format("KNWEBHOOK_DWF"))

return mask_filter
Expand Down