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 #93349 is a reply to message #93348] Mon, 20 June 2016 12:47 Go to previous message
roconnor is currently offline  roconnor
Messages: 2
Registered: June 2016
Junior Member
On Monday, June 20, 2016 at 3:27:27 PM UTC-4, wlandsman wrote:
> 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

That solved it! Thanks so much!
[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 09:27:28 PDT 2025

Total time taken to generate the page: 0.88075 seconds