imstatics nclip/lower,upper incompatible?
Andy Newsam wrote on Jul 31, 2006
Hello.
I'm having a problem with imstatistics. I am using the "upper" and "lower" keywords to exclude values from the statistics calulations (these are "masked" pixels in fact) but as soon as I set nclip > 0, it seems to ignore upper/lower limts. As an example:
[Correct]
[Clearly not setting lower=0!]
I cant find anything in the documentation or a past buglog - can anyone help?
Cheers
Andy
I'm having a problem with imstatistics. I am using the "upper" and "lower" keywords to exclude values from the statistics calulations (these are "masked" pixels in fact) but as soon as I set nclip > 0, it seems to ignore upper/lower limts. As an example:
cl> imstatistics test1.fits lower=0 nclip=0
# IMAGE NPIX MEAN MIDPT STDDEV MIN MAX
test1.fits 702714 1.423 1.134 210.3 0. 113034.[Correct]
cl> imstatistics test1.fits lower=0 nclip=3 lsigma=4 usigma=3
# IMAGE NPIX MEAN MIDPT STDDEV MIN MAX
test1.fits 2308317 -0.5979 -0.9952 0.6923 -1. 2.115[Clearly not setting lower=0!]
I cant find anything in the documentation or a past buglog - can anyone help?
Cheers
Andy
Mike Fitzpatrick wrote on Jul 31, 2006
In your first example: nclip=0
In your second example: nclip=3
The 'nclip' parameter controls the number of iterations performed and if non-zero will cause the lower/upper limits to be adjusted.
If you really want to do statistics through masks, see the MIMSTATISTICS task. See also the examples in the help page for IMEXPR for ways to create pixel masks based on pixel value.
Cheers,
-Mike
In your second example: nclip=3
The 'nclip' parameter controls the number of iterations performed and if non-zero will cause the lower/upper limits to be adjusted.
If you really want to do statistics through masks, see the MIMSTATISTICS task. See also the examples in the help page for IMEXPR for ways to create pixel masks based on pixel value.
Cheers,
-Mike
Andy Newsam wrote on Jul 31, 2006
Thanks - that is pretty much what I was already doing, but I wasn't sure why imstatistics wasn't doing what I expected (naively I assumed that the iterative clipping would be done after the lower and upper limits had been applied to the data)
Cheers
Andy
Cheers
Andy
Last post on Jul 31, 2006