You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an issue with setting ties and constrains with my strings. When I try to tie or constrain FWHM value, it says that there is an attribution error. Can you please help me solve this? The following is my strips
<<
import mantid algorithms, numpy and matplotlib
from mantid.simpleapi import *
import matplotlib.pyplot as plt
import numpy as np
from CrystalField import CrystalField, CrystalFieldFit, Background, Function, PhysicalProperties
from mantid.plots.utility import MantidAxType
from mantid.api import AnalysisDataService as ADS
I have an issue with setting ties and constrains with my strings. When I try to tie or constrain FWHM value, it says that there is an attribution error. Can you please help me solve this? The following is my strips
<<
import mantid algorithms, numpy and matplotlib
from mantid.simpleapi import *
import matplotlib.pyplot as plt
import numpy as np
from CrystalField import CrystalField, CrystalFieldFit, Background, Function, PhysicalProperties
from mantid.plots.utility import MantidAxType
from mantid.api import AnalysisDataService as ADS
PPCv = PhysicalProperties('Cv')
cf = CrystalField('Er', 'D4h', B20=-0.039105620771250384, B40=-0.00012224220121308797, B44=0.005840756562690297, B60=0.00000479869319, B64=0.000030333615728, Temperature=1.5, FWHM=0.65, PhysicalProperty=[PPCv])
cf.PeakShape = 'Lorentzian'
cf.background = Background(peak=Function('Lorentzian', Amplitude=10, PeakCentre=1, FWHM=0.65),
background=Function('LinearBackground', A0=1.0, A1=0.01))
data_ws1 = Load('C:\Users\galak\OneDrive\Desktop\calculations\erpdsi_neutronECplotting_Elasticline_exclude.dat')
heat = Load('C:\Users\galak\OneDrive\Desktop\calculations\ErPd_HC.dat')
cf.peaks.constraints('f1.FWHM < 0.7', 'f2.FWHM < 0.7')
Runs the fit
fit = CrystalFieldFit(Model=cf, InputWorkspace= [data_ws1, heat])
fit.fit()
##This is Eigen values
e = cf.getEigenvalues()
print(e)
for parnames in ['B20','B40', 'B44', 'B60','B64']:
print (parnames+' = '+str(fit.model[parnames])+' meV')
table = mtd['fit_Parameters']
print ('Cost function value = '+str(table.row(table.rowCount()-1)['Value']))
#plotSpectrum('fit_Workspace',[0,1,2],error_bars=False)
#plt.xlim([1,8])
#plt.ylim([0,90])
Please help
The text was updated successfully, but these errors were encountered: