Beispiel #1
0
    def setMask(self, mask):
        super(ShackHartmannLegacy, self).setMask(mask)

        # Find the mask to apply to the scaled EField
        self.scaledMask = numpy.round(
            interp.zoom(self.mask, self.scaledEFieldSize))

        p = self.sim_pad
        self.subapFillFactor = wfs.computeFillFactor(
            self.mask[p:-p, p:-p], self.subapCoords,
            round(float(self.pupil_size) / self.wfsConfig.nxSubaps))
    def setMask(self, mask):
        super(ShackHartmannLegacy, self).setMask(mask)

        # Find the mask to apply to the scaled EField
        self.scaledMask = numpy.round(interp.zoom(
                    self.mask, self.scaledEFieldSize))

        p = self.sim_pad
        self.subapFillFactor = wfs.computeFillFactor(
                self.mask[p:-p, p:-p],
                self.subapCoords,
                round(float(self.pupil_size)/self.wfsConfig.nxSubaps)
                )
Beispiel #3
0
def test_computeFillFactor():
    mask = circle(49, 100)
    sub_aperture_positions = numpy.array(([[10, 10], [10, 0]]))
    sub_aperture_spacing = 10
    fill_factor = wfs.computeFillFactor(mask, sub_aperture_positions, sub_aperture_spacing)
    assert len(fill_factor) == 2