Question About Accessing Magnetograms From JSOC Using DRMS


I’ve been trying to access the magnetograms from JSOC’s SHARP catalog (Magnetic Fields Measured by HMI / SDO) using the DRMS library using the code in the screenshots below. I ran into the error in the first screenshot which indicated that data was missing from my header, and that I should see the link to fix the header. I followed those instructions and reran my code, but got the error: “ValueError: Invalid input: None.” I’ve also tried downloading the FITS files of the magnetograms locally using the Sunpy tutorial code, but even after getting and entering my email (one of the parameters for download with the library), I could not access the data.

I was hoping someone with a similar issue had a solution to this issue, and if so, help is greatly appreciated!
Thank you very much in advance!

1 Like


I think the main issue here is that by downloading the fits file like that, you have zero header information and therefore it is not a valid file that can be opened with a sunpy Map.

You would need to “export” the file via DRMS to get the full correct FITS file.
Or construct the header yourself.

The other choice is to see if you can download the file you want via the sunpy downloader like in this example: Downloading and plotting an HMI magnetogram — SunPy 4.0.5 documentation

On a side note, what SunPy tutorial are you following?


1 Like

Thanks for your reply!

I was able to figure it out using Fido download. The Sunpy tutorial I was following was this one, but I figured out that it was a problem on my end.