Ticket #5306 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

Implement LeBail fitting of cubic lattice

Reported by: Wenduo Zhou Owned by: Wenduo Zhou
Priority: major Milestone: Release 2.3
Component: Mantid Keywords:
Cc: petersonpf@… Blocked By: #5651
Blocking: Tester: Alex Buts

Description (last modified by Wenduo Zhou) (diff)

Implement LeBail fitting in Mantid. It will support sample of cubic lattice structure in this task.

Test Instruction

Please run the following script to prepare for Le Bail Fit. The data files can be found in systemtests/data/

# Import data
LoadAscii(Filename='4844b1.inp',OutputWorkspace='4844b1',Unit='TOF')

# Create some table workspaces for staring values
CreateLeBailFitInput(Instrument='NOMAD',ReflectionsFile='LB4844b1.hkl',
   FullprofParameterFile='2011B_HR60b1.irf',LatticeConstant='4.1568899999999998',
   InstrumentParameterWorkspace='Peak4844',BraggPeakParameterWorkspace='HKL4844')

# Fit for background of the diffraction pattern
ProcessBackground(InputWorkspace='4844b1',OutputWorkspace='4844b1_bkgd',
    Options='SelectBackgroundPoints',LowerBound='5053',UpperBound='49387',
    BackgroundType='Chebyshev',
    BackgroundPoints='5000,6500,8951,10670,15231,16943,24887,33527,40200,45110,49725',
    NoiseTolerance='20')

Fit(Function='name=Polynomial,n=6,A0=0,A1=0,A2=0,A3=0,A4=0,A5=0,A6=0',
    InputWorkspace='4844b1_bkgd',MaxIterations='1000',
    Minimizer='Levenberg-MarquardtMD',
    CreateOutput='1',Output='4844b_polybkgd',
    StartX='2277.27',EndX='49988.900000000001')

# Calculate peak heights with Le Bail algorithm
LeBailFit(InputWorkspace='4844b1',OutputWorkspace='4844b1_cal',
    InputParameterWorkspace='Peak4844',OutputParameterWorkspace='Temp1',
    InputHKLWorkspace='HKL4844',OutputPeaksWorkspace='Temp2',Function='Calculation',
    BackgroundFunctionOrder='6',BackgroundParametersWorkspace='4844b_polybkgd_Parameters',
    UseInputPeakHeights='0',PeakRadius='8')

The input instrument resolution file already contains well-fitted data. Thus for testing purpose, some parameter value can be shifted.

# Fix all the parameters
UpdatePeakParameterTableValue(InputWorkspace='Peak4844',Column='FitOrTie',NewStringValue='t')
# Change value of Alph1
UpdatePeakParameterTableValue(InputWorkspace='Peak4844',ParameterNames='Alph1',NewFloatValue='6')
# Flag Alph1 to be fit
UpdatePeakParameterTableValue(InputWorkspace='Peak4844',Column='FitOrTie',ParameterNames='Alph1',NewStringValue='f')

Then LeBailFit() can be called as

LeBailFit(InputWorkspace='4844b1',OutputWorkspace='4844b1_fitalph1',InputParameterWorkspace='Peak4844',OutputParameterWorkspace='Peak4844X',InputHKLWorkspace='HKL4844',OutputPeaksWorkspace='HKL4844X',BackgroundFunctionOrder='6',BackgroundParametersWorkspace='4844b_polybkgd_Parameters',UseInputPeakHeights='0',PeakRadius='8',Minimizer='SteepestDescent')

Change History

comment:1 Changed 8 years ago by Wenduo Zhou

  • type changed from enhancement to task

comment:2 Changed 8 years ago by Wenduo Zhou

  • Status changed from new to accepted

comment:3 Changed 8 years ago by Wenduo Zhou

Implement prototype of LeBailFunction. Refs #5306.

Changeset: 51df2100ac902365c174866bc378f6ad4f8a9dfc

comment:4 Changed 8 years ago by Wenduo Zhou

Rename to LeBailFunction. Refs #5306.

Changeset: 3c7eac65d414200466a7ab540dca3a8ffba7b056

comment:5 Changed 8 years ago by Wenduo Zhou

Algorithm to create input for LeBail. Refs #5306.

Add algorithm to create input TableWorkspaces for LeBail fitting from input data, Fullprof peak parameter file and etc.

Changeset: b8240abb63746e1d2999b5f1e0dd90f87457e619

comment:6 Changed 8 years ago by Wenduo Zhou

Add algorithm for LeBail input. Refs #5306.

Changeset: 71b9fdd68ca4320e20dce2c535d8db19ed96e06f

comment:7 Changed 8 years ago by Wenduo Zhou

Implement LeBailFit. Refs #5306.

LeBailFit is an Algorithm do fit on LeBailFunction.

Changeset: a039e917a4970dab406c8b94ab135f86a30e099e

comment:8 Changed 8 years ago by Wenduo Zhou

Modify CMake List. Refs #5306.

Changeset: ee5c067c68b70ea222e390e348b7800488445794

comment:9 Changed 8 years ago by Wenduo Zhou

For detailed information in error message. Refs #5306.

Changeset: 738a98d29770946f5ed11f24df1fb865051258c6

comment:10 Changed 8 years ago by Wenduo Zhou

More on LeBailFunction. Refs #5306.

Changeset: 5b1519eccbe8a7b3289fbb9813418926d9cd96c8

comment:11 Changed 8 years ago by Wenduo Zhou

Some minor modification. Refs #5306.

Changeset: cb2d1638744f5cb8a84dd27ae50fbd0a818b1e4e

comment:12 Changed 8 years ago by Wenduo Zhou

Fix for Windows. Refs #5306.

Changeset: 8f076869d94b34edbf5299e97d724a3d4566ada5

comment:13 Changed 8 years ago by Wenduo Zhou

Remove some warning. Refs #5306.

Changeset: eea67b16af8e65f0b647710ca87ee5a6c7a2919b

comment:14 Changed 8 years ago by Wenduo Zhou

Make progress on LeBail Fit. Refs #5306.

Changeset: e096f28023fbcddbe2639ea4c5cefc113186e8f1

comment:15 Changed 8 years ago by Wenduo Zhou

Add Le Bail Fit design doc. Refs #5306.

Changeset: d22d7c5ca3ac267e69892b362619c95127d8a8ea

comment:16 Changed 8 years ago by Wenduo Zhou

Progress on Le Bail Fit. Refs #5306.

Changeset: 0bed987f5e7d019aa2c4c26c6b350854d4cf59ce

comment:17 Changed 8 years ago by Wenduo Zhou

Progress on Le Bail Fit. Refs #5306.

Changeset: f4590a859a16ffda66eaa32b682a1bf433445b9b

comment:18 Changed 8 years ago by Wenduo Zhou

Rename peak function. Refs #5306.

Changeset: f1fdd16ad8074c4e3fefdea778cb5230faa0755e

comment:19 Changed 8 years ago by Wenduo Zhou

Fix codes due to renaming Bk2BkExpConvPV. Refs #5306.

Changeset: b867e3b2e13f612f11d5dd989937317a15786db6

comment:20 Changed 8 years ago by Wenduo Zhou

Add an algorith to process background. Refs #5306.

Changeset: c55b710ee93244f751075ceb5dd07e683c5b987c

comment:21 Changed 8 years ago by Wenduo Zhou

Add a polynomial background function. Refs #5306.

Changeset: a91e9d07ae55cf0c4ea0c1eb336730c6e953277a

comment:22 Changed 8 years ago by Wenduo Zhou

Implement peak profile for neutron TOF. Refs #5306.

Changeset: 64899922338b6284c90320c497e773adb9b801d4

comment:23 Changed 8 years ago by Wenduo Zhou

Start new LeBailFit version 2. Refs #5306.

Changeset: a61daffb3f2d8aed554fc574d1046959b360a38b

comment:24 Changed 8 years ago by Russell Taylor

  • Blocked By 5651 added

comment:25 Changed 8 years ago by Wenduo Zhou

Unit tests on LeBailFit2. Refs #5306.

Changeset: 19128d99af5428471d8e642d217d05050bbdbe89

comment:26 Changed 8 years ago by Wenduo Zhou

Fix category. Refs #5306.

Changeset: 1cf0a8fe81d08fb020d37054d76939f32f6c47ad

comment:27 Changed 8 years ago by Wenduo Zhou

Remove old LeBailFit. Refs #5306.

Changeset: 58b9aa6b5d2df2c74dd04359ee099e7e38b6891b

comment:28 Changed 8 years ago by Wenduo Zhou

Change CMake. Refs #5306.

Changeset: 8b315b8fde6b8366a552913377290e538406e264

comment:29 Changed 8 years ago by Wenduo Zhou

Fix an error. Refs #5306.

Changeset: 9b0a0fd2dac571a626ec555ba0d298d7beda570b

comment:30 Changed 8 years ago by Wenduo Zhou

Rename LeBailFit2 to LeBailFit. Refs #5306.

Changeset: 55304216ac04097a35b8267edf75d49fe2600f9f

comment:31 Changed 8 years ago by Wenduo Zhou

Rename LeBailFit2 to LeBailFit and fix the codes. Refs #5306.

Changeset: b013b29f5787551f97ab6bdd15c1348bc2da30cc

comment:32 Changed 8 years ago by Wenduo Zhou

Add one method. Refs #5306.

Changeset: d8e6cc84ca9772a208553c19397236d8178839c8

comment:33 Changed 8 years ago by Wenduo Zhou

More on unit test. Refs #5306.

Changeset: 76afeca7aae24c91164a2b3c58af4e3c14802046

comment:34 Changed 8 years ago by Wenduo Zhou

Implement prototype of LeBailFunction. Refs #5306.

Changeset: 51df2100ac902365c174866bc378f6ad4f8a9dfc

comment:35 Changed 8 years ago by Wenduo Zhou

Rename to LeBailFunction. Refs #5306.

Changeset: 3c7eac65d414200466a7ab540dca3a8ffba7b056

comment:36 Changed 8 years ago by Wenduo Zhou

Algorithm to create input for LeBail. Refs #5306.

Add algorithm to create input TableWorkspaces for LeBail fitting from input data, Fullprof peak parameter file and etc.

Changeset: b8240abb63746e1d2999b5f1e0dd90f87457e619

comment:37 Changed 8 years ago by Wenduo Zhou

Add algorithm for LeBail input. Refs #5306.

Changeset: 71b9fdd68ca4320e20dce2c535d8db19ed96e06f

comment:38 Changed 8 years ago by Wenduo Zhou

Implement LeBailFit. Refs #5306.

LeBailFit is an Algorithm do fit on LeBailFunction.

Changeset: a039e917a4970dab406c8b94ab135f86a30e099e

comment:39 Changed 8 years ago by Wenduo Zhou

Modify CMake List. Refs #5306.

Changeset: ee5c067c68b70ea222e390e348b7800488445794

comment:40 Changed 8 years ago by Wenduo Zhou

For detailed information in error message. Refs #5306.

Changeset: 738a98d29770946f5ed11f24df1fb865051258c6

comment:41 Changed 8 years ago by Wenduo Zhou

More on LeBailFunction. Refs #5306.

Changeset: 5b1519eccbe8a7b3289fbb9813418926d9cd96c8

comment:42 Changed 8 years ago by Wenduo Zhou

Some minor modification. Refs #5306.

Changeset: cb2d1638744f5cb8a84dd27ae50fbd0a818b1e4e

comment:43 Changed 8 years ago by Wenduo Zhou

Fix for Windows. Refs #5306.

Changeset: 8f076869d94b34edbf5299e97d724a3d4566ada5

comment:44 Changed 8 years ago by Wenduo Zhou

Remove some warning. Refs #5306.

Changeset: eea67b16af8e65f0b647710ca87ee5a6c7a2919b

comment:45 Changed 8 years ago by Wenduo Zhou

Make progress on LeBail Fit. Refs #5306.

Changeset: e096f28023fbcddbe2639ea4c5cefc113186e8f1

comment:46 Changed 8 years ago by Wenduo Zhou

Unit tests on LeBailFit2. Refs #5306.

Changeset: 19128d99af5428471d8e642d217d05050bbdbe89

comment:47 Changed 8 years ago by Wenduo Zhou

Fix category. Refs #5306.

Changeset: 1cf0a8fe81d08fb020d37054d76939f32f6c47ad

comment:48 Changed 8 years ago by Wenduo Zhou

Remove old LeBailFit. Refs #5306.

Changeset: 58b9aa6b5d2df2c74dd04359ee099e7e38b6891b

comment:49 Changed 8 years ago by Wenduo Zhou

Change CMake. Refs #5306.

Changeset: 8b315b8fde6b8366a552913377290e538406e264

comment:50 Changed 8 years ago by Wenduo Zhou

Fix an error. Refs #5306.

Changeset: 9b0a0fd2dac571a626ec555ba0d298d7beda570b

comment:51 Changed 8 years ago by Wenduo Zhou

Rename LeBailFit2 to LeBailFit. Refs #5306.

Changeset: 55304216ac04097a35b8267edf75d49fe2600f9f

comment:52 Changed 8 years ago by Wenduo Zhou

Rename LeBailFit2 to LeBailFit and fix the codes. Refs #5306.

Changeset: b013b29f5787551f97ab6bdd15c1348bc2da30cc

comment:53 Changed 8 years ago by Wenduo Zhou

Add one method. Refs #5306.

Changeset: d8e6cc84ca9772a208553c19397236d8178839c8

comment:54 Changed 8 years ago by Wenduo Zhou

More on unit test. Refs #5306.

Changeset: 76afeca7aae24c91164a2b3c58af4e3c14802046

comment:55 Changed 8 years ago by Wenduo Zhou

More on LeBailFit. Refs #5306.

Changeset: b7ef4df3882de8c5d99a060ffb627cbcb6999a5e

comment:56 Changed 8 years ago by Wenduo Zhou

Fix unit test. Refs #5306.

Unit test was broken due to change in IFunction. Modify the peak function to fix the issue.

Changeset: c1fdecc68ba08d1d15f095fa079b30e0d0ac720a

comment:57 Changed 8 years ago by Wenduo Zhou

Add a shared pointer. Refs #5306.

Changeset: ea181f059dff3beb8c85aec0fe5ab48ab823bceb

comment:58 Changed 8 years ago by Wenduo Zhou

More functions and unit tests. Refs #5306.

Changeset: 3dee1b2fa73a3f54a0a185199e0549dd91dd87fa

comment:59 Changed 8 years ago by Wenduo Zhou

More unit tests. Refs #5306.

Changeset: 581db9083dc9de2c0397b9aa4e8e5aed6b64aa7d

comment:60 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:61 Changed 8 years ago by Wenduo Zhou

Add background option to LeBailFit. Refs #5306.

Changeset: 0d95e8767618c264924be263dfd5150872f7747b

comment:62 Changed 8 years ago by Wenduo Zhou

Move ProcessBackground to CurveFitting. Refs #5306.

Changeset: c0c50fd5c3a21d305e09d901caa5d0ee3f3511a6

comment:63 Changed 8 years ago by Wenduo Zhou

Expand functionality on ProcessBackground. Refs #5306.

Changeset: 1afbbedaabb5ff012cd53bcc51fd8fc671e924ba

comment:64 Changed 8 years ago by Wenduo Zhou

Start to integrate background. Refs #5306.

Changeset: 62f037ae551601fd15b618072903ab2138bcbe36

comment:65 Changed 8 years ago by Wenduo Zhou

Fix unit test. Refs #5306.

Changeset: ab83cca8ffe49e239132d2611a10721d03c34119

comment:66 Changed 8 years ago by Wenduo Zhou

Fix unit test. Refs #5306.

Changeset: 9edd0794410a58a271b109a6928bf70437d6f501

comment:67 Changed 8 years ago by Wenduo Zhou

More on LeBailFit. Refs #5306.

Changeset: 659ff59912d6b70cfb258b07f70f372e68ae9370

comment:68 Changed 8 years ago by Wenduo Zhou

More on LeBailFit. Refs #5306.

Changeset: b7ef4df3882de8c5d99a060ffb627cbcb6999a5e

comment:69 Changed 8 years ago by Wenduo Zhou

Fix unit test. Refs #5306.

Unit test was broken due to change in IFunction. Modify the peak function to fix the issue.

Changeset: c1fdecc68ba08d1d15f095fa079b30e0d0ac720a

comment:70 Changed 8 years ago by Wenduo Zhou

Add a shared pointer. Refs #5306.

Changeset: ea181f059dff3beb8c85aec0fe5ab48ab823bceb

comment:71 Changed 8 years ago by Wenduo Zhou

More functions and unit tests. Refs #5306.

Changeset: 3dee1b2fa73a3f54a0a185199e0549dd91dd87fa

comment:72 Changed 8 years ago by Wenduo Zhou

More unit tests. Refs #5306.

Changeset: 581db9083dc9de2c0397b9aa4e8e5aed6b64aa7d

comment:73 Changed 8 years ago by Wenduo Zhou

Add background option to LeBailFit. Refs #5306.

Changeset: 0d95e8767618c264924be263dfd5150872f7747b

comment:74 Changed 8 years ago by Wenduo Zhou

Move ProcessBackground to CurveFitting. Refs #5306.

Changeset: c0c50fd5c3a21d305e09d901caa5d0ee3f3511a6

comment:75 Changed 8 years ago by Wenduo Zhou

Expand functionality on ProcessBackground. Refs #5306.

Changeset: 1afbbedaabb5ff012cd53bcc51fd8fc671e924ba

comment:76 Changed 8 years ago by Wenduo Zhou

Start to integrate background. Refs #5306.

Changeset: 62f037ae551601fd15b618072903ab2138bcbe36

comment:77 Changed 8 years ago by Wenduo Zhou

Fix unit test. Refs #5306.

Changeset: ab83cca8ffe49e239132d2611a10721d03c34119

comment:78 Changed 8 years ago by Wenduo Zhou

Fix unit test. Refs #5306.

Changeset: 9edd0794410a58a271b109a6928bf70437d6f501

comment:79 Changed 8 years ago by Wenduo Zhou

More on LeBailFit. Refs #5306.

Changeset: 659ff59912d6b70cfb258b07f70f372e68ae9370

comment:80 Changed 8 years ago by Wenduo Zhou

More on LeBailFit. Refs #5306.

Changeset: 05756a5d700c00df91c373b28478939801709086

comment:81 Changed 8 years ago by Wenduo Zhou

More on LeBailFit. Refs #5306.

Changeset: 9c3070c35bd732c54f7bcd33687e822dc9e3806d

comment:82 Changed 8 years ago by Wenduo Zhou

Implement functionality background calculation. Refs #5306.

Changeset: cec72f9eb969c2ccf6341dc3475154533e124806

comment:83 Changed 8 years ago by Wenduo Zhou

Fix unit test. Refs #5306.

Changeset: 1f67e41a474758b9df61aeec4650c8f30acda3c2

comment:84 Changed 8 years ago by Wenduo Zhou

More on LeBailFit. Refs #5306.

Changeset: 8dad687d68f14b4a03434895062b45a9dfc4e2d4

comment:85 Changed 8 years ago by Wenduo Zhou

More work on LeBailFit. Refs #5306.

Changeset: 4d028a71ad4fba999b0320776bc8f643837252bf

comment:86 Changed 8 years ago by Wenduo Zhou

Add support of Chebyshev. Refs #5306.

Changeset: ee45727f603624283fbce251523cf2b8922b8725

comment:87 Changed 8 years ago by Wenduo Zhou

More on LeBailFit. Refs #5306.

Changeset: 0c61d4e705e8112655ed87cf14ec4b981266be67

comment:88 Changed 8 years ago by Wenduo Zhou

Enable to exclude some peaks out of range. Refs #5306.

Changeset: 06d96689c47a33ac0ea24520bb93298e943ff213

comment:89 Changed 8 years ago by Wenduo Zhou

Add another algorithm for LeBailFit. Refs #5306.

Changeset: 9cfbf5d277b5079ddaec5bbfa37bea0a562e71ff

comment:90 Changed 8 years ago by Wenduo Zhou

Add a thermal neutron unit conversion function. Refs #5306.

Changeset: 59badff52a82c31542d61ba0b5ad2237c0a4c60e

comment:91 Changed 8 years ago by Wenduo Zhou

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

comment:92 Changed 8 years ago by Wenduo Zhou

More on LeBailFit. Refs #5306.

Changeset: 05756a5d700c00df91c373b28478939801709086

comment:93 Changed 8 years ago by Wenduo Zhou

More on LeBailFit. Refs #5306.

Changeset: 9c3070c35bd732c54f7bcd33687e822dc9e3806d

comment:94 Changed 8 years ago by Wenduo Zhou

Implement functionality background calculation. Refs #5306.

Changeset: cec72f9eb969c2ccf6341dc3475154533e124806

comment:95 Changed 8 years ago by Wenduo Zhou

Fix unit test. Refs #5306.

Changeset: 1f67e41a474758b9df61aeec4650c8f30acda3c2

comment:96 Changed 8 years ago by Wenduo Zhou

More on LeBailFit. Refs #5306.

Changeset: 8dad687d68f14b4a03434895062b45a9dfc4e2d4

comment:97 Changed 8 years ago by Wenduo Zhou

More work on LeBailFit. Refs #5306.

Changeset: 4d028a71ad4fba999b0320776bc8f643837252bf

comment:98 Changed 8 years ago by Wenduo Zhou

Add support of Chebyshev. Refs #5306.

Changeset: ee45727f603624283fbce251523cf2b8922b8725

comment:99 Changed 8 years ago by Wenduo Zhou

More on LeBailFit. Refs #5306.

Changeset: 0c61d4e705e8112655ed87cf14ec4b981266be67

comment:100 Changed 8 years ago by Wenduo Zhou

Enable to exclude some peaks out of range. Refs #5306.

Changeset: 06d96689c47a33ac0ea24520bb93298e943ff213

comment:101 Changed 8 years ago by Wenduo Zhou

Add another algorithm for LeBailFit. Refs #5306.

Changeset: 9cfbf5d277b5079ddaec5bbfa37bea0a562e71ff

comment:102 Changed 8 years ago by Wenduo Zhou

Add a thermal neutron unit conversion function. Refs #5306.

Changeset: 59badff52a82c31542d61ba0b5ad2237c0a4c60e

comment:103 Changed 8 years ago by Wenduo Zhou

  • Description modified (diff)

comment:104 Changed 8 years ago by Alex Buts

  • Status changed from verify to verifying
  • Tester set to Alex Buts

comment:105 Changed 8 years ago by Alex Buts

Well, The ticket is to implement LeBailFit for the cubic lattice and some LeBailFit is implemented. There are no request to implement it right and though the test script provided runs, I can not judge how stable/correct the run is.

My attempts to run modified LeBailFit Hangs Mantid on windows.

I am closing this particular ticket, but another ticket (#5858) mentions LeBailFit improvement, so I will address my comments to that ticket.

comment:106 Changed 8 years ago by Alex Buts

  • Status changed from verifying to closed

comment:107 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 6152

Note: See TracTickets for help on using tickets.