I was looking at the jwst_pipeline_walkthrough.ipynb notebook (which is great!) and in section 11, you read in the source catalog using astropy.io.ascii.read:
# below is an example source catalog product
from astropy.io import ascii
catalog = ascii.read("mosaic_A1-A4_obs1-8_cat.ecsv")
I just wanted to point out that the preferred way to read in an ECSV file is to use astropy.table.Table (or astropy.table.QTable). That will preserve the metadata stored in the table, e.g. units on column values (e.g. flux) and you will also get back any serialized astropy objects stored in the table (e.g. Time objects or SkyCoord objects (instead of separate columns for RA and Dec):
from astropy.tables import Table
catalog = Table.read('mosaic_A1-A4_obs1-8_cat.ecsv')
I was looking at the
jwst_pipeline_walkthrough.ipynb
notebook (which is great!) and in section 11, you read in the source catalog usingastropy.io.ascii.read
:I just wanted to point out that the preferred way to read in an ECSV file is to use
astropy.table.Table
(orastropy.table.QTable
). That will preserve the metadata stored in the table, e.g. units on column values (e.g. flux) and you will also get back any serialized astropy objects stored in the table (e.g.Time
objects orSkyCoord
objects (instead of separate columns for RA and Dec):CC: @hcferguson