Ticket #7652 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Add a new algorithm to refine power diffraction pattern's background

Reported by: Wenduo Zhou Owned by: Wenduo Zhou
Priority: major Milestone: Release 3.0
Component: Diffraction Keywords:
Cc: Blocked By:
Blocking: #6867 Tester: Roman Tolchenov

Description (last modified by Wenduo Zhou) (diff)

The new algorithm is designed to remove the peaks, whose parameters have been given (via a TableWorkspace), from a diffraction pattern and do fit to background function as an option.

Attachments

22946.gda (197.4 KB) - added by Wenduo Zhou 7 years ago.
for verification test 1
verify7652B.py (991 bytes) - added by Wenduo Zhou 7 years ago.
verification test 2
PG3_11485_Fitted.nxs (886.4 KB) - added by Wenduo Zhou 7 years ago.
verification test 2
braggpeaks.nxs (122.7 KB) - added by Wenduo Zhou 7 years ago.
verification test 2
verify7652A.py (2.3 KB) - added by Wenduo Zhou 7 years ago.
Fixed a bug

Change History

comment:1 Changed 7 years ago by Wenduo Zhou

  • Status changed from new to inprogress

comment:2 Changed 7 years ago by Wenduo Zhou

  • Blocking 6867 added

comment:3 Changed 7 years ago by Wenduo Zhou

Implemented removing peaks. Refs #7652.

Changeset: a69b7cf19bbc15c26d567fd32ae2f6efb237f516

comment:4 Changed 7 years ago by Wenduo Zhou

Cleaned the code. Refs #7652.

Changeset: 5e87073fca2c5bac91ccb975972464507766c011

comment:5 Changed 7 years ago by Wenduo Zhou

  • Description modified (diff)

comment:6 Changed 7 years ago by Wenduo Zhou

Verification

  1. Download all the attached files from this ticket;
  2. Run script verify_7652.py;
  3. Compare spectra 1 in the output workspace ???? and spectra 1 in input workspace ????. You can see the calculated background from the parameters fitted.

comment:7 Changed 7 years ago by Wenduo Zhou

Enhancing UI and background selection. Refs #7652.

  1. Add visibilities to properties used by specific functions of the

algorithm;

  1. Add more support to fit Chebyshev background function.

Changeset: 96aea87cc856f34ade60a9733a5be1444e8d5357

comment:8 Changed 7 years ago by Wenduo Zhou

Instruction for verification

  1. Download attached ???.py (test script), ???.nxs (table workspace) and ???.dat (data)
  2. Run ???.py
  3. Plot Workspace A and B together (spectrum 2) to see the selected background. Spectrum 2 of workspace B is the model fit by Chebyshev.

comment:9 Changed 7 years ago by Wenduo Zhou

Added default value to boundaries. Refs #7652.

Changeset: 01a20818c5331e2255745fafac110cc2e6da8a9e

comment:10 Changed 7 years ago by Wenduo Zhou

Added an option to read in a background function. Refs #7652.

Changeset: be57e77cee05e43d1abcbdda5585db65d09e59f9

comment:11 Changed 7 years ago by Wenduo Zhou

Added unit test and cleaned code. Refs #7652.

Changeset: 9e46bcaf7335d3a2f8b3c6478c461f0e1abe08f2

comment:12 Changed 7 years ago by Wenduo Zhou

Verification Instruction

Selecting background points

This is to verify the enhancement on selecting background points

  1. Download verify7652A.py and 22946.gda;
  2. Run python script in MantidPlot;
  3. Plot spectrum 2 (workspace index = 1) of 'V22946_Bkgd02' over 'V22946'. You can see how the model of the background matches the experiment data. Spectrum 2 of 'V22946_Bkgd01' is a medium result, while spectrum 1 of 'FilterRef01' is the fit directly on user-specified background points.

Removing background by Le Bail fit result

This is to verify the new option 'RemovePeaks' in this algorithm.

  1. Download verify7652B.py and the other 2 .nxs file;
  2. Run script verify7652B.py in MantidPlot;
  3. Plot spectrum 2 of PG3_11485_FitBkgd_Workspace (result) over spectrum 1 of PG3_11485 (original data) to check how the background model fits the experiment data.
Last edited 7 years ago by Wenduo Zhou (previous) (diff)

Changed 7 years ago by Wenduo Zhou

for verification test 1

Changed 7 years ago by Wenduo Zhou

verification test 2

Changed 7 years ago by Wenduo Zhou

verification test 2

Changed 7 years ago by Wenduo Zhou

verification test 2

comment:13 Changed 7 years ago by Wenduo Zhou

Fixed some properties issue. Refs #7652.

Changeset: 7d11ed22bc6fb2e3aecf4c789d4b2bf756863b31

comment:14 Changed 7 years ago by Wenduo Zhou

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

comment:15 Changed 7 years ago by Roman Tolchenov

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

comment:16 Changed 7 years ago by Roman Tolchenov

  • Status changed from verifying to reopened
  • Resolution fixed deleted

Script verify7652A.py failed with message:

RuntimeError: N/A is not supported.
 at line 18 in '/home/hqs74821/work/mantid_stuff/test/7652/verify7652A.py'
 caused by line 547 in '/home/hqs74821/work/mantid/build/bin/mantid/simpleapi.py'

Changed 7 years ago by Wenduo Zhou

Fixed a bug

comment:17 Changed 7 years ago by Wenduo Zhou

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

There was a bug in verify7652A.py. It has been fixed.

comment:18 Changed 7 years ago by Roman Tolchenov

  • Status changed from verify to verifying

comment:19 Changed 7 years ago by Roman Tolchenov

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/7652_process_bkgd'

Full changeset: c09833769a4ff7ea18df0c2ecd899cbc89d9597f

comment:20 Changed 7 years ago by Nick Draper

  • Component changed from Framework to Diffraction

comment:21 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8497

Note: See TracTickets for help on using tickets.