def make_spectrograph_image(image1, image2, header, outname):
print("Making spectrograph image for %s" %op.basename(outname))
a,b = image1.shape
new = np.zeros((a*2,b))
new[:a,:] = image1
new[a:,:] = image2
hdu = fits.PrimaryHDU(np.array(new, dtype='float32'), header=header)
hdu.header.remove('BIASSEC')
hdu.header.remove('TRIMSEC')
hdu.header['DATASEC'] = '[%i:%i,%i:%i]' %(1,b,1,2*a)
hdu.writeto(outname, overwrite=True)
评论列表
文章目录