From ebf8e11866045fa4ff1145cdc8e3a19c159f6184 Mon Sep 17 00:00:00 2001 From: tyrin Date: Tue, 27 May 2025 11:00:53 +0300 Subject: [PATCH] added default value of nearby source search if mr=0 --- views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/views.py b/views.py index f1b1b09..b537450 100644 --- a/views.py +++ b/views.py @@ -369,7 +369,11 @@ class UpperLimitView(APIView): # NEARBY SOURCES CHECK # **************************************************************** - radius_as = map_radius * 2 + if map_radius == 0: + radius_as = 5 * aperture_radius + else: + radius_as = map_radius * 2 + radius_deg = radius_as / 3600 dec_min = max(dec - radius_deg, -90)