docs: def add_imt(fname, imt):
      """
      >>> add_imt('/path/to/hcurve_23.csv', 'SA(0.1)')
      '/path/to/hcurve-SA(0.1)_23.csv'
      """
      name = os.path.basename(fname)
      newname = re.sub(r'(_\d+\.)', '-%s\\1' % imt, name)
      return os.path.join(os.path.dirname(fname), newname)