Setup

The system setup defines the set of system properties, which can be changed during run-time, with a few exceptions.

The CCF Setup is based on the CII Configuration Service.

It is necessary to define a specific schema matching each CCF instance, as the setup is reflecting the chosen configuration of CCF Control, e.g. the number of Processing Threads and the various Processing Recipes and Data Publishers used.

Moreover, if specific adapters, e.g. Processing Recipes or Data Publishers, are provided for a specific context, the parameters for these must be defined in the specific Setup Schema.

The following categories of parameters are defined:

  • Exposure Control

  • Simulation

  • Pipeline Processing

    • Processing Recipe

    • Data Publisher

An example of a setup, in this case the Initialisation Setup, is available in CCF: “setup/ccf/control/example.setup.yaml”.

In the following, the standard (common) Setup parameters are defined.

Note, the parameters are shown as keys, but the actual representation in the Setup document is based on hierarhical indentation, e.g.:

!cfg.include schema/ccf/control/setupExample.schema.yaml:

dcs: !cfg.type:DcsExTypeDef

expo:
   mode:                          'Continuous' # Continuous, Finite
   nb:                            100
   time:                          1.123
   frame_rate:                    1000.0
   win_start_x:                   0
   win_start_y:                   0
   win_width:                     512
   win_height:                    512
   bin_x:                         1
   bin_y:                         1

<remaining document truncated>

I.e., the Exposure Time is given on keyword form as “expo.time”.

Exposure Control Setup Parameters (“expo” category”)

In the following the table the standard Exposure Control parameters are listed:

mode (String)

The Exposure Mode: “Continuous” or “Finite”

nb (Integer)

Number of exposures (acquisitions) to execute after one Start command.

time (Double)

Exposure Time (in seconds) to integrate on the detector per frame.

frame_rate (Double)

Frame rate in Hz to acquire frames.

win_start_x (Integer)

Lower left pixel in window (ROI). First pixel is 0 (zero).

win_start_y (Integer)

Lower left pixel in window (ROI). First pixel is 0 (zero).

win_width (Integer)

Width of window (ROI) in pixels.

win_height (Integer)

Height of window (ROI) in pixels.

bin_x (Integer)

Binning in X (1..N).

bin_y (Integer)

Binning in Y (1..N).

Simulation Setup Parameters (“sim” category”)

In the following the table the standard Simulation parameters are listed:

type (String)

Type of simulation: “File” or “Pattern”. **Note: Only “File” is supported for IFWv4.

file (String)

Name of input data (FITS) file to use for the simulation. Typically a FITS cube that will be played back.

max_shift_pr_frame (String)

Max shift in pixel between two simluated frames. Note: Not supported for IFWv4.

max_shift (String)

Max total shift in pixels of simulated image. Note: Not supported for IFWv4.

noise (String)

Noise in percentage to apply on the image pixels. Note: Not supported for IFWv4.

Pipeline Processing

In the following the table the pipeline related setup parameters are listed:

<proc>.enabled (Boolean)

Used to toggle the given Processing Pipeline on/off.

<proc>.<recipe>.enabled (Boolean)

Used to enable/disable the individual Processing Recipe registered and defined.

<proc>.<recipe>.delay (Double)

Engineering parameter used to introduce an artificial delay, given in seconds, in the Base Recipe Class (“ccf::common::RecipeBase”).

<proc>.<pub>.enabled (Boolean)

Used to enable/disable the individual Processing Recipe registered and defined.

<proc>.<pub>.delay (Double)

Engineering parameter used to introduce an artificial delay, given in seconds, in the Base Recipe Class (“ccf::common::RecipeBase”).

Note, for each Data Publisher Adapter, specific setup Parameters may be defined.

The parameters for the standard Data Publisher Adapters provided by the CCF Package, are documented in the chapter “Standard Adapters”.

Base (Common) Setup Schema

The CII Configuration Service schema for the basic (common) Setup, is defined as follows (“schema/ccf/common/setup.schema.yaml”):

!cfg.typedef ExpoModeTypeDef(string):
   allowed_values: ['Continuous', 'Finite']
   default: 'Continuous'

!cfg.typedef ExposureTypeDef:
   !cfg.required mode:                  !cfg.type:ExpoModeTypeDef
   !cfg.required nb:                    !cfg.type:int32
   !cfg.required time:                  !cfg.type:double
   !cfg.required frame_rate:            !cfg.type:double
   !cfg.required win_start_x:           !cfg.type:int16
   !cfg.required win_start_y:           !cfg.type:int16
   !cfg.required win_width:             !cfg.type:int16
   !cfg.required win_height:            !cfg.type:int16
   !cfg.required bin_x:                 !cfg.type:int16
   !cfg.required bin_y:                 !cfg.type:int16

!cfg.typedef SimTypeModeTypeDef(string):
   allowed_values: ['File', 'Pattern']
   default: 'File'

!cfg.typedef SimulationTypeDef:
   !cfg.required type:                  !cfg.type:SimTypeModeTypeDef
   !cfg.required file:                  !cfg.type:string
   !cfg.required max_shift_pr_frame:    !cfg.type:int16
   !cfg.required max_shift:             !cfg.type:int16
   !cfg.required noise:                 !cfg.type:int16

!cfg.typedef PipelineSetupTypeDef:
   !cfg.required enabled:               !cfg.type:boolean

!cfg.typedef RecipeSetupTypeDef:
   !cfg.required enabled:               !cfg.type:boolean
   delay:                               !cfg.type:double

!cfg.typedef CentroidRecipeTypeDef(RecipeSetupTypeDef):
   !cfg.required max_centre_error:      !cfg.type:double
   !cfg.required max_sigma_error:       !cfg.type:double
   !cfg.required robustness:            !cfg.type:double

!cfg.typedef PublisherSetupTypeDef:
   !cfg.required enabled:               !cfg.type:boolean
   delay:                               !cfg.type:double

!cfg.typedef DdtPublisherTypeDef(PublisherSetupTypeDef):
   !cfg.required ddt_id:                !cfg.type:string
   !cfg.required ddt_broker:            !cfg.type:string
   !cfg.required ddt_max_rate:          !cfg.type:double

!cfg.typedef FitsPubFormatTypeDef(string):
   allowed_values: ['Single', 'Cube', 'MEF']
   default: 'Single'

!cfg.typedef FitsPubRecModeTypeDef(string):
   allowed_values: ['All', 'Interval', 'Period']
   default: 'All'

!cfg.typedef FitsPublisherTypeDef(PublisherSetupTypeDef):
   !cfg.required basename:              !cfg.type:string
   !cfg.required max_size:              !cfg.type:int32
   !cfg.required nb_of_frames:          !cfg.type:int32
   !cfg.required format:                !cfg.type:FitsPubFormatTypeDef
   !cfg.required overwrite:             !cfg.type:boolean
   !cfg.required rec_mode:              !cfg.type:FitsPubRecModeTypeDef
   rec_mode_prop:                       !cfg.type:string   # Interval: <nb>, Period: <period>

!cfg.typedef RtmsPublisherTypeDef(PublisherSetupTypeDef):
   !cfg.required id:                    !cfg.type:string
   !cfg.required max_rate:              !cfg.type:double
   !cfg.required bpp:                   !cfg.type:int16
   !cfg.required address:               !cfg.type:string
   !cfg.required port:                  !cfg.type:int32
   !cfg.required topic_id:              !cfg.type:int32
   !cfg.required sample_id:             !cfg.type:int32
   !cfg.required pkt_send_delay:        !cfg.type:double

Creating a Specific Setup Schema

The Setup for a given CFF instance, is defined by the configuration of the CCF instance. I.e., depending on the given ‘layout’ chosen for the CCF instance, a different set of Setup parameters will be needed and will need to be defined in the Specific Setup Schema.

Also adding context specific adapters, will define new Setup Parameters.

An example of a Specific Setup Schema, corresponding to the Configuration example used in this document, “config/ccf/control/example.cfg.yaml”, is listed below.

!cfg.include schema/ccf/common/setup.schema.yaml:

!cfg.typedef Pipeline1TypeDef(PipelineSetupTypeDef):
!cfg.required recipe_1_1_centroid:        !cfg.type:CentroidRecipeTypeDef
!cfg.required recipe_1_2:                 !cfg.type:RecipeSetupTypeDef
!cfg.required recipe_1_3:                 !cfg.type:RecipeSetupTypeDef
!cfg.required pub_1_1_ddt:                !cfg.type:DdtPublisherTypeDef
!cfg.required pub_1_2_fits:               !cfg.type:FitsPublisherTypeDef
!cfg.required pub_1_3_rtms:               !cfg.type:RtmsPublisherTypeDef

!cfg.typedef Pipeline2TypeDef(PipelineSetupTypeDef):
!cfg.required recipe_2_1:                 !cfg.type:RecipeSetupTypeDef
!cfg.required recipe_2_2:                 !cfg.type:RecipeSetupTypeDef
!cfg.required pub_2_1_fits:               !cfg.type:FitsPublisherTypeDef
!cfg.required pub_2_2_test:               !cfg.type:PublisherSetupTypeDef

!cfg.typedef DcsExTypeDef:
!cfg.required expo:                       !cfg.type:ExposureTypeDef
!cfg.required sim:                        !cfg.type:SimulationTypeDef
!cfg.required proc_1:                     !cfg.type:Pipeline1TypeDef
!cfg.required proc_2:                     !cfg.type:Pipeline2TypeDef

Note that the names of Processing Pipelines, Processing Recipes and Data Publisher can be chosen freely, and need not contain any number indexes as used in the example.

Note also that the categories “expo” and “sim” must be used for these two groups of parameters.