Gain Components

class tabascal.components.gains.BaseGPGains[source]
build_set_params()[source]

Build parameter sampling function (optional)

config_params: Dict[str, Param] = {'gains.amp_corr_freq': Param(types=(<class 'int'>, <class 'float'>), default=<derived from the data>, choices=(), item=None, gt=0, ge=None, lt=None, le=None, null_ok=False, doc='correlation bandwidth of the gain amplitudes in Hz'), 'gains.amp_corr_time': Param(types=(<class 'int'>, <class 'float'>), default=<derived from the data>, choices=(), item=None, gt=0, ge=None, lt=None, le=None, null_ok=False, doc='correlation time of the gain amplitudes in seconds'), 'gains.amp_mean': Param(types=(<class 'int'>, <class 'float'>), default=1.0, choices=(), item=None, gt=None, ge=None, lt=None, le=None, null_ok=False, doc='mean of the prior over the gain amplitudes'), 'gains.amp_std': Param(types=(<class 'int'>, <class 'float'>), default=<derived from the data>, choices=(), item=None, gt=None, ge=0, lt=None, le=None, null_ok=False, doc='prior std of the gain amplitudes, as a percentage of amp_mean'), 'gains.phase_corr_freq': Param(types=(<class 'int'>, <class 'float'>), default=<derived from the data>, choices=(), item=None, gt=0, ge=None, lt=None, le=None, null_ok=False, doc='correlation bandwidth of the gain phases in Hz'), 'gains.phase_corr_time': Param(types=(<class 'int'>, <class 'float'>), default=<derived from the data>, choices=(), item=None, gt=0, ge=None, lt=None, le=None, null_ok=False, doc='correlation time of the gain phases in seconds'), 'gains.phase_mean': Param(types=(<class 'int'>, <class 'float'>), default=0.0, choices=(), item=None, gt=None, ge=None, lt=None, le=None, null_ok=False, doc='mean of the prior over the gain phases, in radians'), 'gains.phase_std': Param(types=(<class 'int'>, <class 'float'>), default=<derived from the data>, choices=(), item=None, gt=None, ge=0, lt=None, le=None, null_ok=False, doc='prior std of the gain phases, in degrees'), 'gains.r_seed': Param(types=(<class 'int'>,), default=123, choices=(), item=None, gt=None, ge=None, lt=None, le=None, null_ok=False, doc='seed for gain samples drawn from the prior')}

Config parameters this component reads, keyed by their dotted path in the config file. Declared here, next to the code that reads them, so a component and its requirements can never drift apart. Only the components named in model.components contribute to a run’s schema – see tabascal.config_schema.collect_params(). Subclasses extend (and may override) what their base declared; the parameters read outside any component live on tabascal.config.TabConfig.

resolve_data_params(tab_config: TabConfig) Dict[source]

Resolve the gains parameters that are derived from the data.

Everything the schema could check has been checked already; what is left is the handful of parameters declared FROM_DATA, whose defaults are the extent of the observation’s own frequency and time axes. Also applies the two unit conventions the config uses: amp_std is a percentage of amp_mean and phase_std is in degrees.

Returns the resolved values rather than writing them back into tab_config.args: the conversions are not idempotent, so a second component reading the same section must see the configured values, not these.

setup(tab_config: TabConfig)[source]

Initialize component with configuration

class tabascal.components.gains.GPGains[source]
build_constants()[source]

Return arrays that do not change during the forward pass.

Returns a dict of array_name -> array_value. These will be stored in constants as “_c/<ClassName>/array_name” by Model.__init__.

build_forward()[source]

Return pure, JIT-compatible function

build_set_params()[source]

Build parameter sampling function (optional)

setup(tab_config: TabConfig)[source]

All validation and error-prone operations here

class tabascal.components.gains.UnitaryGains[source]
build_forward()[source]

Build the forward computation function

setup(tab_config: TabConfig)[source]

All validation and error-prone operations here