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

Update README.md

parent 3b4ba332
Loading
Loading
Loading
Loading
+27 −9
Original line number Diff line number Diff line
@@ -19,15 +19,33 @@ It plots the light curve together with a simple Leahy-normalized power spectrum
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). 

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: 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
- `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: 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

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 
- 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
- `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 
- `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)

<details><summary>Sample graphs from powdist</summary>

For reference, we show here the two figures produced by powdist running on the first 512 seconds of the SiFAP2 3FGLJ1544_20180418_N1_Bary.fits observation with the command `[VsuEtot,epsct,hmp] = powdist_f(Nyq,tsplit,false,'grafiPS.png','grafiCT.png')`. \
For compatibility with this readme file, they were produced as png files, but for nicer formatting we suggest to export as pdf.

<img src="sample_figures/grafiPS_3FGLJ1544_20180418_N1_Bary.fits_m1.png" />
<p>
    <em> Sample first graph produced by powdist, containing: </em>Top<em> - the PS of the data; </em>Centre<em> - its quasi-logarithmically rebinned version,useful to check for deviations from a flat, i.e. white, noise at high frequencies; </em>Bottom<em> - the lightcurve of the data, binned either as originally provided or in bins with dt = 1/(2*NyqFreq) if <code>Binned</code> was set to false.</em>
</p>

<img src="sample_figures/grafiCT_3FGLJ1544_20180418_N1_Bary.fits_m1.png" />
<p>
    <em> Sample second graph produced by powdist, showing: </em>Top<em> - the distribution of the number of counts per bin, both in the data (crosses) and in the models calculated by the function (coloured lines); </em>Bottom<em> - the relative errors, defined as </em><math>|x^model_j - x^data_j|/x^data_j</math><em>, between any of the models and the data (points using the same colour as the lines above).</em>
</p>



</details>
 No newline at end of file