#pragma rtGlobals=3 // Use modern global access method and strict wave access. Function/S ArcTangentBP_BLFuncInfo(InfoDesired) Variable InfoDesired String info="" switch(InfoDesired) case BLFuncInfo_ParamNames: info = "y0;x0;deltaY;dilation;" break; case BLFuncInfo_BaselineFName: info = "arctan_BLFunc" break; endswitch return info end static Constant pio2 = 1.5707963267949 Function arctan_BLFunc(s) STRUCT MPF2_BLFitStruct &s Variable xx = (s.x-s.cwave[1])/s.cwave[3] Variable scale = s.cwave[2]/pi return s.cwave[0] + (pio2 + atan(xx))*scale end