get_zdm_grid

zdm.misc_functions.get_zdm_grid(state: State, new=True, plot=False, method='analytic', nz=500, zmin=0.01, zmax=5, ndm=1400, dmmax=7000.0, datdir='GridData', tag='', orig=False, verbose=False, save=False, zlog=False)[source]

Generate a grid of z vs. DM for an assumed F value for a specified z range and DM range.

Parameters:
  • state (parameters.State) – Object holding all the key parameters for the analysis

  • new (bool, optional) – True (default): generate a new grid False: load from file.

  • plot (bool, optional) – True: Make a2D plot of the zdm distribution. False (default): do nothing.

  • method (str, optional) – Method of generating p(DM|z). Analytic (default): use pcosic make_c0_grid MC: generate via Monte Carlo using dlas.monte_dm

  • nz (int, optional) – Size of grid in redshift. Defaults to 500.

  • zmin (float,optional) – Minimum z. Used only for log-spaced grids.

  • zmax (float, optional) – Maximum z. Defaults to 5. Represents the upper edge of the maximum zbin.

  • ndm (int, optional) – Size of grid in DM. Defaults to 1400.

  • dmmax ([type], optional) – Maximum DM of grid. Defaults to 7000. Represents the upper edge of the max bin in the DM grid.

  • datdir (str, optional) – Directory to load/save grid data. Defaults to ‘GridData’.

  • tag (str, optional) – Label for grids (unique identifier). Defaults to “”.

  • orig (bool, optional) – Use original calculations for things like C0. Defaults to False.

  • save (bool, optional) – Save the grid to disk?

  • zlog (bool, optional) – Use a log-spaced redshift grid? Defaults to False.

Returns:

zDMgrid, zvals, dmvals

Return type:

tuple