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

Home » Public Forums » archive » Moment and XROI
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: Moment and XROI [message #93348 is a reply to message #93345] Mon, 20 June 2016 12:27 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Monday, June 20, 2016 at 2:04:10 PM UTC-4, roco...@smith.edu wrote:
>
> roiImage = data*(mask GT 0)
> M = moment(roiImage)

It looks like you are setting the values outside the mask to zero, but they are still included (as zeros) in the moment calculation. I think what you want is

goodpix = where(mask GT 0)
M = moment(roiImage[goodpix])

but I only took a quick look at the problem. --Wayne
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Compilation Error: Procedure header must appear first and onlyonce
Next Topic: NaN doesn't work!

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

Current Time: Fri Oct 10 04:27:29 PDT 2025

Total time taken to generate the page: 0.40283 seconds