phase offset bug
As reported by @l.stingaciu, in some "edge" cases phase offset calculation is so off that one has to apply large initial offset to overcome it. See the following macro
macro
clear all
bins pix nbins 8
datapath /SNS/NSE/IPTS-27065
read s10950.echo as res
read s10973.echo as sam
match all
fit res
fit sample flag offset phase_offset 0.0
!fit sample flag offset phase_offset 90.0
When phase_offset
is 90 the fitting produces correct results.