# The Austron 2100F has a nominal 0 to 1 volt output which tracks its phase
# meter, with scales of either 0-1us or 0-10us.  The average output voltage
# measured by my 3421A is actually 0.0100v for "zero" and 0.9947v for "one".
# This program averages the reading and scales between these ranges.
sub scale_austron {
	chop $reading;

	# scale the reading -- 0.010015 is "zero", 0.99476 is "one"; therefore
	# make sure we don't go below 0
	if ($reading < 0.010015) {
		$reading = 0.010015;
		}
	$reading = $reading - 0.010015;
	# make sure we don't go above 1
	if ($reading > 0.99476) {
		$reading = 0.99476;
		}
	# the range is 0.9847 and we scale by the inverse of this -- 1.00526
	# while we're at it, convert to nanoseconds
	$reading = $reading * 1.00526 * 10e-7;
	}	
