Re: fits array manipulation [message #80788] |
Mon, 09 July 2012 11:58 |
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  |
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
|
|
|