snsim.post_sim_tools¶
This module contains some tools for post-sim analysis.
Functions¶
|
Approximation of the SNR detection probability. |
|
Run a SNR efficiency detection on all lcs. |
Module Contents¶
- snsim.post_sim_tools.SNR_pdet(SNR, SNR_mean, SNRp, p)[source]¶
Approximation of the SNR detection probability.
- Parameters:
- Returns:
Probability of detection.
- Return type:
Notes
The detection probability function :
\[P_{det}(SNR) = \frac{1}{1+\left(\frac{SNR_{mean}}{SNR}\right)^n}\]where \(n = \frac{\ln\left(\frac{1-p}{p}\right)}{\ln(SNR_{mean}) - \ln(SNR_p)}\)
- snsim.post_sim_tools.SNR_select(selec_function, lcs, SNR_mean=5, SNR_limit=[15, 0.99], randseed=np.random.randint(1000, 100000))[source]¶
Run a SNR efficiency detection on all lcs.
- Parameters:
selec_function (str) – Can be ‘approx’ function TODO : add interpolation for function from file.
lcs (pandas.DataFrame) – SN lcs data.
SNR_mean (float or dic) – The SNR for which the detection probability is 1/2 -> SNR_mean.
SNR_limit (list of dic(list)) – A SNR and its probability of detection -> $SNR_p$ and p.
randseed (int) – Randseed for random detection.
- Returns:
The SNR selected epochs.
- Return type:
Notes
The detection probability function :
\[P_\text{det}(SNR) = \frac{1}{1+\left(\frac{SNR_\text{mean}}{SNR}\right)^n}\]where \(n = \frac{\ln\left(\frac{1-p}{p}\right)}{\ln(SNR_\text{mean}) - \ln(SNR_p)}\)