Commit 27bbbd0f authored by Riccardo La Placa's avatar Riccardo La Placa
Browse files

Edit README.md

parent dd96e98e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@ Code in the [functions folder](https://ict.inaf.it/gitlab/heag-oar/scsearch/-/tr

powdist.m defines a function which briefly analyses a light curve to search for crosstalk signatures. 
It plots the light curve together with a simple Leahy-normalized power spectrum (PS) of the data and the same PS rebinned onto a quasi-logarithmic grid. Then, assuming that the observation is mostly composed of Poissonian noise modified by crosstalk, it generates the expected distribution in three different crosstalk models, and plots the counts-per-bin distribution both in the data and the models.
Moreover, it compares the power distribution expected (a $\chi^2$ distribution with two degrees of freedom) with our power distribution (and I should probably add an output indication of the statistical significance of this comparison).

By checking that the high-frequency PSs are flat (i.e., the noise tends to white noise), and that the alignment between at least one of the models and the data count distribution is good, users can safely just renormalize the powers in their PSs, even after correcting them or the underlying light curve for orbital motions: by dividing the PSs by half the average power at high frequencies (returned by the function as `HalfMeanPow`), they can be treated as normally done for the purpose of power significance and sensitivity estimation.

The function takes five arguments as input (NyqFreq, LC, Binned, PSname, Noisename) and returns three (extrVoverE, CrossTalkProb, HalfMeanPow).
@@ -24,7 +26,7 @@ The function takes five arguments as input (NyqFreq, LC, Binned, PSname, Noisena
- `NyqFreq` is the Nyquist frequency in Hz (we suggest to use at least 1500 Hz)
- `LC` (light curve) is the vector of either binned counts, or photon times of arrival (ToAs)
- If `Binned` is true, we assume uniform binning and dt = 1/(2*NyqFreq), otherwise we assume the elements of LC are actually the ToAs, and the function bins the data with the aforementioned dt
- `PSname` and `Noisename` are the filenames (or complete paths) of graphs to be saved: the first figure will contain the power spectra (PSs) and light curve, and the second will compare the counts distribution with the one estimated through assumptions on the crosstalk distributions. Any of the [types supported](https://it.mathworks.com/help/matlab/ref/exportgraphics.html#mw_3db70293-26d3-4e3f-9abf-6b96488e4dde) by MATLAB's exportgraphics function should be fine, but formatting tests were carried out with pdfs
- `PSname`, `Noisename` and `PowDisname` are the filenames (or complete paths) of graphs to be saved: the first figure will contain the power spectra (PSs) and light curve, the second will compare the counts distribution with the one estimated through assumptions on the crosstalk distributions, while the third contains the comparison of a $\chi^2$ distribution vs our power distribution, both with "input" powers and the PS renormalized by `HalfMeanPow`. Any of the [types supported](https://it.mathworks.com/help/matlab/ref/exportgraphics.html#mw_3db70293-26d3-4e3f-9abf-6b96488e4dde) by MATLAB's exportgraphics function should be fine, but formatting tests were carried out with pdfs

#### Output arguments:
- `extrVoverE` is a three-element vector containing the ratios of Variance over Expected value calculated assuming a Poissonian process modified by, respectively, 8-pixel, 4-pixel, and 1-pixel crosstalk probability distributions