Ticket #2389 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

Room for performance improvements in "sequential fit" with Resolution function

Reported by: Michael Whitty Owned by: Roman Tolchenov
Priority: major Milestone: Release 3.1
Component: Framework Keywords:
Cc: scu@… Blocked By:
Blocking: #6000 Tester: Samuel Jackson

Description (last modified by Roman Tolchenov) (diff)

A common use case for the indirect group is to do a convolution fit on their data, which is a lorentzian and a resolution function.

To facilitate this, I made changes to the resolution function to allow for a nexus file as input - so that it can be more easily generated and managed within Mantid.

When this fit function is used within the PlotPeakByLogValue algorithm, it will re-load the nexus file for each spectra.

Is there a way we can move some element of this up to the controlling algorithm so that the sub-algorithm Fit does not feel the need to do this?

Also - would be desirable to be able to have the resolution taken as being the same workspace index as the current input being fitted.

Attachments

script.py (359 bytes) - added by Roman Tolchenov 7 years ago.
data3.nxs (48.7 KB) - added by Roman Tolchenov 7 years ago.
resolution3.nxs (106.4 KB) - added by Roman Tolchenov 7 years ago.

Change History

comment:1 Changed 9 years ago by Nick Draper

  • Owner set to Roman Tolchenov
  • Status changed from new to assigned

Is this possible without breaking the architecture?

comment:2 Changed 9 years ago by Stuart Campbell

  • Cc scu@… added

comment:3 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 28 to Iteration 29

Bulk move of tickets at the end of iteration 28

comment:4 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 29 to Iteration 30

Accepted and assigned tickets moved at iteration 29 code freeze

comment:5 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 30 to Iteration 31

Bulk move of tickets to iteration 31 at the iteration 30 code freeze

comment:6 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 32 to Iteration 33

Moved to iteration 33 at iteration 32 code freeze

comment:7 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.1 to Release 2.2

Moved at end of release 2.1

comment:8 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.2 to Release 2.3

Moved at the end of release 2.2

comment:9 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.3 to Release 2.4

Moved to milestone 2.4

comment:10 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.4 to Release 2.5

Moved at the code freeze for release 2.4

comment:11 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:12 Changed 7 years ago by Nick Draper

  • Status changed from assigned to new

comment:13 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:14 Changed 7 years ago by Nick Draper

  • Milestone changed from Release 2.6 to Backlog

Moved to backlog at the code freeze for R2.6

comment:15 Changed 7 years ago by Roman Tolchenov

  • Description modified (diff)
  • Milestone changed from Backlog to Release 3.1

comment:16 Changed 7 years ago by Roman Tolchenov

  • Status changed from new to inprogress

Re #2389. Added workspace index attribute to TabulatedFunction.

Changed it to be able to load any loadable file. Resolution inherits from TabulatedFunction.

Changeset: eeaa2288165d2eeaddee61ad0324aca2b245b98a

comment:17 Changed 7 years ago by Roman Tolchenov

Re #2389. Correction to handling empty string attributes.

Changeset: 5c5c7e3a12d1abebe2f851db9670dd65fa5bb10f

comment:18 Changed 7 years ago by Roman Tolchenov

Re #2389. Added StringEditorFactory to QtPropertyBrowser.

The created editors update properties only when user finishes editing.

Changeset: f9a0bf818613f1516220bf982c3e0637099375e2

comment:19 Changed 7 years ago by Stuart Campbell

  • Summary changed from Room for perofmance improvements in "sequential fit" with Resolution function to Room for performance improvements in "sequential fit" with Resolution function

comment:20 Changed 7 years ago by Roman Tolchenov

Re #2389. Added parameter to pass workspace index to fitting function.

Changeset: 5b2bff6e368d945399931a40f2baf57b76266a6a

comment:21 Changed 7 years ago by Roman Tolchenov

Re #2389. Added unit tests for new property of PlotPeakByLogValue.

Changeset: f5513c1a5a6b17d1a45f3cceb3bfd8d838cd96a1

comment:22 Changed 7 years ago by Roman Tolchenov

Re #2389. Added a checkbox to sequential fit dialog to pass ws index.

Also some clean-up of Convolution code.

Changeset: 5a66f8566f7152fee36a8439ac791121f6d01b70

comment:23 Changed 7 years ago by Roman Tolchenov

Re #2389. Changed Resolution class inheritance.

Changeset: b885c42fc799eb461a43b1f81f28936d058b28ba

Changed 7 years ago by Roman Tolchenov

Changed 7 years ago by Roman Tolchenov

Changed 7 years ago by Roman Tolchenov

comment:24 Changed 7 years ago by Roman Tolchenov

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

To tester:

  • Download the attached files and run the script.
  • In the result table workspace each row contains parameters of the function fitted to the corresponding spectrum in data3.
  • When PassWSIndexToFunction is True all parameters must be different. Changing WorkspaceIndex in Resolution doesn't change the result.
  • When PassWSIndexToFunction is False parameters in the same column must be the same. Changing WorkspaceIndex in Resolution changes the result.
  • The same functionality must be available via FitPropertyBrowser.

comment:25 Changed 7 years ago by Roman Tolchenov

  • Blocking 6000 added

comment:26 Changed 7 years ago by Arturs Bekasovs

  • Status changed from verify to verifying
  • Tester set to Arturs Bekasovs

comment:27 Changed 7 years ago by Arturs Bekasovs

  • Status changed from verifying to reopened
  • Resolution fixed deleted

All works as described when running using the script provided.

However, when trying to do the same thing using the FitPropertyBrowser - Mantid crashes. Happens when trying both Fit and Sequential fit, using parameters from the script.py.

comment:28 Changed 7 years ago by Roman Tolchenov

  • Status changed from reopened to inprogress

Resolution mustn't call TabulatedFunction::functionDeriv1D method.

Re #2389

Changeset: d73b7c8f10688f2a3c0d12cafc979e8cd92234d3

comment:29 Changed 7 years ago by Roman Tolchenov

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

comment:30 Changed 7 years ago by Samuel Jackson

  • Status changed from verify to verifying
  • Tester changed from Arturs Bekasovs to Samuel Jackson

comment:31 Changed 7 years ago by Samuel Jackson

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/2389_resolution_sequential_fitting'

Full changeset: 9cc47b21f1553d5948b3887878fe95a6ffb42e30

comment:32 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 3236

Note: See TracTickets for help on using tickets.