Skip to content

Commit

Permalink
move required refs under allOfs
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Dec 10, 2024
1 parent 3d43b91 commit ebed405
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 78 deletions.
19 changes: 10 additions & 9 deletions src/rad/resources/schemas/exposure-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ title: |
type: object
properties:
type:
$ref: asdf://stsci.edu/datamodels/roman/schemas/exposure_type-1.0.0
sdf:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 25
archive_catalog:
datatype: nvarchar(25)
destination: [WFIExposure.exposure_type, GuideWindow.exposure_type, WFICommon.exposure_type]
allOf:
- $ref: asdf://stsci.edu/datamodels/roman/schemas/exposure_type-1.0.0
- sdf:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 25
archive_catalog:
datatype: nvarchar(25)
destination: [WFIExposure.exposure_type, GuideWindow.exposure_type, WFICommon.exposure_type]
start_time:
title: Exposure Start Time (UTC)
description: |
Expand Down
19 changes: 10 additions & 9 deletions src/rad/resources/schemas/guidestar-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ properties:
datatype: nvarchar(20)
destination: [WFIExposure.guide_window_id, GuideWindow.guide_window_id, WFICommon.guide_window_id]
guide_mode:
$ref: guidewindow_modes-1.0.0
sdf:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 18
archive_catalog:
datatype: nvarchar(18)
destination: [WFIExposure.guide_mode, GuideWindow.guide_mode, WFICommon.guide_mode]
allOf:
- $ref: guidewindow_modes-1.0.0
- sdf:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 18
archive_catalog:
datatype: nvarchar(18)
destination: [WFIExposure.guide_mode, GuideWindow.guide_mode, WFICommon.guide_mode]
data_start:
title: Guide Data Start Time (UTC)
description: |
Expand Down
19 changes: 10 additions & 9 deletions src/rad/resources/schemas/guidewindow-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,16 @@ properties:
datatype: nvarchar(120)
destination: [GuideWindow.gw_science_file_source]
gw_mode:
$ref: guidewindow_modes-1.0.0
sdf:
special_processing: VALUE_REQUIRED
source:
origin: Science Data Formatting
maxLength: 18
archive_catalog:
datatype: nvarchar(18)
destination: [GuideWindow.gw_mode]
allOf:
- $ref: guidewindow_modes-1.0.0
- sdf:
special_processing: VALUE_REQUIRED
source:
origin: Science Data Formatting
maxLength: 18
archive_catalog:
datatype: nvarchar(18)
destination: [GuideWindow.gw_mode]
gw_window_xstart:
title: Guide Window X Start Position (pixels)
description: |
Expand Down
19 changes: 10 additions & 9 deletions src/rad/resources/schemas/mosaic_basic-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,16 @@ properties:
datatype: nvarchar(15)
destination: [WFIMosaic.survey, SourceCatalog.survey, SegmentationMap.survey]
optical_element:
$ref: wfi_optical_element-1.0.0
sdf:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 20
archive_catalog:
datatype: nvarchar(20)
destination: [WFIMosaic.optical_element, SourceCatalog.optical_element, SegmentationMap.optical_element]
allOf:
- $ref: wfi_optical_element-1.0.0
- sdf:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 20
archive_catalog:
datatype: nvarchar(20)
destination: [WFIMosaic.optical_element, SourceCatalog.optical_element, SegmentationMap.optical_element]
instrument:
title: Instrument used to acquire the data
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ properties:
type: string
enum: [WFI]
detector:
title: Detector
description: |
The numbered WFI detector in the focal plane (e.g., WFI01 for SCA 01).
$ref: ../wfi_detector-1.0.0
allOf:
- $ref: ../wfi_detector-1.0.0
- description: |
The numbered WFI detector in the focal plane (e.g., WFI01 for SCA 01).
required: [name, detector]
required: [reftype, author, description, pedigree, useafter, telescope, origin, instrument]
...
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ properties:
type: object
properties:
type:
title: WFI Mode
description: |
The type of data taken with the WFI. Allowed values are WFI_IMAGE for
imaging mode, WFI_GRISM and WFI_PRISM for spectral mode, WFI_DARK for
dark exposures, WFI_FLAT for flat fields, and WFI_WFSC.
$ref: ../exposure_type-1.0.0
allOf:
- $ref: ../exposure_type-1.0.0
- title: WFI Mode
description: |
The type of data taken with the WFI. Allowed values are WFI_IMAGE for
imaging mode, WFI_GRISM and WFI_PRISM for spectral mode, WFI_DARK for
dark exposures, WFI_FLAT for flat fields, and WFI_WFSC.
p_exptype:
title: WFI Mode for CRDS
description: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ properties:
type: object
properties:
optical_element:
title: Optical Element
description: |
The optical element filter name.
$ref: ../wfi_optical_element-1.0.0
required: [optical_element]
required: [instrument]
Expand Down
3 changes: 0 additions & 3 deletions src/rad/resources/schemas/segmentation_map-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ properties:
- type: object
properties:
optical_element:
title: WFI Optical Element
description: |
WFI optical element used to take the data.
$ref: wfi_optical_element-1.0.0
program:
title: Program Information
Expand Down
54 changes: 28 additions & 26 deletions src/rad/resources/schemas/wfi_mode-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,35 @@ properties:
datatype: nvarchar(5)
destination: [WFIExposure.instrument_name, GuideWindow.instrument_name, WFICommon.instrument_name]
detector:
title: Wide Field Instrument (WFI) Detector Identifier
description: |
Name of the Wide Field Instrument (WFI) detector used
to take the science data in this file.
$ref: wfi_detector-1.0.0
sdf:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 10
archive_catalog:
datatype: nvarchar(10)
destination: [WFIExposure.detector, GuideWindow.detector, WFICommon.detector]
allOf:
- $ref: wfi_detector-1.0.0
- title: Wide Field Instrument (WFI) Detector Identifier
description: |
Name of the Wide Field Instrument (WFI) detector used
to take the science data in this file.
sdf:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 10
archive_catalog:
datatype: nvarchar(10)
destination: [WFIExposure.detector, GuideWindow.detector, WFICommon.detector]
optical_element:
title: Wide Field Instrument (WFI) Optical Element
description: |
Name of the optical element used to take the science
data.
$ref: wfi_optical_element-1.0.0
sdf:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 20
archive_catalog:
datatype: nvarchar(20)
destination: [WFIExposure.optical_element, GuideWindow.optical_element, WFICommon.optical_element]
allOf:
- $ref: wfi_optical_element-1.0.0
- title: Wide Field Instrument (WFI) Optical Element
description: |
Name of the optical element used to take the science
data.
sdf:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 20
archive_catalog:
datatype: nvarchar(20)
destination: [WFIExposure.optical_element, GuideWindow.optical_element, WFICommon.optical_element]
propertyOrder: [detector, optical_element, name]
flowStyle: block
required: [detector, optical_element, name]
Expand Down

0 comments on commit ebed405

Please sign in to comment.