Commit 5e9ac8bd authored by Thomas Telkamp's avatar Thomas Telkamp
Browse files

use proper column names

parent d4bdb2c2
# %ECSV 1.0
# ---
# datatype:
# - {name: col0.ra, unit: deg, datatype: float64}
# - {name: col0.dec, unit: deg, datatype: float64}
# - {name: col1, datatype: string}
# - {name: coord.ra, unit: deg, datatype: float64}
# - {name: coord.dec, unit: deg, datatype: float64}
# - {name: name, datatype: string}
# meta: !!omap
# - __serialized_columns__:
# col0:
# coord:
# __class__: astropy.coordinates.sky_coordinate.SkyCoord
# dec: !astropy.table.SerializedColumn
# __class__: astropy.coordinates.angles.Latitude
# unit: &id001 !astropy.units.Unit {unit: deg}
# value: !astropy.table.SerializedColumn {name: col0.dec}
# value: !astropy.table.SerializedColumn {name: coord.dec}
# frame: icrs
# ra: !astropy.table.SerializedColumn
# __class__: astropy.coordinates.angles.Longitude
# unit: *id001
# value: !astropy.table.SerializedColumn {name: col0.ra}
# value: !astropy.table.SerializedColumn {name: coord.ra}
# wrap_angle: !astropy.coordinates.Angle
# unit: *id001
# value: 360.0
# representation_type: spherical
# schema: astropy-2.0
col0.ra col0.dec col1
coord.ra coord.dec name
350.85 58.815 "Cassiopeia A"
299.868151909542 40.733915736 "Cygnus A"
266.416816625 -29.007824972 "Sgr A*"
......
......@@ -14,5 +14,5 @@ for name in names:
c = SkyCoord.from_name(name)
sc1.append(SkyCoord(c))
t = Table([sc1,names])
t = Table([sc1,names], names=['coord', 'name'])
t.write('camras_objects.ecsv', format='ascii.ecsv', overwrite=True)
......@@ -110,8 +110,8 @@ def make_sigmf(iqfile, no_rename=False):
global_meta["camras:pointing:dec_deg"] = f"{dt.radec.dec.deg:.4f}"
objects = Table.read('camras_objects.ecsv')
catalog = SkyCoord(objects["col0"])
names = objects["col1"]
catalog = SkyCoord(objects["coord"])
names = objects["name"]
idx, d2d, d3d = sky.match_to_catalog_sky(catalog)
separation = sky.separation(catalog[idx])
if separation < 6 * u.deg:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment