Dear John,
Thank you for the quick reply. Using:
rebin_start_x_at 0.5
rebin_with_dx_of 0.01
does not help. I still get the same error when start_X is close to 150 for my data. I did check the thread you mentioned and tried that fix but didn't help either. For the beq macro I am using Phil Chater's pdf.inc from his Git. I modified the macro slightly to add 1e-5 to X when it is in the denominator:
macro beq_PDFfit2(uiso,uisov,rcut,rcutv,sratio,sratiov,delta1,delta1v,delta2,delta2v,qbroad,qbroadv)
{
#m_argu uiso
#m_argu rcut
#m_argu sratio
#m_argu delta1
#m_argu delta2
#m_argu qbroad
If_Prm_Eqn_Rpt(uiso, uisov, min 0.000001 max 1, del = 0.01 Val;)
If_Prm_Eqn_Rpt(rcut, rcutv, min 0.000001 max 10, del = 0.01 Val;)
If_Prm_Eqn_Rpt(sratio,sratiov, min 0.000001 max 10, del = 0.01 Val;)
If_Prm_Eqn_Rpt(delta1,delta1v, min 0.000001 max 1, del = 0.01 Val;)
If_Prm_Eqn_Rpt(delta2,delta2v, min 0.000001 max 1, del = 0.01 Val;)
If_Prm_Eqn_Rpt(qbroad,qbroadv, min 0.000001 max 1, del = 0.01 Val;)
' ---- Original line in pdf.inc ----
'beq = If(X < CeV(rcut, rcutv), 0.5 CeV(sratio, sratiov), 1) CeV(uiso, uisov) 8 Pi^2 (1 - Min(((CeV(delta1, delta1v)/X) + (CeV(delta2, delta2v)/X^2) - (CeV(qbroad, qbroadv)^2 X^2)),1));
' ---- Modified line substituting X for X+1e-5 ----
beq = If(X < CeV(rcut, rcutv), 0.5 CeV(sratio, sratiov), 1) CeV(uiso, uisov) 8 Pi^2 (1 - Min(((CeV(delta1, delta1v)/(X+1e-5)) + (CeV(delta2, delta2v)/(X+1e-5)^2) - (CeV(qbroad, qbroadv)^2 X^2)),1));
}
But I run into the same problem. Interestingly, it is only when start_X is somewhat close to 150 that I get this error. For instance, 'start_X 143' runs fine but 'start_X 144' yields that error.
My goal here is to set up a 'boxcar' refinement using num_runs so that start_X and finish_X change at each run, to study the behaviour of some parameters as a function of 'r'.
Cheers,
Joaquin.