Re: Fractional Pixels Origin? [message #47625 is a reply to message #47583] |
Sun, 19 February 2006 12:50   |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
JD Smith wrote:
> ... the natural "I'm a tiny ant living on the
> surface of your detector and measuring pixel positions from the edge
> with my tiny little ruler": [0.5,0.5].
Suffice it to say that's what natural to one person can seem very
unnatural to another.
Well perhaps it doesn't suffice, so I'll spell it out. I am a tiny
scientist crawling over a chess board measuring stuff. I go the first
square and make a measurement in its centre: I'll store that at index
[0,0] and record the location as [x0,y0]. Then I move through the
squares on the chess board stepping dx in the x direction by in the y
direction until I get to [x0+63*dx,y0+63*dy]. I now have a set of
measurements, my_data, dimensioned [64,64], and a pair of location
vectors, x=x0+dxfindgen(64) and y=y0+dy*findgen(64). The measurements
are *at* the locations, as is only natural.
I can contour this:
contour, my_data, x, y
I can do a surface
surface, my_data, x, y
or I can plot a slice
plot, x, my_data[*,3]
Then I think, "wouldn't it be cool to show this data with one of those
new-fangled false-colour images!" Obviously, I want the command to be
my_image_plot, my_data, x, y
Now the image will fill the space -0.5*dx<x<63.5*dx, -0.5*dy<y<63.5*dy,
but that's a detail for the plotting program. Then I think, "Hang on. I
don't like the little square, uniform areas around each data point,
because this variable varies smoothly" so I change to an image in which
the colour is interpolated between data points. The data points are
still at the same locations, so now I want my image to fill the space
0<x<63*dx, 0*dy<y<63*dy.
So my contention is that if you think of images as just another way to
show data, not privileged above contours, surfaces, then the natural
convention is to have the lower-left data point at [0,0].
--
Mark Hadfield "Kei puwaha te tai nei, Hoea tahi tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
|
|
|