RHESSI map from corresponding Image Fits

65 views
Skip to first unread message

Sudha

unread,
Aug 20, 2024, 10:56:30 AM8/20/24
to SunPy
Hello, 
I have created a sunpy map using image fits generated using the attached fits file (hsi_image_20141022_140542.fits). The image as generated by hessi package in sswidl is shown attachment "ImageUsingHESSI_IDL.png". 

While reading the fits file into sunpy to create the map, I received the following messages:
INFO: Missing metadata for solar radius: assuming the standard radius of the photosphere. [sunpy.map.mapbase]
WARNING: SunpyMetadataWarning: Missing metadata for observer: assuming Earth-based observer.
For frame 'heliographic_stonyhurst' the following metadata is missing: dsun_obs,hglt_obs,hgln_obs
For frame 'heliographic_carrington' the following metadata is missing: crln_obs,crlt_obs,dsun_obs
 [sunpy.map.mapbase]
WARNING: IERSStaleWarning: leap-second file is expired. [astropy.utils.iers.iers]

The sunpy map is "SunpyMapFromImageFits.png". 

Comparing the two images: 
(1) why does the sunpy map "dilute" or "diffuse" some of the structure observed in the  sswidl image? 
(2) Why are the maximum count flux values different in both the images? the sswidl image has maximum value of 33090, while the sunpy map has ~50000.

Appreciate help in understanding these issues. 
Thanks,
Sudha.


ImageUsingHESSI_IDL.png
hsi_image_20141022_140542.fits
SunpyMapFromImageFits.png

Nabil Freij

unread,
Aug 20, 2024, 11:44:53 AM8/20/24
to SunPy
Hello Sudha,

The first set of warnings, are just informing you that the file is missing the correct metadata to work out where the observer (what took the image) is located.
The last warning message is due to an outdated IERS file within astropy that you should be able to fix with calling "astropy.time.update_leap_seconds".

For your questions, I think they are related. Since the values differ so much, the color scaling applied by default is giving the impression that the image is "diluted".
We can change around the normalization of the sunpy image to have the same style of scaling, but it won't fix the image since the values are still very different.

Can you tell me how you created the IDL image? There might be a step missing to do in Python after loading the file that might explain the different values.

Thanks,
Nabil

Albert Y. Shih

unread,
Aug 20, 2024, 12:09:57 PM8/20/24
to su...@googlegroups.com
Hi, Sudha,
     Regarding your primary question, I cannot reproduce your FITS file.  If I generate a RHESSI back-projection image based on the settings printed on the IDL image, I reproduce the IDL image.  If I then write out a FITS file, and plot it using `sunpy`, it looks the same as the IDL image:


Note that the max pixel value is ~33000, just like with IDL, and the structure is the same as the IDL image.  (You'll have to explicitly set the color range so that it's symmetric about zero.)
    I can't figure out what settings were used to make the FITS file you have, but they can't be the same settings as for the IDL image.  Did you generate your FITS file using a script or using the GUI?

Thanks,
Albert

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/sunpy/38b9aaa4-63a8-47e2-b6f1-f114c978ce65n%40googlegroups.com.

Albert Y. Shih

unread,
Aug 20, 2024, 12:28:21 PM8/20/24
to su...@googlegroups.com
Hi, Sudha,
     I think I've figured out your FITS file.  The FITS file looks to be the image reconstructed using grids 5 through 9, while the IDL image uses grids 4 through 8.  That's why your images don't match.  I suspect that there was confusion about specifying the grid numbers, i.e., counting from 1 versus counting from 0.  Hope that clears things up for you!

Thanks,
Albert

Manju Sudhakar

unread,
Aug 21, 2024, 4:52:41 AM8/21/24
to su...@googlegroups.com
Hello Albert and Nabil, 

Thanks very much for your help with this! I apologize for posting my queries multiple times. 

I see where I have had the problem, and yes, including detector 9 will definitely result in a poorer resolution! I will try again with the relevant fits image. 

Thanks again. 

Best wishes, 
Sudha 



Albert Y. Shih

unread,
Aug 21, 2024, 7:06:04 AM8/21/24
to su...@googlegroups.com
Hi, Sudha,
     I'm glad that your issue has been solved!  As a correction to what you wrote, the addition of detector 9 doesn't necessarily result in poorer resolution.  It's the removal of detector 4 that is causing the poorer resolution.

Thanks,
Albert

Manju Sudhakar

unread,
Aug 22, 2024, 12:46:21 AM8/22/24
to su...@googlegroups.com
Dear Albert, 
Oh I see! I did not think of it from that point of view. Thanks and appreciate the correction!  I will need to really study and experiment with the imaging quality of different combinations of RHESSI collimators. 
Best wishes and have a great day, 
Sudha.

Reply all
Reply to author
Forward
0 new messages