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

Home » Public Forums » archive » Re: ROT is ROTTEN
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: ROT is ROTTEN [message #28079] Tue, 20 November 2001 22:32 Go to previous message
Wayne Landsman is currently offline  Wayne Landsman
Messages: 117
Registered: January 1997
Senior Member
>
> ROT is bad. Can it be fixed? Is there a (fast) alternative?

The easiest alternative is to use the intrinsic ROTATE function, which is
specifically designed to deal with rotations of multiples of 90 degress.

A more subtle alternative is to add the MISSING keyword when using the ROT()
function, e.g.

print, total(rot(a,270,/interp, MISSING = !VALUES.F_NAN))

and you will find that there are values flagged as "missing". This is
because unless the rotation is exactly a multiple of 90 degrees, then there
will be subpixels in the output array for which there are no corresponding
values to interpolate in the input array. Instead of extrapolating,
these pixels get flagged as "missing" and the values returned by ROT() are
not to be trusted. (Exactly which pixels get flagged as missing depends
on the roundoff error.)

This question has come up before here -- perhaps RSI should modfiy ROT() so
that it calls ROTATE when the user supplies an exact integer mulitple of 90
degrees.

Wayne Landsman landsman@mpb.gsfc.nasa.gov

P.S. I would also like a keyword to ROT() to control the output dimensions
e.g. ftp://idlastro.gsfc.nasa.gov/landsman/idl/rot.pro
[Message index]
 
Read Message
Read Message
Previous Topic: Rotation
Next Topic: Calling C++ from IDL

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

Current Time: Wed Oct 08 13:07:52 PDT 2025

Total time taken to generate the page: 0.00371 seconds