Skip to content

Commit

Permalink
Update to jp2parser to support latest sunpy (#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarciabriseno authored Jan 8, 2025
1 parent f83b86b commit 3d85fdd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion install/helioviewer/jp2parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from astropy.time import Time
from sunpy.map import Map, GenericMap
from sunpy.util.xml import xml_to_dict
from sunpy.io.header import FileHeader
from sunpy.io._header import FileHeader
from sunpy.map.mapbase import MapMetaValidationError
from glymur import Jp2k
from sunpy.util.xml import xml_to_dict
Expand Down Expand Up @@ -92,6 +92,9 @@ def getData(self):
# As an example, "LASCO-C2 Orange" -> "LASCO-C2" which is
# consistent with our current naming.
image['nickname'] = imageData.nickname.split(" ")[0]
# Patch for GONG H-alpha which has a nickname of "NSO-GONG,"
# Remove the trailing comma
if image['nickname'].endswith(","): image['nickname'] = image['nickname'][:-1]
image['observatory'] = imageData.observatory.replace(" ","_")
image['instrument'] = imageData.instrument.split(" ")[0]
image['detector'] = imageData.detector
Expand Down

0 comments on commit 3d85fdd

Please sign in to comment.