Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MLSO KCor data files can't be ingested #423

Open
dgarciabriseno opened this issue Jan 8, 2025 · 0 comments
Open

MLSO KCor data files can't be ingested #423

dgarciabriseno opened this issue Jan 8, 2025 · 0 comments

Comments

@dgarciabriseno
Copy link
Contributor

This will be more important when KCor comes back online.

They provided some data in 2024, but the XML data is malformed and can't be processed as valid XML.
We can likely add a patch to work around this, but since there's no new data coming in, it's not much of a priority.

Error reported by glymur (used by sunpy to read jp2 files) when trying to parse the XML:

/usr/local/lib/python3.12/dist-packages/glymur/jp2box.py:3084: UserWarning: XMLSyntaxError encountered while parsing an XML box at byte offset 77:

        "error parsing attribute name, line 12, column 7 (<string>, line 12)"

Further debug shows the root cause seems to be these dollar signs in the XML tag:
MJD_D$...

  1 <?xml version="1.0" encoding="UTF-8"?>
  2 <meta>
  3 <fits>
  4 <SIMPLE>1</SIMPLE>
  5 <BITPIX>-32</BITPIX>
  6 <NAXIS>2</NAXIS>
  7 <NAXIS1>1024</NAXIS1>
  8 <NAXIS2>1024</NAXIS2>
  9 <EXTEND>0</EXTEND>
 10 <DATE-OBS>2024-04-09T17:48:52</DATE-OBS>
 11 <DATE-END>2024-04-09T17:49:07</DATE-END>
 12 <MJD_D$OBS>60409.742</MJD_D$OBS>
 13 <MJD_D$END>60409.742</MJD_D$END>

This MJD tag wasn't in earlier files from 2022 and earlier.

I sent an email to their contact address letting them know they have bad XML in these headers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant