Examples

The SDM Schemas github repository contains Felis schema files used by the Rubin Observatory, which will be used as examples to illustrate the features of Felis. The following is an excerpt from the DP0.2 DC2 schema:

 1---
 2name: dp02_dc2_catalogs
 3"@id": "#dp02_dc2_catalogs"
 4description: "Data Preview 0.2 contains the image and catalog products of the Rubin Science
 5Pipelines v23 processing of the DESC Data Challenge 2 simulation, which covered 300 square
 6degrees of the wide-fast-deep LSST survey region over 5 years."
 7tables:
 8- name: Object
 9  "@id": "#Object"
10   description: "Properties of the astronomical objects detected and measured on the deep coadded images."
11   tap:table_index: 1
12   columns:
13   - name: objectId
14     "@id": "#Object.objectId"
15     datatype: long
16     description: Unique id. Unique ObjectID
17     ivoa:ucd: meta.id;src;meta.main
18   - name: coord_ra
19     "@id": "#Object.coord_ra"
20     datatype: double
21     description: Fiducial ICRS Right Ascension of centroid used for database indexing
22     fits:tunit: deg
23     ivoa:ucd: pos.eq.ra;meta.main

Lines 2-6 define the schema name, id, and description. Name and id are required for all objects in Felis schemas. The description is optional but highly recommended for documentation purposes.

Next is a list of table definitions, starting with the Object table on line 18. Each table definition includes a name, id, description, and a list of columns, and may also include TAP-specific metadata.

A table is comprised of one or more columns which must must have a name, id, and datatype, and an optional (but highly recommended to include) description. The Column class provides a full list of available fields, including TAP and VOTable-specific metadata.

Both fields shown here have an IVOA UCD field, which is a “vocabulary for describing astrononomical data quantities,” describing the semantics of the fields. The first column in the Object table is objectId, which is a long integer field defining a unique identifier for records in the table. The meta.id word in the column’s UCD flags the field semantically as an identifier. The second exerted column is coord_ra, which is a measurement field including units of measurement.

Felis also supports table constraints, such as foreign keys. The DP0.2 DC2 schema includes a foreign key constraint on the ccdVisitId field of the Source table, defined as follows:

1constraints:
2- name: CcdV_Src
3  "@type": "ForeignKey"
4  "@id": "#FK_Source_ccdVisitId_CcdVisit_ccdVisitId"
5  description: Link CCD-level images to associated Sources
6  columns:
7  - "#Source.ccdVisitId"
8  referencedColumns:
9  - "#CcdVisit.ccdVisitId"

The ccdVisitId field in the Source table is linked to the ccdVisitId field in the CcdVisit table.

Felis schemas support many additional features. Refer to the model documentation for a complete list.