Exemplo n.º 1
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
Exemplo n.º 2
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")
Exemplo n.º 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"
                )
Exemplo n.º 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