<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 load the modules
Step1:  Define the image objects. Input arguments
Step2:  Define the instrument. Input arguments
Step3:  Define the algorithm being used. Input arguments
Step4:  Run it
Step5:  Print the Zernikes Zn (n>=4)
Step6:  plot the Zernikes Zn (n>=4)
<ASSISTANT_TASK:>
Python Code:
from lsst.cwfs.instrument import Instrument
from lsst.cwfs.algorithm import Algorithm
from lsst.cwfs.image import Image, readFile
import lsst.cwfs.plots as plots
Explanation: load the modules
End of explanation
fieldXY = [1.185,1.185]
I1 = Image(readFile('../tests/testImages/LSST_NE_SN25/z11_0.25_intra.txt'), fieldXY, Image.INTRA)
I2 = Image(readFile('../tests/testImages/LSST_NE_SN25/z11_0.25_extra.txt'), fieldXY, Image.EXTRA)
plots.plotImage(I1.image,'intra')
plots.plotImage(I2.image,'extra')
Explanation: Define the image objects. Input arguments: file name, field coordinates in deg, image type
The colorbar() below may produce a warning message if your matplotlib version is older than 1.5.0
( https://github.com/matplotlib/matplotlib/issues/5209 )
End of explanation
inst=Instrument('lsst',I1.sizeinPix)
Explanation: Define the instrument. Input arguments: instrument name, size of image stamps
End of explanation
algo=Algorithm('exp',inst,0)
Explanation: Define the algorithm being used. Input arguments: baseline algorithm, instrument, debug level
End of explanation
algo.runIt(inst,I1,I2,'offAxis')
Explanation: Run it
End of explanation
print(algo.zer4UpNm)
Explanation: Print the Zernikes Zn (n>=4)
End of explanation
plots.plotZer(algo.zer4UpNm,'nm')
plots.plotImage(algo.Wconverge,'Final wavefront')
plots.plotImage(algo.Wconverge,'Final wavefront with pupil mask applied', mask=algo.pMask)
Explanation: plot the Zernikes Zn (n>=4)
End of explanation
<END_TASK>