I have some data coming off a diffractometer in channel vs intensity. Channel is directly equivalent to 2theta, with the proviso that channel 1 is ~160 deg2Th and channel 512 is ~145 deg2Th.
Is there a way to use pk_xo to define a calibration equation to change X (channel) into 2Th, so that I can use all the other bits and bobs (emission spectra, cs_L...) as per normal? I don't want to have to prechange the data, or have to redefine all the emission spectra and other macros.
My current attempt ends with the error "No hkls for det0.xye". The error is due to either the pk_xo line. Placing it before the XDD, before the LAMs, after the LAMs, before the STR, or after the STR, make no difference.
Thanks
Matthew
My entire input file is:
XYE("det0.xye")
x_calculation_step 1
prm !ch_width -0.0356183
prm ch_offset 160 min 150 max 170
pk_xo = ((2 Th)-ch_offset)/ch_width; 'this is the bit that I need to figure out.
lam ymin_on_ymax 0.0001
Lam_recs
{
0.378 2.2896977 0.6160974
0.132 2.2900254 0.7444350
0.084 2.2905983 1.3279580
0.073 2.2915136 2.1807273
0.009 2.2882482 0.8395685
0.271 2.2936467 0.9436726
0.054 2.2943110 2.0124101
}
bkg @ 1 0 ' add/remove coefficients as required
Radius(35)
str
CS_L(!csyo, 50)
phase_name Y2O3
MVW( 1, 1, 1)
space_group I_A_3
scale @ 9.92059e-008
site Y1 num_posns 0 x 0.25 y 0.25 z 0.25 occ Y+3 1 beq 0.4545
site Y2 num_posns 0 x 0.46756 y 0 z 0.25 occ Y+3 1 beq 0.394
site O num_posns 0 x 0.10889 y 0.3489 z 0.11966 occ O-2 1 beq 0.7929
Cubic(!ayo 10.60303 min =10.55; max =10.65;)