Reproject GONG H-alpha images to AIA

Hello everyone, I just joined this forum

I’ve started working with SunPy to study solar prominences with both H-alpha data and SDO/AIA imaging, and later also SO data. I’m trying to firstly compare H-apha and AIA193A images to locate the prominences but I’m having problems with axis and projection.

It’s being very comfortable to work with AIA data, as it can be turned into a map object with but I can’t do the same for GONG data, so I’m treating it as a standard fits file. This is what I’m doing:

hdul =
wcs = WCS(hdul[1].header)
image_data = fits.getdata(fileHa)

map193 =

fig = plt.figure(figsize=(12,4))

ax1 = fig.add_subplot(121, projection=map193)
im1 = map193.plot(axes=ax1)

ax2 = fig.add_subplot(122, projection=wcs)
im2 = ax2.imshow(image_data, cmap='hot')
ax2.grid(alpha=0.5, color='white', lw=0.5)
ax2.title.set_text('H-Alpha ' + hdul[1].header['DATE-OBS'].replace('T', ' '))
fig.colorbar(im2, orientation='vertical')

The issue is that, as you can see, while AIA193 image has helioprojective coordinates, GONG has its own coordinates, and I don’t know how to reproject it so they both have the same. I’ve tried changing the ‘CTYPE’ value but it just blows up the axes. If anyone knows how to do it, or how to turn the GONG data into a object, that would ease the job.

Thank you in advance!

Hello @Darroyo,

This is not a solution to your problem but in the next release of sunpy (6.0, hopefully in the next few weeks) will have a map source for these files.

If you see Add GONG H-Alpha map source by samaloney · Pull Request #7451 · sunpy/sunpy · GitHub you can see the changes that had to be made to the metadata to make the files work with sunpy. You can do these changes manually to the metadata before you pass it into as a temporary work around.

Your other choice is to use the development version of sunpy as a different temporary workaround.

If you have any more questions, please do ask!


Hi Nabil, thank you!

That is actually really helpful, nice to see it will be implemented soon. I’ll check the metadata changes and try to work with that until then.