Skip to content
Brian Benjamin Maranville edited this page Sep 4, 2024 · 2 revisions

this is an overview, glossing over most details

Bumps: the Python library

class bumps.FitProblem

This is the central class defined and used in bumps. Users define their problem by initializing FitProblem with a list of models and optional constraints.

FitProblem is then used in the fitters, where at each step the parameters are updated then the negative-log-likelihood function or nllf() is evaluated.

module bumps.fitters

This module defines a number of fitting engines, each of which takes a FitProblem as input and can then take steps to minimize the nllf by trying different combinations of parameters. Two of the most commonly-used fitters are:

bumps.fitters.SimplexFit

Uses the so-called "amoeba" or "Nelder-Mead" algorithm to quickly descend into the closest minimum. This is the default fitter in bumps, and it can be very effective.

bumps.fitters.DreamFit

The most advanced fitting engine in bumps. Once converged, it samples the space of possible Parameter combinations near the "best fit" and records the history of Parameter vectors along with the associated nllf() values. This history can be used to extract Parameter uncertainties and correlations statistically.

Bumps: the applications

bumps.cli

  • For running fits in batch mode or non-interactively, exporting all the fit results to an output folder on completion.
  • Extremely useful for fitting on HPC infrastructure (e.g. SLURM jobs)
  • evaluates a user-provided python "model file" defining a FitProblem, and calls one of the bumps.fitters classes to execute the fit.

bumps.gui

  • The original WxPython GUI for bumps
  • can load FitProblem from user-provided python "model file"
  • allows interactive modification of the loaded FitProblem
    • select/deselect fit parameters
    • modify parameter values
    • realtime feedback in data panel
  • has controls for starting and monitoring fits
    • convergence plot
    • plots of the statistical outputs of DREAM fits.

bumps.webview

A recently-developed second GUI for bumps, based on a web server (with bidirectional socket.io server included).

  • replicates all the visualizations and controls from bumps.gui in a web interface
  • can load JSON-serialized dataclass-based models, or python model files
  • has fully-serializable (saveable) user fit sessions, including history
  • enables interacting with fit sessions running remotely on HPC (by forwarding the web ports)
  • server is based on asyncio, and can be run embedded in a Jupyter notebook