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


Python Map.get_properties方法代码示例

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


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

示例1: get_properties

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

示例2: get_properties

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

示例3: get_properties

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

示例4: get_properties

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

示例5: get_properties

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

示例6: get_properties

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

示例7: get_properties

# 需要导入模块: from sunpy.map import Map [as 别名]
# 或者: from sunpy.map.Map import get_properties [as 别名]
 def get_properties(cls, header):
     """Parses LASCO image header"""
     properties = Map.get_properties(header)
     
     datestr = "%sT%s" % (header.get('date_obs'), header.get('time_obs'))
     
     properties.update({
         "date": parse_time(datestr),
         "measurement": "white-light",
         "name": "LASCO %s" % header.get('detector'),
         "nickname": "LASCO-%s" % header.get('detector'),
         "cmap": cm.get_cmap('soholasco%s' % properties['detector'][1])
     })
     return properties
开发者ID:astrofrog,项目名称:sunpy,代码行数:16,代码来源:soho.py

示例8: get_properties

# 需要导入模块: from sunpy.map import Map [as 别名]
# 或者: from sunpy.map.Map import get_properties [as 别名]
    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")),
            }
        )
        return properties
开发者ID:astrofrog,项目名称:sunpy,代码行数:16,代码来源:sdo.py

示例9: get_properties

# 需要导入模块: from sunpy.map import Map [as 别名]
# 或者: from sunpy.map.Map import get_properties [as 别名]
 def get_properties(cls, header):
     """Parses COR image header"""
     properties = Map.get_properties(header)
     
     # @TODO: Deal with invalid values for exptime. E.g. STEREO-B COR2
     # on 2012/03/20 has -1 for some images.
     properties.update({
         "date": parse_time(header.get('date_obs')),
         "detector": header.get('detector'),
         "instrument": "SECCHI",
         "observatory": header.get('obsrvtry'),
         "measurement": "white-light",
         "name": "SECCHI %s" % header.get('detector'),
         "nickname": "%s-%s" % (header.get('detector'), 
                                header.get('obsrvtry')[-1])
     })
     return properties
开发者ID:JordanBallew,项目名称:sunpy,代码行数:19,代码来源:stereo.py

示例10: get_properties

# 需要导入模块: from sunpy.map import Map [as 别名]
# 或者: from sunpy.map.Map import get_properties [as 别名]
    def get_properties(cls, header):
        """Parses LASCO image header"""
        properties = Map.get_properties(header)

        datestr = "%sT%s" % (
            header.get("date-obs", header.get("date_obs")),
            header.get("time-obs", header.get("time_obs")),
        )

        properties.update(
            {
                "date": parse_time(datestr),
                "measurement": "white-light",
                "name": "LASCO %s" % header.get("detector"),
                "nickname": "LASCO-%s" % header.get("detector"),
                "cmap": cm.get_cmap("soholasco%s" % properties["detector"][1]),
            }
        )
        return properties
开发者ID:ToyDragon,项目名称:sunpy,代码行数:21,代码来源:soho.py

示例11: get_properties

# 需要导入模块: from sunpy.map import Map [as 别名]
# 或者: from sunpy.map.Map import get_properties [as 别名]
 def get_properties(cls, header):
     """Parses RHESSI image header"""
     properties = Map.get_properties(header)
     
     properties.update({
         "date": parse_time(header.get('date_obs')),
         
         "detector": header.get('telescop'),
         "instrument": header.get('telescop'),
         "measurement": [header.get('energy_l'), header.get('energy_h')],
         "observatory": "SDO",
         "name": "RHESSI %d - %d keV" % (header.get('energy_l'), 
                                         header.get('energy_h')),
         "cmap": cm.get_cmap('rhessi'),
         "exposure_time": (parse_time(header.get('date_end')) - 
                           parse_time(header.get('date_obs'))).seconds,
         "coordinate_system": {
             'x': 'HPLN-TAN',
             'y': 'HPLT-TAN'
         }
     })
     return properties
开发者ID:JordanBallew,项目名称:sunpy,代码行数:24,代码来源:rhessi.py

示例12: get_properties

# 需要导入模块: from sunpy.map import Map [as 别名]
# 或者: from sunpy.map.Map import get_properties [as 别名]
 def get_properties(cls, header):
     """Parses EIT image header"""
     properties = Map.get_properties(header)
     
     # Solar radius in arc-seconds at 1 au
     radius_1au = sun.angular_size(header.get('date_obs'))
     
     scale = header.get("cdelt1")
     # EIT solar radius is expressed in number of EIT pixels
     solar_r = header.get("solar_r")
     
     properties.update({
         "date": parse_time(header.get('date_obs')),
         "detector": "EIT",
         "rsun_arcseconds": solar_r * scale,
         "dsun": ((radius_1au / 
                   (solar_r * scale)) * constants.au),
         "name": "EIT %s" % header.get('wavelnth'),
         "nickname": "EIT",
         "cmap": cm.get_cmap('sohoeit%d' % header.get('wavelnth'))
     })
     return properties
开发者ID:Waino,项目名称:sunpy,代码行数:24,代码来源:soho.py


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