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

Home » Public Forums » archive » Re: Map Function Question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Map Function Question [message #79860 is a reply to message #79859] Thu, 19 April 2012 06:27 Go to previous messageGo to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
On 19 avr, 14:35, David Fanning <n...@idlcoyote.com> wrote:
> alx writes:
>> Well, it seems that the IMAGE function implicitly uses ASPECT_RATIO=1
>> and then adjust the position.
>> You can get the correct position by forcing ASPECT_RATIO=0 in the
>> call.
>
>> im = IMAGE(scaledData, x, y, RGB_TABLE=rgb, XRANGE=xrange,
>> YRANGE=yrange, GRID_UNITS='degrees', POSITION=[0.1,0.1,0.9,0.9])
>> print,im.convertCoord(x[0],y[0],/DATA,/TO_NORMAL)
>>       0.10000000      0.24925925      0.00000000
>> im = IMAGE(scaledData, x, y, RGB_TABLE=rgb, ASPECT_RATIO=0,
>> XRANGE=xrange, YRANGE=yrange, GRID_UNITS='degrees',
>> POSITION=[0.1,0.1,0.9,0.9])
>> print,im.convertCoord(x[0],y[0],/DATA,/TO_NORMAL)
>>       0.10000000      0.10000000      0.00000000
>
>> One more thing being not clearly documented and which cannot be
>> guessed !
>
> Well, putting ASPECT_RATIO=0 in the call certainly
> changes the aspect ratio to *something*, although
> God only knows what it is. It is certainly not to
> what I asked for. And, whatever it is, the map
> I'm trying to put on top of the image seems
> to ignore it, too.
>
> Tell me again how you are using these routines
> to do science. It does seem a wonder to me!
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
>

What I understand:
When ASPECT_RATIO is not specified, the IMAGE function scales the
(nx,ny) image array with equal pixel sizes in x and y, in accordance
with POSITION keyword (i.e. the overall scale is given by (pos[1]-
pos[0])/nx > (pos[3]-pos[2])/ny). Your POSITION values are therefore
satisfied in only one direction.
When ASPECT_RATIO=0, the image function scales the array in both x and
y direction, independently. But the image is distorted.
All this makes sense, but is not really explained in EXELIS doc.
alx.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PyMOL in IDL
Next Topic: What color should it be?

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

Current Time: Wed Oct 08 19:58:59 PDT 2025

Total time taken to generate the page: 0.00403 seconds