Hi all, thanks for the Sunday help.<br><br>I tried the simple mapper, but not go. <br>The short buggy SWIFT script is here:<br><a href="http://www.ci.uchicago.edu/~uhasson/AFNIsnrV3.swift">http://www.ci.uchicago.edu/~uhasson/AFNIsnrV3.swift</a><br>
<br>The input directory contains<br>S05.runbyrun.reg_TS_run-1+orig.BRIK<br>S05.runbyrun.reg_TS_run-1+orig.HEAD<br>S05.runbyrun.reg_TS_run-2+orig.BRIK<br>S05.runbyrun.reg_TS_run-2+orig.HEAD<br>S05.runbyrun.reg_TS_run-3+orig.BRIK<br>
S05.runbyrun.reg_TS_run-3+orig.HEAD<br><br>I hoped that as a result of the simple_mapper, <br>sruns[0].HEAD==S05.runbyrun.reg_TS_run-1+orig.HEAD<br>sruns[0].BRIK==S05.runbyrun.reg_TS_run-1+orig.BRIK<br>(I tried reading via both prefix and pattern methods in the mapper)<br>
<br>However, I get an error:<br>Execution failed:<br>        org.griphyn.vdl.mapping.InvalidPathException: Invalid path ([0]) for type AFNI_obj[]<br><br>log file:<br>/disks/gpfs/fmri/cnari/swift/projects/uhasson/AFNIflows/SNR/AFNIsnrV3-20080504-1826-37q86081.log<br>
<br>Also, is there any print() or trace() command I could use to see whether sruns was assigned the correct values? <br>I tried print(@filenames(sruns[0])), <br>print(@filename(sruns[0].HEAD))<br>but am not getting anything meaningful.<br>
<br>Best,<br>Uri<br><br><div class="gmail_quote">On Sun, May 4, 2008 at 5:31 PM, Ben Clifford <<a href="mailto:benc@hawaga.org.uk">benc@hawaga.org.uk</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
> E.g., if the directory contains<br>
><br>
> file1.Head file1.BRIK, file2.Head file2.BRIK<br>
><br>
> The mapper will map files to my complex type:<br>
> mytype t;<br>
> t[0].head = file1.HEAD<br>
> t[0].brik = file1.BRIK<br>
> t[1].head = file2.BRIK<br>
> t[1].brik = file2.BRIK<br>
> and I will be able to pass this to calls as MyCall(t[0])<br>
> [to the best of my understanding, I can achieve this now with csv mapper,<br>
> but not via any other way unless I write a custom mapper, java?]<br>
<br>
</div>You should be able to map this with simple_mapper too. Something like<br>
this:<br>
<br>
type t { file HEAD; file BRIK; }<br>
t inp[] <simple_mapper;prefix="file">;<br>
<div class="Ih2E3d"><br>
> But this doesn't take care of the other use of types that  I planned on,<br>
> which is using them as a placeholder for results of calls.<br>
<br>
</div>This bit I'll think about - similar, but not the same, stuff has been done<br>
before.<br>
<font color="#888888"><br>
--<br>
<br>
</font></blockquote></div><br>