本文整理汇总了Python中sunpy.map.GenericMap.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python GenericMap.__init__方法的具体用法?Python GenericMap.__init__怎么用?Python GenericMap.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sunpy.map.GenericMap
的用法示例。
在下文中一共展示了GenericMap.__init__方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from sunpy.map import GenericMap [as 别名]
# 或者: from sunpy.map.GenericMap import __init__ [as 别名]
def __init__(self, data, header, **kwargs):
GenericMap.__init__(self, data, header, **kwargs)
self.meta['CUNIT1'] = self.meta.get('CUNIT1', 'arcsec').lower()
self.meta['CUNIT2'] = self.meta.get('CUNIT2', 'arcsec').lower()
# Fill in some missing or broken info
# Test if change has already been applied
if 'T' not in self.meta['date-obs']:
datestr = "{date}T{time}".format(date=self.meta.get('date-obs',
self.meta.get('date_obs')
),
time=self.meta.get('time-obs',
self.meta.get('time_obs')
)
)
self.meta['date-obs'] = datestr
# If non-standard Keyword is present, correct it too, for compatibility.
if 'date_obs' in self.meta:
self.meta['date_obs'] = self.meta['date-obs']
self._nickname = self.instrument + "-" + self.detector
self.plot_settings['cmap'] = plt.get_cmap('soholasco{det!s}'.format(det=self.detector[1]))
self.plot_settings['norm'] = ImageNormalize(stretch=source_stretch(self.meta, PowerStretch(0.5)))
示例2: __init__
# 需要导入模块: from sunpy.map import GenericMap [as 别名]
# 或者: from sunpy.map.GenericMap import __init__ [as 别名]
def __init__(self, data, header, **kwargs):
GenericMap.__init__(self, data, header, **kwargs)
self.meta['CUNIT1'] = self.meta['CUNIT1'].lower()
self.meta['CUNIT2'] = self.meta['CUNIT2'].lower()
# Fill in some missing or broken info
datestr = "{date}T{time}".format(date=self.meta.get('date-obs',
self.meta.get('date_obs')
),
time=self.meta.get('time-obs',
self.meta.get('time_obs')
)
)
self.meta['date-obs'] = datestr
# If non-standard Keyword is present, correct it too, for compatibility.
if 'date_obs' in self.meta:
self.meta['date_obs'] = self.meta['date-obs']
self.meta['wavelnth'] = np.nan
self.meta['waveunit'] = 'nm'
self._nickname = self.instrument + "-" + self.detector
self.plot_settings['cmap'] = cm.get_cmap('soholasco{det!s}'.format(det=self.detector[1]))
self.plot_settings['norm'] = ImageNormalize(stretch=PowerStretch(0.5))
示例3: __init__
# 需要导入模块: from sunpy.map import GenericMap [as 别名]
# 或者: from sunpy.map.GenericMap import __init__ [as 别名]
def __init__(self, data, header, **kwargs):
GenericMap.__init__(self, data, header, **kwargs)
self.meta['detector'] = "HMI"
# self.meta['instrme'] = "HMI"
# self.meta['obsrvtry'] = "SDO"
self._nickname = self.detector
示例4: __init__
# 需要导入模块: from sunpy.map import GenericMap [as 别名]
# 或者: from sunpy.map.GenericMap import __init__ [as 别名]
def __init__(self, data, header, **kwargs):
GenericMap.__init__(self, data, header, **kwargs)
self._name = self.observatory + " " + self.detector + " " + str(self.measurement)
self._nickname = "{0}-{1}".format(self.detector, self.observatory[-1])
self.cmap = cm.get_cmap('stereocor%s' % self.detector[-1])
示例5: __init__
# 需要导入模块: from sunpy.map import GenericMap [as 别名]
# 或者: from sunpy.map.GenericMap import __init__ [as 别名]
def __init__(self, data, header, **kwargs):
# Assume pixel units are arcesc if not given
header['cunit1'] = header.get('cunit1', 'arcsec')
header['cunit2'] = header.get('cunit2', 'arcsec')
GenericMap.__init__(self, data, header, **kwargs)
self.meta['detector'] = "SJI"
self.meta['waveunit'] = "Angstrom"
self.meta['wavelnth'] = header['twave1']
示例6: __init__
# 需要导入模块: from sunpy.map import GenericMap [as 别名]
# 或者: from sunpy.map.GenericMap import __init__ [as 别名]
def __init__(self, data, header, **kwargs):
GenericMap.__init__(self, data, header, **kwargs)
# Fill in some missing or broken info
self.meta['detector'] = "MDI"
self._fix_dsun()
self._name = self.observatory + " " + self.detector
self._nickname = self.detector + " " + self.measurement