diff --git a/src/kcorrect/fitter.py b/src/kcorrect/fitter.py index 0f0c0a8..f939300 100644 --- a/src/kcorrect/fitter.py +++ b/src/kcorrect/fitter.py @@ -141,8 +141,7 @@ def set_Amatrix(self): return - def _fit_coeffs(self, redshift=None, maggies=None, ivar=None, - mc=0): + def _fit_coeffs(self, redshift=None, maggies=None, ivar=None, mc=0): """Fit coefficients to single object Parameters diff --git a/src/kcorrect/kcorrect.py b/src/kcorrect/kcorrect.py index 6e5fcfe..ae21d32 100644 --- a/src/kcorrect/kcorrect.py +++ b/src/kcorrect/kcorrect.py @@ -26,6 +26,9 @@ class Kcorrect(kcorrect.fitter.Fitter): abcorrect : bool correct maggies to AB (default False) + filename : str + input file to define kcorrect object (overrides responses, responses_out, responses_map, templates, redshift_range, nredshift, abcorrect) + responses : list of str names of input responses to base SED on @@ -115,6 +118,10 @@ class Kcorrect(kcorrect.fitter.Fitter): AmatrixOut is similar but returns a [nresponses_out, ntemplates] matrix for the output bandpasses. + + Once defined, a Kcorrect object can be output to a FITS file with + the method tofits(), and reimported with fromfits(). The filename + parameter expects this format. """ def __init__(self, filename=None, responses=None, templates=None, responses_out=None, responses_map=None, @@ -215,6 +222,9 @@ def derived(self, redshift=None, coeffs=None, band_shift=0., distance=None): 'mtol' : ndarray of np.float32, or np.float32 [ngalaxy] mass-to-light ratio in each output band + 'b50' : ndarray of np.float32, or np.float32 + [ngalaxy] current (< 50 Myr) over past star formation + 'b300' : ndarray of np.float32, or np.float32 [ngalaxy] current (< 300 Myr) over past star formation @@ -349,6 +359,9 @@ def derived_mc(self, redshift=None, coeffs_mc=None, band_shift=0., distance=None 'mtol' : ndarray of np.float32, or np.float32 [ngalaxy, mc] mass-to-light ratio in each output band + 'b50' : ndarray of np.float32, or np.float32 + [ngalaxy] current (< 50 Myr) over past star formation + 'b300' : ndarray of np.float32, or np.float32 [ngalaxy, mc] current (< 300 Myr) over past star formation @@ -450,7 +463,7 @@ def kcorrect(self, redshift=None, coeffs=None, band_shift=0.): return(kcorrect) def absmag(self, maggies=None, ivar=None, redshift=None, coeffs=None, - band_shift=0., distance=None, coeffs_mc=None): + band_shift=0., distance=None): """Return absolute magnitude in output bands Parameters diff --git a/src/kcorrect/response.py b/src/kcorrect/response.py index 3ef5ed7..5b8cba4 100644 --- a/src/kcorrect/response.py +++ b/src/kcorrect/response.py @@ -134,6 +134,9 @@ class Response(object): filename : str source filename, or None + fwhm, fwhm_low, fwhm_hight : np.float32 + FWHM of response, with low and high wavelength limits (Angstroms) + interp : scipy.interpolate.interp1d object interpolation object diff --git a/src/kcorrect/template.py b/src/kcorrect/template.py index ddde8d3..84dc833 100644 --- a/src/kcorrect/template.py +++ b/src/kcorrect/template.py @@ -26,6 +26,9 @@ class SED(object): flux : ndarray of np.float32 [nsed, nwave] rest frame flux grid in erg/cm^2/s/A at 10pc + ext : str + extension from which to read FLUX in FITS file + Attributes ---------- @@ -285,6 +288,9 @@ class Template(SED): binimage : bool if True, read in WAVE and FLUX extensions as binary images + ext : str + extension from which to read FLUX in FITS file + Attributes ----------