Copy KL_v26 in ARGOS

m2c= pyfits.getdata('/home/argos/nfs/calib/DX/aarb/aoloop/m2c/KL_v26/m2c.fits')
c2m=np.linalg.pinv(m2c)
pyfits.writeto('/home/argos/nfs/calib/DX/aarb/aoloop/m2c/KL_v26/c2m.fits', c2m)

TN 20181202_191645
argos.lgsw.controller.setSlopeOffsetTag('zero')

TN 20181202_191850

Make modal history for KL_v26

mh10=AdsecModalHistory(np.arange(10), '20161205_214300', 'KL_v26', argos.aarbCalibrationManager)
mh50=AdsecModalHistory(np.arange(50), '20161205_214300', 'KL_v26', argos.aarbCalibrationManager)
mh150=AdsecModalHistory(np.arange(150), '20161205_214300', 'KL_v26', argos.aarbCalibrationManager)
argos.aarbCalibrationManager.saveAoLoopModalHistory(mh10, '20181202_192600')
argos.aarbCalibrationManager.saveAoLoopModalHistory(mh50, '20181202_192700')
argos.aarbCalibrationManager.saveAoLoopModalHistory(mh150, '20181202_192800')

Acquire IntMat for KL_v26

IM 10 modes, no rec (use old rec and gain=0)

imacq = lgswIM.AcquireLgswInteractionMatrix(argos.aarbCalibrationManager, lgsw.calibrationManager, argos.adsec, argos.lgsw.controller, argos.lgsw.controller.getActualSubaperturesDefinitionTag(), argos.lgsw.frameBuffer.isWfsCameraUpsideDown(), '20181201_033900', '20181202_192600', argos._logger, argos)
im= imacq.acquire(gain=0)
im.displayShift(np.arange(6))
im.generateInteractionMatrix(shift=2)
im.displayIM()
rec= im.createReconstructorObject(np.arange(10))
argos.aarbCalibrationManager.saveAoLoopLgswReconstructorMatrix(rec, '20181202_195900')

IM 50 modes

imacq = lgswIM.AcquireLgswInteractionMatrix(argos.aarbCalibrationManager, lgsw.calibrationManager, argos.adsec, argos.lgsw.controller, argos.lgsw.controller.getActualSubaperturesDefinitionTag(), argos.lgsw.frameBuffer.isWfsCameraUpsideDown(), '20181202_195900', '20181202_192700', argos._logger, argos)
im= imacq.acquire()
im.generateInteractionMatrix(shift=2)
rec= im.createReconstructorObject(np.arange(50))
argos.aarbCalibrationManager.saveAoLoopLgswReconstructorMatrix(rec, '20181202_200600')

IM 150

imacq = lgswIM.AcquireLgswInteractionMatrix(argos.aarbCalibrationManager, lgsw.calibrationManager, argos.adsec, argos.lgsw.controller, argos.lgsw.controller.getActualSubaperturesDefinitionTag(), argos.lgsw.frameBuffer.isWfsCameraUpsideDown(), '20181202_200600', '20181202_192800', argos._logger, argos)
im= imacq.acquire()
im.generateInteractionMatrix(shift=2)
im.displayIM()
rec= im.createReconstructorObject(np.arange(150))
argos.aarbCalibrationManager.saveAoLoopLgswReconstructorMatrix(rec, '20181202_201000')

Blue is not well illuminated

Make combo recs

Do some combined rec to check if loop can be closed

from argos.arbitrator.aoloop.combined_reconstructor_matrix import CombinedReconstructorMatrix
CombinedReconstructorMatrix.fromLgsw(argos.aarbCalibrationManager, '20181202_195900', '20181202_201100')
CombinedReconstructorMatrix.fromLgsw(argos.aarbCalibrationManager, '20181202_201000', '20181202_201200')
CombinedReconstructorMatrix.fromLgsw(argos.aarbCalibrationManager, '20181202_200600', '20181202_201300')

Check new recs

Measure some snapshots

  • TN 20181202_203248 rec 20181202_201100
  • TN 20181202_203523 rec 20181202_201100 dist 1.6 for KL_22 (20180221_160000)
  • TN 20181202_204552 rec 20181202_201100 dist 1.2 (20180221_120000)

!!Modal decomposition of turbolence and residual is weird at high modes!!. Let's produce AdsecDisturbance files for KL_v26

Add explanation of how modalplots are computed

Make new disturbance for KL 26

oldC2M= argos.aarbCalibrationManager.aoLoopC2M('KL_v22')
newM2C= argos.aarbCalibrationManager.aoLoopM2C('KL_v26')
d22=argos.aarbCalibrationManager.aoLoopAdsecDisturbance('20180221_120000')
mdist=np.dot(oldC2M, d22)
d26= np.dot(newM2C, mdist)
argos.aarbCalibrationManager.saveAoLoopAdsecDisturbance(d26, '20181202_120026', None)

TN 20181202_211130 rec 20181202_201300 dist 1.2 (20181202_120026)

Some strange behaviour of the AdSec after summer shutdown 2018

Now modal decomposition of disturb is ok, but ModalAdsecPosition of non-controlled modes still does not follow the disturbance !

  • TN 20181202_211911 zero gain dist 1.2 (20181202_120026)
  • TN 20181202_212424 zero gain nodist

IMA 20181202_xxx_turb_and_noturb_nogain.png

  • TN 20181202_214326 rec 20181202_201300 dist 1.2 (20181202_120026) 0.4g

Is the issue at modes>50 present also with old KL?

  • TN 20181202_223002 rec 20180223_233700 no dist g=0 (KL_v22)
  • TN 20181202_223439 rec 20180223_233700 no dist g=0 (KL_v22)

As a final test, we repeat the same exact measurement done in Feb18: TN 20180222_002351 and TN 20181202_225213 (same rec, disturbance, gain). The behaviour of the mirror is clearly different.

IMA 20181202_xxx_comparison_feb_dec_v22.png

Take 2

The old modalamplitude seems to be to smal for the modes > 60

We create another one, based on the IM of yesterday

f1=terminal.analyzer('20181202_031553')
im= f1.aarb.aoloop.getIm()
oldMA=f1.aarbCalibManager.aoLoopModalHistory(im.getModalHistoryTag()).modalAmplitudes()
newMA= oldMA*0.05/im._rms_slopes[:150,0]
f1.aarbCalibManager.saveAoLoopModalAmplitude(newMA, '20181203_031200')

New modal history

mh10=AdsecModalHistory(np.arange(10), '20181203_031200', 'KL_v26', argos.aarbCalibrationManager)
mh50=AdsecModalHistory(np.arange(50), '20181203_031200', 'KL_v26', argos.aarbCalibrationManager)
mh150=AdsecModalHistory(np.arange(150), '20181203_031200', 'KL_v26', argos.aarbCalibrationManager)
argos.aarbCalibrationManager.saveAoLoopModalHistory(mh10, '20181203_031700')
argos.aarbCalibrationManager.saveAoLoopModalHistory(mh50, '20181203_031800')
argos.aarbCalibrationManager.saveAoLoopModalHistory(mh150, '20181203_031900')

IM 10 modes

imacq = lgswIM.AcquireLgswInteractionMatrix(argos.aarbCalibrationManager, lgsw.calibrationManager, argos.adsec, argos.lgsw.controller, argos.lgsw.controller.getActualSubaperturesDefinitionTag(), argos.lgsw.frameBuffer.isWfsCameraUpsideDown(), '20181202_195900', '20181203_031700', argos._logger, argos)
im= imacq.acquire()
im.displayShift(np.arange(6))
im.generateInteractionMatrix(shift=3)
im.displayIM()
rec= im.createReconstructorObject(np.arange(10))
argos.aarbCalibrationManager.saveAoLoopLgswReconstructorMatrix(rec, '20181203_032500')

imacq = lgswIM.AcquireLgswInteractionMatrix(argos.aarbCalibrationManager, lgsw.calibrationManager, argos.adsec, argos.lgsw.controller, argos.lgsw.controller.getActualSubaperturesDefinitionTag(), argos.lgsw.frameBuffer.isWfsCameraUpsideDown(), '20180223_232800', '20181203_031900', argos._logger, argos)
im= imacq.acquire()
im= imacq.acquire(gain=0)
im.displayShift(np.arange(6))
im.generateInteractionMatrix(shift=3)
rec=im.createReconstructorObject(np.arange(150))
im.displaySlopeSaturation(0)
im.displaySlopeSaturation(1)
im.displaySlopeSaturation(2)
argos.aarbCalibrationManager.saveAoLoopLgswReconstructorMatrix(rec, '20181203_040300')

imacq = lgswIM.AcquireLgswInteractionMatrix(argos.aarbCalibrationManager, lgsw.calibrationManager, argos.adsec, argos.lgsw.controller, argos.lgsw.controller.getActualSubaperturesDefinitionTag(), argos.lgsw.frameBuffer.isWfsCameraUpsideDown(), '20181203_040300', '20181203_031900', argos._logger, argos)
im= imacq.acquire()
im.displayShift(np.arange(6))
im.generateInteractionMatrix(shift=3)
rec=im.createReconstructorObject(np.arange(150))
im.displaySlopeSaturation(0)
argos.aarbCalibrationManager.saveAoLoopLgswReconstructorMatrix(rec, '20181203_040800')

CombinedReconstructorMatrix.fromLgsw(argos.aarbCalibrationManager, '20181203_040800', '20181203_041100')

Does not work, amplitudes are now ok, but pupil are not fully illuminated during acquisition

Dr Frankstein

imacq = lgswIM.AcquireLgswInteractionMatrix(argos.aarbCalibrationManager, lgsw.calibrationManager, argos.adsec, argos.lgsw.controller,    argos.lgsw.controller.getActualSubaperturesDefinitionTag(), argos.lgsw.frameBuffer.isWfsCameraUpsideDown(), '20180223_232800_B', '20181203_031900', argos._logger, argos)
im= imacq.acquire(gainTT=0, gain=0.005)
im.displayShift(np.arange(6))
im.generateInteractionMatrix(shift=3)
rec=im.createReconstructorObject(np.arange(150))
argos.aarbCalibrationManager.saveAoLoopLgswReconstructorMatrix(rec, '20181203_062100')

imacq = lgswIM.AcquireLgswInteractionMatrix(argos.aarbCalibrationManager, lgsw.calibrationManager, argos.adsec, argos.lgsw.controller,    argos.lgsw.controller.getActualSubaperturesDefinitionTag(), argos.lgsw.frameBuffer.isWfsCameraUpsideDown(), '20180223_232800_Y', '20181203_031900', argos._logger, argos)
im= imacq.acquire(gain=0.05)
im.displayShift(np.arange(6))
im.generateInteractionMatrix(shift=3)
rec=im.createReconstructorObject(np.arange(150))
im.displaySlopeSaturation(1)
im.displayIM()
argos.aarbCalibrationManager.saveAoLoopLgswReconstructorMatrix(rec, '20181203_065800')

imacq = lgswIM.AcquireLgswInteractionMatrix(argos.aarbCalibrationManager, lgsw.calibrationManager, argos.adsec, argos.lgsw.controller,    argos.lgsw.controller.getActualSubaperturesDefinitionTag(), argos.lgsw.frameBuffer.isWfsCameraUpsideDown(), '20180223_232800_R', '20181203_031900', argos._logger, argos)
im= imacq.acquire(gain=0.05)
im.displayShift(np.arange(6))
im.generateInteractionMatrix(shift=3)
rec=im.createReconstructorObject(np.arange(150))
im.displaySlopeSaturation(1)
im.displaySlopeSaturation(2)
im.displayIM()
im.displayIMWithTipTiltSubtracted()
argos.aarbCalibrationManager.saveAoLoopLgswReconstructorMatrix(rec, '20181203_070400')

Frankie reconstructor

recB='20181203_062100'; recY='20181203_065800'; recR='20181203_070400'
from argos.terminal import sandbox
sbimr= sandbox.SingleBeamInteractionMatrixRecombiner(argos, recB, recY, recR)
sbimr.saveAs('20181203_083600')
imAll=argos.aarbCalibrationManager.aoLoopLgswInteractionMatrix('20181203_083600', argos.lgsw.calibrationManager)
rec=imAll.createReconstructorObject(np.arange(150))
argos.aarbCalibrationManager.saveAoLoopLgswReconstructorMatrix(rec, '20181203_083900')
CombinedReconstructorMatrix.fromLgsw(argos.aarbCalibrationManager, '20181203_083900', '20181203_084000')

TN 20181203_085135 Rec 20181203_084000 Dist no, g=0, 0.3, 0

TN 20181203_085257 Rec 20181203_084000 Dist no, g=0, 0.3, 0

TN 20181203_085534 Rec 20181203_084000 Dist no, g=0

TN 20181203_085840 Rec 20181203_084000 Dist 20181202_120026, g=0

TN 20181203_085950 Rec 20181203_084000 Dist 20181202_120026, g=0, 0.1, 0

TN 20181203_090126 Rec 20181203_084000 Dist 20181202_120026, g=0, 0.2, 0

TN 20181203_090233 Rec 20181203_084000 Dist 20181202_120026, g=0, 0.3, 0

TN 20181203_090319 Rec 20181203_084000 Dist 20181202_120026, g=0, 0.4, 0 Unstable

TN 20181203_090411 Rec 20181203_084000 Dist 20181202_120026, g=0, 0.3, 0.1

TN 20181203_090510 Rec 20181203_084000 Dist 20181202_120026, g=0, 0.3, 0.15 Unstable

A last one

Take a last one using 20181203_083900 as flattener

imacq = lgswIM.AcquireLgswInteractionMatrix(argos.aarbCalibrationManager, lgsw.calibrationManager, argos.adsec, argos.lgsw.controller,    argos.lgsw.controller.getActualSubaperturesDefinitionTag(), argos.lgsw.frameBuffer.isWfsCameraUpsideDown(), '20181203_083900', '20181203_031900', argos._logger, argos)
im= imacq.acquire(gain=-0.05)
im.generateInteractionMatrix(shift=3)
rec=im.createReconstructorObject(np.arange(150))
im.displayIM()
argos.aarbCalibrationManager.saveAoLoopLgswReconstructorMatrix(rec, '20181203_093800')
CombinedReconstructorMatrix.fromLgsw(argos.aarbCalibrationManager, '20181203_093800', '20181203_093900')

TN 20181203_094303 Rec 20181203_093900 Dist 20181202_120026, g=0, 0.3, 0

TN 20181203_094435 Rec 20181203_093900 Dist 20181202_120026, g=0, 0.4, 0

TN 20181203_094649 Rec 20181203_093900 Dist 20181202_120026, g=0, 0.3, 0.1

TN 20181203_094824 Rec 20181203_093900 Dist 20181202_120026, g=0, 0.3, 0.15 unstable

Basically, nothing changed...

TN 20181203_110210 Rec 20181203_093900 Dist 20181202_120026, g=0

TN 20181203_110226 Rec 20181203_093900 Dist 20181202_120026, g=0

TN 20181203_110307 Rec 20181203_093900 Dist 20181202_120026, g=0

e110210=terminal.analyzer('20181203_110210')
_= e110210.aarb.aoloop.modalAdsecWavefront.getData()
ap110210= e110210.aarb.aoloop.modalAdsecWavefront._adsecPositions.getData()
zd110210= e110210.aarbCalibManager.aoLoopAdsecDisturbance('20181202_120026').T[1:,:]

apm110210= np.roll(ap110210-ap110210.mean(axis=0), 2573,0)
zdm110210= zd110210-zd110210.mean(axis=0)

clf()
act=100
plot(zdm110210[:,act]*1e9, label='command')
plot(apm110210[:,act]*1e9, label='position')
xlabel('time step [1ms]')
ylabel('act %d position [nm]' % act)
title('TN 20181203_110210 \n Dist 20181202_120026, g=0')
legend()

dd110210= zdm110210-apm110210
dd110210std= dd110210.std(axis=0)

semilogy(dd110210std)
xlabel('act#')
ylabel('std(disturb-pos)')
title('TN 20181203_110210 \n Dist 20181202_120026, g=0')

stdDiff= zdm110210.std(axis=0) - apm110210.std(axis=0)
clf()
plot(stdDiff*1e9)
ylim(-50, 50)
xlabel('act#')
ylabel('std(disturb) - std(pos) [nm]')
title('TN 20181203_110210 \n Dist 20181202_120026, g=0')

clf()
plot(zdm110210.std(axis=0)*1e9)
ylim(0, 1500)
xlabel('act#')
ylabel('std(disturb) [nm]')
title('TN 20181203_110210 \n Dist 20181202_120026, g=0')




dd110210Power= e110210.aarb.aoloop.modalAdsecWavefront._adsecPositions._computePower(dd110210)
clf()
act=261; loglog(aa.lastCuttedFrequency()[1:], dd110210Power[1:,act], label='act %d'%act)
act=262; loglog(aa.lastCuttedFrequency()[1:], dd110210Power[1:,act], label='act %d'%act)
act=260; loglog(aa.lastCuttedFrequency()[1:], dd110210Power[1:,act], label='act %d'%act)
xlabel('f [Hz]')
ylabel('psd( [m^2]')
title('TN 20181203_110210 \n Dist 20181202_120026, g=0')
legend()

clf()
act=101; plot(zdm110210[:,act]*1e9, dd110210[:,act]*1e9, label='act %d' % act)
act=102; plot(zdm110210[:,act]*1e9, dd110210[:,act]*1e9, label='act %d' % act)
act=103; plot(zdm110210[:,act]*1e9, dd110210[:,act]*1e9, label='act %d' % act)
act=104; plot(zdm110210[:,act]*1e9, dd110210[:,act]*1e9, label='act %d' % act)
act=105; plot(zdm110210[:,act]*1e9, dd110210[:,act]*1e9, label='act %d' % act)
xlabel('zonal command [nm]')
title('TN 20181203_110210 \n Dist 20181202_120026, g=0')
legend()
ylabel('command-position [nm]')

Topic revision: r8 - 14 Jan 2019, LorenzoBusoni
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback