table_to_catalog¶
- romanisim.catalog.table_to_catalog(table, bandpasses)¶
Read a astropy Table into a list of CatalogObjects.
We want to read in a catalog and make a list of CatalogObjects. The table must have the following columns:
ra : float, right ascension in degrees
dec : float, declination in degrees
type : str, ‘PSF’ or ‘SER’ for PSF or sersic profiles respectively
n : float, sersic index
half_light_radius : float, half light radius in arcsec
pa : float, position angle of ellipse relative to north (on the sky) in degrees
ba : float, ratio of semiminor axis b over semimajor axis a
Additionally there must be a column for each bandpass giving the flux in that bandbass.
- Parameters:
- tableastropy.table.Table
astropy Table containing ra, dec, type, n, half_light_radius, pa, ba and fluxes in different bandpasses
- bandpasseslist[str]
list of names of bandpasses. These bandpasses must have columns of the corresponding names in the catalog, containing the objects’ fluxes.
- Returns:
- list[CatalogObject]
list of catalog objects for catalog