How to use the fsps._fsps.driver.get_spec 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
if zmet is not None:
            self.params["zmet"] = zmet

        if self.params.dirty:
            self._compute_csp()

        wavegrid = self.wavelengths
        if peraa:
            factor = 3e18 / wavegrid ** 2

        else:
            factor = np.ones_like(wavegrid)

        NSPEC = driver.get_nspec()
        if (tage > 0.0) or (tage == -99):
            return wavegrid, driver.get_spec(NSPEC, 1)[0] * factor

        NTFULL = driver.get_ntfull()
        return wavegrid, driver.get_spec(NSPEC, NTFULL) * factor[None, :]
github dfm / python-fsps / fsps / fsps.py View on Github external
if self.params.dirty:
            self._compute_csp()

        wavegrid = self.wavelengths
        if peraa:
            factor = 3e18 / wavegrid ** 2

        else:
            factor = np.ones_like(wavegrid)

        NSPEC = driver.get_nspec()
        if (tage > 0.0) or (tage == -99):
            return wavegrid, driver.get_spec(NSPEC, 1)[0] * factor

        NTFULL = driver.get_ntfull()
        return wavegrid, driver.get_spec(NSPEC, NTFULL) * factor[None, :]