Ticket #10492 (closed: fixed)
Add Python export button to indirect interfaces
Reported by: | Dan Nixon | Owned by: | Dan Nixon |
---|---|---|---|
Priority: | major | Milestone: | Release 3.3 |
Component: | Indirect Inelastic | Keywords: | |
Cc: | sanghamitra.mukhopadhyay@… | Blocked By: | #10368, #10409, #10482 |
Blocking: | #10626, #10638 | Tester: | Federico M Pouzols |
Description
Add a button to the bottom of the indirect interfaces that will export a Python script containing just algorithms executed by that tab.
Change History
comment:2 Changed 6 years ago by Dan Nixon
- Summary changed from Add Python export buton to indirect interfaces to Add Python export button to indirect interfaces
comment:3 Changed 6 years ago by Dan Nixon
- Status changed from assigned to inprogress
Merge branch 'feature/10482_date_filter_for_GeneratePythonScript' into feature/10492_indirect_ui_python_export
Refs #10492
Changeset: 555de599dfe92ad4345ae021fd0f0ec54c785ae6
comment:4 Changed 6 years ago by Dan Nixon
Added code to handle Python export form an IndirectTab
Refs #10492
Changeset: 9a49ea1142c709d8f199e3d2de82964b7933e217
comment:5 Changed 6 years ago by Dan Nixon
Added Python export for IDR calibration tab
Refs #10492
Changeset: d5775dd7d6dfb4b2ba4149d43cabed6f31e6d601
comment:6 Changed 6 years ago by Dan Nixon
Added Pyhon export to IDR Diagnostics
Refs #10492
Changeset: c87901d98249b16563a55d88e9c02afebc8cb73b
comment:9 Changed 6 years ago by Dan Nixon
- Blocked By 10368 added
IDATab must inherit from IndirectTab for this to work on IDA.
comment:10 Changed 6 years ago by Dan Nixon
Create a dialog for the python script export
Refs #10492
Changeset: e4e9c50288d4e617e07c960910910b805af3d262
comment:11 Changed 6 years ago by Dan Nixon
comment:12 Changed 6 years ago by Dan Nixon
This is the state of this feature on IDR:
- ET: fails
- Calib: works
- Diag: fails
- Trans: fails
- Symm: works
- Sqw: works
- Moments: fails
All of the tabs that fail are due to #10340
comment:13 Changed 6 years ago by Dan Nixon
comment:14 Changed 6 years ago by Dan Nixon
Merge branch 'master' into feature/10492_indirect_ui_python_export
Conflicts:
Code/Mantid/MantidQt/CustomInterfaces/src/IndirectTab.cpp
Refs #10492
Changeset: 3a3cb470a77719f494ee99fbd1d4c83cd2259e5a
comment:15 Changed 6 years ago by Dan Nixon
comment:16 Changed 6 years ago by Dan Nixon
comment:18 Changed 6 years ago by Dan Nixon
comment:19 Changed 6 years ago by Dan Nixon
comment:20 Changed 6 years ago by Dan Nixon
Added Python export support to ConvFit
Also fixes a segfault when the user loads a file to convfit with no instrument directory defined
Refs #10492
Changeset: 52acdb2b8522c996570afa4ac6ec8bf25a60a319
comment:21 Changed 6 years ago by Dan Nixon
Support Python export from Apply Corrections
Refs #10492
Changeset: cfa3955e6c856faa25b4d7d3bbef0173c948eda2
comment:22 Changed 6 years ago by Dan Nixon
All tabs on IDA except Elwin (waiting for #10409) and Calculate Corrections now support the export button.
comment:23 Changed 6 years ago by Dan Nixon
Merge branch 'master' into feature/10492_indirect_ui_python_export
Conflicts:
Code/Mantid/MantidQt/CustomInterfaces/src/IndirectCalibration.cpp
Refs #10492
Changeset: 4321c08752d1c1a8a37b22f3a4e6708d6c118b78
comment:24 Changed 6 years ago by Dan Nixon
comment:25 Changed 6 years ago by Dan Nixon
comment:26 Changed 6 years ago by Dan Nixon
Correct output workspace an Calc Cor
Refs #10492
Changeset: c7459c7334cf981f8906236ce46be8b2e0bad6a1
comment:27 Changed 6 years ago by Dan Nixon
To test:
- Run some simple reductions/analysis on Indirect Data Reduction and Data Analysis (examples: http://www.mantidproject.org/Indirect:ConvertToEnergy and http://www.mantidproject.org/IDA)
- Click the Py button at the bottom left hand side of the screen
- This should automatically fill the time ranges going from just before the Run button was pushed to either just after the last algorithm finished (if the tab uses algorithms (e.g. Elwin)) or just after the current time (if the tab uses Python (e.g. Apply Corrections)).
- The workspace name should be automatically selected to be the result workspace from that tab (or at least the most important one (i.e. Elwin defaults to the workspace in Q squared as it is used in MSD fit)).
- When exported the script should only contain history entries for algorithms executed on that tab (the lack of Load algorithms gives this away for most tabs (NOT Energy Transfer, Calibration or Diagnostics)).
- If a workspace did not specify an output workspace (all do) a warning will appear in the result logs (this also appears if a tab has not yet been executed).
comment:28 Changed 6 years ago by Dan Nixon
comment:29 Changed 6 years ago by Dan Nixon
- Status changed from inprogress to verify
- Resolution set to fixed
comment:32 Changed 6 years ago by Dan Nixon
comment:33 Changed 6 years ago by Dan Nixon
Merge branch 'feature/10492_indirect_ui_python_export' into feature/10638_idr_ungroup_output
Refs #10492
Changeset: 35c2df2f0b45ae8c885eb456c8dbb4d8ebf10874
comment:34 Changed 6 years ago by Federico M Pouzols
- Status changed from verify to verifying
- Tester set to Federico M Pouzols
comment:35 Changed 6 years ago by Federico M Pouzols
- Status changed from verifying to closed
I tried a basic reduction and calibration, elwin, and correction runs. Everything seems to work well. The workspace name list is populated correctly and the automatic suggestion/selection makes sense. I also tried re-starting Mantid, loading the required files and running the same analyses from the scripts. Everything seems to work as expected. Very useful button!
Should a note be added in the wiki/documentation saying that in recent versions of MantidPlot it is possible to save your script with this button?
comment:36 Changed 6 years ago by Dan Nixon
Merge branch 'feature/10482_date_filter_for_GeneratePythonScript' into feature/10492_indirect_ui_python_export
Refs #10492
Full changeset: 555de599dfe92ad4345ae021fd0f0ec54c785ae6
comment:37 Changed 6 years ago by Dan Nixon
Merge branch 'master' into feature/10492_indirect_ui_python_export
Conflicts:
Code/Mantid/MantidQt/CustomInterfaces/src/IndirectTab.cpp
Refs #10492
Full changeset: 3a3cb470a77719f494ee99fbd1d4c83cd2259e5a
comment:38 Changed 6 years ago by Dan Nixon
Merge branch 'master' into feature/10492_indirect_ui_python_export
Conflicts:
Code/Mantid/MantidQt/CustomInterfaces/src/IndirectCalibration.cpp
Refs #10492
Full changeset: 4321c08752d1c1a8a37b22f3a4e6708d6c118b78
comment:39 Changed 6 years ago by Federico Montesino Pouzols
Merge remote-tracking branch 'origin/feature/10492_indirect_ui_python_export'
Full changeset: 20348b3a547fed65f62396f10e894748100643b3
comment:40 Changed 6 years ago by Dan Nixon
I plan to go through the Wiki pages again as part of #10278, almost all of the Indirect UI needs to be re-documented.
comment:41 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 11334