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

Home » Public Forums » archive » Re: Manipulation using where
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: Manipulation using where [message #53188 is a reply to message #53099] Thu, 22 March 2007 01:26 Go to previous message
wxf is currently offline  wxf
Messages: 6
Registered: March 2007
Junior Member
Somebody above use "mod-method".That is correct.

I often use "array_indices" function to change the result of "where"
into two dimensional coordinates.It's ok,but I never tried 3-D case.

IDL> dat=dist(400,300) ; a data array
IDL> index=where (dat eq 100)
IDL> ind = array_indices(dat,index)
IDL> xarray=ind(0,*) ; get X
IDL> yarray=ind(1,*) ; get Y
IDL> tvscl, dat ; show image
IDL> plots, xarray, yarray, psym=2, color=150,/dev ;over plot the
points
If you want to change (x,y) into one dimensional coordinate('where()'-
result),you can use this formula.
;your image size-(m,n),any coordinates(x,y)
;position=mL*long(round(y))+long(round(x))

You see,it is not difficult.3-D's case and formula can be available
just do the same thing.
Good luck
wxf
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ps file with text
Next Topic: ps file

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

Current Time: Sun Oct 12 09:46:34 PDT 2025

Total time taken to generate the page: 0.16087 seconds