Skip to content
Browse files

Merge pull request #148 from khughitt/master

RHESSI tweaks
  • Loading branch information...
2 parents e751377 + 3c9e8a4 commit 22bc4e494ae3704b6db7c6dc45aab246f451309e @ehsteve ehsteve committed Apr 15, 2012
Showing with 13 additions and 9 deletions.
  1. +9 −9 sunpy/map/basemap.py
  2. +4 −0 sunpy/map/sources/rhessi.py
View
18 sunpy/map/basemap.py
@@ -179,8 +179,8 @@ def __init__(self, header):
}
self.units = {
- 'x': header.get('cunit1'),
- 'y': header.get('cunit2')
+ 'x': header.get('cunit1', 'arcsec'),
+ 'y': header.get('cunit2', 'arcsec')
}
# Validate properties
@@ -539,16 +539,16 @@ def plot(self, figure=None, overlays=None, draw_limb=True, gamma=None,
axes.set_title("%s %s" % (self.name, self.date))
# x-axis label
- if self.coordinate_system['x'] in ['HPLN-TAN', 'SOLAR-X']:
- xlabel = 'X-position [%s]' % self.units['x']
- elif self.coordinate_system['x'] == 'HG':
+ if self.coordinate_system['x'] == 'HG':
xlabel = 'Longitude [%s]' % self.units['x']
-
+ else:
+ xlabel = 'X-position [%s]' % self.units['x']
+
# y-axis label
- if self.coordinate_system['y'] in ['HPLT-TAN', 'SOLAR-Y']:
- ylabel = 'Y-position [%s]' % self.units['y']
- elif self.coordinate_system['y'] == 'HG':
+ if self.coordinate_system['y'] == 'HG':
ylabel = 'Latitude [%s]' % self.units['y']
+ else:
+ ylabel = 'Y-position [%s]' % self.units['y']
axes.set_xlabel(xlabel)
axes.set_ylabel(ylabel)
View
4 sunpy/map/sources/rhessi.py
@@ -34,6 +34,10 @@ def __init__(self, data, header):
self.cmap = cm.get_cmap('rhessi')
self.exposure_time = (parse_time(header.get('date_end')) -
parse_time(header.get('date_obs'))).seconds
+ self.coordinate_system = {
+ 'x': 'HPLN-TAN',
+ 'y': 'HPLT-TAN'
+ }
@classmethod
def is_datasource_for(cls, header):

0 comments on commit 22bc4e4

Please sign in to comment.
Something went wrong with that request. Please try again.