public void load(File file, AlignmentMedium medium) {
		this.medium = medium;
		resultFile = file;
		if(medium != null) currentSet = medium.get(0);
		setIndex = 0;
		rdcIndex = 0;
		
		try {
			BufferedReader br = new BufferedReader(new FileReader(file));
			String line;
			Scanner scanner;
			
			while ((line = br.readLine()) != null) {
				scanner = new Scanner(line);
				if(scanner.hasNextInt()) {
					if(medium == null) break; // Apparently not interested in RDC data itself - break out of the loop
					loadRDC(scanner); // actual RDC data
				} else if(scanner.hasNext("DATA")) {
					loadMetaInfo(scanner); // meta info, such as Q-factor etc
				} else
					continue; // Empty line or comment
			}
			br.close();
		} catch (IOException e) {
			loadedSuccessfully = false;
			e.printStackTrace();
			return;
		}
		
		loadedSuccessfully = true;
		
		// Pass the fitting result to the alignment medium if necessary
		if(medium != null) {
			medium.fittingResult = fittingResult;
			medium.fittingWasDone = true;
		}
	}