# ARTS built-in documentation server

## Workspace Method yCalcAppend

### Description

Replaces yCalc if a measurement shall be appended to an existing one. The method works basically as yCalc but appends the results to existing data, instead of creating completely new y and its associated variables. This method is required if your measurement consists of data from two instruments using different observation techniques (corresponding to different iyCalc-methods). One such example is if emission and transmittance data are combined into a joint retrieval. The method can also be used to get around the constrain that sensor_response is required to be the same for all data. The new measurement is simply appended to the input y, and the other output variables are treated correspondingly. Data are appended "blindly" in y_aux. That is, data of different type are appended if iy_aux_vars differs between the two measurements, the data are appended strictly following the order. First variable of second measurement is appended to first variable of first measurement, and so on. The number of auxiliary variables can differ between the measurements. Missing data are set to zero. The set of retrieval quantities can differ between the two calculations. If an atmospheric quantity is part of both Jacobians, the same retrieval grids must be used in both cases. The treatment of instrument related Jacobians (baseline fits, pointing ...) follows the *append_instrument_wfs* argument. A difference to yCalc is that jacobian_quantities is both in- and output variable. The input version shall match the measurement to be calculated, while the output version matches the output y, the combined, measurements. A copies of jacobian_quantities of the first measurement must be made and shall be provided to the method as *jacobian_quantities_copy*. As for yCalc Jacobian transformations are not handled, and the the input Jacobian shall not contain transformations. That is jacobianAdjustAndTransform shall be called after this method, when the complete Jacobian is at hand.

**Authors: **Patrick Eriksson

### Synopsis

yCalcAppend( | y, y_f, y_pol, y_pos, y_los, y_aux, y_geo, jacobian, jacobian_quantities, atmgeom_checked, atmfields_checked, atmosphere_dim, nlte_field, cloudbox_on, cloudbox_checked, scat_data_checked, sensor_checked, stokes_dim, f_grid, sensor_pos, sensor_los, transmitter_pos, mblock_dlos, sensor_response, sensor_response_f, sensor_response_pol, sensor_response_dlos, iy_unit, iy_main_agenda, jacobian_agenda, jacobian_do, iy_aux_vars, jacobian_quantities_copy, append_instrument_wfs ) |

### Variables

OUT+IN | y | (Vector) | The measurement vector. |

OUT+IN | y_f | (Vector) | The frequencies associated with y. |

OUT+IN | y_pol | (ArrayOfIndex) | The polarisation states associated with y. |

OUT+IN | y_pos | (Matrix) | The sensor positions associated with y. |

OUT+IN | y_los | (Matrix) | The line-of-sights associated with y. |

OUT+IN | y_aux | (ArrayOfVector) | Data auxilary to y. |

OUT+IN | y_geo | (Matrix) | The geo-position assigned to each element of y. |

OUT+IN | jacobian | (Matrix) | The Jacobian matrix. |

OUT+IN | jacobian_quantities | (ArrayOfRetrievalQuantity) | The retrieval quantities in the Jacobian matrix. |

IN | atmgeom_checked | (Index) | OK-flag for the geometry of the model atmosphere. |

IN | atmfields_checked | (Index) | OK-flag for atmospheric grids and (physical) fields. |

IN | atmosphere_dim | (Index) | The atmospheric dimensionality (1-3). |

IN | nlte_field | (EnergyLevelMap) | The field of NLTE temperatures and/or ratios. |

IN | cloudbox_on | (Index) | Flag to activate the cloud box. |

IN | cloudbox_checked | (Index) | OK-flag for variables associated with the cloudbox. |

IN | scat_data_checked | (Index) | OK-flag for scat_data. |

IN | sensor_checked | (Index) | OK-flag for sensor related variables. |

IN | stokes_dim | (Index) | The dimensionality of the Stokes vector (1-4). |

IN | f_grid | (Vector) | The frequency grid for monochromatic pencil beam calculations. |

IN | sensor_pos | (Matrix) | The sensor position for each measurement block. |

IN | sensor_los | (Matrix) | The sensor line-of-sight (LOS) for each measurement block. |

IN | transmitter_pos | (Matrix) | Transmitter positions. |

IN | mblock_dlos | (Matrix) | The set of angular pencil beam directions for each measurement block. |

IN | sensor_response | (Sparse) | The matrix modelling the total sensor response. |

IN | sensor_response_f | (Vector) | The frequencies associated with the output of sensor_response. |

IN | sensor_response_pol | (ArrayOfIndex) | The polarisation states associated with the output of sensor_response. |

IN | sensor_response_dlos | (Matrix) | The relative zenith and azimuth angles associated with the output of sensor_response. |

IN | iy_unit | (String) | Selection of output unit for radiative transfer methods. |

IN | iy_main_agenda | (Agenda) | Agenda calculating the single monochromatic pencil beam spectrum. |

IN | jacobian_agenda | (Agenda) | Pure numerical Jacobian calculation agenda. |

IN | jacobian_do | (Index) | Flag to activate (clear-sky) Jacobian calculations. |

IN | iy_aux_vars | (ArrayOfString) | Selection of quantities for iy_aux and when applicable also y_aux. |

GIN | jacobian_quantities_copy | (ArrayOfRetrievalQuantity) | Copy of jacobian_quantities of first measurement. |

GIN | append_instrument_wfs | (Index, Default: 0) | Flag controlling if instrumental weighting functions are appended or treated as different retrieval quantities. |