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


Python BaseMap.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from sunpy.map.basemap import BaseMap [as 别名]
# 或者: from sunpy.map.basemap.BaseMap import __init__ [as 别名]
 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,代码行数:9,代码来源:sdo.py

示例2: __init__

# 需要导入模块: from sunpy.map.basemap import BaseMap [as 别名]
# 或者: from sunpy.map.basemap.BaseMap import __init__ [as 别名]
    def __init__(self, data, header):
        BaseMap.__init__(self, header)
        
        # MDI sometimes has an "60" in seconds field
        datestr = header['date_obs']

        if datestr[17:19] == "60":
            datestr = datestr[:17] + "30" + datestr[19:]
            
        rsun = header.get('radius')
        
        # Solar radius in arc-seconds at 1 au
        # @TODO: use sunpy.sun instead
        radius_1au = 959.644
        
        # MDI images may have radius = 0.0
        if not rsun:
            dsun = constants.au
        else:
            scale = header.get("cdelt1")
            dsun = (radius_1au / (rsun * scale)) * constants.au
            
        # Determine measurement
        dpcobsr = header.get('dpc_obsr')
        meas = "magnetogram" if dpcobsr.find('Mag') != -1 else "continuum"
        
        self.date = parse_time(datestr)
        self.detector = "MDI"
        self.measurement = meas
        self.dsun = dsun
        self.name = "MDI %s" % meas
开发者ID:arabwhipmonk,项目名称:sunpy,代码行数:33,代码来源:soho.py

示例3: __init__

# 需要导入模块: from sunpy.map.basemap import BaseMap [as 别名]
# 或者: from sunpy.map.basemap.BaseMap import __init__ [as 别名]
 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,代码行数:9,代码来源:proba2.py

示例4: __init__

# 需要导入模块: from sunpy.map.basemap import BaseMap [as 别名]
# 或者: from sunpy.map.basemap.BaseMap import __init__ [as 别名]
 def __init__(self, data, header):
     BaseMap.__init__(self, header)
     self.date = parse_time(header.get('date_obs'))
     self.detector = header.get('detector')
     self.instrument = "SECCHI"
     self.observatory = header.get('obsrvtry')
     self.measurement = "white-light"
     self.name = "SECCHI %s" % header.get('detector')
开发者ID:arabwhipmonk,项目名称:sunpy,代码行数:10,代码来源:stereo.py

示例5: __init__

# 需要导入模块: from sunpy.map.basemap import BaseMap [as 别名]
# 或者: from sunpy.map.basemap.BaseMap import __init__ [as 别名]
 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,代码行数:14,代码来源:rhessi.py


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