code: def _parse_motion(block, **kwargs):
      
      _, fa_length, time_step, name, fmt = parse_fixed_width(
          [(5, int), (5, int), (10, float), (30, to_str), (30, to_str)], block)
  
      scale, pga, _, header_lines, _ = parse_fixed_width(
          3 * [(10, to_float)] + 2 * [(5, int)], block)
  
      m = re.search(r'(\d+)\w(\d+)\.\d+', fmt)
      count_per_line = int(m.group(1))
      width = int(m.group(2))
  
      fname = os.path.join(os.path.dirname(kwargs['fname']), name)
      accels = np.genfromtxt(
          fname,
          delimiter=(count_per_line * [width]),
          skip_header=header_lines, )
  
      if np.isfinite(scale):
          pass
      elif np.isfinite(pga):
          scale = pga / np.abs(accels).max()
      else:
          scale = 1.
  
      accels *= scale
      m = motion.TimeSeriesMotion(fname, '', time_step, accels, fa_length)
  
      return m
docs: Parse motin specification block.