Ticket #6473 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

[Muon] Sequential fitting

Reported by: Anders Markvardsen Owned by: Arturs Bekasovs
Priority: critical Milestone: Release 3.1
Component: Muon Keywords:
Cc: devashibhai.adroja@…, adrian.hillier@…, stephen.cottrell@… Blocked By:
Blocking: Tester: Roman Tolchenov

Description (last modified by Anders Markvardsen) (diff)

Chat with Adroja this morning.

Take MUSR run 43001 - etc

Would like to improve the automation of sequential fit of such data.

There is a least two options for this

1A) Allow hundreds of files to be specified in the Home tab, where each of these are processed independently. This will generate hundreds of Workspaces, one for each run, and one or many plots depending on how the settings is in the Settings tab

1B) Select the Data Analysis tab. Enable a version of 'sequential fit' which allow user to select any number of workspaces generated in 1B for sequentially fittting

Another implementation option is

2A) In data analysis tab through a 'sequential fit' implementation directly allow user to select files, which are then processed according to GUI setttings before fitting.

First task is to agree on the user experience of this

Change History

comment:1 Changed 8 years ago by Anders Markvardsen

  • Priority changed from major to critical
  • Status changed from new to accepted

Input from Steve and Adroja

Preferred option 2A above and the name Sequence fitting.

They would like this option underneeds the Fit option. Like the Fit option, this option only will be avaible once a model has been selected by the user. This option will open up a new window with the title "Muon Analysis Squence Fitting", which will look something like:

Runs: Input file here same as the input box from the Home tab

Tickbox : Use parameters from previous fit (default to NOT ticked)

Diagnosis area which has a scroll-bar display one line of information about each COMPLETED fit

At the bottom: an ABORT and an OK button. If the ABORT button is hit this cleanup the present fit only

In term of implementation then the behind the scene algorithm will be

  1. Check that the Runs string specified by the user is OK. If not tell user. Otherwise get filenames for the runs specified
  1. Start with the top file in list. Run it through groupings and setting options as if this file had be specified from the home tab.
  1. Then these data and report a one line diagnosis to the Diagnosis area of the window
  1. Repeat 2 and 3 for all files, unless Abort button hit

comment:2 Changed 7 years ago by Nick Draper

  • Milestone changed from Release 2.5 to Release 2.6

Moved to r2.6 at the end of r2.5

comment:3 Changed 7 years ago by Nick Draper

  • Status changed from accepted to assigned

comment:4 Changed 7 years ago by Nick Draper

  • Status changed from assigned to new

comment:5 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:6 Changed 7 years ago by Nick Draper

  • Milestone changed from Release 2.6 to Backlog

Moved to the Backlog after R2.6

comment:7 Changed 7 years ago by Anders Markvardsen

  • Owner changed from Anders Markvardsen to Arturs Bekasovs
  • Component changed from Framework to Muon
  • Description modified (diff)
  • Milestone changed from Backlog to Release 3.0

comment:8 Changed 7 years ago by Arturs Bekasovs

  • Milestone changed from Release 3.0 to Backlog

As it turned out, there are lots of additional features Muon scientists would like to see in that interface, so we will need to discuss that before I can start working on that. Definitely not for this release.

comment:9 Changed 7 years ago by Arturs Bekasovs

Suggested feature from Stephen Cottrell:

Make the resulting batch fitting interface generate Python script it used to do the fit. It will allow scientists to change it and experiment. This could be implemented as a "Save script..." button in the interface.

Last edited 7 years ago by Arturs Bekasovs (previous) (diff)

comment:10 Changed 7 years ago by Arturs Bekasovs

  • Milestone changed from Backlog to Release 3.1

comment:11 Changed 7 years ago by Arturs Bekasovs

  • Summary changed from Muon: Sequential fitting to [Muon] Sequential fitting

comment:12 Changed 7 years ago by Arturs Bekasovs

  • Status changed from new to inprogress

comment:13 Changed 7 years ago by Arturs Bekasovs

Initial version should include:

  1. Ability to open sequential fitting dialog from the Data Analysis tab.
  2. A box to specify a range of runs for the fitting.
  3. Selector for the type of initial fittings parameters of each run: "From previous fit" or "Initial values".
  4. An input field for the fitting "Label".
    1. All the resulting fittings are nested under that label group.
    2. Fitting workspaces are named according to the label.
    3. If label already exists, user should confirm that is should be overwritten.
  5. Progress bar for the fitting.
  6. "Run" and "Stop" buttons with corresponding functionality.
  7. Diagnosis area. This is to keep an eye on how fitting goes.
    1. Fields: "Run", "Fit quality" (ChiSq), parameters and their errors.
    2. Gets populated as fitting proceeds.
    3. Gets cleared when running second time.
    4. Scrollbars.
  8. Workspaces are created under the label specified as fitting proceeds.
  9. Results can be exported as a table on Results Table tab.
Last edited 7 years ago by Arturs Bekasovs (previous) (diff)

comment:14 Changed 7 years ago by Arturs Bekasovs

Refs #6473. New class for the dialog.

Changeset: 4d2ba844a01749f297442f96f6f6d43975b885d2

comment:15 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Enabled Sequential fit option for Muon Analysis.

The new dialog is shown when it is clicked.

Changeset: ff553b9d50df1dc4608f082621137d4a3b7358ad

comment:16 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Initial UI file for the dialog.

Changeset: 3fddfa42858a4260db3bb7c1e24cc776bac41609

comment:17 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Hide label for MWRunFiles widget if it is empty.

Changeset: 7ab9e199c1f446f1200fbb84da149b00ab507662

comment:18 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Basic elements for the UI form.

Changeset: eaab229f28e0a15c629d3e6f0db8c6496516fea2

comment:19 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Validation of label.

Changeset: ab7d66f2efe9abe5fb582dd66d8dcaac307b1aa6

comment:20 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Single button for start/stop functinality.

Can just change the text when stopped/running.

Changeset: 6bcf617d75bf2bcae594f20a2b550b514223f0f6

comment:21 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Enabling/disabling start button on input change.

Changeset: eb20d269bb30dd2d2976d2754cc792abc80cde38

comment:22 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Renamed member variable according to rules.

Changeset: cfce459cc846daebc889462ddb796c7beb34d129

comment:23 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Better function name.

Changeset: f7212082d75327c5c53e5150962802974150c737

comment:24 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Control button logic.

Changeset: 97d39ab48adc83ab9b33078023d6386d4670f216

comment:25 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Improved inputs alignment.

Changeset: e8786ba5b5ae3221ac0d1ad614f26b81e7a7926b

comment:26 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Disabling input widgets when running.

Changeset: afbef9ee13afe17af31716d18835447f518a4182

comment:27 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Initializing the diagnosis table.

Columns for all the parameters are added.

Changeset: 4d8680733ce65d0d034f6ac6d3d79a8f732879ee

comment:28 Changed 7 years ago by Arturs Bekasovs

  • Blocked By 8494 added

I am unable to load workspace for fitting properly before the workflow of the MuonAnalysis is moved outside the interface, so pausing on this one until it's done.

Last edited 7 years ago by Arturs Bekasovs (previous) (diff)

comment:29 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Initial functionality of running/stopping.

Fitting itself is not done yet, is simulated by just loading files for now.

Changeset: 86efd29bfa2917ae008a8038b251db831c1afcb9

comment:30 Changed 7 years ago by Arturs Bekasovs

Refs #6473. FitPropertyBrowser: make method public.

This is quite a useful method for leaving decision on which function exactly to use for fit to the property browser.

Changeset: d6b9b7694d9e54eb1f849ba96d6e32c4e9a86dd9

comment:31 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Function for getting run title from workspace.

Changeset: b0544f1d428cffa804ac769024be4c98299fe77b

comment:32 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Using better way to get fitting function.

Changeset: 15f02a8cd7f23c5718d7ef59c414a583bfdd1cb3

comment:33 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Setting initial values for inputs.

Changeset: 8223861b79c36a82e913642c8800b455f7b301a2

comment:34 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Minor refactoring.

Changeset: e9e10a3f9661f1e3d672f2d7c9fd82abda9b7eab

comment:35 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Initial fitting implementation.

Changeset: 25c011f3855492ca25982b0d42805b2a353fc547

comment:36 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Diagnosis table is being populated now.

Changeset: a8de94de11424ae4458d1c2526c40ed91e61757e

comment:37 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Various minor improvements.

Changeset: a0041244db20af87a914cde89d0b19e4f3b4d6c7

comment:38 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Minor improvements.

Changeset: 8880fbd3074f165059243292fac72684945e020c

comment:39 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Logic for init/sequential fitting options.

Changeset: 4cf35e3306f3dbf20ed3b6dd6935922b6f3c672d

comment:40 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Showing errors in the diagnosis table.

Changeset: 9483f88cf8829cb10edaf7c4708a37ae12d2b5b0

comment:41 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Merge branch 'feature/6473_muon_seq_fitting' into develop

Conflicts:

Code/Mantid/MantidQt/MantidWidgets/CMakeLists.txt

Changeset: f273d418325624204241f73607023adc26c0b0de

comment:42 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Merge remote-tracking branch 'origin/master' into 6473

Conflicts:

Code/Mantid/MantidQt/MantidWidgets/CMakeLists.txt

Changeset: cc81dc1e9a0d721972f08d227875c5071a6311cb

comment:43 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Changed the way the sequential dialog is opened.

Changeset: b28b209ee29e203b03d23f5fcebac8e9f019f0bc

comment:44 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Pass loading algorithm to the dialog.

Changeset: 78debd201b2d43c479e94fa4fc4a105db39815bc

comment:45 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Helper functions to create load algorithm.

Changeset: 57fa1287464365daabae1d49c6f6063d63b16d9c

comment:46 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Creating and passing the algorithm to the dialog.

Changeset: 88673f3d4407ec3fa80ea3d62d8ed8a56a1557f4

comment:47 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Refactored dead time correction a bit.

So it now uses the same routines as algorithm creation function.

Changeset: 697229c27c6f80ba0c6f84153382ff7d25b42bf0

comment:48 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Minor fixes in MuonAnalysis.

Changeset: cccb358c42472ccde02ab9ccb7cc44244dcacaaf

comment:49 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Merge branch 'feature/6473_muon_seq_fitting' into develop

Conflicts:

Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/MuonAnalysis.h Code/Mantid/MantidQt/MantidWidgets/CMakeLists.txt

Changeset: 4ecd5ff833f47c0db8143b41832e9120b1d4972f

comment:50 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Fix for windows error and warnings.

Changeset: c2d304f18d34a54c255aa239bb1b087b8e31d4c9

comment:51 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Ability to export results on the Results Tab.

Changeset: 21aacb3980e153004bdc4565005548c34e554b77

comment:52 Changed 7 years ago by Arturs Bekasovs

  • Blocked By 8494 removed

This was mostly done. Option for Rebin is a tiny little thing which stops me from closing that ticket, so I've implemented it in both places and will re-factor that during maintenance.

comment:53 Changed 7 years ago by Arturs Bekasovs

Tester:

Better be somebody using non-linux platform as I've clicked through it lots of times using Ubuntu 12.04.

The main purpose of sequential fitting is to be able to quickly fit multiple data sets to a fitting model. In case of Muon analysis it means loading a workspace according to all of the settings user selected using the interface, fitting it and creating all the necessary workspaces so that user can export the results.

The first thing to check is that everything listed in this comment was actually implemented. Try to fit a list of files and export results to make sure it works as expected. A good list of runs is MUSR15189-99 in AutoTestData directory (make sure it is in your user directories first).

Now an important thing is to check that all the settings of the interface are used in sequential fitting. To check that, you need to change some settings on the interface, do the fitting manually, then fit the same file using seq. fitting and check that workspaces used for fitting in both cases do correspond. Repeat that multiple times changing different settings.

If your file is MUSR00015189, and you want to fit assymmetry of pair "long", then your workspace will be in the group "MUSR00015189" and will be called "MUSR00015189; Pair; long; Asym; #1". In sequential fitting, if your label is "Label" then you will find this workspace in the group "MuonSeqFitting_Label" under the name "MuonSeqFitting_Label_MUSR00015189".

This is just an initial version and after showing it to scientists it will probably get changed anyway, so please re-open the ticket only if you've found something which is broken or not working as described. You are welcome to leave any comments though.

Last edited 7 years ago by Arturs Bekasovs (previous) (diff)

comment:54 Changed 7 years ago by Arturs Bekasovs

  • Status changed from inprogress to verify
  • Resolution set to fixed

comment:55 Changed 7 years ago by Roman Tolchenov

  • Status changed from verify to verifying
  • Tester set to Roman Tolchenov

comment:56 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Fixed the Raw workspace names.

This naming is assumed in other places as it turns out.

Changeset: 9a6c3a05f4efe81f98e1a59881d3957f4ff5a9b2

comment:57 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Spelling mistake fix.

Changeset: 4b68be5a84a5e4008b309523a05e53eb235a47fa

comment:58 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Cosmetic diagnosis table improvements.

Changeset: 3d5a2b6a769be9dd17d7abb36f30540cf6fcf624

comment:59 Changed 7 years ago by Roman Tolchenov

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/6473_muon_seq_fitting'

Full changeset: 953f5393e96505aec0c7cf7dac26d9657d21afbb

comment:60 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Merge branch 'feature/6473_muon_seq_fitting' into develop

Conflicts:

Code/Mantid/MantidQt/MantidWidgets/CMakeLists.txt

Changeset: f273d418325624204241f73607023adc26c0b0de

comment:61 Changed 7 years ago by Arturs Bekasovs

Refs #6473. Merge branch 'feature/6473_muon_seq_fitting' into develop

Conflicts:

Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/MuonAnalysis.h Code/Mantid/MantidQt/MantidWidgets/CMakeLists.txt

Changeset: 4ecd5ff833f47c0db8143b41832e9120b1d4972f

comment:62 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7319

Note: See TracTickets for help on using tickets.