snsim.dust_utils ================ .. py:module:: snsim.dust_utils .. autoapi-nested-parse:: This module contains dust features. Functions --------- .. autoapisummary:: snsim.dust_utils.check_files_and_download snsim.dust_utils.init_mw_dust snsim.dust_utils.add_mw_to_fit snsim.dust_utils.compute_ebv Module Contents --------------- .. py:function:: check_files_and_download() Check if sdfmap files are here and download if not. :returns: No return, just download files. :rtype: None .. rubric:: Notes TODO : Change that for environement variable or cleaner solution .. py:function:: init_mw_dust(mw_dust) Set MW dut effect on sncosmo model. :param model: The sncosmo model which to add the mw dust. :type model: sncosmo.Model :param mw_dust_mod: The model of dust to apply. :type mw_dust_mod: dic :returns: Dust effects. :rtype: dict .. py:function:: add_mw_to_fit(fit_model, mwebv, mod_name, rv=3.1) Set mw model parameters of a sncsomo model. :param fit_model: Description of parameter `fit_model`. :type fit_model: type :param mwebv: E(B-V) color excess of the sn. :type mwebv: float :param rv: R_v coeff of the MW. :type rv: float :returns: Directly modify the sncosmo model. :rtype: None .. py:function:: compute_ebv(ra, dec) Compute E(B-V) color excess. :param ra: Right Ascension. :type ra: float or numpy.ndarray :param dec: Declinaison. :type dec: float or numpy.ndarray :returns: The color excess correponding to ra, dec coordinates. :rtype: float or numpy.ndarray