code: def st_02413(n_slices, TR):
      """Ascend alternate every second slice, starting at first slice
  
      Collect slice 0 first, slice 2 second up to top.  Then return to collect
      slice 1, slice 3 etc.
  
      For example, for 5 slices and a TR of 1:
  
      >>> {name}(5, 1.)
      array([ 0. ,  0.6,  0.2,  0.8,  0.4])
  
      {pstr}
      """
      one_slice = TR / n_slices
      time_to_space = list(range(0, n_slices, 2)) + list(
          range(1, n_slices, 2)
      )
      space_to_time = np.argsort(time_to_space)
      return space_to_time * one_slice
  
file_path: nipy/nipy/algorithms/slicetiming/timefuncs.py
imports: import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: st_02413(n_slices, TR) and returns: unknown