Hi, Robert,

There are a large number of ways to do what you want.  How you think  
about it depends on what you want to do with the data -- you can plot  
your pixels directly in the rotated coordinates, or you can insert  
them into a data array of rectified pixels.

If you merely want to plot your pixels for display or printing, you  
can use PGPLOT (or, I think, PLPLOT) to do that.  The way I do such  
things is by creating a FITS header for the data and then using the  
PGPLOT "fits_imag" routine to plot them.  (FITS is a scientific  
imaging format, and each image contains enough information to describe  
a coordinate transformation between pixel coordinates and scientific  
coordinates).

If you want to place your inclined pixels onto another data array, you  
would do well to look at the "PDL::Transform" package, which can remap  
your line of pixels however you like under a coordinate transformation  
(like rotation) that you can specify in advance.  There are other  
specific routines, such as "warp2d", that do similar work.   
Transform::map and warp2d will both produce either sampled or smooth  
interpolated output.

Finally, if you want complete pixel-by-pixel control you can use  
"range()" or "indexND()", the collapse-by-selection operators, to pick  
out particular pixels from your output image plane and rearrange them  
into a shape suitable for direct assignment from your linear array.

Cheers,
Craig


On Apr 3, 2008, at 11:47 AM, Robert Cumming wrote:
> I'm about to dive into doing images for the first time, but I'm not
> sure whether what I want to do is possible.
>
> The idea is to plot one-dimensional pdls as (inclined) lines of
> pixels on a two dimensional viewport.  You might like to think of this
> as a representation of data along a slit if you're a spectroscopy  
> person.
>
> Is this possible, and if it is, should I think in terms of an inclined
> window/panel or remapping by hand to an ordinary pixel scale?
>
> /Robert
> -- 
> Robert Cumming | redaktör, Populär Astronomi | forskare
> Institutionen för astronomi, Stockholms universitet, AlbaNova, 106  
> 91 Stockholm
> 08-5537 8542, m: 070 49 33 114 | http://www.astro.su.se/~robert/
> Populär Astronomi: http://popast.nu/
>
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>


_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to