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

Home » Public Forums » archive » Fractional Pixels Origin?
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: Fractional Pixels Origin? [message #47599 is a reply to message #47583] Tue, 21 February 2006 13:44 Go to previous messageGo to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
JD Smith wrote:
> [snip]
>
> I don't see your argument. Fractional pixels are useful only when
> calculating things which relate pixel coordinates to some other
> coordinate (like celestial coordinates on the sky, etc), or when
> computing other derived fractional pixel positions (e.g. clip two
> polygons). Obviously, the computer has no understanding of a
> fractional pixel, but only the memory indexed offset [0,0]. But the
> latter does not have to drive the former. In fact I'd say it's rather
> strange to let the layout in memory dictate a physical coordinate
> system. You don't need to make this distinction.

Hang on. I'm not letting layout in memory dictate a physical coordinate
system. I'm just adopting a convention for "image plots" that is the
same as for other plot types.

I have a data array, mydata, dimensioned [m,n]

When I type

contour, mydata

the contour routine implicitly locates the data points at x =
[0,...,m-1], y = [0,...,n-1]. Ditto when I type

surface, mydata

Similarly for plots of 1D arrays.

When I plot this data via a false-colour image using my own
image-plotting routine

mgh_image_plot, mydata

then I adopt the same convention. If the image is "blocky" (eg an
IDLgrImage with INTERPOLATE=0) then the cell centres represent the data
points; the image has to fill the space -0.5 <= x <= m-0.5 (similarly
for y) to get them in the right location. If the image is "smooth" (eg
an IDLgrImage with INTERPOLATE=1) then the outer row & column of data
points lie on the edge of the image and it fills the space 0 <= x <=
m-1, etc.

That's the convention I prefer, for reasons which seem good to me. If
that's not the subject under discussion in this thread (which was never
entirely clear to me) then please disregard it.

--
Mark Hadfield "Kei puwaha te tai nei, Hoea tahi tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Processing getting slower and slower?
Next Topic: how to get scale info from a transform matrix?

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

Current Time: Sun Oct 12 13:04:30 PDT 2025

Total time taken to generate the page: 0.80082 seconds