本文整理匯總了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