public CrossDater(TreeRingSeries series, MasterSeries master){

		//RingScorer score = new SumOfSquaresRingScorer();
		RingScorer score = new PearsonCorrelationScorer();
		the_aligner = new DendroAlign(score);
		MapAlignment alignment = the_aligner.align(master,series);
		System.out.println("done? "+alignment.getMap().size());
		int diff = 0;
		int minmaster = Integer.MAX_VALUE;
		int maxmaster = Integer.MIN_VALUE;
		int lastmaster = -1;
		int lastring = -1;
		for(Entry<Integer, Integer> e: alignment.getMap().entrySet()){
			if(lastmaster!=-1){
				
				if(e.getKey() != lastmaster+1){
					System.out.println("skipped a master ring "+(e.getKey()-lastmaster-1));
				}
				
			}
			if(lastring!=-1){
				
				if(e.getValue() != lastring+1){
					System.out.println("skipped a tree ring "+(e.getKey()-lastring-1));
				}
				
			}
			lastmaster = e.getKey();
			lastring = e.getValue();
			System.out.println(master.getYear(e.getKey())+" "+(e.getValue()));
			
			diff += e.getValue()-e.getKey();
			if(e.getKey() > maxmaster)maxmaster = e.getKey();
			if(e.getKey() < minmaster)minmaster = e.getKey();
		}
		double trouble = (double)diff/(double)alignment.getMap().size();
		
		System.out.println("This tree was born in year "+(master.getYear(minmaster))+" and died in year "+(master.getYear(maxmaster))+" min master "+minmaster+" max master "+maxmaster);
		System.out.println(master.getYear(0));
		//AlignmentPanel.showAlignment(master,series,alignment);
		
	}