How to use the fsps._fsps.driver function in fsps

To help you get started, we’ve selected a few fsps examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dfm / python-fsps / fsps / fsps.py View on Github external
fagn=0.0,
            agn_tau=10.0
        )

        # Parse any input options.
        for k, v in self.params.iteritems():
            self.params[k] = kwargs.pop(k, v)

        # Make sure that we didn't get any unknown options.
        if len(kwargs):
            raise TypeError("__init__() got an unexpected keyword argument "
                            "'{0}'".format(list(kwargs)[0]))

        # Before the first time we interact with the FSPS driver, we need to
        # run the ``setup`` method.
        if not driver.is_setup:
            driver.setup(compute_vega_mags, vactoair_flag)
        else:
            cvms, vtaflag = driver.get_setup_vars()
            assert compute_vega_mags == bool(cvms)
            assert vactoair_flag == bool(vtaflag)
        self._zcontinuous = zcontinuous
        # Caching.
        self._wavelengths = None
        self._emwavelengths = None
        self._zlegend = None
        self._ssp_ages = None
        self._stats = None
        self._libraries = None