switched to arc seconds for separation and mask_radius fields
This commit is contained in:
parent
85a96b5fb2
commit
c144285f88
10
views.py
10
views.py
@ -395,13 +395,13 @@ class UpperLimitView(APIView):
|
||||
# refine belt to circular region using astropy separation
|
||||
for catsrc in belt_sources:
|
||||
catsrc_coord = SkyCoord(catsrc.ra_deg, catsrc.dec_deg, unit="deg")
|
||||
separation = center_coord.separation(catsrc_coord).deg
|
||||
if separation > radius_deg:
|
||||
separation = center_coord.separation(catsrc_coord)
|
||||
if separation.deg > radius_deg:
|
||||
continue
|
||||
f = catsrc.flux or 0.0
|
||||
for lb in reversed(sorted_bounds):
|
||||
if f >= lb:
|
||||
mask_radius = radius_map[lb]
|
||||
mask_radius = radius_map[lb] * 3600
|
||||
break
|
||||
|
||||
nearby_sources.append(
|
||||
@ -417,8 +417,8 @@ class UpperLimitView(APIView):
|
||||
"catalog_name": catsrc.catalog_name,
|
||||
"new_xray": catsrc.new_xray,
|
||||
"source_type": catsrc.source_type,
|
||||
"mask_radius_deg": mask_radius,
|
||||
"separation_deg": separation,
|
||||
"mask_radius_as": mask_radius,
|
||||
"separation_as": separation.arcsecond,
|
||||
}
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user