Zoom out of astronomical image preserving header info [message #42625] |
Thu, 17 February 2005 05:59  |
burkina
Messages: 32 Registered: February 2005
|
Member |
|
|
Ciao,
I need to zoom out an astronomical image, in order to make it visible a
part of the sky which is NOT included in the image itself. In other
words, I need to display the original image in a smaller region of the
picture and the rest is black. BUT, I need to preserve the RA and DEC
coordinates in the black part of the picture, because I have to draw a
box at certain coordinates to show that it is well outside the original
image. Moreover, I need to put RA and DEC axis (as it's done with
imcontour), BUT for all the total picture, not only the original image.
I hope it's clear! In any case, I've done it succesfully with ds9, so
that I can show what I want to you, but in IDL the result can be much
better!
Thank you very much,
Stefano
|
|
|
Re: Zoom out of astronomical image preserving header info [message #42666 is a reply to message #42625] |
Fri, 18 February 2005 13:34   |
mperrin+news
Messages: 81 Registered: May 2001
|
Member |
|
|
burkina <stebia@inwind.it> wrote:
> The problem with hrebin (and hcongrid) is that they don't zoom the
> image out as I need (like atv for example). They will produce an image
> with that number of pixels, so that if the zoom factor is 2, an
> original image of, say, 300x300, will become 600x600. This means a lot
> of time in processing the image when you need a very large zoom factor
> (as in my case) and enormous image files. That's not what I need. I
> actually need a costant image size, but with the original image
> shrinked to the desired dimension.
> In practice, I need a functionality completely equivalent to the ATV
> zoom, together with the possibility to re-center the final image where
> I want. I need space outside the image with the correct RA and DEC
> coordinates. ATV does it, but it can't do other things I need. That's
> why I can't use it directly.
In that case, may I suggest that you read through the atv source and copy
the algorithms from there? ATV is actually fairly well written and I think
it's not too difficult to pull out the relevant sections.
In particular, look at atv_getdisplay for the code that actually
resizes the array using congrid and embeds it into a larger fixed-size
array initialized to all zeros. You may have some more complicated
manipulations needed to get the astrometry header to match correctly.
What you really want is to resize the image to a smaller size and then
embed it in a larger array, I think. The first part is easy with
HCONGRID. The second needs the inverse of HEXTRACT, which doesn't seem
to exist yet. (HEMBED?) Maybe if you end up writing such a thing, you
could consider contributing it to the library!
- Marshall
|
|
|
|
Re: Zoom out of astronomical image preserving header info [message #42737 is a reply to message #42666] |
Mon, 21 February 2005 06:33  |
burkina
Messages: 32 Registered: February 2005
|
Member |
|
|
Thank you Marshall.
I have found a workaround for what I needed, simply using larger
astronomical images that actually included the entire field I needed.
Therefore, I haven't actually resolved my first problem, but I have
managed to produced the pictures I wanted...
If I ever find the time to try to resolve the issue, I will let you
know (but I'm not so sure I'll be able to do that!).
Stefano
|
|
|