switched to arc seconds for separation and mask_radius fields

This commit is contained in:
Никита Тырин 2025-05-27 11:19:17 +03:00
parent 85a96b5fb2
commit c144285f88

View File

@ -395,13 +395,13 @@ class UpperLimitView(APIView):
# refine belt to circular region using astropy separation # refine belt to circular region using astropy separation
for catsrc in belt_sources: for catsrc in belt_sources:
catsrc_coord = SkyCoord(catsrc.ra_deg, catsrc.dec_deg, unit="deg") catsrc_coord = SkyCoord(catsrc.ra_deg, catsrc.dec_deg, unit="deg")
separation = center_coord.separation(catsrc_coord).deg separation = center_coord.separation(catsrc_coord)
if separation > radius_deg: if separation.deg > radius_deg:
continue continue
f = catsrc.flux or 0.0 f = catsrc.flux or 0.0
for lb in reversed(sorted_bounds): for lb in reversed(sorted_bounds):
if f >= lb: if f >= lb:
mask_radius = radius_map[lb] mask_radius = radius_map[lb] * 3600
break break
nearby_sources.append( nearby_sources.append(
@ -417,8 +417,8 @@ class UpperLimitView(APIView):
"catalog_name": catsrc.catalog_name, "catalog_name": catsrc.catalog_name,
"new_xray": catsrc.new_xray, "new_xray": catsrc.new_xray,
"source_type": catsrc.source_type, "source_type": catsrc.source_type,
"mask_radius_deg": mask_radius, "mask_radius_as": mask_radius,
"separation_deg": separation, "separation_as": separation.arcsecond,
} }
) )