I’m not sure if this is behaving as expected, but it caused me some head-scratching because it is not very pythonic.
Expected behavior
Positional arguments passed to fitting function are used
Actual behavior
Unless keywords are specified, default values are used instead
Steps to reproduce the behavior
# The following line helps with future compatibility with Python 3
# print must now be used as a function, e.g print('Hello','World')
from __future__ import (absolute_import, division, print_function, unicode_literals)
# import mantid algorithms, numpy and matplotlib
from mantid.simpleapi import *
import matplotlib.pyplot as plt
import numpy as np
q = np.linspace(0.2,2.,5)
print (q)
HR1 = HallRoss()
HR2 = HallRoss(Tau = 0.1, L = 1.)
HR3 = HallRoss(Tau = 1000., L = 300.)
HR4 = HallRoss(0.1, 1.)
HR5 = HallRoss(1000., 300.)
h1 = HR1(q)
h2 = HR2(q)
h3 = HR3(q)
h4 = HR4(q)
h5 = HR5(q)
print (h1)
print (h2)
print (h3)
print (h4)
print (h5)
print ('h1, h4 and h5 have same values!')
CE1 = ChudleyElliot()
CE2 = ChudleyElliot(Tau = 0.1, L = 1.)
CE3 = ChudleyElliot(Tau = 1000., L = 300.)
CE4 = ChudleyElliot(0.1,1.)
CE5 = ChudleyElliot(1000.,300.)
c1 = CE1(q)
c2 = CE2(q)
c3 = CE3(q)
c4 = CE4(q)
c5 = CE5(q)
print (c1)
print (c2)
print (c3)
print (c4)
print (c5)
print ('c1, c4 and c5 have same values!')
Platforms affected
Script has been run in workbench 4.1 on Windows 10