Exemplo n.º 1
0
    def testLoadSkyCircle(self):
        loadANetObj = LoadAstrometryNetObjectsTask(config=self.config)

        ctrCoord = self.wcs.pixelToSky(afwGeom.Point2D(self.ctrPix))
        radius = ctrCoord.angularSeparation(self.wcs.pixelToSky(afwGeom.Box2D(self.bbox).getMin()))

        loadRes = loadANetObj.loadSkyCircle(ctrCoord=ctrCoord, radius=radius, filterName="r")
        self.assertEqual(len(loadRes.refCat), self.desNumStarsInSkyCircle)
Exemplo n.º 2
0
def prep_reference_loader(center, radius):
    """
    Return an astrometry.net reference loader.

    Parameters
    ----------
    center: lsst.afw.SpherePoint
        The center of the field you're testing on.
    radius: lsst.afw.geom.angle
        The radius to load objects around center.
    """
    refLoader = LoadAstrometryNetObjectsTask(LoadAstrometryNetObjectsConfig())
    # Make a copy of the reference catalog for in-memory contiguity.
    return refLoader.loadSkyCircle(center, radius, filterName='r').refCat.copy()
Exemplo n.º 3
0
    def _prep_reference_loader(self, center, radius):
        """
        Setup an astrometry.net reference loader.

        Parameters
        ----------

        center : afw.coord
            The center of the field you're testing on.
        radius : afw.geom.angle
            The radius to load objects around center.
        """
        refLoader = LoadAstrometryNetObjectsTask(LoadAstrometryNetObjectsConfig())
        # Make a copy of the reference catalog for in-memory contiguity.
        self.reference = refLoader.loadSkyCircle(center, radius, filterName='r').refCat.copy()