# ARTS built-in documentation server

## Workspace Method covmat1D

### Description

Create 1D covariance matrix.
Creates a 1D covariance matrix for two retrieval quantities on given
grids from a given functional form. Elements of the covariance matrix
are computed as
S_{i,j} = sigma_i * sigma_j * f(d_{i,j} / l_{i,j})
where d_{i,j} is the distance between the two grid points and l_{i,j}
the mean of the correlation lengths of the grid points.
If a cutoff value co is given elements with absolute value less than this
are set to zero.
The following functional forms are available:
"exp": f(x) = exp(-x)
"lin": f(x) = 1.0 - x, for x > 1.0, 0.0 otherwise
"gauss": f(x) = exp(-x^2)

**Authors: **Simon Pfreundschuh

### Synopsis

covmat1D( | out, grid_1, grid_2, sigma_1, sigma_2, cls_1, cls_2, co, fname ) |

### Variables

GOUT | out | (Matrix, Sparse) | The matrix in which to store the covariance matrix. |

GIN | grid_1 | (Vector) | The retrieval grid for the first retrieval quantity. |

GIN | grid_2 | (Vector, Default: []) | The retrieval grid for the second retrieval quantity. (If empty taken as grid_1) |

GIN | sigma_1 | (Vector) | The variances of the first retrieval quantity. |

GIN | sigma_2 | (Vector, Default: []) | The variances of the second retrieval quantity.(If empty taken as sigma_1) |

GIN | cls_1 | (Vector) | The correlations lengths of the first retrieval quantity. |

GIN | cls_2 | (Vector, Default: []) | The correlations lengths of the second retrieval quantity.(If empty taken as cls_1) |

GIN | co | (Numeric, Default: 0.0) | The cutoff value for covariance matrix elements. |

GIN | fname | (String) | The name of the functional form to use. |