docs: def on_okButton(self, event):
          """
          meas_file # -f magic_measurements_file
          samp_file #-fsa er_samples_file
          age_file # -fa er_ages_file
          depth_scale # -ds scale
          dmin, dmax # -d 1 50  # depth to plot
          timescale, amin, amax (also sets pTS, pcol, width) =  # -ts scale min max
          sym, size # -sym symbol size
          method, step (also may set suc_key) # -LP protocol step
          pltDec (also sets pcol, pel, width)# -D (don't plot dec)
          pltInc (also sets pcol, pel, width)# -I (don't plot inc)
          pltMag (also sets pcol, pel, width)# -M (don't plot intensity)
          logit # -log ( plot log scale)
          fmt # -fmt format
          """
          def check_input_dir_path(input_dir_path, new_dir_path):
              if input_dir_path and input_dir_path != new_dir_path:
                  pw.simple_warning("Please make sure that all input files come from the same directory")
                  return False
              if not input_dir_path and new_dir_path:
                  return new_dir_path
              elif input_dir_path == new_dir_path:
                  return input_dir_path
  
          wait = wx.BusyInfo('Making plots, please wait...')
          wx.SafeYield()
  
          os.chdir(self.WD)
          input_dir_path = None
          meas_file = self.bSizer0.return_value()
          if meas_file:
              input_dir_path, meas_file = os.path.split(meas_file)
          pmag_spec_file = self.bSizer0a.return_value()
          if pmag_spec_file:
              new_dir_path, pmag_spec_file = os.path.split(pmag_spec_file)
              input_dir_path = check_input_dir_path(input_dir_path, new_dir_path)
              if not input_dir_path:
                  del wait
                  return False
          sum_file = self.bSizer2.return_value()
          if sum_file:
              new_dir_path, sum_file = os.path.split(sum_file)
              input_dir_path = check_input_dir_path(input_dir_path, new_dir_path)
              if not input_dir_path:
                  del wait
                  return False
  
          spec_sym, spec_sym_shape, spec_sym_color, spec_sym_size = "", "", "", ""
  
          if pmag_spec_file:
              # get symbol/size for dots
              spec_sym_shape = self.shape_choices_dict[self.bSizer0a2.return_value()]
              spec_sym_color = self.bSizer0a1.return_value()[0]
              spec_sym_size = self.bSizer0a3.return_value()
              spec_sym = str(spec_sym_color) + str(spec_sym_shape)
  
          use_sampfile = self.bSizer1a.return_value()
          if use_sampfile:
              new_dir_path, samp_file = os.path.split(str(self.bSizer1.return_value()))
              age_file = ''
              input_dir_path = check_input_dir_path(input_dir_path, new_dir_path)
              if not input_dir_path:
                  del wait
                  return False
          else:
              samp_file = ''
              new_dir_path, age_file = os.path.split(self.bSizer1.return_value())
              input_dir_path = check_input_dir_path(input_dir_path, new_dir_path)
              if not input_dir_path:
                  del wait
                  return False
  
          depth_scale = self.bSizer8.return_value()
          if age_file:
              depth_scale='age'
          elif depth_scale:
              depth_scale = 'sample_core_depth' #'mbsf'
          else:
              depth_scale = 'sample_composite_depth' #'mcd'
          dmin = self.bSizer6.return_value()
          dmax = self.bSizer7.return_value()
          if self.bSizer9.return_value(): # if plot GPTS is checked
              pltTime = 1
              timescale = self.bSizer10.return_value()
              amin = self.bSizer11.return_value()
              amax = self.bSizer12.return_value()
              if not amin or not amax:
                  del wait
                  pw.simple_warning("If plotting timescale, you must provide both a lower and an upper bound.\nIf you don't want to plot timescale, uncheck the 'Plot GPTS' checkbox")
                  return False
          else: # if plot GPTS is not checked
              pltTime, timescale, amin, amax = 0, '', -1, -1
          sym_shape = self.shape_choices_dict[self.bSizer5.return_value()]
          sym_color = self.bSizer4.return_value()[0]
          sym = sym_color + sym_shape
          size = self.bSizer5a.return_value()
          pltLine = self.bSizer5b.return_value()
          if pltLine:
              pltLine = 1
          else:
              pltLine = 0
          method = str(self.bSizer13.return_value())
          step = self.bSizer14.return_value()
          if not step:
              step = 0
              method = 'LT-NO'
          #if not step:
          #    #-LP [AF,T,ARM,IRM, X] step [in mT,C,mT,mT, mass/vol] to plot
          #    units_dict = {'AF': 'millitesla', 'T': 'degrees C', 'ARM': 'millitesla', 'IRM': 'millitesla', 'X': 'mass/vol'}
              #unit = units_dict[method]
              #pw.simple_warning("You must provide the experiment step in {}".format(unit))
              #return False
          pltDec, pltInc, pltMag, logit = 0, 0, 0, 0
          for val in self.bSizer3.return_value():
              if 'declination' in val:
                  pltDec = 1
              if 'inclination' in val:
                  pltInc = 1
              if 'magnetization' in val:
                  pltMag = 1
              if 'log' in val:
                  logit = 1
  
          #pltSus = self.bSizer15.return_value()
          #if pltSus:
          #    pltSus = 0
          #else:
          #    pltSus = 1
  
          fmt = self.bSizer16.return_value()
          #print "meas_file", meas_file, "pmag_spec_file", pmag_spec_file, "spec_sym_shape", spec_sym_shape, "spec_sym_color", spec_sym_color, "spec_sym_size", spec_sym_size, "samp_file", samp_file, "age_file", age_file, "depth_scale", depth_scale, "dmin", dmin, "dmax", dmax, "timescale", timescale, "amin", amin, "amax", amax, "sym", sym, "size", size, "method", method, "step", step, "pltDec", pltDec, "pltInc", pltInc, "pltMag", pltMag, "pltTime", pltTime, "logit", logit, "fmt", fmt
  
          # for use as module:
          #print "pltLine:", pltLine
          #print "pltSus:", pltSus
  
          fig, figname = ipmag.core_depthplot(input_dir_path or self.WD, meas_file, pmag_spec_file, samp_file, age_file, sum_file, '', depth_scale, dmin, dmax, sym, size, spec_sym, spec_sym_size, method, step, fmt, pltDec, pltInc, pltMag, pltLine, 1, logit, pltTime, timescale, amin, amax)
          if fig:
              self.Destroy()
              dpi = fig.get_dpi()
              pixel_width = dpi * fig.get_figwidth()
              pixel_height = dpi * fig.get_figheight()
              plot_frame = PlotFrame((pixel_width, pixel_height + 50), fig, figname)
              del wait
              return plot_frame
          else:
              del wait
              pw.simple_warning("No data points met your criteria - try again\nError message: {}".format(figname))
              return False
  
  
          # for use as command_line:
          if meas_file:
              meas_file = os.path.split(meas_file)[1]
          meas_file = pmag.add_flag(meas_file, '-f')
          if pmag_spec_file:
              pmag_spec_file = os.path.split(pmag_spec_file)[1]
          pmag_spec_file = pmag.add_flag(pmag_spec_file, '-fsp')
          pmag_spec_file = pmag_spec_file + ' ' + spec_sym_color + spec_sym_shape + ' ' + str(spec_sym_size)
          sym = '-sym ' + sym + ' ' + str(size)
          if samp_file:
              samp_file = os.path.split(samp_file)[1]
          samp_file = pmag.add_flag(samp_file, '-fsa')
          if age_file:
              age_file = os.path.split(age_file)[1]
          age_file = pmag.add_flag(age_file, '-fa')
          depth_scale = pmag.add_flag(depth_scale, '-ds')
          depth_range = ''
          if dmin and dmax:
              depth_range = '-d ' + str(dmin) + ' ' + str(dmax)
          if pltTime and amin and amax:
              timescale = '-ts ' + timescale + ' ' + str(amin) + ' ' + str(amax)
          else:
              timescale = ''
          method = pmag.add_flag(method, '-LP') + ' ' + str(step)
          #if not pltSus:
          #    pltSus = "-L"
          #else:
          #    pltSus = ''
          if not pltDec:
              pltDec = "-D"
          else:
              pltDec = ''
          if not pltInc:
              pltInc = "-I"
          else:
              pltInc = ''
          if not pltMag:
              pltMag = "-M"
          else:
              pltMag = ''
          if pltLine:
              pltLine = ""
          else:
              pltLine = '-L' # suppress line
          if logit:
              logit = "-log"
          else:
              logit = ''
          fmt = pmag.add_flag(fmt, '-fmt')
  
          COMMAND = "core_depthplot.py {meas_file} {pmag_spec_file} {sym} {samp_file} {age_file} {depth_scale} {depth_range} {timescale} {method} {pltDec} {pltInc} {pltMag} {logit} {fmt} {pltLine} -WD {WD}".format(meas_file=meas_file, pmag_spec_file=pmag_spec_file, sym=sym, samp_file=samp_file, age_file=age_file, depth_scale=depth_scale, depth_range=depth_range, timescale=timescale, method=method, pltDec=pltDec, pltInc=pltInc, pltMag=pltMag, logit=logit, fmt=fmt, pltLine=pltLine, WD=self.WD)
          print(COMMAND)
          #os.system(COMMAND)
  
  
          """
          haven't done these options yet
          wt_file (also sets norm)# -n specimen_filename
          spc_file, spc_sym, spc_size # -fsp spec_file symbol_shape symbol_size
          res_file, res_sym, res_size # -fres pmag_results_file symbol_shape symbol_size
          wig_file (also sets pcol, width) # -fwig wiggle_file(???)
          sum_file # -fsum IODP_core_summary_csv_file
  
          (sets plots & verbose) # -sav
          """