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
Moment and XROI [message #93345] Mon, 20 June 2016 11:04 Go to previous message
roconnor is currently offline  roconnor
Messages: 2
Registered: June 2016
Junior Member
Hi everyone,

I'm stumped on this one. My aim is to "cut out" a region of an image (fits) and analyze only the data in that region. That works great when I use XROI and the statistics keyword. However, I would also like to use MOMENT to further analyze the data contained within the ROI. When I use MOMENT, however, the mean returned is very different than the mean returned by Statistics. Does anyone know why this is/how I could get MOMENT to analyze the data within the ROI?

Relevant snippet of code is below.

XROI, data, regions_out = thisROI, statistics=S, /block

mask = thisROI ->computemask(dimensions=size(data, /dimensions), mask_rule=2)

roiImage = data*(mask GT 0)
M = moment(roiImage)
tv, roiImage

PRINT, 'Count Min Max Mean StdDev'
PRINT, S
print, '*********************************************************** ****'
PRINT, 'Mean: ', M[0] & PRINT, 'Variance: ', M[1] & $
PRINT, 'Skewness: ', M[2] & PRINT, 'Kurtosis: ', M[3]
[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: Wed Oct 08 18:09:19 PDT 2025

Total time taken to generate the page: 0.00692 seconds