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 hierarchical indentation, e.g.:
!cfg.include schema/ifw/ccf/control/setupExample.schema.yaml:
dcs: !cfg.type:DcsExTypeDef
expo:
mode: 'Continuous' # Continuous, Finite
nb: 100
time: 1.123
frame_rate: 5.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:
Parameter |
Description |
|---|---|
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) |
Desired acquisition frame rate in Hz. If 0, no rate is enforced. When both exposure time and frame rate are set and “auto_adjust_time_rate” is enabled (see Configuration), an invalid combination is auto-adjusted; otherwise it is rejected. |
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”)
The Simulation parameters are used by the Simulation Communication Adapter (“ComAdptSim”). The simulator either plays back an existing FITS file or generates synthetic frames using one of a number of built-in pattern generators. The generator is selected by the “type” parameter.
Common parameters (apply to all simulation types):
Parameter |
Description |
|---|---|
type (String) |
Simulation generator to use. One of: “File”, “Gaussian”, “MultiGaussian”, “Flat”, “Grid”, “Gradient”, “Ring”, “Checkerboard”, “Noise”, “Grating”. |
gain (Double) |
Multiplicative gain applied to the generated/played-back pixel values. |
nb_of_planes (Integer) |
Number of distinct frames generated for cyclic playback (the simulator cycles through them). |
max_shift_pr_frame (Integer) |
Maximum image shift, in pixels, introduced between two consecutive frames (simulates motion/jitter). |
max_shift (Integer) |
Maximum total image shift, in pixels, in one direction. |
noise (Integer) |
Amount of random noise added per read-out (0 disables added noise). |
“File” generator:
Parameter |
Description |
|---|---|
file (String) |
Input FITS file (typically a cube) whose frames are played back. |
“Gaussian” / “MultiGaussian” generators (point sources):
Parameter |
Description |
|---|---|
amplitude (Double) |
Peak intensity of each Gaussian spot. |
sigma (Double) |
Gaussian sigma (spot width), in pixels. |
nb_stars (Integer) |
Number of spots to place (MultiGaussian). |
“Flat” generator:
Parameter |
Description |
|---|---|
flat_intensity (Double) |
Uniform intensity value for the whole frame. |
“Grid” generator:
Parameter |
Description |
|---|---|
grid_spacing (Integer) |
Spacing between spots, in pixels. |
spot_size (Double) |
Gaussian sigma of each grid spot, in pixels. |
“Gradient” generator:
Parameter |
Description |
|---|---|
gradient_dir (String) |
Gradient direction: “Horizontal”, “Vertical” or “Radial”. |
gradient_start (Double) |
Intensity at the start of the gradient. |
gradient_end (Double) |
Intensity at the end of the gradient. |
“Ring” generator (defocused star):
Parameter |
Description |
|---|---|
ring_inner_radius (Double) |
Inner radius of the ring, in pixels. |
ring_outer_radius (Double) |
Outer radius of the ring, in pixels. |
“Checkerboard” generator:
Parameter |
Description |
|---|---|
checker_size (Integer) |
Size of the checkerboard squares, in pixels. |
“Noise” generator:
Parameter |
Description |
|---|---|
noise_dist (String) |
Noise distribution: “Gaussian”, “Poisson” or “Uniform”. |
noise_mean (Double) |
Mean of the noise distribution. |
noise_std (Double) |
Standard deviation of the noise distribution. |
“Grating” generator (spectral pattern):
Parameter |
Description |
|---|---|
grating_dispersion (Double) |
Dispersion of the simulated grating. |
grating_wavelength_min (Double) |
Minimum wavelength (nm). |
grating_wavelength_max (Double) |
Maximum wavelength (nm). |
grating_order (Integer) |
Diffraction order. |
Pipeline Processing
In the following the table the pipeline related setup parameters are listed:
Parameter |
Description |
|---|---|
<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 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 CCF 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/ifw/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.