File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -278,13 +278,16 @@ def _list_outputs(self):
278
278
cwd = base_path )
279
279
outputs ['out_movpar' ] = self ._gen_fname (base , suffix = '_movpar' ,
280
280
ext = '.txt' , cwd = base_path )
281
- n_vols = nb .load (self .inputs .in_file ).shape [- 1 ]
282
281
283
- outputs ['out_warps' ] = [os .path .abspath (self .inputs .out_warp_prefix + "_%02d" % (i + 1 ) + Info .output_type_to_ext (self .inputs .output_type )) for i in range (n_vols )]
284
- outputs ['out_jacs' ] = [os .path .abspath (
285
- self .inputs .out_jac_prefix + "_%02d" % (
286
- i + 1 ) + Info .output_type_to_ext (self .inputs .output_type )) for i in
287
- range (n_vols )]
282
+ n_vols = nb .load (self .inputs .in_file ).shape [- 1 ]
283
+ ext = Info .output_type_to_ext (self .inputs .output_type )
284
+ fmt = os .path .abspath ('{prefix}_{i:02d}{ext}' ).format
285
+ outputs ['out_warps' ] = [
286
+ fmt (prefix = self .inputs .out_warp_prefix , i = i , ext = ext )
287
+ for i in range (1 , n_vols + 1 )]
288
+ outputs ['out_jacs' ] = [
289
+ fmt (prefix = self .inputs .out_jac_prefix , i = i , ext = ext )
290
+ for i in range (1 , n_vols + 1 )]
288
291
289
292
if isdefined (self .inputs .encoding_direction ):
290
293
outputs ['out_enc_file' ] = self ._get_encfilename ()
You can’t perform that action at this time.
0 commit comments