本文整理汇总了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'))
示例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
示例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')
示例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')
示例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