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

Python cm.get_cmap函数代码示例

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

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



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

示例1: __init__

 def __init__(self, data, header):
     BaseMap.__init__(self, header)
     self.detector = "SWAP"
     self.instrument = "SWAP"
     self.observatory = "PROBA2"
     self.name = "SWAP %s" % header.get('wavelnth')
     self.cmap = cm.get_cmap(name='sdoaia171')
开发者ID:arabwhipmonk,项目名称:sunpy,代码行数:7,代码来源:proba2.py


示例2: __init__

 def __init__(self, data, header):
     BaseMap.__init__(self, header)
     
     self.detector = "AIA"
     self.instrument = "AIA"
     self.observatory = "SDO"
     self.cmap = cm.get_cmap('sdoaia%d' % header.get('wavelnth'))
开发者ID:arabwhipmonk,项目名称:sunpy,代码行数:7,代码来源:sdo.py


示例3: get_properties

    def get_properties(cls, header):
        """Parses XRT image header"""
        properties = Map.get_properties(header)
        # XRT uses DATE_OBS, not date-obs.
        properties["date"] = parse_time(header.get('date_obs', None))

        #TODO: proper exception handling here - report to the user that there is
        # an unexpected value
        fw1 = header.get('EC_FW1_')
        if not(fw1.lower() in [x.lower() for x in cls.filter_wheel1_measurements]):
            pass
        fw2 = header.get('EC_FW2_')
        if not(fw2.lower() in [x.lower() for x in cls.filter_wheel2_measurements]):
            pass

        # All images get the same color table - IDL Red temperature (loadct, 3)
        properties.update({
            "detector": "XRT",
            "instrument": "XRT",
            "observatory": "Hinode",
            "name": "XRT %s-%s " % (fw1.replace('_', ' '),
                                       fw2.replace('_', ' ')),
            "nickname": "XRT",
            "cmap": cm.get_cmap(name='hinodexrt')
        })
        return properties
开发者ID:JordanBallew,项目名称:sunpy,代码行数:26,代码来源:hinode.py


示例4: __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


示例5: get_properties

    def get_properties(cls, header):
        """Parses SXT image header"""
        properties = Map.get_properties(header)
        
        # 2012/11/07 - the SXT headers do not have a value of the distance from
        # the spacecraft to the center of the Sun.  The FITS keyword 'DSUN_OBS'
        # appears to refer to the observed diameter of the Sun.  Until such 
        # time as that is calculated and properly included in the file, we will 
        # use the value of 1 AU as a standard.
        properties['dsun']= constants.au
        
        wavelnth = header.get('wavelnth')
        if wavelnth == 'Al.1':
            wavelnth = 'Al01'
        if wavelnth.lower() == 'open':
            wavelnth = 'white light'

        properties.update({
            "detector": "SXT",
            "instrument": "SXT",
            "observatory": "Yohkoh",
            "name": "SXT %s" % wavelnth,
            "nickname": "SXT",
            "cmap": cm.get_cmap(name='yohkohsxt' + wavelnth[0:2].lower())
        })
        return properties 
开发者ID:tsundoku,项目名称:sunpy,代码行数:26,代码来源:yohkoh.py


示例6: get_properties

    def get_properties(cls, header):
        """Parses SXT image header"""
        properties = Map.get_properties(header)

        # 2012/12/19 - the SXT headers do not have a value of the distance from
        # the spacecraft to the center of the Sun.  The FITS keyword 'DSUN_OBS'
        # appears to refer to the observed diameter of the Sun.  Until such
        # time as that is calculated and properly included in the file, we will
        # use simple trigonometry to calculate the distance of the center of
        # the Sun from the spacecraft.  Note that the small angle approximation
        # is used, and the solar radius stored in SXT FITS files is in arcseconds.
        properties["dsun"] = constants.au
        yohkoh_solar_r = header.get("solar_r", None)
        if yohkoh_solar_r == None:
            properties["dsun"] = constants.au
        else:
            properties["dsun"] = constants.radius / (np.deg2rad(yohkoh_solar_r / 3600.0))

        wavelnth = header.get("wavelnth")
        if wavelnth == "Al.1":
            wavelnth = "Al01"
        if wavelnth.lower() == "open":
            wavelnth = "white light"

        properties.update(
            {
                "detector": "SXT",
                "instrument": "SXT",
                "observatory": "Yohkoh",
                "name": "SXT %s" % wavelnth,
                "nickname": "SXT",
                "cmap": cm.get_cmap(name="yohkohsxt" + wavelnth[0:2].lower()),
            }
        )
        return properties
开发者ID:nanoclosure,项目名称:sunpy,代码行数:35,代码来源:yohkoh.py


示例7: __init__

 def __init__(self, data, header):
     BaseMap.__init__(self, header)
     self.date = parse_time(header.get('date_obs'))
     self.detector = "EUVI"
     self.instrument = "SECCHI"
     self.observatory = header.get('obsrvtry')
     self.name = "EUVI %s" % self.meas
     self.cmap = cm.get_cmap('sohoeit%d' % header.get('wavelnth'))
开发者ID:arabwhipmonk,项目名称:sunpy,代码行数:8,代码来源:stereo.py


示例8: __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


示例9: __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'] = cm.get_cmap(self._get_cmap_name())
        self.plot_settings['norm'] = ImageNormalize(stretch=source_stretch(self.meta, AsinhStretch(0.01)))
开发者ID:Hypnus1803,项目名称:sunpy,代码行数:9,代码来源:sdo.py


示例10: __init__

 def __init__(self, data, header, **kwargs):
     
     GenericMap.__init__(self, data, header, **kwargs)
     
     # Fill in some missing or broken info
     self._fix_date()
     
     self._name = self.instrument + " " + self.detector
     self._nickname = self.instrument + "-" + self.detector
             
     self.cmap = cm.get_cmap('soholasco%s' % self.detector[1])
开发者ID:kik369,项目名称:sunpy,代码行数:11,代码来源:soho.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)

        # 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


示例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):
     BaseMap.__init__(self, header)
     
     self.date = parse_time(header.get('date_obs'))
     self.detector = header.get('telescop')
     self.instrument = header.get('telescop')
     self.measurement = [header.get('energy_l'), header.get('energy_h')]
     self.name = "RHESSI %d - %d keV" % (header.get('energy_l'), 
                                         header.get('energy_h'))
     self.cmap = cm.get_cmap('rhessi')
     self.exposure_time = (parse_time(header.get('date_end')) - 
                           parse_time(header.get('date_obs'))).seconds
开发者ID:arabwhipmonk,项目名称:sunpy,代码行数:12,代码来源:rhessi.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'] = cm.get_cmap('trace' + str(self.meta['WAVE_LEN']))
        self.plot_settings['norm'] = ImageNormalize(stretch=source_stretch(self.meta, LogStretch()))
开发者ID:Hypnus1803,项目名称:sunpy,代码行数:12,代码来源:trace.py


示例16: __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


示例17: __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


示例18: get_properties

 def get_properties(cls, header):
     """Parses SWAP image header"""
     properties = Map.get_properties(header)
     
     properties.update({
         "detector": "SWAP",
         "instrument": "SWAP",
         "observatory": "PROBA2",
         "name": "SWAP %s" % header.get('wavelnth'),
         "nickname": "SWAP",
         "cmap": cm.get_cmap(name='sdoaia171')
     })
     return properties
开发者ID:JordanBallew,项目名称:sunpy,代码行数:13,代码来源:proba2.py


示例19: get_properties

 def get_properties(cls, header):
     """Parses AIA image header"""
     properties = Map.get_properties(header)
     
     properties.update({
         "detector": "AIA",
         "instrument": "AIA",
         "observatory": "SDO",
         "nickname": "AIA",
         "cmap": cm.get_cmap('sdoaia%d' % header.get('wavelnth')),
         "processing_level": header.get('LVL_NUM')            
     })
     return properties
开发者ID:JordanBallew,项目名称:sunpy,代码行数:13,代码来源:sdo.py


示例20: get_properties

 def get_properties(cls, header):
     """Parses EUVI image header"""
     properties = Map.get_properties(header)
     
     properties.update({
         "date": parse_time(header.get('date-obs',header.get('date_obs'))),
         "detector": "EUVI",
         "instrument": "SECCHI",
         "observatory": header.get('obsrvtry'),
         "cmap": cm.get_cmap('sohoeit%d' % header.get('wavelnth')),
         "nickname": "EUVI-" + header.get('obsrvtry')[-1]
     })
     return properties
开发者ID:ToyDragon,项目名称:sunpy,代码行数:13,代码来源:stereo.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python config.get函数代码示例发布时间:2022-05-27
下一篇:
Python utils.get_stop_words函数代码示例发布时间: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