Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/hpmcm/output_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ class ObjectStatsTable(TableInterface):
dist_rms=TableColumnInfo(
float, "RMS of distance from sources to object centroid"
),
cluster_dist_rms=TableColumnInfo(
float, "RMS of distance from sources to parent cluster centroid"
),
ra=TableColumnInfo(float, "RA of object centroid"),
dec=TableColumnInfo(float, "DEC of object centroid"),
x_cent=TableColumnInfo(float, "X-value of object centroid in x_cell_coadd coords (0 at inner left edge)"),
Expand Down Expand Up @@ -132,6 +135,7 @@ def buildFromCellData(cell_data: CellData) -> ObjectStatsTable:
n_srcs = np.zeros((n_obj), dtype=int)
n_uniques = np.zeros((n_obj), dtype=int)
dist_rms = np.zeros((n_obj), dtype=float)
cluster_dist_rms = np.zeros((n_obj), dtype=float)
x_cents = np.zeros((n_obj), dtype=float)
y_cents = np.zeros((n_obj), dtype=float)
snrs = np.zeros((n_obj), dtype=float)
Expand All @@ -148,6 +152,7 @@ def buildFromCellData(cell_data: CellData) -> ObjectStatsTable:
n_srcs[idx] = obj.n_src
n_uniques[idx] = obj.n_unique
dist_rms[idx] = obj.rms_dist
cluster_dist_rms[idx] = obj.parent_cluster.rms_dist
x_cents[idx] = obj.x_cent
y_cents[idx] = obj.y_cent
snrs[idx] = obj.snr_mean
Expand All @@ -161,6 +166,7 @@ def buildFromCellData(cell_data: CellData) -> ObjectStatsTable:

ra, dec = cell_data.getRaDec(x_cents, y_cents)
dist_rms *= cell_data.matcher.pixToArcsec()
cluster_dist_rms *= cell_data.matcher.pixToArcsec()
x_pix = x_cents + cell_data.min_pix[0]
y_pix = y_cents + cell_data.min_pix[1]
# Convert centroids from x_cell (0 at outer edge) to x_cell_coadd (0 at inner edge)
Expand All @@ -173,6 +179,7 @@ def buildFromCellData(cell_data: CellData) -> ObjectStatsTable:
n_unique=n_uniques,
n_src=n_srcs,
dist_rms=dist_rms,
cluster_dist_rms=cluster_dist_rms,
ra=ra,
dec=dec,
x_cent=x_cents_coadd,
Expand Down
Loading