Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-29940: Add TAP table_index for DP0.1 #8

Merged
merged 2 commits into from May 13, 2021
Merged

Conversation

hsinfang
Copy link
Collaborator

@hsinfang hsinfang commented May 7, 2021

No description provided.

@gpdf gpdf requested review from gpdf and brianv0 May 7, 2021 00:57
Copy link
Collaborator

@gpdf gpdf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks right to me and reflects the order documented on DM-29763 by @MelissaGraham et al.

Added @brianv0 to the review to make sure we're using tap:table_index correctly. Perhaps he could try running Felis-to-TAP_SCHEMA conversion on it to make sure the TAP_SCHEMA.tables table comes out as expected?

@gpdf
Copy link
Collaborator

gpdf commented May 12, 2021

I found something we'd all overlooked in previous reviews. It should say "Data Preview 0.1" in the top-level description. Fixed.

Copy link
Contributor

@brianv0 brianv0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, I ran and checked output:

INSERT INTO tables (schema_name, table_name, table_type, utype, description, table_index) VALUES ('dp01_dc2_catalogs', 'dp01_dc2_catalogs.position', 'table', NULL, 'Select astrometry-related parameters for objects detected in the coadded images, such as coordinates, footprints, patch/tract information, and deblending parameters. (29 columns)', 2);
INSERT INTO tables (schema_name, table_name, table_type, utype, description, table_index) VALUES ('dp01_dc2_catalogs', 'dp01_dc2_catalogs.reference', 'table', NULL, 'Measurements for objects detected in the coadded images, including photometry, astrometry, shape, deblending, model fits, and related background and flag parameters. This table joined with the position table is very similar to the object table, but with additional columns. (236 columns)', 3);
INSERT INTO tables (schema_name, table_name, table_type, utype, description, table_index) VALUES ('dp01_dc2_catalogs', 'dp01_dc2_catalogs.forced_photometry', 'table', NULL, 'Forced photometry measurements for objects detected in the coadded images, at the locations defined by the position table. (747 columns)', 4);
INSERT INTO tables (schema_name, table_name, table_type, utype, description, table_index) VALUES ('dp01_dc2_catalogs', 'dp01_dc2_catalogs.object', 'table', NULL, 'The object table from the DESC DC2 simulated sky survey as described in arXiv:2101.04855. Includes astrometric and photometric parameters for objects detected in coadded images. (137 columns)', 0);
INSERT INTO tables (schema_name, table_name, table_type, utype, description, table_index) VALUES ('dp01_dc2_catalogs', 'dp01_dc2_catalogs.truth_match', 'table', NULL, 'The truth-match table for the DESC DC2''s object table as described in arXiv:2101.04855. Includes the noiseless astrometric and photometric parameters and the best matches to the object table. (30 columns)', 1);

@hsinfang
Copy link
Collaborator Author

Thanks @gpdf for fixing the DP0 -> DP0.1 in the description. I'll create a PR to have that fix in https://github.com/lsst-sqre/lsst-tap-service

Since we are on this, comparing the felis outputs:
INSERT INTO tables (schema_name, table_name, table_type, utype, description, table_index) VALUES ('dp01_dc2_catalogs', 'dp01_dc2_catalogs.position', 'table', NULL, 'Select astrometry-related parameters for objects detected in the coadded images, such as coordinates, footprints, patch/tract information, and deblending parameters. (29 columns)', 2);

versus what is in https://github.com/lsst-sqre/lsst-tap-service/blob/master/docker/tap-schema/1015_dp01_dc2_tap_schema.sql#L2
INSERT INTO tap_schema.tables11 (schema_name, table_name, table_type, utype, description, table_index) VALUES ('dp01_dc2_catalogs', 'dp01_dc2_catalogs.position', 'table', null, 'Select astrometry-related parameters for objects detected in the coadded images, such as coordinates, footprints, patch/tract information, and deblending parameters. (29 columns)', 2);

Note the difference in the beginning:
INSERT INTO tables versus INSERT INTO tap_schema.tables11

I've been fixing this manually. May this be absorbed into felis so no manual fixup is involved?

@hsinfang
Copy link
Collaborator Author

@gpdf
Copy link
Collaborator

gpdf commented May 13, 2021

Note the difference in the beginning:
INSERT INTO tables versus INSERT INTO tap_schema.tables11

I've been fixing this manually. May this be absorbed into felis so no manual fixup is involved?

"Manually" meaning, there isn't even a script checked in somewhere to do that transformation?

I'm not sure what the "11" suffix is about on the actual TAP service. If we could get a simple script written and stored (in lsst-tap-service?) for this, I think that's OK for now. I would hold off on making changes to Felis itself until the larger questions about how we are going to manage TAP_SCHEMA better are resolved.

@hsinfang
Copy link
Collaborator Author

It's a simple sed command.

Sounds good to me to hold it off for the larger question.

@hsinfang hsinfang merged commit 80f14cd into master May 13, 2021
@hsinfang hsinfang deleted the tickets/DM-29940 branch May 13, 2021 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants