panacea.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:Panacea 作者: grzeimann 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号