当前位置: 首页>>代码示例>>Python>>正文


Python GenericMap.__init__方法代码示例

本文整理汇总了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)))
开发者ID:DanRyanIrish,项目名称:sunpy,代码行数:27,代码来源:soho.py

示例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))
开发者ID:SallyDa,项目名称:sunpy,代码行数:27,代码来源:soho.py

示例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
开发者ID:Cadair,项目名称:sunpy,代码行数:10,代码来源:sdo.py

示例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])
开发者ID:examon,项目名称:sunpy,代码行数:10,代码来源:stereo.py

示例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']
开发者ID:Cadair,项目名称:sunpy,代码行数:11,代码来源:iris.py

示例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
开发者ID:kik369,项目名称:sunpy,代码行数:12,代码来源:soho.py


注:本文中的sunpy.map.GenericMap.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。