diff --git a/views.py b/views.py index 5ec1f34..bef6616 100644 --- a/views.py +++ b/views.py @@ -176,13 +176,6 @@ class UpperLimitView(APIView): annulus_inner = 142 # 2 * aperture_radius annulus_outer = 284 # 4 * aperture_radius - # default value if not specified in the query - # get hpids within a circle of radius sqrt(2) * outer annulus radius - if map_radius_value is None: - map_radius = annulus_outer * np.sqrt(2) - else: - map_radius = float(map_radius_value) - # CREATE SKYCOORD, CONVERT TO GALACTIC BECAUSE THE HEALPIX # MAP ITSELF WAS MADE IN GALACTIC COORDINATES # ************************************************************** @@ -369,12 +362,12 @@ class UpperLimitView(APIView): # NEARBY SOURCES CHECK # **************************************************************** - if map_radius == 0: - radius_as = 5 * aperture_radius - else: - 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 + radius_deg = 3 # radius_as / 3600 dec_min = max(dec - radius_deg, -90) dec_max = min(dec + radius_deg, 90) @@ -425,6 +418,13 @@ class UpperLimitView(APIView): # REGION IMAGE SERVING # **************************************************************** + # default value if not specified in the query + # get hpids within a circle of radius sqrt(2) * outer annulus radius + if map_radius_value is None: + map_radius = annulus_outer * np.sqrt(2) + else: + map_radius = float(map_radius_value) + map_pixel_list = hp.query_disc( nside=4096, vec=src_vec,