def testb_initPiezo(): config = confParse.loadSoapyConfig(os.path.join(CONFIG_PATH, "sh_8x8.yaml")) mask = aotools.circle(config.sim.pupilSize/2., config.sim.simSize) wfs = WFS.ShackHartmann(config, mask=mask) dm = DM.Piezo(config, n_dm=1, wfss=[wfs], mask=mask)
def testb_initPiezo(self): config = confParse.Configurator(os.path.join(CONFIG_PATH, "sh_8x8.py")) config.loadSimParams() mask = aoSimLib.circle(config.sim.pupilSize / 2., config.sim.simSize) wfs = WFS.ShackHartmann(config, mask=mask) self.dm = DM.Piezo(config, wfss=[wfs], mask=mask)
import numpy from soapy import confParse, SCI, atmosphere, DM from SPGD import SPGD # setup soapy conf 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)