frb.dm.dm_ism_healpix_map

frb.dm.dm_ism_healpix_map.get_current_mapfile()[source]

Get the path to the default NE2001 DM HEALPix map file.

Returns:

The path to the NE2001 DM HEALPix map file.

Return type:

str

frb.dm.dm_ism_healpix_map.calc_ismDM_item(item, ne=None)[source]

Calculate the dispersion measure (DM) for a given item using the NE2001 model. :param item: A list containing the galactic longitude (l) and latitude (b) in degrees. :type item: list :param ne: An instance of the ElectronDensity class from the NE2001 model. :type ne: density.ElectronDensity, optional

Returns:

The calculated DM value for the given galactic coordinates.

Return type:

float

frb.dm.dm_ism_healpix_map.create_ne2001_dm_healpix_map(nside=64, n_cores=15)[source]

Create a HEALPix map of dispersion measure (DM) values using the NE2001 model.

Parameters:

nside (int) – The HEALPix resolution parameter. The number of pixels will be 12 * nside^2.

Return type:

None

frb.dm.dm_ism_healpix_map.get_dm_map(mapfile=None)[source]

Read a HEALPix map of dispersion measure (DM) values created using the NE2001 model.

Parameters:

mapfile (str) – The path to the FITS file containing the HEALPix map of DM values.

Returns:

dm_map – The DM map read from the FITS file.

Return type:

array

frb.dm.dm_ism_healpix_map.dm_ism_from_healpix_map(l, b, dm_map)[source]

Get the dispersion measure (DM) value from a HEALPix map of DM values.

Parameters:
  • l (float or int or np.ndarray) – Galactic longitude in degrees.

  • b (float or int or np.ndarray) – Galactic latitude in degrees.

  • dm_map (array) – The HEALPix map of DM values

Returns:

dm_ism – The DM value at the given coordinates.

Return type:

float

frb.dm.dm_ism_healpix_map.plot_mollwiede_view_dm_ism(mapfile=None, title='$DM_{ISM}$ Map', min=0, max=1000)[source]

Plot a Mollweide view of the HEALPix map of dispersion measure (DM) values.

Parameters:

mapfile (str) – The path to the FITS file containing the HEALPix map of DM values.

Return type:

None