IltData attributes

IltData holds the data and parameters required for inversion. Immediately after using iltload, the following data-related attributes parameters are available :

  • IltData.data : Processed data read by iltload

  • IltData.t : Arrays stored as a list representing the input sampling vectors corresponding to the dimensions of IltData.data.

  • IltData.filepath : Filepath which was provided to iltload, in case of loading from numpy arrays, this corresponds to the path of the current working directory.

After a successful inversion, the following additional attributes are defined:

  • IltData.g : The distribution (or spectrum) obtained after inversion.

  • IltData.fit : Fit of the data obtained after inversion.

  • IltData.residuals : Residuals of the fit obtained after inversion.

Brief descriptions of other attributes are given below. More detailed explanations for adjustable parameters can be found here.

Attributes
----------
alpha_0 : float, optional
    Baseline regularization in regions without spectral density of the inverted distribution.
    Default is 1e-4.

alpha_00 : float, optional
    Global scaling factor for the regularization term. Default is 1.

alpha_p : float or None, optional
    Reduces the curvature penalty as a function of the slope, especially for broad features.
    Default is None.

alpha_c : float or None, optional
    Weight of the curvature penalty in uniform penalty regularization. Default is None.

alpha_d : float or None, optional
    Weight of the zero-crossing (ZC) penalty. If None, it is set to 1/alpha_a. Default is None.

alpha_a : float or None, optional
    Adjusts contribution of zero crossings to the regularization. Default is 1e5.

alpha_bc : float, optional
    Boundary regularization weight to ensure smooth edge behavior. Default is 50.

alpha_nn : float, optional
    Weight of the non-negativity penalty. Default is 1000.

alt_g : int, optional
    Algorithm choice for time-limiting inversion. Allowed values are {0, 2, 4, 6}. Default is 0.

compress : bool or list of bool, optional
    Enable/disable singular value decomposition (SVD) based data compression. Default is False.

use_svds : bool or list of bool, optional
    Use sparse algorithm for SVD of highly sparse matrices. Default is False.

s : int or list of int, optional
    Number of singular values to retain during compression. Default is 15.

sigma : ndarray, optional
    Standard deviation of noise for each data point. Must match shape of data. Default is None.

g_guess : ndarray, optional
    Initial guess for the distribution, based on prior knowledge. Default is None.

c_nmax : int, optional
    Window size for moving max in curvature term calculation. Default is 3.

p_nmax : int, optional
    Window size for moving max in slope term calculation. Default is 3.

reg_bc : int or None, optional
    Number of edge points regularized for boundary smoothness. Default is None.

kernel : IltKernel, optional
    Kernel function for inversion. Must be an instance of IltKernel. Default is IltKernel().

base_tau : int, {0, 1}, optional
    Defines spacing for `tau`. 1 for logarithmic, 0 for linear. Default is 1.

maxloop : int, optional
    Maximum number of iterations before termination. Default is 100.

nn : bool, optional
    Enable non-negativity penalty. Default is False.

reg_down : int, optional
    Iteration after which the regularization update rate starts decreasing. Default is 29.

reg_downrate : float, optional
    Rate of decrease of the regularization update after `reg_down`. Default is 0.05.

reg_upd : float, optional
    Initial fraction of regularization update. Default is 1.

reg_updmin : float, optional
    Minimum update fraction for regularization. Default is 0.2.

sb : bool, optional
    Add bias term to the distribution (not used in uniform penalty). Default is False.

reg_zc : bool, optional
    Enable zero-crossing (ZC) penalty. Default is True.

zc_max : int, optional
    (Deprecated) Used in previous ZC penalty calculations. Default is 1.

zc_down : int, optional
    Iteration after which ZC penalty update starts to decrease. Default is 59.

zc_upd : float, optional
    Initial update fraction for ZC penalty. Default is 1.

zc_updmin : float, optional
    Minimum update fraction for ZC penalty. Default is 0.2.

zc_downrate : float, optional
    Rate of decrease for ZC update fraction after `zc_down`. Default is 0.05.

zc_on : int, optional
    Iteration index when ZC regularization is turned on. Default is 4.

zc_nmax : int, optional
    Window size for moving max in ZC penalty coefficient calculation. Default is 3.

dim_ndim : ndarray, optional
    Custom sampling vector for regularized non-inverted dimensions. Default is None.

tau : ndarray or list of ndarray, optional
    Independent variable values for each dimension. Default is None.

conv_limit : float, optional
    Convergence tolerance for iterative update. Default is 1e-6.

Cz : list of ndarray, optional
    Zero-crossing term of the regularization matrix. Used for resuming or inspecting inversion. Default is [np.array([0])].

store_g : bool, optional
    If True, the ``g``(distribution or spectrum) is stored in ``IltData.g_list`` after each iteration.

store_gamma : bool, optional
    If True, the ``Gamma``(regularization matrix) is stored in ``IltData.gamma_list`` after each iteration.

g_list : bool, optional
    If ``store_g`` is True, the ``g``(distribution or spectrum) is stored in ``IltData.g_list`` after each iteration.

gamma_list : bool, optional
    If ``store_gamma`` is True, the ``Gamma``(regularization matrix) is stored in ``IltData.gamma_list`` after each iteration.

force_sparse : bool, optional
    If True, all operations for alt_g = 0 will use matrices in sparse format irrespective of the sparsity of kernel matrices

sparse_threshold : float, optional
    Defines the minimum sparsity level required for kernel matrices to be treated as sparse in case of alt_g = 0.
    For example, a value of 0.9 means that a matrix must have more than 90% zero entries to be considered sparse.