T_value is the projection of the vector between theo and measured hit along the theo vector.
If the scan has theo values, then just :
ASSIGN/V1=DOT(SCN1.HIT[1..SCN1.NUMHITS].XYZ-SCN1.HIT[1..SCN1.NUMHITS].TXYZ,SCN1.HIT[1..SCN1.NUMHITS].TIJK)
Then loop on SCN1.NUMHITS :