[Swift-commit] r4577 - SwiftApps/Montage/scripts

jonmon at ci.uchicago.edu jonmon at ci.uchicago.edu
Tue Jun 7 14:47:37 CDT 2011


Author: jonmon
Date: 2011-06-07 14:47:37 -0500 (Tue, 07 Jun 2011)
New Revision: 4577

Modified:
   SwiftApps/Montage/scripts/Swift_Montage_Apps.swift
   SwiftApps/Montage/scripts/Swift_Montage_Batch.swift
   SwiftApps/Montage/scripts/mDiff_wrap.sh
Log:
Changed several interfaces to allow the mapping of the area files in the Montage scripts


Modified: SwiftApps/Montage/scripts/Swift_Montage_Apps.swift
===================================================================
--- SwiftApps/Montage/scripts/Swift_Montage_Apps.swift	2011-06-07 19:02:50 UTC (rev 4576)
+++ SwiftApps/Montage/scripts/Swift_Montage_Apps.swift	2011-06-07 19:47:37 UTC (rev 4577)
@@ -4,9 +4,10 @@
 }
 
 
-app ( Image bg_img ) mBackground( Image img, float a, float b, float c )
+app ( Image bg_img ) mBackground( Image img, Image area_img, float a, float b, float c )
 {
-    mBackground "-n" @img @bg_img a b c;
+//    mBackground "-n" @img @bg_img a b c;
+    mBackground @img @bg_img a b c;
 }
 
 
@@ -22,16 +23,18 @@
 }
 
 
-app ( Image diff_img ) mDiff( Image proj_img_1, Image proj_img_2, MosaicData hdr )
+app ( Image diff_img ) mDiff( Image proj_img_1, Image area_img_1, Image proj_img_2, Image area_img_2, MosaicData hdr )
 {
 //    mDiff "-n" @proj_img_1 @proj_img_2 @diff_img @hdr;
-    mDiff_wrap "-n" @proj_img_1 @proj_img_2 @diff_img @hdr;
+//    mDiff_wrap "-n" @proj_img_1 @proj_img_2 @diff_img @hdr;
+    mDiff_wrap @proj_img_1 @proj_img_2 @diff_img @hdr;
 }
 
 
-app ( Image diff_img, Status stat ) mDiffFit( Image img_1, Image img_2, MosaicData hdr )
+app ( Image diff_img, Status stat ) mDiffFit( Image img_1, Image area_img_1, Image img_2, Image area_img_2, MosaicData hdr )
 {
-    mDiffFit "-n" "-s" @stat @img_1 @img_2 @diff_img @hdr;
+//    mDiffFit "-n" "-s" @stat @img_1 @img_2 @diff_img @hdr;
+    mDiffFit "-s" @stat @img_1 @img_2 @diff_img @hdr;
 }
 
 
@@ -56,7 +59,7 @@
 
 app ( JPEG mos_img_jpg ) mJPEG( Image mos_img )
 {
-    mJPEG "-gray" @mos_img "20%" "99.98%" "loglog" "-out" @mos_img_jpg;
+    mJPEG "-gray" @mos_img "0s" "max" "gaussian-log" "-out" @mos_img_jpg;
 }
 
 

Modified: SwiftApps/Montage/scripts/Swift_Montage_Batch.swift
===================================================================
--- SwiftApps/Montage/scripts/Swift_Montage_Batch.swift	2011-06-07 19:02:50 UTC (rev 4576)
+++ SwiftApps/Montage/scripts/Swift_Montage_Batch.swift	2011-06-07 19:47:37 UTC (rev 4577)
@@ -7,12 +7,13 @@
     foreach background_entry, i in back_struct
     {
         Image proj_img <single_file_mapper; file = @strcat( @dirname( bg_imgs[i] )+"/", @background_entry.fname )>;
+	Image area_img <regexp_mapper; source = @proj_img, match = "(.*)\\.(.*)", transform = "\\1_area.\\2">;
         Image corr_img <regexp_mapper; source = @proj_img, match = ".*\\/(.*)", transform = "corr_dir/\\1">;
 
         float a = background_entry.a;
         float b = background_entry.b;
         float c = background_entry.c;
-        corr_img = mBackground( proj_img, a, b, c );
+        corr_img = mBackground( proj_img, area_img, a, b, c );
 
         corr_imgs[ i ] = corr_img;
     }
@@ -27,9 +28,11 @@
     {
         Image img_1 <single_file_mapper; file = @strcat( src_dir+"/", @d_entry.plus )>;
         Image img_2 <single_file_mapper; file = @strcat( src_dir+"/", @d_entry.minus )>;
+	Image area_img_1 <regexp_mapper; source = @img_1, match = "(.*)\\.(.*)", transform = "\\1_area.\\2">;
+	Image area_img_2 <regexp_mapper; source = @img_2, match = "(.*)\\.(.*)", transform = "\\1_area.\\2">;
 
         Image diff_img <single_file_mapper; file = @strcat( dest_dir+"/", @d_entry.diff )>;
-        diff_img = mDiff( img_1, img_2, hdr );
+        diff_img = mDiff( img_1, area_img_1, img_2, area_img_2, hdr );
 
         diff_imgs[ i ] = diff_img;
     }
@@ -47,11 +50,13 @@
     {
         Image img_1 <single_file_mapper; file = @strcat( src_dir+"/", @d_entry.plus )>;
         Image img_2 <single_file_mapper; file = @strcat( src_dir+"/", @d_entry.minus )>;
+	Image area_img_1 <regexp_mapper; source = @img_1, match = "(.*)\\.(.*)", transform = "\\1_area.\\2">;
+	Image area_img_2 <regexp_mapper; source = @img_2, match = "(.*)\\.(.*)", transform = "\\1_area.\\2">;
 
         Image diff_img <single_file_mapper; file = @strcat( dest_dir+"/", @d_entry.diff )>;
         Status stat <single_file_mapper; file = @strcat( "stat_dir/stat.", @d_entry.diff)>;
 
-        ( diff_img, stat ) = mDiffFit( img_1, img_2, hdr );
+        ( diff_img, stat ) = mDiffFit( img_1, area_img_1, img_2, area_img_2, hdr );
 
         diff_imgs[ i ] = diff_img;
         stats[ i ] = stat;
@@ -80,7 +85,7 @@
     foreach img, i in raw_imgs
     {
         Image proj_img <regexp_mapper; source = @img, match = ".*\\/(.*)", transform = "proj_dir/proj_\\1">;
-        Image area_img <regexp_mapper; source = @proj_img, match = "(.*)\\.(.*)", transform = "proj_dir/\\1_area.\\2">;
+        Image area_img <regexp_mapper; source = @proj_img, match = "(.*)\\.(.*)", transform = "\\1_area.\\2">;
 //        proj_img = mProject( img, hdr );
 //        proj_img = mProjectPP( img, hdr );
         ( proj_img, area_img ) = mProject( img, hdr );

Modified: SwiftApps/Montage/scripts/mDiff_wrap.sh
===================================================================
--- SwiftApps/Montage/scripts/mDiff_wrap.sh	2011-06-07 19:02:50 UTC (rev 4576)
+++ SwiftApps/Montage/scripts/mDiff_wrap.sh	2011-06-07 19:47:37 UTC (rev 4577)
@@ -1,8 +1,8 @@
 #!/bin/bash
 
-mDiff $1 $2 $3 $4 $5
+mDiff $1 $2 $3 $4
 
 mkdir -p `dirname $4`
-touch $4
+touch $3
 
 exit 0




More information about the Swift-commit mailing list