Random observation operator for testing random/std

Random observation operator for testing random/std#

Description#

Random observation operator for testing and validation.

This is a synthetic observation operator intended for testing and validation of pyCIF inversion workflows. It does not represent any physical transport model.

The observation operator \(\mathbf{H}\) is a fixed random matrix of shape \((n_\text{obs},\, n_\text{ctl})\), generated once at initialisation and held constant throughout the run:

\[\mathbf{H} = \mathbf{U}_1 \odot \mathbf{u}_2\]

where \(\mathbf{U}_1 \in \mathbb{R}^{n_\text{obs} \times n_\text{ctl}}\) has entries drawn from \(\mathcal{U}(0,1)\) and the row vector \(\mathbf{u}_2 \in \mathbb{R}^{1 \times n_\text{ctl}}\) has entries drawn from \(\mathcal{U}(-1,1)\), broadcast over all rows. \(\odot\) denotes element-wise multiplication.

The three operational modes are:

  • Forward (fwd): \(\mathbf{y}_\text{sim} = \mathbf{H}\,\mathbf{x}\)

  • Tangent-linear (tl): \(\delta\mathbf{y} = \mathbf{H}\,\delta\mathbf{x}\) (and \(\mathbf{y}_\text{sim} = \mathbf{H}\,\mathbf{x}\) is also stored)

  • Adjoint (adj): \(\delta\mathbf{x} = \mathbf{H}^\top\,\delta\mathbf{y}\)

Because the operator is a plain matrix product, the tangent-linear and adjoint are exact by construction, making this plugin particularly useful for adjoint / TL consistency tests.

Reproducibility is controlled via the seed and seed_id input arguments.

YAML arguments#

The following arguments are used to configure the plugin. pyCIF will return an exception at the initialization if mandatory arguments are not specified, or if any argument does not fit accepted values or type:

Optional arguments#

seed : bool, optional, default True

Use a seed for random generation

seed_id : int, optional, default 1

Seed to use in numpy.

Requirements#

The current plugin requires the present plugins to run properly:

Requirement name

Requirement type

Explicit definition

Any valid

Default name

Default version

obsvect

ObsVect

True

True

standard

std

controlvect

ControlVect

True

True

standard

std

datavect

DataVect

True

True

standard

std

platform

Platform

True

True

None

None

YAML template#

Please find below a template for a YAML configuration:

1obsoperator:
2  plugin:
3    name: random
4    version: std
5    type: obsoperator
6
7  # Optional arguments
8  seed: XXXXX  # bool
9  seed_id: XXXXX  # int