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

TRACE image processing #28

Open
wafels opened this issue Feb 9, 2022 · 3 comments
Open

TRACE image processing #28

wafels opened this issue Feb 9, 2022 · 3 comments

Comments

@wafels
Copy link
Contributor

wafels commented Feb 9, 2022

The TRACE images should be available in Helioviewer.org. Work has started on this - this issue will track progress.

@wafels
Copy link
Contributor Author

wafels commented Feb 18, 2022

The TRACE data processing pipeline runs and creates images - see #30 . However, the image when imported to SunPy shows the following error:

In [2]: m = sunpy.map.Map("/Users/ireland/2008_11_12__17_27_54_000__TRACE_TRACE_TRACE_171.jp2")
WARNING: SunpyUserWarning: This file contains more than 2 dimensions. Data will be truncated to the first two dimensions. [sunpy.map.mapbase]

In [6]: m.data.shape
Out[6]: (1024, 3)
In [7]: m.dimensions
Out[7]: PixelPair(x=<Quantity 3. pix>, y=<Quantity 1024. pix>)

Since other JP2 files made with JP2Gen are read as anticipated by SunPy there must be something unusual about the TRACE processing pipeline.

@wafels
Copy link
Contributor Author

wafels commented Feb 18, 2022

Some more information:

In [2]: import glymur

In [3]: jp2 = glymur.Jp2k("/Users/ireland/2008_11_12__17_27_54_000__TRACE_TRACE_TRACE_171.jp2")

In [4]: fullres = jp2[:]

In [5]: fullres.shape
Out[5]: (1024, 1024, 3)

In [6]: jpl = glymur.Jp2k(
   ...:     "/Users/ireland/Data/jp2/SOHO/2022_02_18__13_36_26_362__SOHO_LASCO_C2_white-light.jp2"
   ...: )


In [8]: fullres_l = jpl[:]

In [9]: fullres_l.shape
Out[9]: (1024, 1024)

@wafels
Copy link
Contributor Author

wafels commented Feb 18, 2022

I think the issue lies here: https://github.com/Helioviewer-Project/jp2gen/blob/master/idl/trace/hvs_trace.pro#L60 . The details structure gets the palette key. The value is an array of [3, 256]. The code that writes the JP2 file contains an option to use the palette in the details structure: https://github.com/Helioviewer-Project/jp2gen/blob/master/idl/gen/hv_write_jp2_lwg.pro#L581 . I think what is happening is that IDL then uses the palette to write out a JP2 file with RGB channels. I'll post this as an issue.

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

No branches or pull requests

2 participants