Skip to content

Commit

Permalink
Add all intra-DP0.2 single-attribute foreign keys
Browse files Browse the repository at this point in the history
  • Loading branch information
gpdf committed Nov 8, 2023
1 parent fa7cd0d commit 7af816e
Showing 1 changed file with 71 additions and 3 deletions.
74 changes: 71 additions & 3 deletions yml/dp02_dc2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7241,6 +7241,7 @@ tables:
datatype: long
mysql:datatype: BIGINT
description: Unique id.
ivoa:ucd: meta.id;meta.main
- name: gPSFluxChi2
"@id": "#DiaObject.gPSFluxChi2"
datatype: double
Expand Down Expand Up @@ -7964,6 +7965,7 @@ tables:
mysql:datatype: BIGINT
description: Unique ID of CCD and visit where this source was detected and measured. Primary Key of the CcdVisit Table.
fits:tunit:
ivoa:ucd: meta.id;obs.image
- name: centroid_flag
"@id": "#DiaSource.centroid_flag"
datatype: boolean
Expand Down Expand Up @@ -8009,12 +8011,14 @@ tables:
mysql:datatype: BIGINT
description: Unique DiaObject ID. Primary Key of the DIA Object Table
fits:tunit:
ivoa:ucd: meta.id;src
- name: diaSourceId
"@id": "#DiaSource.diaSourceId"
datatype: long
mysql:datatype: BIGINT
description: Unique ID
fits:tunit:
ivoa:ucd: meta.id;meta.main;src
- name: dipAngle
"@id": "#DiaSource.dipAngle"
datatype: double
Expand Down Expand Up @@ -8334,6 +8338,23 @@ tables:
mysql:datatype: FLOAT
description: 1-sigma uncertainty on y position
fits:tunit: pixel
constraints:
- name: DiaO_DiaS
"@type": "ForeignKey"
"@id": "#FK_DiaSource_diaObjectId_DiaObject_diaObjectId"
description: Link DiaObjects to associated DiaSources
columns:
- "#DiaSource.diaObjectId"
referencedColumns:
- "#DiaObject.diaObjectId"
- name: CcdV_DiaS
"@type": "ForeignKey"
"@id": "#FK_DiaSource_ccdVisitId_CcdVisit_ccdVisitId"
description: Link CCD-level images to associated DiaSources
columns:
- "#DiaSource.ccdVisitId"
referencedColumns:
- "#CcdVisit.ccdVisitId"
- name: ForcedSourceOnDiaObject
"@id": "#ForcedSourceOnDiaObject"
description: "Point-source forced-photometry measurements on individual single-epoch
Expand Down Expand Up @@ -8385,7 +8406,7 @@ tables:
mysql:datatype: BIGINT
description: Unique DiaObject ID. Primary Key of the DiaObject Table
fits:tunit:
ivoa:ucd: meta.id
ivoa:ucd: meta.id;src
tap:principal: 1
tap:column_index: 10
- name: forcedSourceOnDiaObjectId
Expand All @@ -8394,7 +8415,7 @@ tables:
mysql:datatype: BIGINT
description: Unique ID of forced source. Primary Key.
fits:tunit:
ivoa:ucd: meta.id;meta.main
ivoa:ucd: meta.id;meta.main;src
tap:principal: 1
tap:column_index: 100
- name: localBackground_instFlux
Expand Down Expand Up @@ -8667,6 +8688,23 @@ tables:
ivoa:ucd: meta.id
tap:principal: 0
tap:column_index: 140
constraints:
- name: DiaO_DiaFS
"@type": "ForeignKey"
"@id": "#FK_ForcedSourceOnDiaObject_diaObjectId_DiaObject_diaObjectId"
description: Link DiaObjects to associated DiaForcedSources
columns:
- "#ForcedSourceOnDiaObject.diaObjectId"
referencedColumns:
- "#DiaObject.diaObjectId"
- name: CcdV_DiaS
"@type": "ForeignKey"
"@id": "#FK_ForcedSourceOnDiaObject_ccdVisitId_CcdVisit_ccdVisitId"
description: Link CCD-level images to associated DiaForcedSources
columns:
- "#ForcedSourceOnDiaObject.ccdVisitId"
referencedColumns:
- "#CcdVisit.ccdVisitId"
- name: Visit
'@id': '#Visit'
description: "Metadata about the pointings of the DC2 simulated survey,
Expand All @@ -8678,7 +8716,7 @@ tables:
datatype: long
description: Unique identifier.
mysql:datatype: INTEGER
ivoa:ucd: meta.id;obs.image
ivoa:ucd: meta.id;meta.main;obs.image
- name: physical_filter
'@id': '#Visit.physical_filter'
datatype: char
Expand Down Expand Up @@ -8784,11 +8822,13 @@ tables:
datatype: long
description: Primary key (unique identifier).
mysql:datatype: BIGINT
ivoa:ucd: meta.id;meta.main;obs.image
- name: visitId
'@id': '#CcdVisit.visitId'
datatype: long
description: Reference to the corresponding entry in the Visit table.
mysql:datatype: INTEGER
ivoa:ucd: meta.id;obs.image
- name: physical_filter
'@id': '#CcdVisit.physical_filter'
datatype: char
Expand Down Expand Up @@ -8970,6 +9010,15 @@ tables:
mysql:datatype: DOUBLE
fits:tunit: deg
ivoa:ucd: pos.eq.dec
constraints:
- name: Visit_CcdV
"@type": "ForeignKey"
"@id": "#FK_CcdVisit_visitId_Visit_visitId"
description: Link DiaObjects to associated DiaSources
columns:
- "#DiaSource.diaObjectId"
referencedColumns:
- "#DiaObject.diaObjectId"
- name: CoaddPatches
"@id": "#coaddpatches"
description: "Static information about the subset of tracts and patches from the standard
Expand Down Expand Up @@ -9088,6 +9137,23 @@ tables:
tap:column_index: 2
tap:principal: 1
description: Combination of TruthSummary id and truth_type fields, used for JOINs.
constraints:
- name: Obj_MatTru
"@type": "ForeignKey"
"@id": "#FK_MatchesTruth_match_objectId_Object_objectId"
description: Link Object to potential matches to Truth entries
columns:
- "#MatchesTruth.match_objectId"
referencedColumns:
- "#Object.objectId"
- name: Tru_MatTru
"@type": "ForeignKey"
"@id": "#FK_MatchesTruth_id_truth_type_TruthSummary_id_truth_type"
description: Link Truth entries to potential matches to Objects
columns:
- "#MatchesTruth.id_truth_type"
referencedColumns:
- "#TruthSummary.id_truth_type"
# - name: MatchesObject
# '@id': '#MatchesObject'
# description: Match information for objectTable_tract sources
Expand Down Expand Up @@ -9128,6 +9194,7 @@ tables:
datatype: char
mysql:datatype: CHAR(22)
description: Combination of id and truth_type fields, used for JOINs with MatchesTruth.
ivoa:ucd: meta.id
- name: id
'@id': '#TruthSummary.id'
datatype: char
Expand All @@ -9136,6 +9203,7 @@ tables:
tap:column_index: 1
tap:principal: 1
description: Unique object ID
ivoa:ucd: meta.id;meta.main
- name: host_galaxy
'@id': '#TruthSummary.host_galaxy'
datatype: long
Expand Down

0 comments on commit 7af816e

Please sign in to comment.