[Swift-commit] r4707 - in SwiftApps/SwiftMontage: etc scripts

jonmon at ci.uchicago.edu jonmon at ci.uchicago.edu
Wed Jun 29 10:28:31 CDT 2011


Author: jonmon
Date: 2011-06-29 10:28:31 -0500 (Wed, 29 Jun 2011)
New Revision: 4707

Modified:
   SwiftApps/SwiftMontage/etc/swift_montage.properties
   SwiftApps/SwiftMontage/scripts/Swift_Montage_Apps.swift
   SwiftApps/SwiftMontage/scripts/Swift_Montage_Batch.swift
   SwiftApps/SwiftMontage/scripts/Swift_Montage_Types.swift
   SwiftApps/SwiftMontage/scripts/montage.swift
Log:
o merged changes


Modified: SwiftApps/SwiftMontage/etc/swift_montage.properties
===================================================================
--- SwiftApps/SwiftMontage/etc/swift_montage.properties	2011-06-29 15:01:10 UTC (rev 4706)
+++ SwiftApps/SwiftMontage/etc/swift_montage.properties	2011-06-29 15:28:31 UTC (rev 4707)
@@ -4,4 +4,5 @@
 wrapper.log.always.transfer=true
 foreach.maxthreads=1024
 wrapper.parameter.mode=files
-
+use.provider.staging=true
+provider.staging.pin.swiftfiles=false

Modified: SwiftApps/SwiftMontage/scripts/Swift_Montage_Apps.swift
===================================================================
--- SwiftApps/SwiftMontage/scripts/Swift_Montage_Apps.swift	2011-06-29 15:01:10 UTC (rev 4706)
+++ SwiftApps/SwiftMontage/scripts/Swift_Montage_Apps.swift	2011-06-29 15:28:31 UTC (rev 4707)
@@ -1,18 +1,18 @@
-app ( Image mos ) mAdd( Image imgs[], Table img_tbl, MosaicData hdr )
+app ( Image mos ) mAdd( Image imgs[], Table img_tbl, Header hdr )
 {
     mAdd "-p" @dirname( imgs[0] ) "-n" @img_tbl @hdr @mos;
 }
 
 
-app ( Image bg_img ) mBackground( Image img, float a, float b, float c )
+app ( Image rc_img ) mBackground( Image img, float a, float b, float c )
 {
-    mBackground "-n" @img @bg_img a b c;
+    mBackground "-n" @img @rc_img a b c;
 }
 
 
-app ( Table corr_tbl ) mBgModel( Table img_tbl, Table fits_tbl )
+app ( Table rect_tbl ) mBgModel( Table img_tbl, Table fits_tbl )
 {
-    mBgModel @img_tbl @fits_tbl @corr_tbl;
+    mBgModel @img_tbl @fits_tbl @rect_tbl;
 }
 
 
@@ -22,23 +22,20 @@
 }
 
 
-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 proj_img_2, Header hdr )
 {
-//    mDiff "-n" @proj_img_1 @proj_img_2 @diff_img @hdr;
     mDiff_wrap "-n" @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 img_2, Header hdr )
 {
-//    mDiffFit "-n" "-s" @stat @img_1 @img_2 @diff_img @hdr;
     mDiffFit_wrap "-n" "-s" @stat @img_1 @img_2 @diff_img @hdr;
 }
 
 
 app ( Status stat ) mFitplane( Image diff_img )
 {
-//    mFitplane "-s" @stat @diff_img;
     mFitplane_wrap "-s" @stat @diff_img;
 }
 
@@ -49,7 +46,7 @@
 }
 
 
-app ( MosaicData hdr ) mMakeHdr( Table img_tbl )
+app ( Header hdr ) mMakeHdr( Table img_tbl )
 {
     mMakeHdr @img_tbl @hdr;
 }
@@ -67,13 +64,13 @@
 }
 
 
-app ( Image proj_img ) mProjectPP( Image raw_img, MosaicData hdr )
+app ( Image proj_img ) mProjectPP( Image raw_img, Header hdr )
 {
     mProjectPP "-X" @raw_img @proj_img @hdr;
 }
 
 
-app ( Image proj_img ) mProject( Image raw_img, MosaicData hdr )
+app ( Image proj_img ) mProject( Image raw_img, Header hdr )
 {
     mProject "-X" @raw_img @proj_img @hdr;
 }
@@ -89,9 +86,9 @@
 /*                                                                                  */
 /*----------------------------------------------------------------------------------*/
 
-app ( Table back_tbl ) Background_list( Table imgs_tbl, Table corrs_tbl )
+app ( Table back_tbl ) Background_list( Table imgs_tbl, Table rects_tbl )
 {
-    Background_list @imgs_tbl @corrs_tbl @back_tbl;
+    Background_list @imgs_tbl @rects_tbl @back_tbl;
 }
 
 

Modified: SwiftApps/SwiftMontage/scripts/Swift_Montage_Batch.swift
===================================================================
--- SwiftApps/SwiftMontage/scripts/Swift_Montage_Batch.swift	2011-06-29 15:01:10 UTC (rev 4706)
+++ SwiftApps/SwiftMontage/scripts/Swift_Montage_Batch.swift	2011-06-29 15:28:31 UTC (rev 4707)
@@ -19,16 +19,16 @@
 }
 
 
-( Image diff_imgs[] ) mDiffBatch( string src_dir, string dest_dir, Table diff_tbl, MosaicData hdr )
+( Image diff_imgs[] ) mDiffBatch( string src, string dest, Table diff_tbl, Header hdr )
 {
     DiffStruct diffs[] <csv_mapper; file = diff_tbl, skip = 1, hdelim="| ">;
 
     foreach d_entry, i in diffs
     {
-        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 img_1 <single_file_mapper; file = @strcat( src+"/", @d_entry.plus )>;
+        Image img_2 <single_file_mapper; file = @strcat( src+"/", @d_entry.minus )>;
 
-        Image diff_img <single_file_mapper; file = @strcat( dest_dir+"/", @d_entry.diff )>;
+        Image diff_img <single_file_mapper; file = @strcat( dest+"/", @d_entry.diff )>;
         diff_img = mDiff( img_1, img_2, hdr );
 
         diff_imgs[ i ] = diff_img;
@@ -36,7 +36,7 @@
 }
 
 
-( Image diff_imgs[], Table fits_tbl ) mDiffFitBatch( string src_dir, string dest_dir, string stat_dir, string files[], Table diff_tbl, MosaicData hdr )
+( Image diff_imgs[], Table fits_tbl ) mDiffFitBatch( string src, string dest, string stat, string files[], Table diff_tbl, Header hdr )
 {
     DiffStruct diffs[] <csv_mapper; file = diff_tbl, skip = 1, hdelim="| ">;
     Status stats[];
@@ -45,24 +45,24 @@
     
     foreach d_entry, i in diffs
     {
-        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 img_1 <single_file_mapper; file = @strcat( src+"/", @d_entry.plus )>;
+        Image img_2 <single_file_mapper; file = @strcat( src+"/", @d_entry.minus )>;
 
-        Image diff_img <single_file_mapper; file = @strcat( dest_dir+"/", @d_entry.diff )>;
-	Status stat <single_file_mapper; file = stat_dir+ at strcat( "/stat.", @d_entry.diff)>;
+        Image diff_img <single_file_mapper; file = @strcat( dest+"/", @d_entry.diff )>;
+	Status stat_file <single_file_mapper; file = stat+ at strcat( "/stat.", @d_entry.diff)>;
         
-        ( diff_img, stat ) = mDiffFit( img_1, img_2, hdr );
+        ( diff_img, stat_file ) = mDiffFit( img_1, img_2, hdr );
 
 	diff_imgs[ i ] = diff_img;
-        stats[ i ] = stat;
+        stats[ i ] = stat_file;
     }
     fits_tbl = mConcatFit( status_tbl, stats );
 }
 
 
-( Table fits_tbl ) mFitBatch( string stat_dir, Image diff_imgs[], Table diff_tbl )
+( Table fits_tbl ) mFitBatch( string stat, Image diff_imgs[], Table diff_tbl )
 {
-    Status stats[] <structured_regexp_mapper; source = diff_imgs, match = ".*\\/(.*)", transform = stat_dir+"/stat.\\1">;
+    Status stats[] <structured_regexp_mapper; source = diff_imgs, match = ".*\\/(.*)", transform = stat+"/stat.\\1">;
 
     Table status_tbl = create_status_table( diff_tbl );
 
@@ -75,7 +75,7 @@
 }
 
 
-( Image proj_imgs[] ) mProjectBatch( string dest, Image raw_imgs[], MosaicData hdr )
+( Image proj_imgs[] ) mProjectBatch( string dest, Image raw_imgs[], Header hdr )
 {
     foreach img, i in raw_imgs
     {

Modified: SwiftApps/SwiftMontage/scripts/Swift_Montage_Types.swift
===================================================================
--- SwiftApps/SwiftMontage/scripts/Swift_Montage_Types.swift	2011-06-29 15:01:10 UTC (rev 4706)
+++ SwiftApps/SwiftMontage/scripts/Swift_Montage_Types.swift	2011-06-29 15:28:31 UTC (rev 4707)
@@ -1,5 +1,5 @@
 type Image;
-type MosaicData;
+type Header;
 type Table;
 type JPEG;
 type Status;

Modified: SwiftApps/SwiftMontage/scripts/montage.swift
===================================================================
--- SwiftApps/SwiftMontage/scripts/montage.swift	2011-06-29 15:01:10 UTC (rev 4706)
+++ SwiftApps/SwiftMontage/scripts/montage.swift	2011-06-29 15:28:31 UTC (rev 4707)
@@ -1,36 +1,31 @@
-import "Swift_Montage_Types";
-import "Swift_Montage_Apps";
-import "Swift_Montage_Batch";
+import "SwiftMontage";
 
-MosaicData header <"header.hdr">;
+Header header <"header.hdr">;
 Table images_tbl <"images.tbl">;
-Table raw_images_tbl <"raw-images.tbl">;
 Table difference_tbl <"diffs.tbl">;
 Table fits_images_tbl <"fits.tbl">;
 Table corrections_tbl <"corrections.tbl">;
 Table stat_tbl <"stats.tbl">;
-Image corrected_mos <"final/corrected.fits">;
-JPEG corrected_jpg_img <"final/corrected.jpg">;
+Image rectified_mos <"final/rectified.fits">;
+JPEG rectified_jpg_img <"final/rectified.jpg">;
 Image projected_images[];
 Image difference_images[];
-Image corrected_images[];
+Image rectified_images[];
 
 Image raw_image_files[] <filesys_mapper; location = "raw_dir", suffix = ".fits">;
 
-//difference_tbl = mOverlaps( raw_images_tbl );
+projected_images = mProjectBatch( "proj_dir", raw_image_files, header );
 
-projected_images = mProjectBatch( raw_image_files, header );
-
 images_tbl = mImgtbl( projected_images );
 
 difference_tbl = mOverlaps( images_tbl );
 
-( difference_images, fits_images_tbl ) = mDiffFitBatch( "proj_dir", "diff_dir", @filenames(projected_images), difference_tbl, header );
+( difference_images, fits_images_tbl ) = mDiffFitBatch( "proj_dir", "diff_dir", "stat_dir", @filenames(projected_images), difference_tbl, header );
 
 corrections_tbl = mBgModel( images_tbl, fits_images_tbl );
 
-corrected_images = mBackgroundBatch( projected_images, images_tbl, corrections_tbl );
+rectified_images = mBackgroundBatch( "corr_dir", projected_images, images_tbl, corrections_tbl );
 
-corrected_mos = mAdd( corrected_images, images_tbl, header );
+rectified_mos = mAdd( rectified_images, images_tbl, header );
 
-corrected_jpg_img = mJPEG( corrected_mos );
+rectified_jpg_img = mJPEG( rectified_mos );




More information about the Swift-commit mailing list