Ticket #9213 (closed: fixed)
Implement initial version of the ALC Analysis interface
Reported by: | Arturs Bekasovs | Owned by: | Arturs Bekasovs |
---|---|---|---|
Priority: | major | Milestone: | Release 3.2 |
Component: | Muon | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | #9214, #9215, #9216, #9489, #9490, #9495 | Tester: | Anders Markvardsen |
Description
Use the mock-ups created as a part of #7611 and implement the basic functionality.
More tickets will be created for more advanced things.
Change History
comment:1 Changed 7 years ago by Arturs Bekasovs
- Summary changed from Implement initial version of the ALC Anysis interface to Implement initial version of the ALC Analysis interface
comment:6 Changed 6 years ago by Arturs Bekasovs
- Status changed from assigned to inprogress
Refs #9213. Move all the Muon files to separate directory
Changeset: 8263ae39673d95b1911a3793f27623e1e9c2d42c
comment:7 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Initial data loading classes
Changeset: 6e6d06140933c1b7a83214a7c469669699431147
comment:8 Changed 6 years ago by Arturs Bekasovs
Refs #9213. The basic presenter/view interaction for data loading
Changeset: df595eb99a47d65514fe2dd5e50414d20f8c0c35
comment:9 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Simplest loading implementation
Changeset: c82fc3fcc701cf78028a5e977c5466ba48a5c33d
comment:10 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Better naming for the method and class
Changeset: 6c356534220098a3e3a62821e19ec63846d522b5
comment:11 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Initial widget view implementation
Changeset: 990d3a4e12e96856e582052b3a7415f7fd902e22
comment:12 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Split the step code into multiple files
Changeset: c16d3359bc669a44cf3dd602857f3d7ca45ee5e3
comment:13 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Hide presenter inside the mock view
We shouldn't ever access it directly, but rather test it through the mock view, so better hide it.
Changeset: 68bdb79f8f1b507d5958186eccba500d66f3062a
comment:14 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Display data as a plot
Changeset: 1fd5d49cb3e3c8f8e543636edf9454d0d2326f89
comment:15 Changed 6 years ago by Arturs Bekasovs
Refs #9213. A few UI improvements
Changeset: ac9a00a024c0b44e87348b5723a6a6becd2a53e4
comment:16 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Quick fix for the PlotAsymmetryByLogValue
Child algorithms don't put workspaces to the ADS, unless these workspaces are group. That's why it wasn't working property for non-period runs. Will test that propertly in a different ticket.
Changeset: 209ca714a10d1a7cb15be5bb8cd7c45861e605f0
comment:17 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Classes for the baseline modelling step
Changeset: a7e05224d55a6a04f953d208fcb9f5ba5ebdddc5
comment:18 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Basic fitting implementation
Changeset: 78bdb35db633a2a4fbe1a4e92e3b95f9ae6f6dd2
comment:19 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Initial widget view implementation
Changeset: 205f15a15380002e613d7494a78b030cf6ce1687
comment:20 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Basic step view switching
Changeset: 949cf62d25dfb0ddd2a3ee3a11e516d058fc9fac
comment:21 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Minor code/documentation clean-up
Changeset: ddefa889cf9996fbd95a632c84540252dbc6ae0f
comment:22 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Transfer loaded data to baseline modelling
Changeset: 54eb73e4f8fc239d085c2bfff59db4734b26ae76
comment:23 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Use MWRunFiles to select first/last run
Changeset: a849dd2a7a602e669df48e381299d150cab5c25f
comment:24 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Change the way presenter is created
Creating it from view isn't the best approach - the view shouldn't really be aware of who is controlling it. Additionally, in order to interfact with the presenter, we should retrieve it from the view each time.
Some other minor code clean-up was done as well.
Changeset: 62401d714b2c4169ee162984ebf478d5e651e0dd
comment:25 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Display baseline-subtracted (corrected) data
Changeset: 93adbec4671760256ff1be5621315b516e0279c6
comment:26 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Add section support to baseline modelling
Changeset: 14ee9ba1ef05d23a4a10f318321f525a5fd5a9bc
comment:27 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Incorporate RangeSelector for easier selection of sections
Changeset: d043e5407d06bedeb15cb81777443505a7846e39
comment:28 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Fix data loading curve bug
It wasn't working correctly when loading data multiple times - the old curve wasn't cleared. Additionally, attach baseline modelling curves only once.
Changeset: 15db0b54cb90041b8d60a66c590833c5946f6e8f
comment:29 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Initial Peak Fitting step view interface & presenter
Changeset: 84b71a7dc52a99cb74aade26dcda4de0648d5b40
comment:30 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Single peak fitting functionality
Changeset: 232e65a3281b2a0617c7800034bff998c6a6d5ac
comment:31 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Initial Qt Peak Fitting step implementation
Changeset: 0d142f37492f4425c2f2d33a2f58232745b0226c
comment:32 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Minor refactoring
Changeset: 5f7cfa77c19672f7cdfa38d7ab42214213365685
comment:33 Changed 6 years ago by Arturs Bekasovs
refs #9213. Restrucutre Baseline Modelling test
Changeset: 4a3a39907387a8a88cd65a5dd84b4e638c9a5bce
comment:34 Changed 6 years ago by Arturs Bekasovs
Refs #9213. More consistent method naming
Changeset: 7c8bcf7c9978c7a4e3c65c646ef74dade19c9c14
comment:35 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Change the way we work with baseline sections
Instead of just keeping the list in the view, we keep it in the presenter, and handle view requests to modify it.
Changeset: 01ce1f708703983a6ff60a33bf3990d25e0b47d3
comment:36 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Use table to present sections
Changeset: c87103b6b86baad9dc3b9ac04c93f5337c95f182
comment:37 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Ability to modify sections
Changeset: e3623fe01971569dffc585c187c0903164121b13
comment:38 Changed 6 years ago by Arturs Bekasovs
Refs #9213. More consistent slot name
Changeset: 798f457a4a52d6b1ebf6564cfae4accfb1e5f0fa
comment:39 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Use FunctionBrowser for baseline modelling
Usefuleness/lines-of-code ration is close to infinity for this commit.
Changeset: 3107d376b5a8b4d4ac7cbbd9c83a213fe5602032
comment:40 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Better signal/slot naming
Changeset: e645fe73c521f80f052b6f5aa18ce7608deacf26
comment:41 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Fix RangeSelector.
It wasn't unattaching itself from the plot upon desctruction, which left us with dead range lines on the plot.
Changeset: ce9afc4e1275a252079a2aa8e3515099b92514fc
comment:42 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Massive re-factoring of the Baseline Modelling step
It now follows MVC patter much stricter - we have a model which handles the data, a very thin view which displays stuff, and presenter which glues those two together. Both model and view have intermediate interfaces which allow to test presenter throughlty. Model is tested independently as well.
Changeset: 6d7b24c090e1d585a9f7a90109c99aa6ec738dde
comment:43 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Range selectors for sections
Changeset: 111315eb7b200fa370b17c12b2b7276a0a0be50f
comment:44 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Ability to remove sections
Changeset: 99c84e8e1223d782420247171e48c8823e5d1d1b
comment:45 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Update RangeSelector when section is updated in the table
Changeset: 44dcc67a1fdaeb305fe6cf585a9171239415e4b4
comment:46 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Move useful functions to new helper file
Changeset: 7383ae8823684009d8142fa689c69333e5691b31
comment:47 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Refactored PeakFitting step
Made the view much thinner by moving as much as possible to the Presenter. This allows me to test it and keep UI code minimal
Changeset: 2b33556c0f19b05851d7cea4504f5d0426bb7f4d
comment:48 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Various usability improvements
Changeset: 7b02b21504a4b750c0ea9d06f217f254a106a0ae
comment:49 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Revert "Fix RangeSelector."
This reverts commit ce9afc4e1275a252079a2aa8e3515099b92514fc.
This introduced new problems, so I'll approach it in a different way.
Changeset: a3cf0dfa800df934d3b0c893e9086f05d6d7ceec
comment:50 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Remove RangeSelector markers from the plot on deletion
Changeset: f0a157d22d1e168a21fec1c985606c1460c026a6
comment:51 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Refactor DataLoading step
So that it is more consistent with the other ones
Changeset: 1a7cf1a35471d7f93b86af85b1565316a83821fe
comment:52 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Add log selection combo-box and auto-populate it
Changeset: e5f3b244a48ca999d5c06fe1c3567af2eef68255
comment:53 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Move back to synchronous loading for now
Changeset: b64aaeba655b68d672de62aedd84c65c03811bff
comment:54 Changed 6 years ago by Arturs Bekasovs
Refs #9213. More properties on the DataLoading step
Changeset: 83c0ef6a3f8c22e764d0f561a3c77d81730896ac
comment:55 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Better dealing with invalid/unspecified run files
Changeset: 830c4113857f95792a5190cc8dc492e12c9e928e
comment:56 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Fix a small problem in FunctionBrowser
Function indices are not set property when using setFunction. The function to update them was called only if function was added/removed manually.
Changeset: a2f389d987880c03ae20d18b0f0c6fce1754d863
comment:57 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Add a tiny PeakPicker for QwtPlots
This behaves and looks very similar to PeakPickerTool, but is much simpler
Changeset: b1c86566b7c39b10bcf65c3083bde8090863bfdb
comment:58 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Extend FunctionBrowser functionality
This allows for finer-grain function retrieval and updating, plus a few signals to indicate basic changes.
Changeset: 2abc97ac6b8e3765d5a932188cf7dfb4ff4bf674
comment:59 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Use new PeakPicker for peak refining
Changeset: 0fdedc8975d33df058845c400786c488df035fd6
comment:60 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Begin to work on "Export results" functionality
Baseline parameters are exported only at the moment
Changeset: b591272865fbab7b35347f4a028973ddd39dbbe5
comment:61 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Add a model for PeakFitting and make it exported
Changeset: bbee9df98c513ae7df2568529c329a87fce4ddad
comment:62 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Refactor BaselineModelling step
Both BaselineModelling and PeakFitting steps are now structurally similar
Changeset: 8c298bc847b323f81f8c6939aa99b4726d8135fa
comment:63 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Make the BaselineFitting view much thinner
Plus add some basic error-checking
Changeset: 7cbb183587d62f2f2d209d436c904b057d136a39
comment:64 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Clean curves when re-setting the data
Changeset: b4b68091ed3c1c040e35001fe84e081d21cc0274
comment:65 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Don't allow to go to the next step if no data available
Changeset: 9fdbc607f956d49fe1968a23cceb82e2b530cdd6
comment:66 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Merge remote-tracking branch 'origin/master' into feature/9213_initial_alc_interface
Changeset: 9592775b62ca91d5ecb6fb716a3d212b99abfdfa
comment:67 Changed 6 years ago by Arturs Bekasovs
Refs #9213. A few minor UI improvements
Changeset: e8cb7cc2567eeed855d3bd61617f31724ce8d3ae
comment:68 Changed 6 years ago by Arturs Bekasovs
Tester:
Please don't get scared by the number of commits - most of them are me changing mind about how things should be done.
First of all, please use Balsamiq and take a look at mock-up files I've created as a part of #7611 - https://github.com/mantidproject/documents/tree/master/Design/Mockups/muon/alc. This is how the interface is supposed to look like. I haven't done everything in this ticket, because it's too large as it is. Please make sure I've created appropriate tickets for missing functionality and added them to this tickets "Blocking" list.
I don't think a rigorous code-review is required at the moment, but I would be great if you could skim through what I've done. The MVP pattern I've used is quite new to me, so it might not be perfectly structured. This could be fixed in future tickets if required.
To test this initial interface version, here is a sequence of steps you could follow:
- Copy olympic\babylon5\Public\ArtursBekasovs\290K.zip to your drive and extract it. These are data files suitable for ALC analysis.
- Open the new interface. (Interfaces -> Muon -> ALC)
- Set the copied hifi00051636.nxs and hifi00051786.nxs files as first and last run files. The "Log" combo-box should be populated when you select the first file. Select "sample_magn_field".
- Hit load. Loading and processing ~150 files takes some time. When it's done, the loaded data should be plotted on the right.
- Go to the next step. The data you've loaded on the previous step should be plotted on the right again, as that's what you'll be fitting baseline to.
- In the "Function" box, right-click, "Add function" and select "Background -> Polynomial". Set n to 2.
- In the "Sections" box, right-click, "Add section". The range selector should appear. Use it to select a region to the left of the left-most peak. Section values in the box should be ~12000 to ~12886.
- Add the second section in the same way: ~14160 to ~15000.
- Click "Fit". The red line should appear on the plot, fitting the curve nicely.
- Switch to the "Corrected data" tab on the right. The green curve should be similar to the original loaded data, but sitting nicely on the X axis.
- Go to the next step. Corrected data plot should be on the right again.
- In the "Peaks" box on the left, right-click, and add two Gaussian peaks.
- You can specify the initial values manually in the box, but I've added some simple PeakPicker functionality which makes it much easier. To use it, select one of the peaks, and holding Shift button click somewhere in the plot. Peak picker should appear (because of the 0 width it will look like a red horizontal line). This works as a usual Mantid Peak Picker tool -- drag the dotted lines to change the width, or the tip of the peak to move it.
- Using PeakPicker tool, specify good initial values for two peaks you see on the plot.
- Click "Fit". A red line should appear, fitting the curve nicely. (If it isn't, try hitting Fit again).
- Click "Export results..." on the right, and leave the default name in the appearing box.
- Inspect the created workspace group to verify that all the crucial baseline and peak information is in there. (The format of table workspaces might not be very convenient, but its format is yet to be discussed with the scientists.)
That's the basic analysis the interface aims for. If it works OK, play with the interface a bit more, try to find any big problems or inconveniences. Try to go back, fit a different function to baseline and repeat peak fitting. Try some erroneous input (see N.B. below).
N.B: This is an initial ticket for the interface, so please re-open it for something big only. This ticket is huge already, so any further improvements will be done in other tickets.
comment:71 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Merge branch 'feature/9213_initial_alc_interface' into develop
Conflicts:
Code/Mantid/Framework/SINQ/CMakeLists.txt
Changeset: d129646154a8f7162727f517beae905f6febf92e
comment:72 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Attempt to fix build errors/warnings
Changeset: 071bc846e026b94fcd7f081e565e9f9f744ff712
comment:73 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Fix Windows build - set correct DLL export macro
Changeset: f980217f436cdf1d20b081f23498b1f5185b0dd4
comment:75 Changed 6 years ago by Arturs Bekasovs
- Status changed from inprogress to verify
- Resolution set to fixed
comment:76 Changed 6 years ago by Anders Markvardsen
- Status changed from verify to verifying
- Tester set to Anders Markvardsen
comment:77 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Merge remote-tracking branch 'origin/master' into feature/9213_initial_alc_interface
Changeset: 0ef2c20fd84afe859154e11388f9f561d044d7ee
comment:78 Changed 6 years ago by Arturs Bekasovs
Refs #9213. A few minor UI improvements
Changeset: f9d31e9f9661f8f56782723592a17187fbf48eb7
comment:79 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Attempt to fix build errors/warnings
Changeset: bb72f0c32adda145749eedd4a29d636a34598bda
comment:80 Changed 6 years ago by Arturs Bekasovs
Refs #9213. Fix Windows build - set correct DLL export macro
Changeset: d1840181ef1c9e90da9930516a69037afba78ea0
comment:81 Changed 6 years ago by Anders Markvardsen
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/feature/9213_initial_alc_interface'
Full changeset: 4089750766e2ed5a3147d9d6543c4b3a139c6a24
comment:82 Changed 6 years ago by Anders Markvardsen
Looks like a very good first interface.
Could follow the tutorial and can all the expected results.
A couple of 'majors' things which I think is already captures in tickets:
- When initially loading to the data it would be good to have the MantidPlot processbar enabled
- History is lost when navigating back and forth
comment:83 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 10056