Ticket #10492 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

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:1 Changed 6 years ago by Dan Nixon

  • Status changed from new to assigned

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:7 Changed 6 years ago by Dan Nixon

Add script output to S(Q, w)

Refs #10492

Changeset: c50cdfbdd185815d393a614e50314787a6934930

comment:8 Changed 6 years ago by Dan Nixon

Add Python export to IDR Symmetrise

Refs #10492

Changeset: ba431daf51a7d4ad90099a6d07d559ad999fc5cd

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

Add trans and moments WS names

Refs #10492

Changeset: 5d9651cc382d327ecbec0a63be6ddadcaea75557

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

Fix diagnostics for multiple runs

Refs #10492

Changeset: 834dc38938c1c9617016868f041f529d85b889cf

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

Add export button to IDA

Refs #10492

Changeset: ed5837676405f85cf13181bdae592c1460b3c3f9

comment:16 Changed 6 years ago by Dan Nixon

Add support for Fury and MSDFit

Refs #10492

Changeset: 880e28ee1e37257906e9bffb5d166faba053f3ce

comment:17 Changed 6 years ago by Dan Nixon

  • Blocked By 10409 added

comment:18 Changed 6 years ago by Dan Nixon

Correct MSDFit output WS name

Refs #10492

Changeset: 2288557b521838b122d299f7c759d5555ca09d29

comment:19 Changed 6 years ago by Dan Nixon

Support export for FuryFit tab

Refs #10492

Changeset: 36b9c36c5e8ed239d8c994a317e373b23c4c300d

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

Support script export on IDA Elwin

Refs #10492

Changeset: 0b6472a8009388c126b5d281456922450e79c9df

comment:25 Changed 6 years ago by Dan Nixon

Support export on calc corr

Refs #10492

Changeset: 4d4679eb01829a9f963053c99e88b86b98e46932

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).
Last edited 6 years ago by Dan Nixon (previous) (diff)

comment:28 Changed 6 years ago by Dan Nixon

Fix compiler warnings

Refs #10492

Changeset: 15f01bb126d3da2e40810ccbad54567685a07d77

comment:29 Changed 6 years ago by Dan Nixon

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

comment:30 Changed 6 years ago by Dan Nixon

  • Blocking 10626 added

comment:31 Changed 6 years ago by Dan Nixon

  • Blocking 10638 added

comment:32 Changed 6 years ago by Dan Nixon

Set output workspace for ET tab

Refs #10492

Changeset: 8db13010ac3571c761aa65ad42b34b9d88765b00

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

Note: See TracTickets for help on using tickets.