# The unit of camera rotation angle is in degree cameraRotation = 0 cameraMJD = 59580.0 obs = ObservationMetaData(pointingRA=RA, pointingDec=Dec, rotSkyPos=cameraRotation, mjd=mjdTime) # Instantiate the subsystems phoSimCommu = PhosimCommu() skySim = SkySim() # Instantiate the telescope tele = TeleFacade(phoSimCommu=phoSimCommu) # Set the subsystem directory tele.setSubSysConfigFile(phosimDir=phosimDir) # Update the telescope degree of freedom # dofInUm = np.zeros(50) # Camera piston in um # dofInUm[5] = 1000 # Camera dx in um # dofInUm[6] = 500 # Set the telescope DOF # tele.setDofInUm(dofInUm)
aFilter = "g" wavelengthInNm = 500 zAngleInDeg = 27.0912 boresight = (0, 0) mjdTime = 59552.3 # Instantiate the subsystems M1M3 = M1M3Sim() M2 = M2Sim() phoSimCommu = PhosimCommu() skySim = SkySim() # Instantiate the telescope # There is no camera correction for the comcam at this moment tele = TeleFacade(M1M3=M1M3, M2=M2, phoSimCommu=phoSimCommu) # Set the configuration file path tele.setConfigFile(configFilePath) # Set the subsystem directory tele.setSubSysConfigFile(M1M3dataDir=M1M3dataDir, M2dataDir=M2dataDir, phosimDir=phosimDir) # Set the comcam camera tele.setInstName("comcam10") # Add the star skySim.addStarByRaDecInDeg(0, 0, 0, 17) skySim.addStarByRaDecInDeg(1, 0.0033, 0.0033, 18)
iSim = 6 obsId = 9006000 aFilter = "g" wavelengthInNm = 500 zAngleInDeg = 27.0912 rotAngInDeg = -1.2323 / np.pi * 180.0 # Instantiate the subsystems cam = CamSim() M1M3 = M1M3Sim() M2 = M2Sim() phoSimCommu = PhosimCommu() metr = OpdMetrology() # Instantiate the telescope tele = TeleFacade(cam=cam, M1M3=M1M3, M2=M2, phoSimCommu=phoSimCommu) # Set the configuration file path tele.setConfigFile(configFilePath) # Set the subsystem directory tele.setSubSysConfigFile(camDataDir=camDataDir, M1M3dataDir=M1M3dataDir, M2dataDir=M2dataDir, phosimDir=phosimDir) # Write the perturbation command file pertCmdFilePath = tele.writePertBaseOnConfigFile(outputDir, zAngleInDeg=zAngleInDeg, rotAngInDeg=rotAngInDeg, seedNum=iSim,
Dec = 0 # The unit of camera rotation angle is in degree cameraRotation = 0 obs = ObservationMetaData(pointingRA=RA, pointingDec=Dec, rotSkyPos=cameraRotation, mjd=mjdTime) # Instantiate the subsystems phoSimCommu = PhosimCommu() skySim = SkySim() # Instantiate the telescope # There is no camera correction for the comcam at this moment tele = TeleFacade(phoSimCommu=phoSimCommu) # Set the subsystem directory tele.setSubSysConfigFile(phosimDir=phosimDir) # Set the comcam camera tele.setInstName("lsst") # Add the star sensorName = ["R22_S11", "R22_S10"] starMag = [15, 16.5, 15, 15] xInpixelInCam = [500, 500, 800, 950] yInPixelInCam = [1000, 1080, 1300, 1500] starId = 23 for sensor in sensorName:
outputImgDir = "./outputImg" cmdSettingFile = "./data/cmdFile/opdDefault.cmd" instSettingFile = "./data/instFile/opdDefault.inst" obsId = 9006050 aFilter = "g" opdWaveInNm = 500.0 # Declare the opd metrology and add the interested field points metr = OpdMetrology() metr.addFieldXYbyDeg(0, 0) metr.addFieldXYbyDeg(0.2, 0.3) # Set the Telescope facade class phoSimCommu = PhosimCommu() tele = TeleFacade(phoSimCommu=phoSimCommu) tele.setSubSysConfigFile(phosimDir=phosimDir) # Update the telescope degree of freedom dofInUm = np.zeros(50) # Camera dx dofInUm[6] = 1000 tele.setDofInUm(dofInUm) # Write the physical command file cmdFilePath = tele.writeCmdFile(outputDir, cmdSettingFile=cmdSettingFile, cmdFileName="opd.cmd") # Write the instance file
aFilter = "g" wavelengthInNm = 500 zAngleInDeg = 27.0912 rotAngInDeg = -1.2323 / np.pi * 180.0 boresight = (0, 0) mjdTime = 59552.3 # Instantiate the subsystems cam = CamSim() M1M3 = M1M3Sim() M2 = M2Sim() phoSimCommu = PhosimCommu() skySim = SkySim() # Instantiate the telescope tele = TeleFacade(cam=cam, M1M3=M1M3, M2=M2, phoSimCommu=phoSimCommu) # Set the configuration file path tele.setConfigFile(configFilePath) # Set the subsystem directory tele.setSubSysConfigFile(camDataDir=camDataDir, M1M3dataDir=M1M3dataDir, M2dataDir=M2dataDir, phosimDir=phosimDir) # Update the telescope degree of freedom # dofInUm = np.zeros(50) # Camera dx # dofInUm[6] = 1000