Skip to content

mgjho/xrfit

Repository files navigation

xrfit

Supported Python Versions PyPi pre-commit.ci status Codecov Coverage Ruff

Overview 🎯

xrfit provides Model-based, Multidimensional regression/analysis methods. By Integrating,

  1. xarray to handle multivariate data by utilizing coordinate-aware structure of DataArray.

  2. lmfit to deal complex regression problems using the composite-model based approach.

Features ✨

  1. Model based regression
    model = Model_1() + Model_2()
    guess = data.fit.guess(model=model)
    result = data.fit(model=model, params=guess)
  2. Parameter handling (e.g. Sorting and Smoothing parameters)
    sorted_result = result.params.sort("params_name")
    smoothened_result = sorted_result.params.smoothen("params_name")
    new_result = data.fit(model=model, params=smoothened_result.parmams)
  3. Interactive visualization
    result.display()