TemplateGrid¶
- class eazy.photoz.TemplateGrid(zgrid, templates, RES='FILTERS.RES.latest', f_numbers=[156], add_igm=True, galactic_ebv=0, Eb=0, n_proc=4, interpolator=None, filters=None, verbose=2, cosmology=None, array_dtype=<class 'numpy.float32'>, tempfilt_data=None)[source]¶
Bases:
objectIntegrate filters through filters on a redshift grid
- Parameters:
- zgridarray
Redshift grid
- templateslist
List of
Templateobjects- RESstr
Filename of a
FilterFile, or the object itself.- f_numberslist
List of unit-indexed filter numbers for the desired filters to integrate.
- add_igmbool
Add IGM absorption as a function of redshift
- galactic_ebvfloat
MW extinction \(E(B-V)\)
- Ebfloat
Extra dust bump Drude profile to apply to galactic extinction
- n_procint
Number of parallel processes
- interpolatorNone
See
init_interpolator- filterslist, optional
Explicit list of filters to bypass
RESandf_numbers- verboseint
Some control over status messages
- cosmology
astropy.cosmologyobject (Not really used here)
- array_dtypedtype
Data type for computed arrays
- tempfilt_dataarray
Precomputed array of integrated fluxes
- Attributes:
NZNumber of redshift grid points
NFILTNumber of filters
NTEMPNumber of templates
pivotFilter pivot wavelengths
- zgridarray (NZ)
Redshfit grid
- trdzarray (NZ)
Array for trapezoid integration as a dot product (see
trapz_dx)- tempfiltarray (NZ, NTEMP, NFILT)
Templates integrated through filter bandpasses on the redshift grid.
- splineinterpolator
Spline interpolator that interpolates
tempfiltat a specified redshift
Attributes Summary
Number of filters
Number of objects in catalog
Number of templates
Number of redshift grid points
Filter pivot wavelengths (deprecated, use
pivot)Filter pivot wavelengths
Methods Summary
__call__(z)Interpolate filter flux grid at specified redshift
apply_SFH_constraint([max_mass_frac, ...])Set interpolated template fluxes to zero for a given redshift/tmeplate combination if the accumulated stellar mass fraction at ages older than the age of the universe is greater than
max_mass_frac.init_interpolator([interpolator])Initialize filter flux interpolator
Attributes Documentation
- NFILT¶
Number of filters
- NOBJ¶
Number of objects in catalog
- NTEMP¶
Number of templates
- NZ¶
Number of redshift grid points
- pivot¶
Filter pivot wavelengths
Methods Documentation
- apply_SFH_constraint(max_mass_frac=0.5, cosmology=None, sfh_file='templates/fsps_full/fsps_QSF_12_v3.sfh.fits')[source]¶
Set interpolated template fluxes to zero for a given redshift/tmeplate combination if the accumulated stellar mass fraction at ages older than the age of the universe is greater than
max_mass_frac.Requires the “sfh.fits” file.
Warning
The implementation seems to work but the results when applied to running on a full catalog don’t seem very reliable, probably caused by the effect of clipping out templates at discrete redshifts.
- init_interpolator(interpolator=None)[source]¶
Initialize filter flux interpolator
- Parameters:
- interpolatorNone or a
scipy.interpolateclass. Defaults to
scipy.interpolate.Akima1DInterpolatorwhich has desirable smooth behavior robust to large curvature in the interpolated data.
- interpolatorNone or a