.. _sect_penalty_file: Penalty File (.penalty) ----------------------- The penalty file is only needed for inversion and contains the :Ref:`sect_penalty_matrix` penalty matrix used to regularize (aka stabilize) the non-linear inversion of the EM data. This file is automatically generated by ``Mamba2D.m`` and here is documented for completeness. .. Note :: In a future update, the penalty file will be removed as the penalty matrix can be coded to be directly computed within MARE2DEM in the same way as done in MARE3DEM. The penalty matrix is :math:`{p \times q}` penalty matrix :math:`{\mathbf{R}}`, where *p* is the number of penalty rows and *q* is the number of model parameters, that is applied to the model vector with the matrix-vector product :math:`{\mathbf{R}} \mathbf{m}` ,as described in :Ref:`sect_nonlinear_inversion`. The file uses this format: .. code-block:: none Format: CSR_penalty_1.0 <# non-zeros>
# non-zeros following lines: