23 from __future__
import absolute_import, division, print_function
24 from builtins
import object
31 """!Construct the indexer object
33 @param[in] depth depth of the hierarchy to construct
35 self.
htm = esutil.htm.HTM(depth)
38 """!Get all shards that touch a circular aperture
40 @param[in] ctrCoord afwCoord.Coord object of the center of the aperture
41 @param[in] radius afwGeom.Angle object of the aperture radius
42 @param[out] A pipeBase.Struct with the list of shards, shards, and a boolean arry, boundary_mask,
43 indicating whether the shard touches the boundary (True) or is fully contained (False).
45 pixel_id_list = self.htm.intersect(ctrCoord.getLongitude().asDegrees(),
46 ctrCoord.getLatitude().asDegrees(),
47 radius.asDegrees(), inclusive=
True)
48 covered_pixel_id_list = self.htm.intersect(ctrCoord.getLongitude().asDegrees(),
49 ctrCoord.getLatitude().asDegrees(),
50 radius.asDegrees(), inclusive=
False)
51 is_on_boundary = (pixel_id
not in covered_pixel_id_list
for pixel_id
in pixel_id_list)
52 return pixel_id_list, is_on_boundary
55 """!Generate trixel ids for each row in an input file
57 @param[in] ra_list List of RA coordinate in degrees
58 @param[in] dec_list List of Dec coordinate in degrees
59 @param[out] A list of pixel ids
61 return self.htm.lookup_id(ra_list, dec_list)
65 """!Make a data id. Meant to be overridden.
66 @param[in] pixel_id An identifier for the pixel in question.
67 @param[in] dataset_name Name of the dataset to use.
68 @param[out] dataId (dictionary)
73 return {
'pixel_id': pixel_id,
'name':dataset_name}
def get_pixel_ids
Get all shards that touch a circular aperture.
def make_data_id
Make a data id.
def index_points
Generate trixel ids for each row in an input file.
def __init__
Construct the indexer object.