docs: def iodp_srm_lore(srm_file, dir_path=".", input_dir_path="",noave=False,comp_depth_key='Depth CSF-B (m)',\
                meas_file="srm_arch_measurements.txt", spec_file="srm_arch_specimens.txt",\
                   samp_file='srm_arch_samples.txt',site_file='srm_arch_sites.txt',lat="",lon=""):
      """
      Convert IODP archive half measurement files into MagIC file(s).
  
      Parameters
      ----------
      srm_file : str
          input csv file downloaded from LIMS online repository
      dir_path : str
          output directory, default "."
      input_dir_path : str
          input file directory IF different from dir_path, default ""
      meas_file : str
          output measurement file name, default "measurements.txt"
      spec_file : str
          specimens file name as output file - these specimens are not already in the specimen table
          created by iodp_samples_csv
      samp_file : str
         samples file name as output file - these  are not already in the specimen table
          created by iodp_samples_csv
      site_file : str
          sites file name as output file - these are not already in the samples table
      noave : Boolean
          if False, average replicate measurements
  
      Returns
      --------
      type - Tuple : (True or False indicating if conversion was sucessful, meas_file name written)
      """
      # initialize defaults
      version_num = pmag.get_version()
      # format variables
      input_dir_path, output_dir_path = pmag.fix_directories(input_dir_path, dir_path)
      # convert cc to m^3
      meas_reqd_columns=['specimen','measurement','experiment','sequence','quality','method_codes',\
                         'instrument_codes','citations',\
                         'treat_temp','treat_ac_field','treat_dc_field',\
                        'treat_dc_field_phi','treat_dc_field_theta','meas_temp',\
                        'dir_dec','dir_inc','magn_moment','magn_volume',\
                         'description','timestamp','software_packages',\
                         'external_database_ids','treat_step_num','meas_n_orient']
      srm_file = pmag.resolve_file_name(srm_file, input_dir_path)
      spec_file = pmag.resolve_file_name(spec_file, dir_path)
      in_df=pd.read_csv(srm_file,header=0)
      in_df.drop_duplicates(inplace=True)
      in_df.sort_values(by='Treatment Value',inplace=True)
      if len(in_df)==0:
          print ('you must download a csv file from the LIMS database and place it in your input_dir_path')
          return False
      measurements_df=pd.DataFrame(columns=meas_reqd_columns)
      meas_out = os.path.join(output_dir_path, meas_file)
      hole,srm_specimens=iodp_samples_srm(in_df, spec_file=spec_file,samp_file=samp_file,site_file=site_file,\
                                          dir_path=dir_path,input_dir_path=input_dir_path,\
                                          comp_depth_key=comp_depth_key,lat=lat,lon=lon)
      # assume only one hole
      # set up defaults
      measurements_df['specimen']=srm_specimens
      measurements_df['quality']='g'
      measurements_df['citations']='This study'
      measurements_df['meas_temp']=273
      measurements_df['software_packages']=version_num
      measurements_df["treat_temp"] = '%8.3e' % (273)  # room temp in kelvin
      measurements_df["meas_temp"] = '%8.3e' % (273)  # room temp in kelvin
      measurements_df["treat_ac_field"] = '0'
      measurements_df["treat_dc_field"] = '0'
      measurements_df["treat_dc_field_phi"] = '0'
      measurements_df["treat_dc_field_theta"] = '0'
      measurements_df["standard"] = 'u'  # assume all data are "good"
      measurements_df["dir_csd"] = '0'  # assume all data are "good"
      measurements_df["method_codes"] = 'LT-NO' # assume all are NRMs
      measurements_df['instrument_codes']="IODP-SRM" # assume all measurements on shipboard 2G
      measurements_df['treat_step_num']='0' # assign a number
      measurements_df['meas_n_orient']=1 # at least one orientation
      measurements_df['timestamp']=pd.to_datetime(\
                                 in_df['Timestamp (UTC)']).dt.strftime("%Y-%m-%dT%H:%M:%S")+'Z'
      measurements_df['dir_dec']=in_df['Declination background & drift corrected (deg)'] # declination
      measurements_df['dir_inc']=in_df['Inclination background & drift corrected (deg)'] # inclination
      measurements_df['magn_volume']=in_df['Intensity background & drift corrected (A/m)'] # magnetization
      Xs=in_df['Magnetic moment x (Am²)']
      Ys=in_df['Magnetic moment y (Am²)']
      Zs=in_df['Magnetic moment z (Am²)']
      magn_moment=np.sqrt(Xs**2+Ys**2+Zs**2)
      measurements_df['magn_moment']=magn_moment # moment in Am^2
      measurements_df['description']=in_df['Treatment Type'] # temporary column
      measurements_df['treat_ac_field']=in_df['Treatment Value']*1e-3 # assume all treatments are AF
      measurements_df.loc[measurements_df['description']=='IN-LINE AF DEMAG',\
                          'method_codes']='LT-AF-Z'
      measurements_df.loc[measurements_df['description']=='IN-LINE AF DEMAG',\
                          'instrument_codes']='IODP-SRM:IODP-SRM-AF'
      measurements_df['external_database_ids']='LORE['+in_df['Test No.'].astype('str')+']'
  
      measurements_df.fillna("",inplace=True)
      meas_dicts = measurements_df.to_dict('records')
      meas_dicts=pmag.measurements_methods3(meas_dicts,noave=noave)
      pmag.magic_write(meas_out, meas_dicts, 'measurements')
      return True