Print

Print


Commit in CDMS/src/CDMS/kscheck on MAIN
CreateRoadMapFile.java+14-61.3 -> 1.4
SortCoordsTest.java+1-11.3 -> 1.4
+15-7
2 modified files
Bugfix and one new feature.

1. Determined cause of 3x3 bug introduced in previous patch. Was due to approximation of qet as rectangle, and edges cutting things off. Put in better measurements of length/width, and lowered length to remove the 3 bug (the few microns I eliminated are more than covered by hard-coded overlap, and interpolated images will help too since this is along the length).

2. In csv mode, added j k output to not interpolated images, to easily tell what grid point we're on

CDMS/src/CDMS/kscheck
CreateRoadMapFile.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- CreateRoadMapFile.java	25 Jan 2011 02:06:47 -0000	1.3
+++ CreateRoadMapFile.java	25 Jan 2011 23:43:29 -0000	1.4
@@ -37,12 +37,16 @@
     
     
     // lots of parameters
-    private static double TESlength = 0.7; //length in mm
-    private double TESwidth = 0.307907; //width in mm, originally .22 mm
+    //private static double TESlength = 0.7; //length in mm
+    private static double TESlength = 0.65; //measured as 0.675, lowered to 0.65 to prevent corners from increasing effects
+    //private static double TESwidth = 0.307907; //width in mm, originally .22 mm
     //private static double TESwidth = 0.27;
+    private static double TESwidth = 0.31;
     private static double nPixX = 620; //number of pixels in horizontal direction = 640 add overlap explicitly here: 620/460
     private static double nPixY = 460; //number of pixels in vertical direction = 480
 
+    private static double OVERLAP_FRAC = 0.8;
+    
     private static double xDim;
     private static double yDim;
     
@@ -125,7 +129,7 @@
                     fmt2.format("%.6f", y1-(0.5*(n-1))*yDim+k*yDim); // the QET by the 0.5*(m-1) offset here
                     												 // will we need to include explicit overlap?
                     if(outputType==0) output.write("c:\\Partrtn\\IZipOriginTakePicture_x2_5.RTN,"+fmt1+","+fmt2+",0,0,0,0\n");
-                    else if(outputType==1) output.write(fmt1+","+fmt2+"\n");
+                    else if(outputType==1) output.write(fmt1+","+fmt2+","+j+" "+k+"\n");
                 }
                 
             }
@@ -389,12 +393,16 @@
         		yOverlap = (bottommostTop - topmostBottom)/yDim;
         	}
         	
-        	// if 80% overlap in one direction, and > 0 overlap in another direction, we can be pretty sure
+        	// if lots of overlap in one direction, and > 0 overlap in another direction, we can be pretty sure
         	// we don't need overlap. but otherwise, let's say bad overlap, take another picture.
-        	if(Math.max(yOverlap, xOverlap) > 0.8 && Math.min(yOverlap,xOverlap) > 0)
+        	if(Math.max(yOverlap, xOverlap) > OVERLAP_FRAC && Math.min(yOverlap,xOverlap) > 0)
         		return true;
-        	else
+        	else{
+        		if(Math.min(yOverlap,xOverlap)<0){
+        			//System.out.println("no overlap!");
+        		}
         		return false;
+        	}
         	
         }
         else 

CDMS/src/CDMS/kscheck
SortCoordsTest.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- SortCoordsTest.java	25 Jan 2011 02:06:47 -0000	1.3
+++ SortCoordsTest.java	25 Jan 2011 23:43:29 -0000	1.4
@@ -18,7 +18,7 @@
     public static void main(String[] args) throws FileNotFoundException, IOException {
     	System.out.println("testing!");
         //SortCoordsFile pcfile = new SortCoordsFile("side1_copy.txt","sortedCoords.txt");
-        CreateRoadMapFile roadmap1 = new CreateRoadMapFile("/Users/maxinion/Documents/Work/CDMS/code/imaging/sortedCoords_short.txt","/Users/maxinion/Documents/Work/CDMS/code/imaging/autorun_test_interp_true_26size.csv",0.00059,1);
+        CreateRoadMapFile roadmap1 = new CreateRoadMapFile("/Users/maxinion/Documents/Work/CDMS/code/imaging/sortedCoords_long.txt","/Users/maxinion/Documents/Work/CDMS/code/imaging/testfiles1-25/autorun_long.csv",0.00059,1);
         //CreateRoadMapFile roadmap2 = new CreateRoadMapFile("shortTest2.txt","testautorun2.txt",0.00067);
         //CreateRoadMapFile roadmap3 = new CreateRoadMapFile("longTest.txt","testautorun3.txt",0.00067);
         //SplitSortedFile splitfile = new SplitSortedFile("sortedCoords.txt","splittest.txt");
CVSspam 0.2.8