insert_peak
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
insert_peak [2012/01/12 02:58] – edit comment markers for auto-colouring rowlesmr | insert_peak [2025/06/05 08:01] (current) – johnsoevans | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Insert_Peak ====== | ||
+ | A single line macro to add a peak to a Rietveld fit. There are lots of different ways of doing this. The second macro uses fit_obj to plot the peak in the gui. | ||
+ | |||
+ | Insert_Peak(twotheta, | ||
+ | |||
+ | <code topas> | ||
+ | '' | ||
+ | '' | ||
+ | '' | ||
+ | '' | ||
+ | |||
+ | macro Insert_Peak(p1, | ||
+ | #m_argu p1 '' | ||
+ | #m_argu p2 '' | ||
+ | #m_argu p3 '' | ||
+ | #m_argu p4 '' | ||
+ | If_Prm_Eqn_Rpt(p1, | ||
+ | If_Prm_Eqn_Rpt(p2, | ||
+ | If_Prm_Eqn_Rpt(p3, | ||
+ | If_Prm_Eqn_Rpt(p4, | ||
+ | xo_Is xo =CeV(p1, | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Insert_Peak_Plot(peak_name, | ||
+ | |||
+ | <code topas> | ||
+ | ' | ||
+ | macro Insert_Peak_Plot(v0, | ||
+ | #m_argu p1 ' | ||
+ | #m_argu p2 'lor | ||
+ | #m_argu p3 'fwhm | ||
+ | #m_argu p4 'int | ||
+ | If_Prm_Eqn_Rpt(p1, | ||
+ | If_Prm_Eqn_Rpt(p2, | ||
+ | If_Prm_Eqn_Rpt(p3, | ||
+ | If_Prm_Eqn_Rpt(p4, | ||
+ | fit_obj = CeV(p4,v4) * ( CeV(p2,v2) * Lorentzian(CeV(p1, | ||
+ | dummy_str space_group P1 phase_name v0 weight_percent 0 | ||
+ | } | ||
+ | </ |