當前位置: 首頁>>代碼示例>>Python>>正文


Python Map.peek方法代碼示例

本文整理匯總了Python中sunpy.map.Map.peek方法的典型用法代碼示例。如果您正苦於以下問題:Python Map.peek方法的具體用法?Python Map.peek怎麽用?Python Map.peek使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在sunpy.map.Map的用法示例。


在下文中一共展示了Map.peek方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: Map

# 需要導入模塊: from sunpy.map import Map [as 別名]
# 或者: from sunpy.map.Map import peek [as 別名]
# Select the wave
file_path = '/Users/ireland/sunpy/data/aia_lev1_304a_2013_03_04t01_00_07_12z_image_lev1.fits'
m = Map(file_path).superpixel((4, 4)*u.pix)

ny = m.data.shape[0]
nx = m.data.shape[1]
dd = 25
aa = 200
bb = 800

m.data[ny/2 - dd: ny/2 + dd, 200-dd:200+dd] = 0.0
m.data[ny/2 - dd: ny/2 + dd, 800-dd:800+dd] = 0.33 * m.data.max()
m.data[200-dd:200+dd, nx/2 - dd: nx/2 + dd] = 0.66 * m.data.max()
m.data[800-dd:800+dd, nx/2 - dd: nx/2 + dd] = 1.00 * m.data.max()

m.peek()
# Unraveling parameters used to convert HPC image data to HG data
along_wavefront_sampling = 1
perpendicular_to_wavefront_sampling = 1
transform_hpc2hg_parameters = {'epi_lon': 00.0*u.degree,
                               'epi_lat': 0.0*u.degree,
                               'lon_num': 360*along_wavefront_sampling*u.pixel,
                               'lat_num': 720*perpendicular_to_wavefront_sampling*u.pixel}

hg = map_hpc_to_hg_rotate(m,
                          epi_lon=transform_hpc2hg_parameters['epi_lon'],
                          epi_lat=transform_hpc2hg_parameters['epi_lat'],
                          lon_num=transform_hpc2hg_parameters['lon_num'],
                          lat_num=transform_hpc2hg_parameters['lat_num'],
                          method='linear')
開發者ID:wafels,項目名稱:eitwave,代碼行數:32,代碼來源:test_transforms3.py

示例2: print

# 需要導入模塊: from sunpy.map import Map [as 別名]
# 或者: from sunpy.map.Map import peek [as 別名]
# print a list of datasources and their associated ids
files = [] 
if get_files:

   for observatory, instruments in datasources.items():
        for inst, detectors in instruments.items():
            for det, measurements in detectors.items():
                for meas, params in measurements.items():
                    print("%s %s: %d" % (observatory, params['nickname'], params['sourceId']))
                    filepath = hv.download_jp2('2013/06/24 17:31:30',
                                               observatory=observatory,
                                               instrument=inst,
                                               detector=det,
                                               measurement=meas,
                                               directory=directory)
                    files.append(filepath)
else:
    flist = os.listdir(directory)
    for fl in flist:
        files.append(os.path.join(directory, fl))

files = sorted(files)

n = len(files)


for f in files:
    print f
    m = Map(f)
    m.peek()
開發者ID:wafels,項目名稱:sunpy-sandbox,代碼行數:32,代碼來源:hvdload.py

示例3: test1

# 需要導入模塊: from sunpy.map import Map [as 別名]
# 或者: from sunpy.map.Map import peek [as 別名]
def test1():
    aia = Map(sunpy.AIA_171_IMAGE)
    aia.peek()
開發者ID:kinketu,項目名稱:Astronomy,代碼行數:5,代碼來源:sunpy_test.py


注:本文中的sunpy.map.Map.peek方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。