Recent Changes · Search:

Dispense


Navigation Tips - Dritte


PmWiki

pmwiki.org

edit SideBar

Mudashed

< Mujpy.Paths | Index | Mujpy.Methods2 >


Barebone edit dash

Provides a simpler way to build the dashboard.json file for a fit.

  • Run from mudashed.ipynb
  • mudashed builds itself in three stages and is based on four boxes:
    • suite_box (three HBox: info, groups, runlist)
    • command_box (two HBox: pre-model choices, fit plot buttons)
    • global parameters, VBox of rows (HBox)
    • model_box is a more complex cascade: HBox of two VBox (columns) of VBox (components) of HBox (component widgets, pardicts widgets)
  • First stage, grp_calib dict, data path to prototype run, runlist, the latter triggers the following
  • Second stage, only first row of command box, sequential/global Toggle, global parameter number (NG) [0], model acronym Text (MN), version Label (VL) [default 1], load Button (LL) last mudashed standard dashboard.json into self.dashboard, load Button (LF) from fit file into self.dashboard
  • Third stage builds the rest


Backends

%matplotlib ipympl 

produces a side-by-side plot in the Log tab, self.logtab_box, by self.figure_box = Output(...) with auto switch by self.tab.selected_index. See also tools.show_hide_ tab

%matplotlib qt

requires pip3 install pyqt5, but also a minimum Qt5 in linux/wsl and is now fully optional. It produces the usual plot window, recycled.


_on_Fit: check dashboard

  • editor widgets syntax checks
    • mudashed.build_dashboard_from_widgets checks function algebra by muvalid, producing (mostly) informative errmsg
    • notice that model parameter values are FloatText.value that converts automatically typo 1,2 into 1.2
    • notice that global parameter values are Text.value to allow for lists; they convert lists by ast.literal_eval(value) and single values (no leading '[') by ast.literal_eval(value.replace(',','.')), so both replace typo '1,2' to 1.2
    • tools.check_pardicts checks flag, name, function consistencies with len(groups) and global or sequential fits
    • mudashed._on_Fit further checks consistency between fit and suite, e.g. presence of function_multi in model and multigroup in suite.
  • a separate check is performed again by tools.check_pardicts when loading dashboard from file, which minuit always does. So this is duplicate when using mudashed, but it must work also for script use of mufit, without mudashed checks. Some of the checks are anyways already implemented by mudashed, e.g. global flag "=" not allowed (only "~","!","#" in the editor).
  • a further check could be a dry run (like for guess plot, not implomented)
  • since plot guess might be called first, make sure the same checks are performed for _on_Plot

< Mujpy.Paths | Index | Mujpy.Methods2 >

Edit - History - Print - PDF - Recent Changes - Search
Page last modified on November 16, 2026, at 07:11 AM