Skip to content

Commit 7260f12

Browse files
Implements SOLOHi imager
1 parent bc2d945 commit 7260f12

4 files changed

Lines changed: 26 additions & 9 deletions

File tree

PyThea/PyThea_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def footer_text():
8585
More imaging data have been added:
8686
- SDO/AIA images from 211A channel.
8787
- PSP/WISPR inner and outer telescope images.
88-
- SolO/EUI and METIS images.
88+
- SolO/EUI, METIS, and HI(tiles 1&2) images.
8989
''', icon='ℹ️')
9090
st.warning('''
9191
**NOTE: From PyThea >0.8.1 the JSON fitting files will be slightly different from the old ones.**

PyThea/config/selected_imagers.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,10 @@
8080
imager_dict['METIS'] = {'fido': (a.Instrument('METIS'), a.soar.Product('METIS-VL-TB'), a.Level(2)),
8181
'process': {'dimensions': (1024*u.pixel, 1024*u.pixel), 'superpixel': 2},
8282
'source': 'SOLO', 'instrument': 'METIS', 'detector': 'VLD', 'wavelength': 'TB'}
83+
84+
for tile in range(1, 5):
85+
z = 'T' if tile in [1, 2] else 'G'
86+
imager_dict[f'SOLOHI-T{tile}'] = {'fido': (a.Instrument('SOLOHI'),
87+
a.soar.Product(f'SOLOHI-{tile}F{z}'), a.Level(2)),
88+
'process': {'superpixel': 2},
89+
'source': 'SOLO', 'instrument': 'SOLOHI', 'detector': f'T{tile}'}

PyThea/sunpy_dev/map/maputils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,9 @@ def maps_clims(images):
317317
return [14., 14.]
318318
elif images[i].detector == 'Inner':
319319
return [13., 13.]
320-
if images[i].instrument == 'Metis':
320+
elif images[i].instrument == 'Metis':
321321
return [12.80, 13.00]
322+
elif images[i].instrument.startswith('SoloHI'):
323+
return [13.95, 14.05]
324+
322325
return [np.nanquantile(images[i].data, 0.20)-10, np.nanquantile(images[i].data, 0.80)+10]

PyThea/utils.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,7 @@ def make_figure(map, cmap='Greys_r', clim=[-20, 20], clip_model=True, **kwargs):
128128
if median_filter_value != 1:
129129
map = sunpy.map.Map(median_filter(map.data, size=int(median_filter_value)), map.meta)
130130

131-
if map.instrument == 'WISPR':
132-
clim = [-10**-clim[0], 10**-clim[1]]
133-
134-
if map.instrument == 'Metis':
131+
if map.instrument in ['WISPR', 'Metis'] or map.instrument.startswith('SoloHI'):
135132
clim = [-10**-clim[0], 10**-clim[1]]
136133

137134
if cmap == 'default':
@@ -155,9 +152,19 @@ def make_figure(map, cmap='Greys_r', clim=[-20, 20], clip_model=True, **kwargs):
155152
if cref.Ty > 0:
156153
axis.invert_yaxis()
157154

158-
axis.set_title(re.sub(r'\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}',
159-
' $T_{AGV}:$' + parse_time(map.date_average).strftime('%Y-%m-%d %H:%M:%S'),
160-
map.latex_name.replace('VLD', 'METIS-VDL')),
155+
if map.instrument == 'SoloHI':
156+
title = 'SoloHI' + f' Tile-{map.detector}' ' $T_{AGV}:$' + parse_time(map.date_average).strftime('%Y-%m-%d %H:%M:%S')
157+
elif map.instrument == 'Metis':
158+
title = re.sub(r'\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}',
159+
' $T_{AGV}:$' + parse_time(map.date_average).strftime('%Y-%m-%d %H:%M:%S'),
160+
map.latex_name.replace('VLD', 'METIS-VDL'))
161+
else:
162+
title = re.sub(r'\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}',
163+
' $T_{AGV}:$' + parse_time(map.date_average).strftime('%Y-%m-%d %H:%M:%S'),
164+
map.latex_name)
165+
print(map.instrument)
166+
print(map.latex_name)
167+
axis.set_title(title,
161168
fontsize=10, pad=8)
162169

163170
return fig, axis

0 commit comments

Comments
 (0)