housekeeping
This commit is contained in:
18
views.py
18
views.py
@@ -1,7 +1,6 @@
|
||||
# uplim/views.py
|
||||
|
||||
# from astropy_healpix import HEALPix does not have an option to
|
||||
# search for pixels non-inclusively
|
||||
# from astropy_healpix import HEALPix does not have an option to search for pixels non-inclusively so we have to use healpy
|
||||
import healpy as hp
|
||||
import astropy.units as u
|
||||
import numpy as np
|
||||
@@ -679,7 +678,7 @@ class StackedUpperLimitView(APIView):
|
||||
or annulus_pixels.filter(contaminated=True).exists()
|
||||
)
|
||||
|
||||
# exclude contaminated pixels from the background and source regions
|
||||
# exclude contaminated pixels from the background regions
|
||||
annulus_pixels = annulus_pixels.exclude(contaminated=True)
|
||||
# source_pixels = source_pixels.exclude(contaminated=True)
|
||||
|
||||
@@ -914,10 +913,6 @@ class StackedUpperLimitView(APIView):
|
||||
|
||||
# iterate over source vectors, making maps
|
||||
|
||||
# # Create a single list to hold all Healpix IDs
|
||||
# all_map_pixels = []
|
||||
# source_indices = []
|
||||
|
||||
hpid_to_source_indices_map = defaultdict(list)
|
||||
|
||||
# Iterate over source vectors and get all unique Healpix IDs
|
||||
@@ -950,15 +945,6 @@ class StackedUpperLimitView(APIView):
|
||||
map_exposure_list = []
|
||||
map_source_indices_list = []
|
||||
|
||||
# # turn the queryset to a list
|
||||
# map_pixels_list = list(map_pixels_qs)
|
||||
|
||||
# # get lists of healpix indices and count values
|
||||
# map_healpix_list = [d["hpid"] for d in map_pixels_list]
|
||||
# map_counts_list = [d["counts"] for d in map_pixels_list]
|
||||
# map_exposure_list = [d["exposure"] for d in map_pixels_list]
|
||||
# # map_contaminated_list = [d["contaminated"] for d in map_pixels_list]
|
||||
|
||||
for hpid, source_indices in hpid_to_source_indices_map.items():
|
||||
# Check if this pixel was actually found in the database query
|
||||
if hpid in db_results_map:
|
||||
|
Reference in New Issue
Block a user