• Peterson, Peter's avatar
    Fix behavior for negative time-of-flight to d · ffd01776
    Peterson, Peter authored
    Apparently some instruments still have a DAS/DAQ/DAE that sometimes
    creates a negative time-of-flight in the raw data file. This
    demonstrated that the quadratic equation was not correctly converting to
    d-spacing when DIFA==0. This PR adds an extra trap to simplify the
    calculation in this case. Also changes the order of special cases to
    move calculating intermediate results until as late as possible. In
    principle, this should execute the case of difa==0 faster as zero is not
    squared then square rooted.