added ns as a function parameter

number of sensors 'ns' also added as a parameter passed to the function
SCalibrate