snsim.dust_utils

This module contains dust features.

Functions

check_files_and_download()

Check if sdfmap files are here and download if not.

init_mw_dust(mw_dust)

Set MW dut effect on sncosmo model.

add_mw_to_fit(fit_model, mwebv, mod_name[, rv])

Set mw model parameters of a sncsomo model.

compute_ebv(ra, dec)

Compute E(B-V) color excess.

Module Contents

snsim.dust_utils.check_files_and_download()[source]

Check if sdfmap files are here and download if not.

Returns:

No return, just download files.

Return type:

None

Notes

TODO : Change that for environement variable or cleaner solution

snsim.dust_utils.init_mw_dust(mw_dust)[source]

Set MW dut effect on sncosmo model.

Parameters:
  • model (sncosmo.Model) – The sncosmo model which to add the mw dust.

  • mw_dust_mod (dic) – The model of dust to apply.

Returns:

Dust effects.

Return type:

dict

snsim.dust_utils.add_mw_to_fit(fit_model, mwebv, mod_name, rv=3.1)[source]

Set mw model parameters of a sncsomo model.

Parameters:
  • fit_model (type) – Description of parameter fit_model.

  • mwebv (float) – E(B-V) color excess of the sn.

  • rv (float) – R_v coeff of the MW.

Returns:

Directly modify the sncosmo model.

Return type:

None

snsim.dust_utils.compute_ebv(ra, dec)[source]

Compute E(B-V) color excess.

Parameters:
Returns:

The color excess correponding to ra, dec coordinates.

Return type:

float or numpy.ndarray