예제 #1
0
파일: SCI.py 프로젝트: rahulbhadani/soapy
 def fibreEfield(self, size):
     fibre_efield = aotools.gaussian2d((self.sim_size, self.sim_size),
                                       (size, size))
     fibre_efield /= numpy.sqrt(
         numpy.sum(
             numpy.abs(
                 aotools.gaussian2d((self.sim_size * 3, self.sim_size * 3),
                                    (size, size)))**2))
     return fibre_efield
예제 #2
0
파일: DM.py 프로젝트: rahulbhadani/soapy
    def makeIMatShapes(self):
        """
        Generates the influence functions for the GaussStack DM.

        Creates a number of Guassian distributions which are centred at points
        across the pupil to act as DM influence functions. The width of the
        guassian is determined from the configuration file.
        """
        shapes = numpy.zeros(
            (self.n_acts, self.nx_dm_elements, self.nx_dm_elements))

        actSpacing = self.pupil_size / (self.dmConfig.nxActuators - 1)
        width = actSpacing / 2.

        for i in xrange(self.n_acts):
            x, y = self.valid_act_coords[i] * actSpacing
            shapes[i] = aotools.gaussian2d(self.nx_dm_elements,
                                           width,
                                           cent=(x, y))

        self.iMatShapes = shapes

        pad = self.simConfig.simPad
        self.iMatShapes = numpy.pad(self.iMatShapes,
                                    ((0, 0), (pad, pad), (pad, pad)),
                                    mode="constant")
예제 #3
0
    def makeIMatShapes(self):
        """
        Generates the influence functions for the GaussStack DM.

        Creates a number of Guassian distributions which are centred at points
        across the pupil to act as DM influence functions. The width of the
        guassian is determined from the configuration file.
        """
        shapes = numpy.zeros((
                self.n_acts, self.nx_dm_elements, self.nx_dm_elements))

        actSpacing = self.pupil_size/(self.dmConfig.nxActuators-1)
        width = actSpacing/2.

        for i in xrange(self.n_acts):
            x,y = self.valid_act_coords[i] * actSpacing
            shapes[i] = aotools.gaussian2d(
                    self.nx_dm_elements, width, cent=(x,y))

        self.iMatShapes = shapes

        pad = self.simConfig.simPad
        self.iMatShapes = numpy.pad(
                self.iMatShapes, ((0,0), (pad,pad), (pad,pad)), mode="constant"
                )
예제 #4
0
 def fibreEfield(self, size):
     fibre_efield = aotools.gaussian2d((self.sim_size, self.sim_size), (size, size))
     fibre_efield /= numpy.sqrt(numpy.sum(numpy.abs(aotools.gaussian2d((self.sim_size*3, self.sim_size*3), (size, size)))**2))
     return fibre_efield