Commit b4b6d30b authored by Riccardo La Placa's avatar Riccardo La Placa
Browse files

Update README.md

parent df90d25c
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -14,14 +14,17 @@ Code in the [functions folder](https://ict.inaf.it/gitlab/heag-oar/scsearch/-/tr

### powdist.m (Poissonian and crosstalk noise distribution check for visual inspection)

 powdist.m defines a function which takes five input arguments (NyqFreq,LC,Binned,PSname,Noisename) and outputs three (extrVoverE,CrossTalkProb,HalfMeanPow). 
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.
Plots are produced both with and without the `-nodesktop` option, but in the second case an interactive window will open too.

The function takes five arguments as input  (NyqFreq,LC,Binned,PSname,Noisename) and returns three (extrVoverE,CrossTalkProb,HalfMeanPow). 
Input arguments:
- NyqFreq is the Nyquist frequency in 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, resp. PSs+lightcurve and counts dist. with crosstalk estimate
- 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

Output arguments:
- extrVoverE are the three values of the expected Var/E assuming 8-pixel, 4-pixel, and 1-pixel crosstalk probability distributions
- CrossTalkProb is the agnostic crosstalk porb. (only assumes underlying poissonian noise)
- HalfMeanPow is 0.5 the average high-freq. power in the power spectrum (this is what extrVoverE has to be compared to)
 No newline at end of file
- extrVoverE is a three-element vector containing the ratios of Variance over Expected value calculated assuming a Poissonian process modified, respectively, 8-pixel, 4-pixel, and 1-pixel crosstalk probability distributions 
- CrossTalkProb is the total crosstalk probability (it only assumes underlying poissonian noise and is independent of the number of pixels that can be fired by a single photon)
- HalfMeanPow is half the average power at frequencies higher than 1000 Hz in the power spectrum (this is what extrVoverE has to be compared to)
 No newline at end of file