• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python map.GenericMap类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中sunpy.map.GenericMap的典型用法代码示例。如果您正苦于以下问题:Python GenericMap类的具体用法?Python GenericMap怎么用?Python GenericMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了GenericMap类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: save

 def save(self):
     date = sunpy.time.parse_time(self.date)
     error = sys('touch '+self.maps_dir+'data/{:%Y/%m/%d/} > shelloutput.txt'.format(date))
     if error != 0:
         sys('{0}{1:%Y}; {0}{1:%Y/%m}; {0}{1:%Y/%m/%d} > shelloutput.txt'.format(
             'mkdir '+self.maps_dir+'data/', date))
     GenericMap.save(self, self.maps_dir+'data/{:%Y/%m/%d/%Y-%m-%dT%H:%M:%S}.fits'.format(date), clobber=True)
开发者ID:CyclingNinja,项目名称:CoronaTemps,代码行数:7,代码来源:temperature.py


示例2: __init__

    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,代码行数:25,代码来源:soho.py


示例3: __init__

    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,代码行数:25,代码来源:soho.py


示例4: __init__

    def __init__(self, data, header, **kwargs):
        GenericMap.__init__(self, data, header, **kwargs)

        # Fill in some missing info
        self.meta['detector'] = "AIA"
        self._nickname = self.detector
        self.plot_settings['cmap'] = plt.get_cmap(self._get_cmap_name())
        self.plot_settings['norm'] = ImageNormalize(stretch=source_stretch(self.meta, AsinhStretch(0.01)))
开发者ID:Cadair,项目名称:sunpy,代码行数:8,代码来源:sdo.py


示例5: __init__

 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,代码行数:8,代码来源:stereo.py


示例6: __init__

    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,代码行数:9,代码来源:iris.py


示例7: __init__

 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,代码行数:10,代码来源:soho.py


示例8: __init__

    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._name = self.detector + " " + str(self.measurement)
        self._nickname = self.detector
开发者ID:jaylenw,项目名称:sunpy,代码行数:10,代码来源:sdo.py


示例9: __init__

    def __init__(self, data, header, **kwargs):

        GenericMap.__init__(self, data, header, **kwargs)

        # Fill in some missing info
        self.meta['detector'] = "AIA"
#        self.meta['instrme'] = "AIA"

        self._nickname = self.detector
        self._name = self.detector + " " + str(self.measurement)
        self.cmap = cm.get_cmap(self._get_cmap_name())
开发者ID:bsipocz,项目名称:sunpy,代码行数:11,代码来源:sdo.py


示例10: plot

 def plot(self, vmin=None, vmax=None, *args, **kwargs):
     mean = np.nanmean(self.data, dtype=np.float64)
     std = np.nanstd(self.data, dtype=np.float64)
     if vmin is None:
         vmin = mean - (2.0 * std)
     if vmax is None:
         vmax = mean + (2.0 * std)
     
     GenericMap.plot(self, vmin=vmin, vmax=vmax, *args, **kwargs)
     
     return
开发者ID:CyclingNinja,项目名称:CoronaTemps,代码行数:11,代码来源:temperature.py


示例11: __init__

    def __init__(self, data, header, **kwargs):
        
        GenericMap.__init__(self, data, header, **kwargs)
        
        # Fill in some missing info
        self.meta['detector'] = "AIA"
#        self.meta['instrme'] = "AIA"
        
        self._nickname = self.detector
        
        self.cmap = cm.get_cmap('sdoaia%d' % self.wavelength)
开发者ID:quintusdias,项目名称:sunpy,代码行数:11,代码来源:sdo.py


示例12: __init__

    def __init__(self, data, header, **kwargs):

        GenericMap.__init__(self, data, header, **kwargs)
        self._nickname = "{0}-{1}".format(self.detector, self.observatory[-1])
        self.plot_settings['cmap'] = plt.get_cmap('stereohi{det!s}'.format(det=self.detector[-1]))
        self.plot_settings['norm'] = ImageNormalize(stretch=source_stretch(self.meta, PowerStretch(0.25)))

        # Try to identify when the FITS meta data does not have the correct
        # date FITS keyword
        if ('date_obs' in self.meta) and not('date-obs' in self.meta):
            self.meta['date-obs'] = self.meta['date_obs']
开发者ID:bwgref,项目名称:sunpy,代码行数:11,代码来源:stereo.py


示例13: __init__

    def __init__(self, data, header, **kwargs):

        GenericMap.__init__(self, data, header, **kwargs)

        # It needs to be verified that these must actually be set and
        # are not already in the header.
        self.meta['detector'] = "SWAP"
#        self.meta['instrme'] = "SWAP"
        self.meta['obsrvtry'] = "PROBA2"

        self._nickname = self.detector
        self.plot_settings['cmap'] = cm.get_cmap(name='sdoaia171')
开发者ID:Hypnus1803,项目名称:sunpy,代码行数:12,代码来源:proba2.py


示例14: __init__

    def __init__(self, data, header, **kwargs):

        GenericMap.__init__(self, data, header, **kwargs)

        # It needs to be verified that these must actually be set and are not
        # already in the header.
        self.meta["detector"] = "TRACE"
        self.meta["obsrvtry"] = "TRACE"
        self._nickname = self.detector
        # Colour maps
        self.plot_settings["cmap"] = cm.get_cmap("trace" + self.measurement)
        self.plot_settings["norm"] = colors.LogNorm()
开发者ID:ZachWerginz,项目名称:sunpy,代码行数:12,代码来源:trace.py


示例15: __init__

    def __init__(self, data, header, **kwargs):

        GenericMap.__init__(self, data, header, **kwargs)

        # It needs to be verified that these must actually be set and are not
        # already in the header.
        self.meta['detector'] = "TRACE"
        self.meta['obsrvtry'] = "TRACE"
        self._nickname = self.detector
        # Colour maps
        self.plot_settings['cmap'] = plt.get_cmap('trace' + str(self.meta['WAVE_LEN']))
        self.plot_settings['norm'] = ImageNormalize(stretch=source_stretch(self.meta, LogStretch()))
开发者ID:DanRyanIrish,项目名称:sunpy,代码行数:12,代码来源:trace.py


示例16: __init__

    def __init__(self, data, header, **kwargs):

        GenericMap.__init__(self, data, header, **kwargs)

        # Fill in some missing info
        self.meta['detector'] = "AIA"
#        self.meta['instrme'] = "AIA"

        self._nickname = self.detector
        self._name = self.detector + " " + str(self.measurement)

        self.cmap = cm.get_cmap('sdoaia{wl:d}'.format(wl=self.wavelength))
开发者ID:abigailStev,项目名称:sunpy,代码行数:12,代码来源:sdo.py


示例17: __init__

    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('stereohi{det!s}'.format(det=self.detector[-1]))

        # Try to identify when the FITS meta data does not have the correct
        # date FITS keyword
        if ('date_obs' in self.meta) and not('date-obs' in self.meta):
            self.meta['date-obs'] = self.meta['date_obs']
开发者ID:abigailStev,项目名称:sunpy,代码行数:13,代码来源:stereo.py


示例18: __init__

    def __init__(self, data, header, **kwargs):

        GenericMap.__init__(self, data, header, **kwargs)

        # Fill in some missing info
        self.meta['detector'] = "EIT"
        self.meta['waveunit'] = "Angstrom"
        self._fix_dsun()

        self._name = self.detector + " " + str(self.measurement)
        self._nickname = self.detector

        self.cmap = cm.get_cmap(self._get_cmap_name())
开发者ID:jongyeob,项目名称:sunpy,代码行数:13,代码来源:soho.py


示例19: __init__

    def __init__(self, data, header, **kwargs):

        GenericMap.__init__(self, data, header, **kwargs)

        # It needs to be verified that these must actually be set and are not
        # already in the header.
        self.meta["detector"] = "SWAP"
        #        self.meta['instrme'] = "SWAP"
        self.meta["obsrvtry"] = "PROBA2"

        self._name = self.detector + " " + str(self.measurement)
        self._nickname = self.detector

        self.cmap = cm.get_cmap(name="sdoaia171")
开发者ID:rhewett,项目名称:sunpy,代码行数:14,代码来源:proba2.py


示例20: __init__

 def __init__(self, data, header, **kwargs):
     
     GenericMap.__init__(self, data, header, **kwargs)
     
     self._name = "RHESSI %d - %d keV" % (self.measurement[0], self.measurement[1])
     self._nickname = self.detector
     
     # Fix some broken/misapplied keywords
     if self.meta['ctype1'] == 'arcsec':
         self.meta['cunit1'] = 'arcsec'
         self.meta['ctype1'] = 'HPLN-TAN'
     if self.meta['ctype2'] == 'arcsec':
         self.meta['cunit2'] = 'arcsec'
         self.meta['ctype2'] = 'HPLT-TAN'
开发者ID:MediaPlex,项目名称:sunpy,代码行数:14,代码来源:rhessi.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python map.Map类代码示例发布时间:2022-05-27
下一篇:
Python fits.get_header函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap