docs: def iodp_jr6_lore(jr6_file, dir_path=".", input_dir_path="",volume=7,noave=False,dc_field=50e-6,\
                meas_file="measurements.txt", spec_file="specimens.txt"):
      """
      Convert IODP JR6 measurement files in MagIC file(s). This program
      assumes that you have created the specimens, samples, sites and location
      files using convert_2_magic.iodp_samples_csv from files downloaded from the LIMS online
      repository and that all samples are in that file.
  
      Parameters
      ----------
      jr6_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 created by, for example, convert_2_magic.iodp_samples_csv, default "specimens.txt"
          file should already be in dir_path
      volume : float
          volume in cm^3 assumed during measurement on SRM.  The so-called "Japanese" cubes have a volume of 7cc
      noave : Boolean
           if False, average replicate measurements
      dc_field : float
          if ARM measurements are in the file, this was the DC bias field applied
  
      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
      volume = volume * 1e-6
      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']
      jr6_file = pmag.resolve_file_name(jr6_file, input_dir_path)
      spec_file = pmag.resolve_file_name(spec_file, dir_path)
      specimens_df=pd.read_csv(spec_file,sep='\t',header=1)
      if len(specimens_df)==0:
          print ('you must download and process the samples table from LORE prior to using this')
          print ('see convert_2_magic.iodp_samples_csv for help')
          return False
      LORE_specimens=list(specimens_df.specimen.unique())
      measurements_df=pd.DataFrame(columns=meas_reqd_columns)
      meas_out = os.path.join(output_dir_path, meas_file)
      citations = "This study"
      in_df=pd.read_csv(jr6_file)
      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
      in_df.sort_values(by='Treatment value (mT or °C or ex. B14)',inplace=True)
      hole,jr6_specimens=iodp_sample_names(in_df)
      for spec in list(jr6_specimens.unique()):
          if spec not in LORE_specimens:
              print (spec, ' not found in sample table')
      # set up defaults
      measurements_df['specimen']=jr6_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["treat_step_num"] = 1
      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-JR6" # assume all measurements on shipboard JR6
      measurements_df['timestamp']=pd.to_datetime(\
                                 in_df['Timestamp (UTC)']).dt.strftime("%Y-%m-%dT%H:%M:%S")+'Z'
      # use the sample coordinates, assume was placed correctly in the JR6 and use az=0,pl=-90 to
      # put into 'geographic' coordinates
      incs=in_df['Inclination (°)'].values
      decs=in_df['Declination (°)'].values
      azs=np.ones(len(decs))*0
      pls=np.ones(len(decs))*-90
      geo=np.vstack((decs,incs,azs,pls)).transpose()
      drot,irot=pmag.dogeo_V(geo)
  
      measurements_df['dir_dec']=drot # declination
      measurements_df['dir_inc']=irot # inclination
      measurements_df['magn_volume']=in_df['Intensity raw (A/m)'] # magnetization
      measurements_df['magn_moment']=measurements_df['magn_volume']*volume # moment in Am^2
      measurements_df['description']=in_df['Treatment type']
      measurements_df['treat_ac_field']=in_df['Treatment value (mT or °C or ex. B14)']*1e-3 # initialize all treatments to AF in mT
      measurements_df.loc[measurements_df['description']=='AD',\
                          'method_codes']='LT-AF-Z'
      measurements_df.loc[measurements_df['description']=='AD',\
                          'instrument_codes']='IODP-JR6:IODP-D2000'
      measurements_df.loc[measurements_df['description']=='ARM',\
                          'method_codes']='LT-AF-I'
      measurements_df.loc[measurements_df['description']=='ARM',\
                          'instrument_codes']='IODP-JR6:IODP-D2000'
      measurements_df.loc[measurements_df['description']=='ARM',"treat_dc_field"] = dc_field #
      measurements_df['external_database_ids']='LORE['+in_df['Test No.'].astype('str')+']'
  # add these later when controlled vocabs implemented
      measurements_df.loc[measurements_df['description']=='TD','method_codes']='LT-T-Z'
      measurements_df.loc[measurements_df['description']=='TD',\
                          'instrument_codes']='IODP-SRM:IODP-TDS'
      measurements_df.loc[measurements_df['description']=='TD',"treat_temp"] =\
                          in_df['Treatment value (mT or °C or ex. B14)']+273
      #measurements_df.loc[measurements_df['description']=='IRM','method_codes']='LT-IRM'
      #measurements_df.loc[measurements_df['description']=='IRM',\
         #                 'instrument_codes']='IODP-SRM:IODP-IRM'
  
      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