Sunpy support for handling spectral image cubes?

17 views
Skip to first unread message

Bin Chen

unread,
Nov 13, 2017, 11:16:56 AM11/13/17
to SunPy
Hi All,

I am wondering if sunpy has (or will have) support for spectral imaging cubes. I have radio spectral imaging data in FITS format that have more than 2 axes, i.e., NAXIS = 4, in which CTYPE3 is wavelength, and CTYPE4 is polarization. sunpy.map (version 0.8.1) complains when reading the fits file. And it only uses the first two dimensions:

".../anaconda2/lib/python2.7/site-packages/sunpy/map/mapbase.pyc:324: Warning: This file contains more than 2 dimensions. Only the first two dimensions will be used. The truncated data will not be saved in a new file."

astropy.io.fits can open the fits file without a problem, but it lacks many functionalities that I love from sunpy.map, e.g., cropping the images using solar xy coordinates, etc. Currently I had to go back to sswidl and do all those things using ssw map structures. Any suggestions?

Many thanks,
Bin

DVD PS

unread,
Nov 13, 2017, 2:16:09 PM11/13/17
to sunpy
Hi Bin,

It's in our plan for the future. There's been some attempts during the past years but none properly fit all the requirements. The last one seems promising (under sunpy/cube, sunpy/ndcube and sunpy/irispy) but is still under development. Some of sunpy people are involved with a larger effort including astropy about how to handle high dimensional data. My suggestion would be to play with ndcube to seee whether that fits your needs and feedback with comments.

Maybe Stuart or Danny can give you more info about this.

David

--
You received this message because you are subscribed to the Google Groups "SunPy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sunpy+unsubscribe@googlegroups.com.
To post to this group, send email to su...@googlegroups.com.
Visit this group at https://groups.google.com/group/sunpy.
For more options, visit https://groups.google.com/d/optout.

Bin Chen

unread,
Nov 13, 2017, 10:15:20 PM11/13/17
to SunPy
Hi David,

Thank you for your swift reply and point to the relevant packages. I'll give them a try. 

-Bin


On Monday, November 13, 2017 at 2:16:09 PM UTC-5, DavidPS wrote:
Hi Bin,

It's in our plan for the future. There's been some attempts during the past years but none properly fit all the requirements. The last one seems promising (under sunpy/cube, sunpy/ndcube and sunpy/irispy) but is still under development. Some of sunpy people are involved with a larger effort including astropy about how to handle high dimensional data. My suggestion would be to play with ndcube to seee whether that fits your needs and feedback with comments.

Maybe Stuart or Danny can give you more info about this.

David
On 13 November 2017 at 16:16, Bin Chen <bin...@njit.edu> wrote:
Hi All,

I am wondering if sunpy has (or will have) support for spectral imaging cubes. I have radio spectral imaging data in FITS format that have more than 2 axes, i.e., NAXIS = 4, in which CTYPE3 is wavelength, and CTYPE4 is polarization. sunpy.map (version 0.8.1) complains when reading the fits file. And it only uses the first two dimensions:

".../anaconda2/lib/python2.7/site-packages/sunpy/map/mapbase.pyc:324: Warning: This file contains more than 2 dimensions. Only the first two dimensions will be used. The truncated data will not be saved in a new file."

astropy.io.fits can open the fits file without a problem, but it lacks many functionalities that I love from sunpy.map, e.g., cropping the images using solar xy coordinates, etc. Currently I had to go back to sswidl and do all those things using ssw map structures. Any suggestions?

Many thanks,
Bin

--
You received this message because you are subscribed to the Google Groups "SunPy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sunpy+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages