calc_likelihoods_1D
- zdm.iteration.calc_likelihoods_1D(grid, survey, doplot=False, norm=True, pdmz=True, psnr=True, Pn=False, pNreps=True, ptauw=False, pwb=False, dolist=0, grid_type=0)[source]
Calculates 1D likelihoods using only observedDM values Here, Zfrbs is a dummy variable allowing it to be treated like a 2D function for purposes of calling.
grid: the grid object calculated from survey
survey: survey object containing the observed z,DM values
doplot: will generate a plot of z,DM values
- psnr:
True: calculate probability of observing each FRB at the observed SNR False: do not calculate this
- Pn:
True: calculate probability of observing N FRBs False: do not calculate this
- pNreps:
True: calculate probability of the number of repetitions for each repeater False: do not calculate this
- ptauw:
True: calculate probability of intrinsic width and scattering given total width False: do not calculate this
- pwb:
True: calculate probability of specific width and beam values, and psnr | bw False: do not calculate this; simply sum psnr over all possible p(b,w)
- dolist:
0: returns total log10 likelihood llsum only [float] 1: also returns a dict of individual statistical contributions to log-likelihood 2: also returns the above for every FRB individually Structure of llsum and longlist:
[“pzDM”][“pDM”] [“pN”] [“Nexpected”] (only for [“ptauw”]
[“pbar”] [“piw”] [“ptau”] [“w_indices”]
- [“pbw”]
[“pb”] [“pw”] [“pbgw”] [“pwgb”] [“pbw”] [“psnr_gbw”] [“psnrbw”]
lllist: <Nfrbs> longlist [list of lists]:
Pn: float zDM: PzDM zDM extras: P(z) P(DM), P(DM|z), P(z|DM) ptauw: p(tau|wtot), p(wtot), p(snr|wtot) psnr: p_snr (over all beams/widths) pwb: p(snr|b,w,z,dm), p(snr,b,w|z,DM), p(b|zDM), p(w|zDM), p(b|w,zDM), p(w|b,zDM), p(wb|zDM)
else: returns nothing (actually quite useful behaviour!)
- grid_type:
0: normal zdm grid 1: assumes the grid passed is a repeat_grid.zdm_repeat_grid object and calculates likelihood for repeaters 2: assumes the grid passed is a repeat_grid.zdm_repeat_grid object and calculates likelihood for single bursts