Purpose : cache data in pointer for fast retrieval Yes, it uses common blocks, but their names areĭynamically created so there is never a conflict.Ĭategory : Ancillary GBO Synoptic ObjectsĭATA_CACHE::CLEANUP, DATA_CACHE::HAS_DATA, DATA_CACHE::INITĭATA_CACHE::RESTORE, DATA_CACHE::SAVE, DATA_CACHE::SET, DATA_CACHE::SHOWĭATA_CACHE::VALID_NAME, DATA_CACHE_DEFINE, DPRINT, EXIST, IS_STRING, TRIM is_number, is_number, str_replace, str_replace In memory even after object is destroyed. Purpose : create a cache object, whose contents persist $SSW/gen/idl/objects/data_cache_define.pro Kim, - Extracted c_expected file into a separate file Not true for chi-squared when counts/bin > 10, cash_statistic = ChisquaredĮJS - FLOATED f_mod to prevent f_obs/f_modīecoming zero if f_obs and f_mod both INTEGER.ĮJS - Added option to get expectation of C-statistic To provide a goodness-of-fit statistic valid for very low countrates NOTES: Tested analytic form of coefficient array, but explicit form isĪ=dblarr(mm) & fact_=a & fact_=1. The approximation is good to better than 0.1% everywhere. RESTRICTIONS: fmod must be positive, never zero Print,'Expectation of C-statistic=',expec = Polynomial * exponential - log term for 0 = 1.000 39. The Poisson distribution function (f^n / n!) exp(-f),Īnd the C-statistic is C(n,f)= 2*(f-n*alog(n)-n*alog(f)). Where the range of n is 0 to infinity, and P_n is The C-statistic is the same as chi-squared for largeĬount rates, but differs significantly when the
The result of the program is the mean C-statisticįor an infinite ensemble of Poisson-distributedĬount rates with mean values given by fmod. PURPOSE: Expectation value of the C-statistic