# Write the star physical command file cmdFilePath = tele.writeCmdFile(outputDir, cmdSettingFile=cmdSettingFile, pertFilePath=pertCmdFilePath, cmdFileName="starComCam.cmd") # Write the star instance file # Set the rot=0 for the simplification. But actually, there is no correction for ComCam. # However, the coordinate is affected by this. instFilePath = tele.writeStarInstFile( outputDir, skySim, obsId, aFilter, boresight=boresight, rot=0, mjd=mjdTime, sedName="sed_500.txt", sciSensorOn=True, instSettingFile=instSettingFile, instFileName=instFileNameList[str(ii)]) # Get the argument to run the phosim logFilePath = os.path.join(outputImgDirList[str(ii)], logFileNameList[str(ii)]) argString = tele.getPhoSimArgs(instFilePath, cmdFilePath=cmdFilePath, numPro=2, outputDir=outputImgDirList[str(ii)], e2ADC=0, logFilePath=logFilePath)
# Export sky information skySim.exportSkyToFile(outputFilePath) # Write the star physical command file cmdFilePath = tele.writeCmdFile(outputDir, cmdSettingFile=cmdSettingFile, cmdFileName="starWfsAll.cmd") # Write the star instance file # Use the rot=0 temporally. Need to update it latter. instFilePath = tele.writeStarInstFile(outputDir, skySim, obsId, aFilter, boresight=(RA, Dec), rot=cameraRotation, mjd=mjdTime, sedName="sed_500.txt", wfSensorOn=True, instSettingFile=instSettingFile, instFileName="starWfsAll.inst") # Write the accumulated DOF file tele.writeAccDofFile(outputDir) # Get the argument to run the phosim logFilePath = os.path.join(outputImgDir, "phosimStarWfsAll.log") argString = tele.getPhoSimArgs(instFilePath, cmdFilePath=cmdFilePath, numPro=8, outputDir=outputImgDir,
if (ii == -1): # Write the star physical command file cmdFilePath = tele.writeCmdFile(outputDir, cmdSettingFile=cmdSettingFile, cmdFileName="starLsstFam.cmd") # Write the star instance file # Set the rot=0 for the simplification. But actually, there is no correction for ComCam. # However, the coordinate is affected by this. instFilePath = tele.writeStarInstFile( outputDir, skySim, obsIdList[str(ii)], aFilter, boresight=(RA, Dec), rot=cameraRotation, mjd=mjdTime, sedName="sed_500.txt", sciSensorOn=True, instSettingFile=instSettingFile, instFileName=instFileNameList[str(ii)]) # Get the argument to run the phosim logFilePath = os.path.join(outputImgDirList[str(ii)], logFileNameList[str(ii)]) argString = tele.getPhoSimArgs(instFilePath, cmdFilePath=cmdFilePath, numPro=2, outputDir=outputImgDirList[str(ii)], e2ADC=1, logFilePath=logFilePath)