Пример #1
0
    def __init__(self, data, header=None): #pylint: disable=W0613
        """BaseMap constructor"""
        if header:
            self.header = header
            self.date = None
            self.name = None
            self.cmap = None
            self.exptime = None
            
            # Set object attributes dynamically
            for attr, value in list(self.get_properties(header).items()):
                setattr(self, attr, value)

            self.center = {
                "x": wcs.get_center(header, axis='x'),
                "y": wcs.get_center(header, axis='y')
            }
            self.scale = {
                "x": header.get('cdelt1'),
                "y": header.get('cdelt2')
            }
            self.units = {
                "x": wcs.get_units(header, axis='x'), 
                "y": wcs.get_units(header, axis='y')
            }
            self.rsun = wcs.get_solar_limb(header)
Пример #2
0
Файл: map.py Проект: hbain/sunpy
 def center(self):
     """Returns the offset between the center of the Sun and the center of 
     the map."""
     return {
         'x': wcs.get_center(self.shape[1], self.scale['x'], 
                             self.reference_pixel['x'], 
                             self.reference_coordinate['x']),
         'y': wcs.get_center(self.shape[0], self.scale['y'], 
                             self.reference_pixel['y'], 
                             self.reference_coordinate['y'])
     }
Пример #3
0
 def center(self):
     """Returns the offset between the center of the Sun and the center of 
     the map."""
     return {
         "x": wcs.get_center(
             self.shape[0], self.scale["x"], self.reference_pixel["x"], self.reference_coordinate["x"]
         ),
         "y": wcs.get_center(
             self.shape[0], self.scale["y"], self.reference_pixel["y"], self.reference_coordinate["y"]
         ),
     }
Пример #4
0
 def center(self):
     """Returns the offset between the center of the Sun and the center of 
     the map."""
     return {
         'x':
         wcs.get_center(self.shape[1], self.scale['x'],
                        self.reference_pixel['x'],
                        self.reference_coordinate['x']),
         'y':
         wcs.get_center(self.shape[0], self.scale['y'],
                        self.reference_pixel['y'],
                        self.reference_coordinate['y'])
     }