Hi,
I was wondering about the concept of "Sine Latitude" based map projection.
The example given in "Loading an HMI Synoptic map" uses the JSOC synoptic series with the FITS header 'cunit2' keyword indicating that the latitude is projected in units of 'Sine Latitude'. As shown in the example, the synoptic map is plotted.
When I try to use other JSOC HMI series like
(1) Daily synchronic image FITS => hmi.Mrdailysynframe_720s
(2) Time-distance image FITS => hmi.td_fsi_12h,
the FITS header keyword 'cunit2' is 'sin(deg)' and sunpy does not recognize this unit and the following error is displayed:
So I decided to try the following:
sin_deg = u.def_unit('sin_deg')
u.add_enabled_units([sin_deg])
For example, to test:
ang = 30*u.deg
<Quantity 30. deg>
q = np.sin(ang)*sin_deg
Quantity 0.5 sin_deg>
Then, I tried to create a new header using "sunpy.map.make_fitswcs_header" for this daily synchronic map by using the newly enabled unit 'sin_deg'
hdu = fits.open('hmi.Mrdailysynframe_720s.20140918_120000_TAI.data.fits')
data = hdu[0].data
coord = SkyCoord(180*u.arcsec, 0.sin_deg, obstime='2014-09-18', observer='earth', frame="heliographic_carrington")
UnitTypeError: Latitude instances require units equivalent to 'rad', so cannot set it to 'sin_deg'.
Could someone please help!
(1) I would like to know how sunpy recognized the latitude unit 'Sine Latitude' in synoptic file "hmi.Synoptic_Mr.*.fits' and why my newly created unit was not recognized. I might be doing something very wrong.
(2) I really do not know how to modify the header information of the synchronic FITs or time-distance FITs so that the sunpy map can be created. For example, the scale values in the header of daily synchronic file are
CDELT1 = -0.10000000000000001 / [degree/pixel] image scale in the x direction
CDELT2 = 0.0013888888888888889 / [sin(deg)/pixel] image scale in the y direction.
Thanks!
Sudha