Skip to content

Commit

Permalink
Bugfix: Match query 'obsid' to product 'parent_obsid'
Browse files Browse the repository at this point in the history
  • Loading branch information
troyraen committed Dec 16, 2024
1 parent 6ac9aa5 commit fc2bb99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spectroscopy/code_src/mast_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,10 @@ def JWST_get_spec_helper(sample_table, search_radius_arcsec, datadir, verbose,
tab = Table(names=keys + ["productFilename"], dtype=[str,
str, str, int, float, int, int, int, float]+[str])
for jj in range(len(data_products_list_filter)):
# Match query 'obsid' to product 'parent_obsid' (not 'obsID') because products may
# belong to a different group than the observation.
idx_cross = np.where(query_results["obsid"] ==
data_products_list_filter["obsID"][jj])[0]
data_products_list_filter["parent_obsid"][jj])[0]
tmp = query_results[idx_cross][keys]
tab.add_row(list(tmp[0]) + [data_products_list_filter["productFilename"][jj]])

Expand Down

0 comments on commit fc2bb99

Please sign in to comment.