[Swift-devel] CCA-11 Swift Poster Visitor's Questions

Daniel S. Katz dsk at ci.uchicago.edu
Thu Apr 14 05:51:14 CDT 2011


In the Montage presentation I have, I include the code (from Jon) that runs a simple version of Montage, and one of the wrapper examples, as follows.  This seems to me to be sufficiently complete for a talk.  I use two slides, one for the code, and one for the wrapper.




import {…}

MosaicData header <"header.hdr">;
Table images_tbl <"images.tbl">;
Image mosaic <"final/mosaic.fits">;
Image projected_images[];

Image raw_image_files[] <filesys_mapper; location = "raw_dir", suffix = ".fits">;
projected_images = mProjectBatch( raw_image_files, header );
images_tbl = mImgtbl( projected_images );
mosaic = mAdd( projected_images, images_tbl, header );


( Image proj_imgs[] ) mProjectBatch( Image raw_imgs[], MosaicData hdr )
{
    foreach img, i in raw_imgs
    {
        Image proj_img <regexp_mapper; source = @img, match = ".*\\/(.*)", transform = "proj_dir/proj_\\1">;
        proj_img = mProject( img, hdr );
        proj_imgs[ i ] = proj_img;
    }
}

app ( Image proj_img ) mProject( Image raw_img, MosaicData hdr )
{
    mProject "-X" @raw_img @proj_img @hdr;
}



On Apr 14, 2011, at 6:41 AM, Michael Wilde wrote:

> That seems a valid criticism that we should address.  In this case the entire script is fairly compact, so we could put the whole script on the poster and just enlarge the highlights shown here (and the mappings as well if desired).
> 
> We should move these to a new Case Studies section of the Swift web that we have long proposed.
> 
> The format can be a more visually interesting version of the annotated script walkthroughs that we put in the Parco paper. (By the way, at least one NCAR researcher was highly complementary of the Parco paper and said that it really clarified Swift for her).
> 
> - Mike
> 
> ----- Original Message -----
>>> -- The simplicity of script-code seems deceptive!?!
>> 
>> If that's refering to the script in the lower left corner, I guess it
>> omits a bunch of stuff. Whether that's "deceptive" is rather
>> subjective -
>> for example, its ommitting the mappings (which at one point were a big
>> part of the swift story). Now its probably ok to cough politely and
>> get
>> away with that for str_roots, but the code as given seems to assign
>> data_files[0] many times without it being clear from the fragment that
>> data_files[0] is going to be different each time round (presumably it
>> is?). Mapping often seems to be a user-effort-sink, so discarding them
>> and
>> then saying "easy!" is kinda cheeky...
>> 
>> _______________________________________________
>> Swift-devel mailing list
>> Swift-devel at ci.uchicago.edu
>> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
> 
> -- 
> Michael Wilde
> Computation Institute, University of Chicago
> Mathematics and Computer Science Division
> Argonne National Laboratory
> 
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel

-- 
Daniel S. Katz
University of Chicago
(773) 834-7186 (voice)
(773) 834-3700 (fax)
d.katz at ieee.org or dsk at ci.uchicago.edu
http://www.ci.uchicago.edu/~dsk/






More information about the Swift-devel mailing list