This is an old revision of the document!


Insert_Peak

A single line macro to add a peak to a Rietveld fit.

Insert_Peak(twotheta, 20, lor, 0.1, fwhm, 0.15, int, 100)

'Description: add single peak to e.g. rietveld fit
'Description: Insert_Peak(twotheta, 20, lor, 0.1, fwhm, 0.15, int, 100)
'Why: simple one line makes things easier
'Contributed by: John Evans
 
macro Insert_Peak(p1,v1,p2,v2,p3,v3,p4,v4) {
#m_argu p1 '2theta
#m_argu p2 'lor
#m_argu p3 'fwhm
#m_argu p4 'int
If_Prm_Eqn_Rpt(p1, v1, min =0.9*v1; max =1.1*v1;)
If_Prm_Eqn_Rpt(p2, v2, min .000000000001 max 1)
If_Prm_Eqn_Rpt(p3, v3, min .000000000001 max 1)
If_Prm_Eqn_Rpt(p4, v4, min .000000000001 max 1e9)
xo_Is xo =CeV(p1,v1);  peak_type pv pv_lor =CeV(p2,v2);  pv_fwhm =CeV(p3,v3); I =CeV(p4,v4);
}

Personal Tools