docs: def on_okButton(self, event):
          """
          Complies information input in GUI into a kwargs dictionary which can
          be passed into the utrecht_magic script and run to output magic files
          """
          os.chdir(self.WD)
          options_dict = {}
          wd = self.WD
          options_dict['dir_path'] = wd
          full_file = self.bSizer0.return_value()
          if not full_file:
              pw.simple_warning('You must provide a Utrecht format file')
              return False
          input_directory, Utrecht_file = os.path.split(full_file)
          options_dict['mag_file'] = Utrecht_file
          options_dict['input_dir_path'] = input_directory
          if input_directory:
              ID = "-ID " + input_directory
          else:
              ID = ''
          outfile = Utrecht_file + ".magic"
          options_dict['meas_file'] = outfile
          samp_outfile = Utrecht_file[:Utrecht_file.find('.')] + "_er_samples.txt"
          options_dict['samp_file'] = samp_outfile
          spec_outfile = Utrecht_file[:Utrecht_file.find('.')] + "_er_specimens.txt"
          options_dict['spec_file'] = spec_outfile
          site_outfile = Utrecht_file[:Utrecht_file.find('.')] + "_er_sites.txt"
          options_dict['site_file'] = site_outfile
          dc_flag,dc_params = '',''
          if self.bSizer6.return_value() != '':
              dc_params = list(map(float,self.bSizer6.return_value().split()))
              options_dict['dc_params'] = dc_params
              dc_flag = '-dc'
          spec_num = self.bSizer3.return_value()
          options_dict['specnum'] = spec_num
          if spec_num:
              spec_num = "-spc " + str(spec_num)
          else:
              spec_num = "-spc 0" # defaults to 0 if user doesn't choose number
          loc_name = self.bSizer4.return_value()
          options_dict['location_name'] = loc_name
          if loc_name:
              loc_name = "-loc " + loc_name
          ncn = self.bSizer2.return_value()
          options_dict['samp_con'] = ncn
          particulars = self.bSizer1.return_value()
          options_dict['meth_code'] = particulars
          if particulars:
              particulars = "-mcd " + particulars
          euro_date = self.bSizer7.return_value()
          if euro_date: options_dict['dmy_flag'] = True; dmy_flag='-dmy'
          else: options_dict['dmy_flag'] = False; dmy_flag=''
          try: site_lat,site_lon = self.bSizer8.return_value().split()
          except ValueError: site_lat,site_lon = '',''
          options_dict['site_lat'] = site_lat
          options_dict['site_lon'] = site_lon
          replicate = self.bSizer5.return_value()
          if replicate:
              options_dict['avg'] = False
              replicate = ''
          else:
              options_dict['avg'] = True
              replicate = '-A'
  
          COMMAND = "cit_magic.py -WD {} -f {} -F {} {} {} {} -ncn {} {} -Fsp {} -Fsi {} -Fsa {} {} {} {} {} -lat {} -lon {}".format(wd, Utrecht_file, outfile, particulars, spec_num, loc_name, ncn, ID, spec_outfile, site_outfile, samp_outfile, replicate, dc_flag, dc_params, dmy_flag, site_lon, site_lat)
          # to run as module:
          program_ran, error_message = utrecht_magic.main(command_line=False, **options_dict)
          if program_ran:
              pw.close_window(self, COMMAND, outfile)
          else:
              pw.simple_warning(error_message)