sunpy / sunpy

SunPy - Python for Solar Physics
http://www.sunpy.org
BSD 2-Clause "Simplified" License
920 stars 592 forks source link

Investigate using astropy Cutout2D in submap #1540

Open Cadair opened 9 years ago

Cadair commented 9 years ago

https://astropy.readthedocs.org/en/latest/nddata/utils.html#cutout-images

That looks like it could simplify the header calculations for submap. Further investigation is required.

dpshelio commented 9 years ago

wow! seems quite cool! I just miss there are some units missed in there, like the positions. However, it seems to accept skyCoords for that too.

wtbarnes commented 4 years ago

Is this still something we are interested in looking into?

Cadair commented 4 years ago

Don't see why not.

jeffreypaul15 commented 3 years ago

Is this still a requirement? I was tinkering around with this and noticed that after setting the pixels accordingly, submap of the GenericMap.wcs gives me

Number of WCS axes: 2
CTYPE : 'HPLN-TAN'  'HPLT-TAN'  
CRVAL : 0.00089530541880571  0.00038493926472939  
CRPIX : 436.5  436.5  
PC1_1 PC1_2  : 0.99999706448085  0.0024230207763071  
PC2_1 PC2_2  : -0.0024230207763071  0.99999706448085  
CDELT : 0.00066744222222222  0.00066744222222222  
NAXIS : 0  0

but the cutout.wcs from Cutout2D gives :

Number of WCS axes: 2
CTYPE : 'HPLN-TAN'  'HPLT-TAN'  
CRVAL : 0.00089530541880571  0.00038493926472939  
CRPIX : 437.5  437.5  
PC1_1 PC1_2  : 0.99999706448085  0.0024230207763071  
PC2_1 PC2_2  : -0.0024230207763071  0.99999706448085  
CDELT : 0.00066744222222222  0.00066744222222222  
NAXIS : 50  50

I'm confused as to why NAXIS is 50 50 (basically the size of the cutout mentioned, I've set pixels = 50 here) whereas using submap is of 0 0.