(common_jitter)=

# Common jitter

```{warning}
This page is a stub generated by Codex. The content has been verified, but important information (references, links to external packages) may be missing  
```

The `common_jitter` model replaces the local jitter parameters defined by the jitter flags in the dataset file with a single jitter parameter shared by all datasets using the same common model.

The jitter is added in quadrature to the formal uncertainties and is useful when the measurement errors underestimate additional white-noise contributions. A common jitter is useful when several datasets should share the same extra white-noise term, for example observations from the same instrument split across different files.

```{note}
When `common_jitter` is applied to a dataset, the local jitter flags of that dataset are deactivated internally. This avoids fitting both a local jitter and a shared jitter for the same data.
```

## Model definition and requirements

- model name: `common_jitter`
- required common object: `common_jitter`

The jitter boundaries are estimated automatically from the formal uncertainties of the datasets using the model. If more than one dataset shares the same common jitter, the default boundary is expanded to include the uncertainty ranges of all of them.

## Keywords

There are no model-wide keywords.

## Examples

In the following example, two RV datasets share the same jitter parameter even if they are stored in different files.

```yaml
inputs:
  RV_HARPS_s01:
    file: datasets/HARPS_s01_PyORBIT.dat
    kind: RV
    models:
      - radial_velocities
      - common_jitter_RV
  RV_HARPS_s02:
    file: datasets/HARPS_s02_PyORBIT.dat
    kind: RV
    models:
      - radial_velocities
      - common_jitter_RV
common:
  planets:
    b:
      orbit: circular
      use_time_inferior_conjunction: True
      boundaries:
        P: [2.0, 3.0]
        K: [0.0, 20.0]
        Tc: [59000.0, 59001.0]
  common_jitter_RV:
    model: common_jitter
models:
  radial_velocities:
    planets:
      - b
```

If needed, the prior or boundaries can be specified directly in the common object:

```yaml
common:
  common_jitter_RV:
    model: common_jitter
    boundaries:
      jitter: [0.0, 20.0]
    priors:
      jitter: ['Gaussian', 5.0, 2.0]
```

It is also possible to use independent common jitters for different observables:

```yaml
common:
  common_jitter_RV:
    model: common_jitter
  common_jitter_BIS:
    model: common_jitter
  common_jitter_Sindex:
    model: common_jitter
```

## Model parameters

The following parameters will be inherited from the common model.

| Name | Parameter | Common? | Definition | Notes |
| :--- | :-------- | :------ | :--------- | :---- |
| `jitter` | Extra white-noise term added in quadrature to the dataset errors | common | `common_jitter` | Same units as the dataset errors |
