ccdstat in=image [parameter=value]
Optionally, if the map contains an error normalized difference
between an observation and model, it can also compute a chi2 goodness of
fit if the number of of fitting parameters is given (npar, must be > 0
to trigger this option), as well as the number of independant points per
beam (nppb):
chi2 = sum_{i,j}(map(i,j)^2)/nppb/(N/nppb-npar)
where N is the number of non-bad values in the map. The input map is now
assumed to contain a dimensionless (obs-mod)/sigma
% ccdstat image.ccd min=-2 Min=-1.879409 Max=2.265516 Number of points : 95 Mean and dispersion : 0.097891 0.956030 Skewness and kurtosis: -0.059936 -0.654776 5/100 out-of-range points discardedHere is an example how to created a weight file which is a circular annulus:
% ccdmath out=map1 "fie=iflt(%r,50,1,0)" size=200,200 crpix=100,100 % ccdmath out=map2 "fie=iflt(%r,20,1,0)" size=200,200 crpix=100,100 % ccdmath map1,map2 map3 %1-%2Here is an two masking example: firstignoring the exact value of 0, followed by an example of a small range around 0:
% ccdstat map1 bad=0 % ccdmath map1 - 'iflt(abs(%1),0.001,0,%1)' | ccdstat - bad=0Here is an example of calculating the chi2 goodness of fit for a gaussian distribution:
% ccdmath "" - "rang(0,1)" | ccdstat - npar=1 Generating a map from scratch chi2= 1.03431 df= 98
src/image/misc ccdstat.c
4-Oct-88 V1.0: Created PJT 9-may-03 V1.3: added bad= PJT 5-jun-03 V1.4: added win= PJT 14-nov-04 V1.5: added the chi2 trigger with npar= and nppb= PJT 24-may-06 V1.8: added mmcount PJT