本文整理汇总了Python中ccdproc.CCDData.data方法的典型用法代码示例。如果您正苦于以下问题:Python CCDData.data方法的具体用法?Python CCDData.data怎么用?Python CCDData.data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ccdproc.CCDData
的用法示例。
在下文中一共展示了CCDData.data方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: CCDData
# 需要导入模块: from ccdproc import CCDData [as 别名]
# 或者: from ccdproc.CCDData import data [as 别名]
ccd = ccdproc.trim_image(ccd, fits_section=ccd.header['TRIMSEC'] )
ccd = ccdproc.subtract_bias(ccd, master_bias_blue)
blue_flat_list.append(ccd)
master_flat_blue = ccdproc.combine(blue_flat_list, method='median')
master_flat_blue.write('master_flat_blue.fits', clobber=True)
#reduce the arc frames
for filename in ic1.files_filtered(obstype='Arc', isiarm='Blue arm'):
hdu = fits.open(ic1.location + filename)
ccd = CCDData(hdu[1].data, header=hdu[0].header+hdu[1].header, unit = u.adu)
#this has to be fixed as the bias section does not include the whole section that will be trimmed
ccd = ccdproc.subtract_overscan(ccd, median=True, overscan_axis=0, fits_section='[1:966,4105:4190]')
ccd = ccdproc.trim_image(ccd, fits_section=ccd.header['TRIMSEC'] )
ccd = ccdproc.subtract_bias(ccd, master_bias_blue)
ccd = ccdproc.flat_correct(ccd, master_flat_blue)
ccd.data = ccd.data.T
ccd.write('arc_'+filename, clobber=True)
red_flat_list = []
for filename in ic1.files_filtered(obstype='Arc', isiarm='Red arm'):
hdu = fits.open(ic1.location + filename)
ccd = CCDData(hdu[1].data, header=hdu[0].header+hdu[1].header, unit = u.adu)
#this has to be fixed as the bias section does not include the whole section that will be trimmed
ccd = ccdproc.subtract_overscan(ccd, median=True, overscan_axis=0, fits_section='[1:966,4105:4190]')
ccd = ccdproc.trim_image(ccd, fits_section=ccd.header['TRIMSEC'] )
ccd = ccdproc.subtract_bias(ccd, master_bias_red)
ccd = ccdproc.flat_correct(ccd, master_flat_red)
ccd.data = ccd.data.T
ccd.write('arc_'+filename, clobber=True)
#reduce the sky frames