import scipy
import numpy
import pyfits
import matplotlib.pyplot as pyplot
import NGCTools

detector = NGCTools.detector()

print "No Decenter"
#detector.makeRamp()
pokes = numpy.zeros(60)
pokes[0] = 1.1
detector.generateFrame([0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0], pokes, 0.0)
#"""
print "Actuator 1"
detector.generateFrame([0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0], pokes, 45.0)
print "Actuator 1"
detector.generateFrame([0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 2.0], pokes, 90.0)
print "Actuator 3"
detector.generateFrame([0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0], pokes, 235.0)
#"""
detector.saveFrames("PupilShiftSlopes.fits")
#"""
fig = pyplot.figure(0)
ax1 = fig.add_axes([0.1, 0.1, 0.4, 0.4])
ax2 = fig.add_axes([0.1, 0.5, 0.4, 0.4])
ax3 = fig.add_axes([0.5, 0.1, 0.4, 0.4])
ax4 = fig.add_axes([0.5, 0.5, 0.4, 0.4])

ax1.imshow(detector.z[0])
ax2.imshow(detector.z[1])
Beispiel #2
0
import pyfits
import scipy
import numpy
import matplotlib.pyplot as pyplot
import NGCTools

"""
df1 = '/home/deen/Data/GRAVITY/SimulatedData/ciaoSimulatedFrameBuffer.fits'
df2 = '/home/deen/Data/GRAVITY/SimulatedData/pixelUnscramblingMap.fits'
df3 = '/home/deen/Data/GRAVITY/NAOMI/NAOMI_simulated_buffer_5_frames_rand.fits'

dat1 = pyfits.getdata(df1)
dat2 = pyfits.getdata(df2)
dat3 = pyfits.getdata(df3)

fig = pyplot.figure(0)
ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])


fig.show()
"""

frames = NGCTools.frameBuffer()

frames.generateRandomFrames(nframes=5)

frames.saveFile('test_bright.fits')
frames.saveCentroids('centroids_bright.fits')