import java.io.*;
import java.util.*;


public class CalibrationTable extends Interpolator {
	/**
	 * 
	 */
	private static final long serialVersionUID = -3843930469196283911L;

	public CalibrationTable(String fileName) throws IOException {
		super(fileName);
	}
	
	public void readData(String datafile) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(datafile)));
		
		int n = 0;
		String line = null;
		while((line = in.readLine()) != null) if(line.length() > 0) if(line.charAt(0) != '#') {
			StringTokenizer tokens = new StringTokenizer(line);
			InterpolatorData calibration = new InterpolatorData();
			
			tokens.nextToken();
			tokens.nextToken();
			calibration.MJD = Double.parseDouble(tokens.nextToken());
			calibration.value = Double.parseDouble(tokens.nextToken());
		
			add(calibration);
		}
	}
	
	
}
