[Swift-commit] r3722 - in trunk/tests: apps language/working

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Wed Nov 24 11:02:18 CST 2010


Author: wozniak
Date: 2010-11-24 11:02:17 -0600 (Wed, 24 Nov 2010)
New Revision: 3722

Added:
   trunk/tests/apps/046-tibi.swift
   trunk/tests/apps/047-LQCD.swift
   trunk/tests/apps/0471-fmri.swift
Removed:
   trunk/tests/language/working/046-tibi.swift
   trunk/tests/language/working/047-LQCD.swift
   trunk/tests/language/working/0471-fmri.swift
Log:
Move app tests to apps


Copied: trunk/tests/apps/046-tibi.swift (from rev 3708, trunk/tests/language/working/046-tibi.swift)
===================================================================
--- trunk/tests/apps/046-tibi.swift	                        (rev 0)
+++ trunk/tests/apps/046-tibi.swift	2010-11-24 17:02:17 UTC (rev 3722)
@@ -0,0 +1,39 @@
+// this is from Tibi's message
+// on 8th feb 2007777777
+
+type file {}
+
+//define the wavelet procedure
+(file wavelets) waveletTransf (file waveletScript, int subjNo,
+string trialType, file dataFiles) {
+    app {
+        cwtsmall @filename(waveletScript) subjNo trialType;
+    }
+}
+
+(file outputs[]) batchTrials ( string trialTypes[] ){
+    file waveletScript<single_file_mapper;
+file="scripts/runTrialSubjectWavelet.R">;
+    //file dataFiles[]<simple_mapper; prefix="101_", suffix="-epochs.Rdata">;
+
+    foreach s,i in trialTypes {
+        //file output<simple_mapper;prefix=s,suffix="101.tgz">;
+        file dataFiles<simple_mapper; prefix="101_", suffix=s>;
+        outputs[i] = waveletTransf(waveletScript,101,s,dataFiles);
+    }
+}
+
+//string trialTypes[] = ["FB", "FC", "FI", "SB", "SC", "SI" ];
+string trialTypes[] = [ "FB" ];
+
+file allOutputs[];
+file namedOutputs[]<fixed_array_mapper;
+files="101-FBchannel10_cwt-results.Rdata, 101-FBchannel11_cwt-results.Rdata, 101-FBchannel12_cwt-results.Rdata, 101-FBchannel13_cwt-results.Rdata, 101-FBchannel14_cwt-results.Rdata, 101-FBchannel15_cwt-results.Rdata, 101-FBchannel16_cwt-results.Rdata, 101-FBchannel17_cwt-results.Rdata, 101-FBchannel18_cwt-results.Rdata, 101-FBchannel19_cwt-results.Rdata, 101-FBchannel1_cwt-results.Rdata, 101-FBchannel20_cwt-results.Rdata, 101-FBchannel21_cwt-results.Rdata, 101-FBchannel22_cwt-results.Rdata, 101-FBchannel23_cwt-results.Rdata, 101-FBchannel24_cwt-results.Rdata, 101-FBchannel25_cwt-results.Rdata, 101-FBchannel26_cwt-results.Rdata, 101-FBchannel27_cwt-results.Rdata, 101-FBchannel28_cwt-results.Rdata, 101-FBchannel2_cwt-results.Rdata, 101-FBchannel3_cwt-results.Rdata, 101-FBchannel4_cwt-results.Rdata, 101-FBchannel5_cwt-results.Rdata, 101-FBchannel6_cwt-results.Rdata, 101-FBchannel7_cwt-results.Rdata, 101-FBchannel8_cwt-results.Rdata, 101-FBchannel9_cwt-results.Rdata">;
+
+
+//the MAIN program
+//file waveletScript<single_file_mapper;
+string file="scripts/runTrialSubjectWavelet.R";
+//namedOutputs = waveletTransf(waveletScript, 101, "FB");
+namedOutputs = batchTrials(trialTypes);
+

Copied: trunk/tests/apps/047-LQCD.swift (from rev 3708, trunk/tests/language/working/047-LQCD.swift)
===================================================================
--- trunk/tests/apps/047-LQCD.swift	                        (rev 0)
+++ trunk/tests/apps/047-LQCD.swift	2010-11-24 17:02:17 UTC (rev 3722)
@@ -0,0 +1,100 @@
+type file {};
+
+(file gauge) stageIn (file input, int config) {
+	app {
+		stageIn "-v" "-i" @input "-c" config "-o" @gauge;
+	}
+}
+
+(file output[]) stagSolve (file gauge, string mass, string source) {
+	app {
+		stagSolve "-v" "-g" @gauge "-m" mass "-s" source "-o" @output[*];
+	}
+}
+
+(file output) cloverSolve ( float kappa, float cSW, file gauge, string source) {
+	app {
+		cloverSolve "-v" "-k" kappa "-c" cSW "-g" @gauge "-s" source "-o" @output;
+	}
+}
+
+(file output) cvt12x12 (file input) {
+	app {
+		CVT12x12 "-v" "-i" @input "-o" @output;
+	}
+}
+
+(file output) archive (file input) {
+	app {
+		Archive "-v" "-i" @input "-o" @output;
+	}
+}
+
+(file output) archiveStag (string mass, file input[]) {
+	app {
+		ArchiveStag "-v" "-m" mass "-i" @input[*] "-o" @output;
+	} 
+}
+
+(file sdo) twoPtHH (file gauge, file antiQ, file Q0, file Q1, file Q2) {
+	app {
+		TwoPtHH "-v" "-g" @gauge "-a" @antiQ "-0" @Q0 "-1" @Q1 "-2" @Q2 stdout=@sdo;
+	}
+}
+
+(file sdo) twoPtSH (file gauge, file stag, file antiQ, file Q0, file Q1, file Q2) {
+	app {
+		TwoPtSH "-v" "-g" @gauge "-s" @stag "-a" @antiQ "-0" @Q0 "-1" @Q1 "-2" @Q2 stdout=@sdo;
+	}
+}
+
+string confList[]=["000102","000108","000114"];
+
+#string ensemble = "l4096f21b708m0031m031";
+float kappaQ = 0.127; 
+float cSW = 1.75;
+
+string mass = "0.005,0.007,0.01,0.02,0.03";
+string fn[] = [ "m0.005_000102 m0.007_000102 m0.01_000102 m0.02_000102 m0.03_000102",
+		"m0.005_000108 m0.007_000108 m0.01_000108 m0.02_000108 m0.03_000108",
+		"m0.005_000114 m0.007_000114 m0.01_000114 m0.02_000114 m0.03_000114" ];
+
+int conflist[];
+
+foreach config,i in conflist {
+	string source = "local,0,0,0,0";
+
+	# gauge template name 
+	file template<"foo">;
+
+	file gauge = stageIn (template, config);
+
+	# need config to be put into filenames too
+	#string fn = "m0.005 m0.007 m0.01 m0.02 m0.03";
+	file stags[]<fixed_array_mapper; files=fn[i]>; 
+	
+	stags = stagSolve(gauge, mass, source);
+
+	file stagTar<simple_mapper; suffix=".tar">;
+	stagTar = archiveStag(mass, stags);
+
+	file clover0 = cloverSolve(kappaQ, cSW, gauge, source);
+	file q0 = cvt12x12(clover0);
+	file cvtArch0 = archive(q0);
+
+	string source1 = "wavefunction,0,1S";
+	file clover1 = cloverSolve(kappaQ, cSW, gauge, source1);
+	file q1 = cvt12x12(clover1);
+	file cvtArch1 = archive(q1);
+
+	string source2 = "wavefunction,0,2S";
+	file clover2 = cloverSolve(kappaQ, cSW, gauge, source2);
+	file q2 = cvt12x12(clover2);
+	file cvtArch2 = archive(q2);
+
+	file antiQ = q0;
+	file pStdout = twoPtHH(gauge, antiQ, q0, q1, q2);
+	foreach stag in stags {
+		file sStdout = twoPtSH(gauge, stag, antiQ, q0, q1, q2);
+	}
+}

Copied: trunk/tests/apps/0471-fmri.swift (from rev 3708, trunk/tests/language/working/0471-fmri.swift)
===================================================================
--- trunk/tests/apps/0471-fmri.swift	                        (rev 0)
+++ trunk/tests/apps/0471-fmri.swift	2010-11-24 17:02:17 UTC (rev 3722)
@@ -0,0 +1,90 @@
+type voxelfile;
+type headerfile;
+
+type pgmfile;
+type imagefile;
+
+type warpfile;
+
+type volume {
+    voxelfile img;
+    headerfile hdr;
+};
+
+(warpfile warp) align_warp(volume reference, volume subject, string model, string quick) {
+    app {
+        align_warp @reference.img @subject.img @warp "-m " model quick;
+    }
+}
+
+(volume sliced) reslice(warpfile warp, volume subject)
+{
+    app {
+        reslice @warp @sliced.img;
+    }
+}
+
+(volume sliced) align_and_reslice(volume reference, volume subject, string model, string quick) {
+    warpfile warp;
+    warp = align_warp(reference, subject, model, quick);
+    sliced = reslice(warp, subject);
+}
+
+
+(volume atlas) softmean(volume sliced[])
+{
+    app {
+        softmean @atlas.img "y" "null" @filenames(sliced[*].img);
+    }
+}
+
+
+(pgmfile outslice) slicer(volume input, string axis, string position)
+{
+    app {
+        slicer @input.img axis position @outslice;
+    }
+}
+
+(imagefile outimg) convert(pgmfile inpgm)
+{
+    app {
+        convert @inpgm @outimg;
+    }
+}
+
+(imagefile outimg) slice_to_jpeg(volume inp, string axis, string position)
+{
+    pgmfile outslice;
+    outslice = slicer(inp, axis, position);
+    outimg = convert(outslice);
+}
+
+(volume s[]) all_align_reslices(volume reference, volume subjects[]) {
+
+    foreach subject, i in subjects {
+        s[i] = align_and_reslice(reference, subjects[i], "12", "-q");
+    }
+
+}
+
+
+volume references[] <csv_mapper;file="reference.csv">;
+volume reference=references[0];
+
+volume subjects[] <csv_mapper;file="subjects.csv">;
+
+volume slices[] <csv_mapper;file="slices.csv">;
+slices = all_align_reslices(reference, subjects);
+
+volume atlas <simple_mapper;prefix="atlas">;
+atlas = softmean(slices);
+
+string directions[] = [ "x", "y", "z"];
+
+foreach direction in directions {
+    imagefile o <single_file_mapper;file=@strcat("atlas-",direction,".jpeg")>;
+    string option = @strcat("-",direction);
+    o = slice_to_jpeg(atlas, option, ".5");
+}
+

Deleted: trunk/tests/language/working/046-tibi.swift
===================================================================
--- trunk/tests/language/working/046-tibi.swift	2010-11-24 17:00:14 UTC (rev 3721)
+++ trunk/tests/language/working/046-tibi.swift	2010-11-24 17:02:17 UTC (rev 3722)
@@ -1,39 +0,0 @@
-// this is from Tibi's message
-// on 8th feb 2007777777
-
-type file {}
-
-//define the wavelet procedure
-(file wavelets) waveletTransf (file waveletScript, int subjNo,
-string trialType, file dataFiles) {
-    app {
-        cwtsmall @filename(waveletScript) subjNo trialType;
-    }
-}
-
-(file outputs[]) batchTrials ( string trialTypes[] ){
-    file waveletScript<single_file_mapper;
-file="scripts/runTrialSubjectWavelet.R">;
-    //file dataFiles[]<simple_mapper; prefix="101_", suffix="-epochs.Rdata">;
-
-    foreach s,i in trialTypes {
-        //file output<simple_mapper;prefix=s,suffix="101.tgz">;
-        file dataFiles<simple_mapper; prefix="101_", suffix=s>;
-        outputs[i] = waveletTransf(waveletScript,101,s,dataFiles);
-    }
-}
-
-//string trialTypes[] = ["FB", "FC", "FI", "SB", "SC", "SI" ];
-string trialTypes[] = [ "FB" ];
-
-file allOutputs[];
-file namedOutputs[]<fixed_array_mapper;
-files="101-FBchannel10_cwt-results.Rdata, 101-FBchannel11_cwt-results.Rdata, 101-FBchannel12_cwt-results.Rdata, 101-FBchannel13_cwt-results.Rdata, 101-FBchannel14_cwt-results.Rdata, 101-FBchannel15_cwt-results.Rdata, 101-FBchannel16_cwt-results.Rdata, 101-FBchannel17_cwt-results.Rdata, 101-FBchannel18_cwt-results.Rdata, 101-FBchannel19_cwt-results.Rdata, 101-FBchannel1_cwt-results.Rdata, 101-FBchannel20_cwt-results.Rdata, 101-FBchannel21_cwt-results.Rdata, 101-FBchannel22_cwt-results.Rdata, 101-FBchannel23_cwt-results.Rdata, 101-FBchannel24_cwt-results.Rdata, 101-FBchannel25_cwt-results.Rdata, 101-FBchannel26_cwt-results.Rdata, 101-FBchannel27_cwt-results.Rdata, 101-FBchannel28_cwt-results.Rdata, 101-FBchannel2_cwt-results.Rdata, 101-FBchannel3_cwt-results.Rdata, 101-FBchannel4_cwt-results.Rdata, 101-FBchannel5_cwt-results.Rdata, 101-FBchannel6_cwt-results.Rdata, 101-FBchannel7_cwt-results.Rdata, 101-FBchannel8_cwt-results.Rdata, 101-FBchannel9_cwt-results.Rdata">;
-
-
-//the MAIN program
-//file waveletScript<single_file_mapper;
-string file="scripts/runTrialSubjectWavelet.R";
-//namedOutputs = waveletTransf(waveletScript, 101, "FB");
-namedOutputs = batchTrials(trialTypes);
-

Deleted: trunk/tests/language/working/047-LQCD.swift
===================================================================
--- trunk/tests/language/working/047-LQCD.swift	2010-11-24 17:00:14 UTC (rev 3721)
+++ trunk/tests/language/working/047-LQCD.swift	2010-11-24 17:02:17 UTC (rev 3722)
@@ -1,100 +0,0 @@
-type file {};
-
-(file gauge) stageIn (file input, int config) {
-	app {
-		stageIn "-v" "-i" @input "-c" config "-o" @gauge;
-	}
-}
-
-(file output[]) stagSolve (file gauge, string mass, string source) {
-	app {
-		stagSolve "-v" "-g" @gauge "-m" mass "-s" source "-o" @output[*];
-	}
-}
-
-(file output) cloverSolve ( float kappa, float cSW, file gauge, string source) {
-	app {
-		cloverSolve "-v" "-k" kappa "-c" cSW "-g" @gauge "-s" source "-o" @output;
-	}
-}
-
-(file output) cvt12x12 (file input) {
-	app {
-		CVT12x12 "-v" "-i" @input "-o" @output;
-	}
-}
-
-(file output) archive (file input) {
-	app {
-		Archive "-v" "-i" @input "-o" @output;
-	}
-}
-
-(file output) archiveStag (string mass, file input[]) {
-	app {
-		ArchiveStag "-v" "-m" mass "-i" @input[*] "-o" @output;
-	} 
-}
-
-(file sdo) twoPtHH (file gauge, file antiQ, file Q0, file Q1, file Q2) {
-	app {
-		TwoPtHH "-v" "-g" @gauge "-a" @antiQ "-0" @Q0 "-1" @Q1 "-2" @Q2 stdout=@sdo;
-	}
-}
-
-(file sdo) twoPtSH (file gauge, file stag, file antiQ, file Q0, file Q1, file Q2) {
-	app {
-		TwoPtSH "-v" "-g" @gauge "-s" @stag "-a" @antiQ "-0" @Q0 "-1" @Q1 "-2" @Q2 stdout=@sdo;
-	}
-}
-
-string confList[]=["000102","000108","000114"];
-
-#string ensemble = "l4096f21b708m0031m031";
-float kappaQ = 0.127; 
-float cSW = 1.75;
-
-string mass = "0.005,0.007,0.01,0.02,0.03";
-string fn[] = [ "m0.005_000102 m0.007_000102 m0.01_000102 m0.02_000102 m0.03_000102",
-		"m0.005_000108 m0.007_000108 m0.01_000108 m0.02_000108 m0.03_000108",
-		"m0.005_000114 m0.007_000114 m0.01_000114 m0.02_000114 m0.03_000114" ];
-
-int conflist[];
-
-foreach config,i in conflist {
-	string source = "local,0,0,0,0";
-
-	# gauge template name 
-	file template<"foo">;
-
-	file gauge = stageIn (template, config);
-
-	# need config to be put into filenames too
-	#string fn = "m0.005 m0.007 m0.01 m0.02 m0.03";
-	file stags[]<fixed_array_mapper; files=fn[i]>; 
-	
-	stags = stagSolve(gauge, mass, source);
-
-	file stagTar<simple_mapper; suffix=".tar">;
-	stagTar = archiveStag(mass, stags);
-
-	file clover0 = cloverSolve(kappaQ, cSW, gauge, source);
-	file q0 = cvt12x12(clover0);
-	file cvtArch0 = archive(q0);
-
-	string source1 = "wavefunction,0,1S";
-	file clover1 = cloverSolve(kappaQ, cSW, gauge, source1);
-	file q1 = cvt12x12(clover1);
-	file cvtArch1 = archive(q1);
-
-	string source2 = "wavefunction,0,2S";
-	file clover2 = cloverSolve(kappaQ, cSW, gauge, source2);
-	file q2 = cvt12x12(clover2);
-	file cvtArch2 = archive(q2);
-
-	file antiQ = q0;
-	file pStdout = twoPtHH(gauge, antiQ, q0, q1, q2);
-	foreach stag in stags {
-		file sStdout = twoPtSH(gauge, stag, antiQ, q0, q1, q2);
-	}
-}

Deleted: trunk/tests/language/working/0471-fmri.swift
===================================================================
--- trunk/tests/language/working/0471-fmri.swift	2010-11-24 17:00:14 UTC (rev 3721)
+++ trunk/tests/language/working/0471-fmri.swift	2010-11-24 17:02:17 UTC (rev 3722)
@@ -1,90 +0,0 @@
-type voxelfile;
-type headerfile;
-
-type pgmfile;
-type imagefile;
-
-type warpfile;
-
-type volume {
-    voxelfile img;
-    headerfile hdr;
-};
-
-(warpfile warp) align_warp(volume reference, volume subject, string model, string quick) {
-    app {
-        align_warp @reference.img @subject.img @warp "-m " model quick;
-    }
-}
-
-(volume sliced) reslice(warpfile warp, volume subject)
-{
-    app {
-        reslice @warp @sliced.img;
-    }
-}
-
-(volume sliced) align_and_reslice(volume reference, volume subject, string model, string quick) {
-    warpfile warp;
-    warp = align_warp(reference, subject, model, quick);
-    sliced = reslice(warp, subject);
-}
-
-
-(volume atlas) softmean(volume sliced[])
-{
-    app {
-        softmean @atlas.img "y" "null" @filenames(sliced[*].img);
-    }
-}
-
-
-(pgmfile outslice) slicer(volume input, string axis, string position)
-{
-    app {
-        slicer @input.img axis position @outslice;
-    }
-}
-
-(imagefile outimg) convert(pgmfile inpgm)
-{
-    app {
-        convert @inpgm @outimg;
-    }
-}
-
-(imagefile outimg) slice_to_jpeg(volume inp, string axis, string position)
-{
-    pgmfile outslice;
-    outslice = slicer(inp, axis, position);
-    outimg = convert(outslice);
-}
-
-(volume s[]) all_align_reslices(volume reference, volume subjects[]) {
-
-    foreach subject, i in subjects {
-        s[i] = align_and_reslice(reference, subjects[i], "12", "-q");
-    }
-
-}
-
-
-volume references[] <csv_mapper;file="reference.csv">;
-volume reference=references[0];
-
-volume subjects[] <csv_mapper;file="subjects.csv">;
-
-volume slices[] <csv_mapper;file="slices.csv">;
-slices = all_align_reslices(reference, subjects);
-
-volume atlas <simple_mapper;prefix="atlas">;
-atlas = softmean(slices);
-
-string directions[] = [ "x", "y", "z"];
-
-foreach direction in directions {
-    imagefile o <single_file_mapper;file=@strcat("atlas-",direction,".jpeg")>;
-    string option = @strcat("-",direction);
-    o = slice_to_jpeg(atlas, option, ".5");
-}
-




More information about the Swift-commit mailing list