comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: fits array manipulation
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: fits array manipulation [message #80788] Mon, 09 July 2012 11:58
Kyle Schindler is currently offline  Kyle Schindler
Messages: 3
Registered: June 2012
Junior Member
On Friday, July 6, 2012 6:23:12 PM UTC-4, Kyle Schindler wrote:
> I am using a fits image to look at ngc1097. The radius of the galaxy is roughly 600 pixles. I want to cut this part out into a new array so I can work with just the galaxy. Does anybody no how to do this.
>
> I was thinking of selecting each area above to the sides and below the galaxy into a new array then subtracting this from my original array.

Thanks this helped alot
Re: fits array manipulation [message #80797 is a reply to message #80788] Fri, 06 July 2012 20:52 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Friday, July 6, 2012 6:23:12 PM UTC-4, Kyle Schindler wrote:
> I am using a fits image to look at ngc1097. The radius of the galaxy is roughly 600 pixles. I want to cut this part out into a new array so I can work with just the galaxy. Does anybody no how to do this.
>
> I was thinking of selecting each area above to the sides and below the galaxy into a new array then subtracting this from my original array.

Does it really matter that the data starts as a FITS array? Once you read the data into IDL, it's just a 600x600 array (or whatever size it really is).

Use IDL subscripting syntax to pull out a portion of any array,
GALAXY = IMG[100:200,200:250]
(just a random subscripting example)

If you are asking a deeper question of how to create a new FITS file with just the sub-image, well that's harder. You might want to try using DS9 (not sure if it does sub-images), or FTOOLS (which can extract subimages). Creating new world coordinate FITS keywords is always tricky. The IDL Astronomy package has bunches of awesome world coordinate capabilities, but you need to spend time to learn them.

Craig
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: include COI on wavelet plots using toolkit
Next Topic: hdf conversion

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:53:49 PDT 2025

Total time taken to generate the page: 0.00639 seconds