[Swift-commit] r6705 - in SwiftApps/modis: bin tutorial
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Fri Aug 2 09:25:16 CDT 2013
Author: davidk
Date: 2013-08-02 09:25:15 -0500 (Fri, 02 Aug 2013)
New Revision: 6705
Modified:
SwiftApps/modis/bin/analyzelanduse.sh
SwiftApps/modis/bin/assemble.sh
SwiftApps/modis/bin/colormodis.sh
SwiftApps/modis/tutorial/modis05.swift
SwiftApps/modis/tutorial/modis06.swift
Log:
Make downscaling part of the coloring process
Modified: SwiftApps/modis/bin/analyzelanduse.sh
===================================================================
--- SwiftApps/modis/bin/analyzelanduse.sh 2013-08-02 01:16:36 UTC (rev 6704)
+++ SwiftApps/modis/bin/analyzelanduse.sh 2013-08-02 14:25:15 UTC (rev 6705)
@@ -38,6 +38,6 @@
# Write selectedtiles.txt
for r in $( echo "$result" | awk '{print $1}' )
do
- echo $( basename $r ).ppm.gz |sed s/\.landuse\.byfreq//g >> $selectedtiles
+ echo $( basename $r ).rgb |sed s/\.landuse\.byfreq//g >> $selectedtiles
done
exit 0
Modified: SwiftApps/modis/bin/assemble.sh
===================================================================
--- SwiftApps/modis/bin/assemble.sh 2013-08-02 01:16:36 UTC (rev 6704)
+++ SwiftApps/modis/bin/assemble.sh 2013-08-02 14:25:15 UTC (rev 6705)
@@ -46,7 +46,8 @@
# convert $hv.png -resize 290x290 $tmpdir/t.png
# convert $tmp/t.png -bordercolor red -border 5x5 $tmpdir/$vh.png
else
- $bindir/rgb_downscale.pl $indir/$hv.color.rgb 2400 2400 8 $tmpdir/$vh.rgb
+ # $bindir/rgb_downscale.pl $indir/$hv.color.rgb 2400 2400 8 $tmpdir/$vh.rgb
+ mv $indir/$hv.color.rgb $tmpdir/$vh.rgb
fi
done
done
Modified: SwiftApps/modis/bin/colormodis.sh
===================================================================
--- SwiftApps/modis/bin/colormodis.sh 2013-08-02 01:16:36 UTC (rev 6704)
+++ SwiftApps/modis/bin/colormodis.sh 2013-08-02 14:25:15 UTC (rev 6705)
@@ -33,3 +33,6 @@
EOF
$BINDIR/rgb_adjust_color.pl $infile translate.txt $outfile
+mv $outfile $outfile.tmp
+$BINDIR/rgb_downscale.pl $outfile.tmp 2400 2400 8 $outfile
+
Modified: SwiftApps/modis/tutorial/modis05.swift
===================================================================
--- SwiftApps/modis/tutorial/modis05.swift 2013-08-02 01:16:36 UTC (rev 6704)
+++ SwiftApps/modis/tutorial/modis05.swift 2013-08-02 14:25:15 UTC (rev 6705)
@@ -26,7 +26,7 @@
int nFiles = @toInt(@arg("nfiles", "1000"));
int nSelect = @toInt(@arg("nselect", "10"));
string landType = @arg("landtype", "urban");
-string MODISdir = @arg("modisdir", "../data/modis/2002");
+string MODISdir = @arg("modisdir", "data/modis/2002");
# Input Dataset
imagefile geos[] <ext; exec="../bin/modis.mapper", location=MODISdir, suffix=".rgb", n=nFiles>;
Modified: SwiftApps/modis/tutorial/modis06.swift
===================================================================
--- SwiftApps/modis/tutorial/modis06.swift 2013-08-02 01:16:36 UTC (rev 6704)
+++ SwiftApps/modis/tutorial/modis06.swift 2013-08-02 14:25:15 UTC (rev 6705)
@@ -22,11 +22,16 @@
colormodis @input @output;
}
+app (imagefile mon, file o, file e) assemble (file tiles, imagefile images[], string data_dir)
+{
+ assemble @filename(o) @filename(tiles) data_dir stdout=@filename(o) stderr=@filename(e);
+}
+
# Constants and command line arguments
int nFiles = @toInt(@arg("nfiles", "1000"));
int nSelect = @toInt(@arg("nselect", "10"));
string landType = @arg("landtype", "urban");
-string MODISdir = @arg("modisdir", "../data/modis/2002");
+string MODISdir = @arg("modisdir", "data/modis/2002");
# Input Dataset
imagefile geos[] <ext; exec="../bin/modis.mapper", location=MODISdir, suffix=".rgb", n=nFiles>;
@@ -55,5 +60,9 @@
}
# Assemble a montage of the top selected areas
-imagefile montage<"map.png">;
-assemble(selectedTiles,colorImage,webDir);
+imagefile montage<"map.png">; # @arg
+file assemble_olog <"logs/assemble.o.log">;
+file assemble_elog <"logs/assemble.e.log">;
+tracef("Calling assemble %s %s %s\n", @montage, @selectedTiles, @colorImage[0]);
+(montage, assemble_olog, assemble_elog) = assemble(selectedTiles, colorImage, "colorImages");
+
More information about the Swift-commit
mailing list