In [ ]:
%matplotlib inline
(if you are using astropy verion older than 1.0.5, below you may see a warning about IPython.kernel being deprecated. See https://github.com/astropy/astropy/pull/4078 )
In [ ]:
from lsst.cwfs.instrument import Instrument
from lsst.cwfs.algorithm import Algorithm
from lsst.cwfs.image import readFile, Image
import lsst.cwfs.plots as plots
In [ ]:
fieldXY = [1.185,1.185]
im1 = readFile('../tests/testImages/LSST_NE_SN25/z11_0.25_intra.txt')
I1 = Image(im1, fieldXY, Image.INTRA)
im2 = readFile('../tests/testImages/LSST_NE_SN25/z11_0.25_extra.txt')
I2 = Image(im2, fieldXY, Image.EXTRA)
In [ ]:
inst=Instrument('lsst',I1.sizeinPix)
In [ ]:
algo=Algorithm('exp',inst,1)
algo.runIt(inst,I1,I2,'offAxis')
print(algo.zer4UpNm)
In [ ]:
algo=Algorithm('fft',inst,3)
algo.itr0(inst,I1,I2,'offAxis')
In [ ]:
plots.plotImage(algo.S,'wavefront signal')
In [ ]:
algo.nextItr(inst,I1,I2,'offAxis')
plots.plotImage(algo.S,'wavefront signal')
algo.nextItr(inst,I1,I2,'offAxis')
plots.plotImage(algo.S,'wavefront signal')
In [ ]:
algo.runIt(inst,I1,I2,'offAxis')
plots.plotImage(algo.S,'wavefront signal')
In [ ]:
algo=Algorithm('exp',inst,1)
In [ ]:
algo.nextItr(inst,I1,I2,'offAxis')
print('Current Iteration No = %d'%algo.currentItr)
In [ ]:
algo.setDebugLevel(3)
algo.nextItr(inst,I1,I2,'offAxis',2)
In [ ]:
algo.runIt(inst,I1,I2,'offAxis')
In [ ]:
print(algo.outerItr)
print(algo.debugLevel)
algo.nextItr(inst,I1,I2,'offAxis',2)
In [ ]:
algo.setDebugLevel(0)
plots.plotZer(algo.zer4UpNm,'nm')