41 from PyQt5.uic
import loadUiType
49 ExpertWidgetTemplate, ExpertClassTemplate = uiLoader(
'widget_ao_expert')
55 ExpertClassTemplate.__init__(self)
82 self.
uiExpert.wao_selectRtcMatrix.currentIndexChanged.connect(
90 self.
uiExpert.wao_dmActuPushArcSecNumWFS.currentIndexChanged.connect(
102 self.
sim.rtc.set_gain(0, float(self.
uiExpert.wao_controlGain.value()))
103 print(
"Loop gain updated on GPU")
106 diffract = self.
sim.config.p_wfss[0].Lambda * \
107 1e-6 / self.
sim.config.p_tel.diam * CONST.RAD2ARCSEC
108 self.
uiExpert.wao_pyr_ampl_arcsec.setValue(
109 self.
uiExpert.wao_pyr_ampl.value() * diffract)
112 diffract = self.
sim.config.p_wfss[0].Lambda * \
113 1e-6 / self.
sim.config.p_tel.diam * CONST.RAD2ARCSEC
114 self.
uiExpert.wao_pyr_ampl_arcsec.setValue(
115 self.
sim.config.p_wfss[0].pyr_ampl * diffract)
119 comp_new_pyr_ampl(0, self.
uiExpert.wao_pyr_ampl.value(), self.
sim.config.p_wfss,
120 self.
sim.config.p_tel)
121 self.
sim.config.p_wfss[0].set_pyr_ampl(self.
uiExpert.wao_pyr_ampl.value())
122 print(
"Pyramid modulation updated on GPU")
126 push4imat = self.
uiExpert.wao_dmpush4iMat.value()
127 unitpervolt = self.
uiExpert.wao_dmUnitPerVolt.value()
128 self.
updateDMrange(push4imat=push4imat, unitpervolt=unitpervolt)
130 def updateDMrange(self, push4imat: float =
None, unitpervolt: float =
None) ->
None:
131 numdm = str(self.
uiExpert.wao_selectDM.currentText())
132 numwfs = str(self.
uiExpert.wao_dmActuPushArcSecNumWFS.currentText())
133 if ((numdm
is not "")
and (numwfs
is not "")
and (push4imat != 0)
and
136 int(numdm), int(numwfs), push4imat=push4imat,
137 unitpervolt=unitpervolt)
138 self.
uiExpert.wao_dmActPushArcsec.setValue(arcsecDMrange)
141 self.
uiExpert.wao_zenithAngle.setValue(self.
sim.config.p_geom.zenithangle)
142 self.
uiExpert.wao_diamTel.setValue(self.
sim.config.p_tel.diam)
143 self.
uiExpert.wao_cobs.setValue(self.
sim.config.p_tel.cobs)
146 ndm = self.
uiExpert.wao_selectDM.currentIndex()
149 self.
uiExpert.wao_dmActuPushArcSecNumWFS.clear()
150 self.
uiExpert.wao_dmActuPushArcSecNumWFS.addItems([
151 str(i)
for i
in range(len(self.
sim.config.p_dms))
153 self.
uiExpert.wao_numberofDMs.setText(str(len(self.
sim.config.p_dms)))
154 self.
uiExpert.wao_dmTypeSelector.setCurrentIndex(
155 self.
uiExpert.wao_dmTypeSelector.findText(
156 str(self.
sim.config.p_dms[ndm].type)))
157 self.
uiExpert.wao_dmAlt.setValue(self.
sim.config.p_dms[ndm].alt)
158 if (self.
sim.config.p_dms[ndm].type == scons.DmType.KL):
159 self.
uiExpert.wao_dmNactu.setValue(self.
sim.config.p_dms[ndm].nkl)
161 self.
uiExpert.wao_dmNactu.setValue(self.
sim.config.p_dms[ndm].nact)
162 self.
uiExpert.wao_dmUnitPerVolt.setValue(self.
sim.config.p_dms[ndm].unitpervolt)
163 self.
uiExpert.wao_dmpush4iMat.setValue(self.
sim.config.p_dms[ndm].push4imat)
164 self.
uiExpert.wao_dmCoupling.setValue(self.
sim.config.p_dms[ndm].coupling)
165 self.
uiExpert.wao_dmThresh.setValue(self.
sim.config.p_dms[ndm].thresh)
169 nwfs = self.
uiExpert.wao_selectWfs.currentIndex()
172 self.
uiExpert.wao_numberofWfs.setText(str(len(self.
sim.config.p_dms)))
173 self.
uiExpert.wao_wfsType.setText(str(self.
sim.config.p_wfss[nwfs].type))
174 self.
uiExpert.wao_wfsNxsub.setValue(self.
sim.config.p_wfss[nwfs].nxsub)
175 self.
uiExpert.wao_wfsNpix.setValue(self.
sim.config.p_wfss[nwfs].npix)
176 self.
uiExpert.wao_wfsPixSize.setValue(self.
sim.config.p_wfss[nwfs].pixsize)
177 self.
uiExpert.wao_wfsXpos.setValue(self.
sim.config.p_wfss[nwfs].xpos)
178 self.
uiExpert.wao_wfsYpos.setValue(self.
sim.config.p_wfss[nwfs].ypos)
179 self.
uiExpert.wao_wfsFracsub.setValue(self.
sim.config.p_wfss[nwfs].fracsub)
180 self.
uiExpert.wao_wfsLambda.setValue(self.
sim.config.p_wfss[nwfs].Lambda)
181 self.
uiExpert.wao_wfsMagnitude.setValue(self.
sim.config.p_wfss[nwfs].gsmag)
182 self.
uiExpert.wao_wfsZp.setValue(np.log10(self.
sim.config.p_wfss[nwfs].zerop))
183 self.
uiExpert.wao_wfsThrough.setValue(self.
sim.config.p_wfss[nwfs].optthroughput)
184 self.
uiExpert.wao_wfsNoise.setValue(self.
sim.config.p_wfss[nwfs].noise)
185 self.
uiExpert.wao_pyr_ampl.setValue(self.
sim.config.p_wfss[nwfs].pyr_ampl)
188 if (self.
sim.config.p_wfss[nwfs].gsalt > 0):
189 self.
uiExpert.wao_wfsIsLGS.setChecked(
True)
190 self.
uiExpert.wao_wfsGsAlt.setValue(self.
sim.config.p_wfss[nwfs].gsalt)
191 self.
uiExpert.wao_wfsLLTx.setValue(self.
sim.config.p_wfss[nwfs].lltx)
192 self.
uiExpert.wao_wfsLLTy.setValue(self.
sim.config.p_wfss[nwfs].llty)
193 self.
uiExpert.wao_wfsLGSpower.setValue(
194 self.
sim.config.p_wfss[nwfs].laserpower)
195 self.
uiExpert.wao_wfsReturnPerWatt.setValue(
196 self.
sim.config.p_wfss[nwfs].lgsreturnperwatt)
197 self.
uiExpert.wao_wfsBeamSize.setValue(self.
sim.config.p_wfss[nwfs].beamsize)
198 self.
uiExpert.wao_selectLGSProfile.setCurrentIndex(
199 self.
uiExpert.wao_selectLGSProfile.findText(
200 str(self.
sim.config.p_wfss[nwfs].proftype)))
203 self.
uiExpert.wao_wfsIsLGS.setChecked(
False)
205 if (self.
sim.config.p_wfss[nwfs].type ==
"pyrhr" or
206 self.
sim.config.p_wfss[nwfs].type ==
"pyr"):
207 self.
uiExpert.wao_wfs_plotSelector.setCurrentIndex(3)
211 nscreen = self.
uiExpert.wao_selectAtmosLayer.currentIndex()
214 self.
uiExpert.wao_r0.setValue(self.
sim.config.p_atmos.r0)
215 self.
uiExpert.wao_atmosNlayers.setValue(self.
sim.config.p_atmos.nscreens)
216 self.
uiExpert.wao_atmosAlt.setValue(self.
sim.config.p_atmos.alt[nscreen])
217 self.
uiExpert.wao_atmosFrac.setValue(self.
sim.config.p_atmos.frac[nscreen])
218 self.
uiExpert.wao_atmosL0.setValue(self.
sim.config.p_atmos.L0[nscreen])
219 self.
uiExpert.wao_windSpeed.setValue(self.
sim.config.p_atmos.windspeed[nscreen])
220 self.
uiExpert.wao_windDirection.setValue(
221 self.
sim.config.p_atmos.winddir[nscreen])
222 if (self.
sim.config.p_atmos.dim_screens
is not None):
223 self.
uiExpert.wao_atmosDimScreen.setText(
224 str(self.
sim.config.p_atmos.dim_screens[nscreen]))
225 self.
uiExpert.wao_atmosWindow.canvas.axes.cla()
226 width = (self.
sim.config.p_atmos.alt.max() / 20. + 0.1) / 1000.
227 self.
uiExpert.wao_atmosWindow.canvas.axes.barh(
228 self.
sim.config.p_atmos.alt / 1000. - width / 2.,
229 self.
sim.config.p_atmos.frac, width, color=
"blue")
230 self.
uiExpert.wao_atmosWindow.canvas.draw()
234 ncentro = self.
uiExpert.wao_selectCentro.currentIndex()
237 type = self.
sim.config.p_centroiders[ncentro].type
238 self.
uiExpert.wao_centroTypeSelector.setCurrentIndex(
239 self.
uiExpert.wao_centroTypeSelector.findText(str(type)))
241 self.
uiExpert.wao_centroThresh.setValue(
242 self.
sim.config.p_centroiders[ncentro].thresh)
243 if type == scons.CentroiderType.BPCOG:
244 self.
uiExpert.wao_centroNbrightest.setValue(
245 self.
sim.config.p_centroiders[ncentro].nmax)
246 if type == scons.CentroiderType.TCOG:
247 self.
uiExpert.wao_centroThresh.setValue(
248 self.
sim.config.p_centroiders[ncentro].thresh)
249 if type
in [scons.CentroiderType.CORR, scons.CentroiderType.WCOG]:
250 self.
uiExpert.wao_centroFunctionSelector.setCurrentIndex(
251 self.
uiExpert.wao_centroFunctionSelector.findText(
252 str(self.
sim.config.p_centroiders[ncentro].type_fct)))
253 self.
uiExpert.wao_centroWidth.setValue(
254 self.
sim.config.p_centroiders[ncentro].width)
257 type_contro = self.
sim.config.p_controllers[0].type
258 if (type_contro == scons.ControllerType.LS
and
259 self.
sim.config.p_controllers[0].modopti == 0):
260 self.
uiExpert.wao_controlTypeSelector.setCurrentIndex(0)
261 elif (type_contro == scons.ControllerType.MV):
262 self.
uiExpert.wao_controlTypeSelector.setCurrentIndex(1)
263 elif (type_contro == scons.ControllerType.GEO):
264 self.
uiExpert.wao_controlTypeSelector.setCurrentIndex(2)
265 elif (type_contro == scons.ControllerType.LS
and
266 self.
sim.config.p_controllers[0].modopti):
267 self.
uiExpert.wao_controlTypeSelector.setCurrentIndex(3)
268 elif (type_contro == scons.ControllerType.CURED):
269 self.
uiExpert.wao_controlTypeSelector.setCurrentIndex(4)
270 elif (type_contro == scons.ControllerType.GENERIC):
271 self.
uiExpert.wao_controlTypeSelector.setCurrentIndex(5)
273 print(
"Controller type enumeration invalid.")
275 self.
uiExpert.wao_controlCond.setValue(self.
sim.config.p_controllers[0].maxcond)
276 self.
uiExpert.wao_controlDelay.setValue(self.
sim.config.p_controllers[0].delay)
277 self.
uiExpert.wao_controlGain.setValue(self.
sim.config.p_controllers[0].gain)
278 self.
uiExpert.wao_controlTTcond.setValue(
279 self.
sim.config.p_controllers[0].maxcond)
282 ntarget = self.
uiExpert.wao_selectTarget.currentIndex()
285 self.
uiExpert.wao_numberofTargets.setText(str(len(self.
sim.config.p_targets)))
286 self.
uiExpert.wao_targetMag.setValue(self.
sim.config.p_target[ntarget].mag)
287 self.
uiExpert.wao_targetXpos.setValue(self.
sim.config.p_target[ntarget].xpos)
288 self.
uiExpert.wao_targetYpos.setValue(self.
sim.config.p_target[ntarget].ypos)
289 self.
uiExpert.wao_targetLambda.setValue(self.
sim.config.p_target[ntarget].Lambda)
300 self.
sim.config.p_tel.set_diam(self.
uiExpert.wao_diamTel.value())
301 self.
sim.config.p_tel.set_cobs(self.
uiExpert.wao_cobs.value())
302 self.
sim.config.p_geom.set_zenithangle(self.
uiExpert.wao_zenithAngle.value())
303 print(
"New telescope parameters set")
306 nscreen = self.
uiExpert.wao_selectAtmosLayer.currentIndex()
309 self.
sim.config.p_atmos.alt[nscreen] = self.
uiExpert.wao_atmosAlt.value()
310 self.
sim.config.p_atmos.frac[nscreen] = self.
uiExpert.wao_atmosFrac.value()
311 self.
sim.config.p_atmos.L0[nscreen] = self.
uiExpert.wao_atmosL0.value()
312 self.
sim.config.p_atmos.windspeed[nscreen] = self.
uiExpert.wao_windSpeed.value()
313 self.
sim.config.p_atmos.winddir[nscreen] = self.
uiExpert.wao_windDirection.value(
315 print(
"New atmos parameters set")
319 ncentro = self.
uiExpert.wao_selectCentro.currentIndex()
322 self.
sim.config.p_centroiders[ncentro].set_type(
323 str(self.
uiExpert.wao_centroTypeSelector.currentText()))
324 self.
sim.config.p_centroiders[ncentro].set_thresh(
325 self.
uiExpert.wao_centroThresh.value())
326 self.
sim.config.p_centroiders[ncentro].set_nmax(
327 self.
uiExpert.wao_centroNbrightest.value())
328 self.
sim.config.p_centroiders[ncentro].set_thresh(
329 self.
uiExpert.wao_centroThresh.value())
330 self.
sim.config.p_centroiders[ncentro].set_type_fct(
331 str(self.
uiExpert.wao_centroFunctionSelector.currentText()))
332 self.
sim.config.p_centroiders[ncentro].set_width(
333 self.
uiExpert.wao_centroWidth.value())
336 type_contro = str(self.
uiExpert.wao_controlTypeSelector.currentText())
337 if (type_contro ==
"LS"):
338 self.
sim.config.p_controllers[0].set_type(scons.ControllerType.LS)
339 elif (type_contro ==
"MV"):
340 self.
sim.config.p_controllers[0].set_type(scons.ControllerType.MV)
341 elif (type_contro ==
"PROJ"):
342 self.
sim.config.p_controllers[0].set_type(scons.ControllerType.GEO)
343 elif (type_contro ==
"OptiMods"):
344 self.
sim.config.p_controllers[0].set_type(scons.ControllerType.LS)
345 self.
sim.config.p_controllers[0].set_modopti(1)
347 self.
sim.config.p_controllers[0].set_maxcond(
348 self.
uiExpert.wao_controlCond.value())
349 self.
sim.config.p_controllers[0].set_delay(
350 self.
uiExpert.wao_controlDelay.value())
351 self.
sim.config.p_controllers[0].set_gain(self.
uiExpert.wao_controlGain.value())
354 print(
"New RTC parameters set")
357 nwfs = self.
uiExpert.wao_selectWfs.currentIndex()
360 self.
sim.config.p_wfss[nwfs].set_nxsub(self.
uiExpert.wao_wfsNxsub.value())
361 self.
sim.config.p_wfss[nwfs].set_npix(self.
uiExpert.wao_wfsNpix.value())
362 self.
sim.config.p_wfss[nwfs].set_pixsize(self.
uiExpert.wao_wfsPixSize.value())
363 self.
sim.config.p_wfss[nwfs].set_xpos(self.
uiExpert.wao_wfsXpos.value())
364 self.
sim.config.p_wfss[nwfs].set_ypos(self.
uiExpert.wao_wfsYpos.value())
365 self.
sim.config.p_wfss[nwfs].set_fracsub(self.
uiExpert.wao_wfsFracsub.value())
366 self.
sim.config.p_wfss[nwfs].set_Lambda(self.
uiExpert.wao_wfsLambda.value())
367 self.
sim.config.p_wfss[nwfs].set_gsmag(self.
uiExpert.wao_wfsMagnitude.value())
370 self.
sim.config.p_wfss[nwfs].set_zerop(10**(self.
uiExpert.wao_wfsZp.value()))
371 self.
sim.config.p_wfss[nwfs].set_optthroughput(
372 self.
uiExpert.wao_wfsThrough.value())
373 self.
sim.config.p_wfss[nwfs].set_noise(self.
uiExpert.wao_wfsNoise.value())
376 if (self.
uiExpert.wao_wfsIsLGS.isChecked()):
377 self.
sim.config.p_wfss[nwfs].set_gsalt(self.
uiExpert.wao_wfsGsAlt.value())
378 self.
sim.config.p_wfss[nwfs].set_lltx(self.
uiExpert.wao_wfsLLTx.value())
379 self.
sim.config.p_wfss[nwfs].set_llty(self.
uiExpert.wao_wfsLLTy.value())
380 self.
sim.config.p_wfss[nwfs].set_laserpower(
381 self.
uiExpert.wao_wfsLGSpower.value())
382 self.
sim.config.p_wfss[nwfs].set_lgsreturnperwatt(
383 self.
uiExpert.wao_wfsReturnPerWatt.value())
384 self.
sim.config.p_wfss[nwfs].set_beamsize(
385 self.
uiExpert.wao_wfsBeamSize.value())
386 self.
sim.config.p_wfss[nwfs].set_proftype(
387 str(self.
uiExpert.wao_selectLGSProfile.currentText()))
388 print(
"New WFS parameters set")
391 ndm = self.
uiExpert.wao_selectDM.currentIndex()
394 self.
sim.config.p_dms[ndm].set_type(
395 str(self.
uiExpert.wao_dmTypeSelector.currentText()))
396 self.
sim.config.p_dms[ndm].set_alt(self.
uiExpert.wao_dmAlt.value())
397 self.
sim.config.p_dms[ndm].set_nact(self.
uiExpert.wao_dmNactu.value())
398 self.
sim.config.p_dms[ndm].set_unitpervolt(
399 self.
uiExpert.wao_dmUnitPerVolt.value())
400 self.
sim.config.p_dms[ndm].set_coupling(self.
uiExpert.wao_dmCoupling.value())
401 self.
sim.config.p_dms[ndm].set_thresh(self.
uiExpert.wao_dmThresh.value())
402 print(
"New DM parameters set")
406 ndm = self.
uiExpert.wao_selectDM.currentIndex()
408 self.
sim.dms.resetdm(
409 str(self.
uiExpert.wao_dmTypeSelector.currentText()),
412 print(
"DM #%d reset" % ndm)
414 print(
"Invalid DM : please select a DM to reset")
416 print(
"There is no DM to reset")
420 nfilt = int(self.
uiExpert.wao_filterBtt.value())
421 ao.command_on_Btt(self.
sim.rtc, self.
sim.dms, self.
sim.config.p_dms,
422 self.
sim.config.p_geom, nfilt)
423 print(
"Loop is commanded from Btt basis now")
427 nfilt = int(self.
uiExpert.wao_filterBtt.value())
428 cmat = ao.command_on_KL(
429 self.
sim.rtc, self.
sim.dms, self.
sim.config.p_controllers[0],
430 self.
sim.config.p_dms, self.
sim.config.p_geom,
431 self.
sim.config.p_atmos, self.
sim.config.p_tel, nfilt)
432 self.
sim.rtc.set_cmat(0, cmat.astype(np.float32))
433 print(
"Loop is commanded from KL basis now")
436 typeText = str(self.
uiExpert.wao_wfs_plotSelector.currentText())
437 n = self.
uiExpert.wao_selectWfs.currentIndex()
438 self.
uiExpert.wao_wfsWindow.canvas.axes.clear()
439 ax = self.
uiExpert.wao_wfsWindow.canvas.axes
440 if ((self.
sim.config.p_wfss[n].type == scons.WFSType.PYRHR
or
441 self.
sim.config.p_wfss[n].type == scons.WFSType.PYRLR)
and
442 typeText ==
"Pyramid mod. pts" and self.
sim.is_init):
443 scale_fact = 2 * np.pi / self.
sim.config.p_wfss[n]._Nfft * \
444 self.
sim.config.p_wfss[n].Lambda * \
445 1e-6 / self.
sim.config.p_tel.diam / \
446 self.
sim.config.p_wfss[n]._qpixsize * CONST.RAD2ARCSEC
447 cx = self.
sim.config.p_wfss[n]._pyr_cx / scale_fact
448 cy = self.
sim.config.p_wfss[n]._pyr_cy / scale_fact
452 if not self.
sim.is_init:
458 type_matrix = str(self.
uiExpert.wao_selectRtcMatrix.currentText())
460 type_matrix ==
"imat" and
461 self.
sim.config.p_controllers[0].type != scons.ControllerType.GENERIC
463 self.
sim.config.p_controllers[0].type != scons.ControllerType.GEO):
464 data = self.
sim.rtc.get_imat(0)
465 elif (type_matrix ==
"cmat"):
466 data = self.
sim.rtc.get_cmat(0)
467 elif (type_matrix ==
"Eigenvalues"):
468 if (self.
sim.config.p_controllers[0].type == scons.ControllerType.LS
or
469 self.
sim.config.p_controllers[0].type == scons.
471 data = self.
sim.rtc.getEigenvals(0)
472 elif (type_matrix ==
"Cmm" and
473 self.
sim.config.p_controllers[0].type == scons.ControllerType.MV):
474 tmp = self.
sim.rtc.get_cmm(0)
475 ao.do_tomo_matrices(0, self.
sim.rtc, self.
sim.config.p_wfss,
476 self.
sim.dms, self.
sim.atm, self.
sim.wfs,
477 self.
sim.config.p_rtc, self.
sim.config.p_geom,
478 self.
sim.config.p_dms, self.
sim.config.p_tel,
479 self.
sim.config.p_atmos)
480 data = self.
sim.rtc.get_cmm(0)
481 self.
sim.rtc.set_cmm(0, tmp)
482 elif (type_matrix ==
"Cmm inverse" and
483 self.
sim.config.p_controllers[0].type ==
"mv"):
484 data = self.
sim.rtc.get_cmm(0)
485 elif (type_matrix ==
"Cmm eigen" and
486 self.
sim.config.p_controllers[0].type ==
"mv"):
487 data = self.
sim.rtc.getCmmEigenvals(0)
488 elif (type_matrix ==
"Cphim" and
489 self.
sim.config.p_controllers[0].type ==
"mv"):
490 data = self.
sim.rtc.get_cphim(0)
492 if (data
is not None):
493 self.
uiExpert.wao_rtcWindow.canvas.axes.clear()
494 ax = self.
uiExpert.wao_rtcWindow.canvas.axes
495 if (len(data.shape) == 2):
496 self.
uiExpert.wao_rtcWindow.canvas.axes.matshow(
497 data, aspect=
"auto", origin=
"lower", cmap=
"gray")
498 elif (len(data.shape) == 1):
500 self.
uiExpert.wao_rtcWindow.canvas.axes.plot(
501 list(range(len(data))), data, color=
"black")
503 if (type_matrix ==
"Eigenvalues"):
514 self.
uiExpert.wao_rtcWindow.canvas.axes.grid(which=
'both')
517 self.
uiExpert.wao_rtcWindow.canvas.axes.grid(
518 which=
'minor', alpha=0.2)
519 self.
uiExpert.wao_rtcWindow.canvas.axes.grid(
520 which=
'major', alpha=0.5)
521 nfilt = self.
sim.rtc.get_nfiltered(0, self.
sim.config.p_rtc)
522 self.
uiExpert.wao_rtcWindow.canvas.axes.plot([
523 nfilt - 0.5, nfilt - 0.5
524 ], [data.min(), data.max()], color=
"red", linestyle=
"dashed")
526 self.
uiExpert.wao_rtcWindow.canvas.axes.scatter(
527 np.arange(0, nfilt, 1), data[0:nfilt], color=
"red"
529 self.
uiExpert.wao_rtcWindow.canvas.axes.scatter(
530 np.arange(nfilt, len(data),
531 1), data[nfilt:], color=
"blue"
533 tt =
"%d modes Filtered" % nfilt
535 ax.text(0.5, 0.2, tt, horizontalalignment=
'center',
536 verticalalignment=
'center', transform=ax.transAxes)
538 self.
uiExpert.wao_rtcWindow.canvas.draw()
541 unitpervolt: float =
None) -> float:
543 if (push4imat
is None or push4imat == 0):
544 push4imat = self.
sim.config.p_dms[i].push4imat
545 if (unitpervolt
is None or unitpervolt == 0):
546 unitpervolt = self.
sim.config.p_dms[i].unitpervolt
548 actuPushInMicrons = push4imat * unitpervolt
549 coupling = self.
sim.config.p_dms[i].coupling
550 a = coupling * actuPushInMicrons
552 c = actuPushInMicrons
553 d = coupling * actuPushInMicrons
554 if (self.
sim.config.p_dms[i].type
is not scons.DmType.TT):
555 dist = self.
sim.config.p_tel.diam
557 dist = self.
sim.config.p_tel.diam / \
558 self.
sim.config.p_wfss[numwfs].nxsub
559 Delta = (1e-6 * (((c + d) / 2) - ((a + b) / 2)))
560 actuPushInArcsecs = CONST.RAD2ARCSEC * Delta / dist
561 return actuPushInArcsecs