PhotDG¶
-
class
pydirtygrid.PhotDG.
PhotDG
(datafile='data/dirtygrid_29mar17.hdf5')[source]¶ Read in the DirtyGrid cube from a HDF5 file
Returns: (self.)seds: a list that grows with the SED you choose to extract
- (self.)dgrid: the HDF5 file: with attributes corresponding to the
parameters values; with each dataset corresponding to each band
Methods Summary
findIndexFromParams
(grain, geom, sf_type, ...)Give a set of parameters and find where they will be stored in the photAddNew
(wave0, band_name, newcube[, datafile])Create the new dataset and add it to the file photGet
(grain, geom, sf_type, metal, age, ...)Save photometry points given a set of parameters. photPlot
([ind])Plot photometry points, either giving a specific set of bands, or all print_parameters
()Methods Documentation
-
findIndexFromParams
(grain, geom, sf_type, metal, age, sfr, tau)[source]¶ Give a set of parameters and find where they will be stored in the DirtyGrid cube
Parameters: grain: string
type of grain
geom: string
geometry
sf_type: string
star formation type
metal: float
metallicity
age: float
age of the stellar population
sfr: float
star formation rate
tau: float
optical depth
Returns: indgt, indgm, indst, indmt, indsa, indsr, indta: integers
the corresponding indices
-
photAddNew
(wave0, band_name, newcube, datafile='data/dirtygrid_29mar17.hdf5')[source]¶ Create the new dataset and add it to the file
Parameters: wave0: float
central wavelength of the new filter
band_name: string
name of the new filter
newcube: array(3, 6, 2, 5, 50, 29, 25) (float)
new photometry to be added to the file as a new dataset
-
photGet
(grain, geom, sf_type, metal, age, sfr, tau, bands=-1)[source]¶ Save photometry points given a set of parameters. The function allows for:
- values not in the DGrid parameter sampling, and finds the closest point
- specific bands only
Parameters: grain: string
type of grain
geom: string
geometry
sf_type: string
star formation type
metal: float
metallicity
age: float
age of the stellar population
sfr: float
star formation rate
tau: float
optical depth
Returns: seds: save the corresponding SED