Exemplo n.º 1
0
 def compute_offset_xy_crosscor_regions(self, arrs, regions, refine=False, tol=0.5):
     offsets_xy = offsets_from_crosscor_regions(
         arrs, regions,
         refine=refine, order='xy', tol=tol
     )
     self.logger.debug("offsets_xy cross-corr %s", offsets_xy)
     # Offsets in numpy order, swaping
     return offsets_xy
Exemplo n.º 2
0
    def compute_offset_xy_crosscor_regions(self, iinfo, regions, refine=False, tol=0.5):

        names = [frame.lastname for frame in iinfo]
        print(names)
        print(regions)
        with nfcom.manage_fits(names) as imgs:
            arrs = [img[0].data for img in imgs]
            offsets_xy = offsets_from_crosscor_regions(
                arrs, regions,
                refine=refine, order='xy', tol=tol
            )
            self.logger.debug("offsets_xy cross-corr %s", offsets_xy)
            # Offsets in numpy order, swaping
        return offsets_xy
Exemplo n.º 3
0
    def compute_offset_crosscor_regions(self, arrs, regions, subpixshape, refine=False, tol=0.5):
        offsets_xy = offsets_from_crosscor_regions(
            arrs, regions,
            refine=refine, order='xy', tol=tol
        )
        self.logger.debug("offsets_xy cross-corr %s", offsets_xy)
        # Offsets in numpy order, swaping
        offsets_fc = offsets_xy[:, ::-1]
        offsets_fc_t = numpy.round(offsets_fc).astype('int')

        self.logger.info('Computing relative offsets from cross-corr')
        finalshape, offsetsp = combine_shape(subpixshape, offsets_fc_t)

        return finalshape, offsetsp, offsets_xy
Exemplo n.º 4
0
    def compute_offset_xy_crosscor_regions(self,
                                           iinfo,
                                           regions,
                                           refine=False,
                                           tol=0.5):

        names = [frame.lastname for frame in iinfo]
        with nfcom.manage_fits(names) as imgs:
            arrs = [img[0].data for img in imgs]
            offsets_xy = offsets_from_crosscor_regions(arrs,
                                                       regions,
                                                       refine=refine,
                                                       order='xy',
                                                       tol=tol)
            self.logger.debug("offsets_xy cross-corr:\n%s", offsets_xy)
        return offsets_xy