code: def write_acceptance_criteria_to_file(self):
          
          crit_list = list(self.acceptance_criteria.keys())
          crit_list.sort()
          rec = {}
          rec['pmag_criteria_code'] = "ACCEPT"
          # rec['criteria_definition']=""
          rec['criteria_definition'] = "acceptance criteria for study"
          rec['er_citation_names'] = "This study"
  
          for crit in crit_list:
              if type(self.acceptance_criteria[crit]['value']) == str:
                  if self.acceptance_criteria[crit]['value'] != "-999" and self.acceptance_criteria[crit]['value'] != "":
                      rec[crit] = self.acceptance_criteria[crit]['value']
              elif type(self.acceptance_criteria[crit]['value']) == int:
                  if self.acceptance_criteria[crit]['value'] != -999:
                      rec[crit] = "%.i" % (
                          self.acceptance_criteria[crit]['value'])
              elif type(self.acceptance_criteria[crit]['value']) == float:
                  if float(self.acceptance_criteria[crit]['value']) == -999:
                      continue
                  decimal_points = self.acceptance_criteria[crit]['decimal_points']
                  if decimal_points != -999:
                      command = "rec[crit]='%%.%sf'%%(self.acceptance_criteria[crit]['value'])" % (
                          decimal_points)
                      exec(command)
                  else:
                      rec[crit] = "%e" % (
                          self.acceptance_criteria[crit]['value'])
          pmag.magic_write(os.path.join(self.WD, "pmag_criteria.txt"), [
                           rec], "pmag_criteria")
docs: Writes current GUI acceptance criteria to criteria.txt or
          pmag_criteria.txt depending on data model