本文整理汇总了Python中sunpy.map.Map.meta['crpix2']方法的典型用法代码示例。如果您正苦于以下问题:Python Map.meta['crpix2']方法的具体用法?Python Map.meta['crpix2']怎么用?Python Map.meta['crpix2']使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sunpy.map.Map
的用法示例。
在下文中一共展示了Map.meta['crpix2']方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: enumerate
# 需要导入模块: from sunpy.map import Map [as 别名]
# 或者: from sunpy.map.Map import meta['crpix2'] [as 别名]
print '\nWidth:', wid
fig = plt.figure(figsize=(30, 12))
for wl, wlength in enumerate(['94', '131', '171', '193', '211', '335']):
#emiss = Map(emission[wl, :, :, w], mapmeta)
emiss = Map(emission[wl, :, w, :].copy(), mapmeta)
emiss.cmap = sunpy.cm.get_cmap('sdoaia{}'.format(wlength))
emiss.meta['naxis1'] = emiss.shape[1]
emiss.meta['naxis2'] = emiss.shape[0]
#emiss.meta['cdelt1'] = widths[1] - widths[0]
emiss.meta['cdelt1'] = heights[1] - heights[0] #np.log10(heights[1]) - np.log10(heights[0])
emiss.meta['cdelt2'] = temps[1] - temps[0]
#emiss.meta['crval1'] = widths[0]
emiss.meta['crval1'] = heights[0] #np.log10(heights[0])
emiss.meta['crval2'] = temps[0]
emiss.meta['crpix1'] = 0.5
emiss.meta['crpix2'] = 0.5
if wlength == '94': wlength = '094'
fits_dir = path.join(CThome, 'data', 'synthetic', wlength)
if not path.exists(fits_dir): makedirs(fits_dir)
emiss.save(path.join(fits_dir, 'model.fits'), clobber=True)
#print '----', emission[2, :, :, :].min(), emission[2, :, :, :].max()
#print '------', emission[2, :, w, :].min(), emission[2, :, w, :].max()
emiss.data /= emission[2, :, w, :]
#print '--------', emiss.min(), emiss.max()
ax = fig.add_subplot(1, 6, wl+1)
emiss.plot(aspect='auto', vmin=emiss.min(), vmax=emiss.max())
plt.title('{}'.format(wlength))
plt.xlabel('Input EM')
plt.ylabel('Input log(T)')
plt.colorbar()
#fig.gca().add_artist(rect)