Beispiel #1
0
    def test_fibreFrame(self):
        config = confParse.Configurator(os.path.join(CONFIG_PATH, "sh_8x8.py"))
        config.loadSimParams()

        mask = circle.circle(config.sim.pupilSize/2., config.sim.simSize)

        sci = SCI.singleModeFibre(
                config, 0, mask)
Beispiel #2
0
    def test_sciInit(self):

        config = confParse.Configurator(os.path.join(CONFIG_PATH, "sh_8x8.py"))
        config.loadSimParams()

        mask = aoSimLib.circle(config.sim.pupilSize/2., config.sim.simSize)

        sci = SCI.scienceCam(
                config.sim, config.tel, config.atmos, config.scis[0], mask)
Beispiel #3
0
    def test_sciStrehl(self):
        config = confParse.Configurator(os.path.join(CONFIG_PATH, "sh_8x8.py"))
        config.loadSimParams()

        mask = aoSimLib.circle(config.sim.pupilSize/2., config.sim.simSize)

        sci = SCI.scienceCam(
                config.sim, config.tel, config.atmos, config.scis[0], mask)

        sci.frame(numpy.ones((config.sim.simSize, config.sim.simSize)))

        self.assertTrue(numpy.allclose(sci.instStrehl, 1.))
Beispiel #4
0
conf_path = "conf/sim.yaml"
conf = confParse.loadSoapyConfig(conf_path)

# setup atmospheric distortion
atmos = atmosphere.atmos(conf)
dist = atmos.randomScrns()

# setup simulations DM
dm = DM.Piezo(conf)
n_acts = dm.getActiveActs()

# initiate control object
control = numpy.zeros((conf.sim.nDM, conf.sim.scrnSize, conf.sim.scrnSize))

# setup camera
cam = SCI.PSF(conf)

# light with no correction
beam = cam.frame(dist[0]).copy()

# target
target = cam.frame(None).copy()

# import SPGDutils
# target = SPGDutils.generate_gaussian_target(beam, 10)


# system wrapper
class SystemWrapper:
    def __init__(self, configuration, mirror, camera, distortion):
        self.configuration = configuration