parameters: (self, eaf=0)
docstring: Generate a pointwise PENDF file from the ENDF raw data using the
          MODER, RECONR, BROADR, PURR (if dilutions present), and THERMR
          modules. This is the starting point for all other datatype generations
          including DRAGLIB, ACE, WIMSD, etc.
  
          Parameters
          ----------
          eaf : int
              If eaf is 1, simplified processing is performed to be compatible
              with the EAF nuclear library.
docstring_summary: Generate a pointwise PENDF file from the ENDF raw data using the
          MODER, RECONR, BROADR, PURR (if dilutions present), and THERMR
          modules. This is the starting point for all other datatype generations
          including DRAGLIB, ACE, WIMSD, etc.
docstring_tokens: Generate a pointwise PENDF file from the ENDF raw data using the MODER RECONR BROADR PURR ( if dilutions present ) and THERMR modules . This is the starting point for all other datatype generations including DRAGLIB ACE WIMSD etc .
function: def pendf(self, eaf=0):
          """Generate a pointwise PENDF file from the ENDF raw data using the
          MODER, RECONR, BROADR, PURR (if dilutions present), and THERMR
          modules. This is the starting point for all other datatype generations
          including DRAGLIB, ACE, WIMSD, etc.
  
          Parameters
          ----------
          eaf : int
              If eaf is 1, simplified processing is performed to be compatible
              with the EAF nuclear library.
  
          """
  
          print(" --- make pendf for " + self.hmat + " ---")
          mycwd = os.getcwd()
          mynjoy = mycwd + '/' + self.execdir + "/xnjoy<file_data"
          if not os.path.isfile(os.path.expandvars(self.evaluation_file)):
              raise PyNjoyError("evaluation file " + self.evaluation_file + 
                                " not found")
          if not os.path.isdir(self.evaluation_name):
              os.mkdir(self.evaluation_name)
          os.chdir(self.evaluation_name)
          textdil = ""
          if self.dilutions:
              nbdil = len(self.dilutions)
              if nbdil > 10:
                  raise PyNjoyError("cannot have more than 10 dilutions")
              for dil in self.dilutions:
                  textdil += " %E" % dil
          else:
              nbdil = 0
          nbtmp = len(self.temperatures)
          if nbtmp > 10:
              raise PyNjoyError("cannot have more than 10 temperatures")
          texttmp = ""
          for tmp in self.temperatures:
              texttmp += " %E" % tmp
  
          matsab_inc = 221
          nbatoms = 1
          elasopt = 0
          if self.scattering_law:
              if self.scattering_mat == 1:
                  # Hydrogen in H20
                  nbatoms = 2
                  matsab_inc = 222
              elif self.scattering_mat == 7:
                  # Hydrogen in ZrH
                  nbatoms = 2
                  elasopt = 1
                  matsab_inc = 225
              elif self.scattering_mat == 11:
                  # Hydrogen in D20
                  nbatoms = 2
                  matsab_inc = 228
              elif self.scattering_mat == 26:
                  # Beryllium metal
                  elasopt = 1
                  matsab_inc = 231
              elif self.scattering_mat == 27:
                  # Beryllium in BeO 
                  nbatoms = 2
                  elasopt = 1
                  matsab_inc = 233
              elif self.scattering_mat == 31:
                  # Graphite
                  elasopt = 1
                  matsab_inc = 229
              elif self.scattering_mat == 37:
                  # Hydrogen in CH2
                  nbatoms = 2
                  matsab_inc = 223
              elif self.scattering_mat == 40:
                  # Hydrogen in C6H6 (benzine)
                  nbatoms = 2
                  matsab_inc = 227
              elif self.scattering_mat == 58:
                  # Zirconium in ZrH
                  nbatoms = 2
                  elasopt = 1
                  matsab_inc = 235
              unitlaw = -27
              matlaw = self.scattering_mat
              typelaw = 4
              os.system("ln -s " + self.scattering_law + " tape26")
          else:
              unitlaw = 0
              matlaw = 0
              typelaw = 1
              nbatoms = 1
              elasopt = 0
          htime = time.ctime(time.time())
          self.__dict__.update({"textdil": textdil, "nbdil": nbdil,
                                "texttmp": texttmp, "nbtmp": nbtmp,  
                                "unitlaw": unitlaw, "matlaw": matlaw,
                                "typelaw": typelaw, "nbatoms": nbatoms,
                                "elasopt": elasopt, "htime": htime,
                                "matsab_inc" : matsab_inc})
  
          if self.scattering_law:
              text_data = "moder\n20 -21\nmoder\n26 -27\n"
          else:
              text_data = "moder\n20 -21\n"
          text_data += (
              "reconr\n-21 -22\n'pendf tape from %(evaluation_name)s'/\n"
              "%(mat)d 1/\n0.001  0.  0.005/\n"
              "'%(hmat)s from %(evaluation_name)s at %(htime)s' /\n0/\n"
              "broadr\n-21 -22 -23\n%(mat)d %(nbtmp)d/\n0.001/\n"
              "%(texttmp)s/\n0/\n" % self.__dict__)
          if self.dilutions and self.purr:
              text_data +=  (
                  "purr\n-21 -23 -24\n%(mat)d %(nbtmp)d %(nbdil)d 20 32/\n"
                  "%(texttmp)s/\n%(textdil)s/\n0/\n" % self.__dict__)
          elif self.dilutions:
              text_data +=  (
                  "unresr\n-21 -23 -24\n%(mat)d %(nbtmp)d %(nbdil)d 1/\n"
                  "%(texttmp)s/\n%(textdil)s/\n0/\n" % self.__dict__)
          if self.dilutions:
              text_data +=  (
                  "thermr\n0 -24 -35\n0 %(mat)d 16 %(nbtmp)d %(typelaw)d 0 "
                  "%(nbatoms)d 221 0\n%(texttmp)s/\n0.001 4.0\nmoder\n-35 29\n"
                  "stop\n" % self.__dict__)
          else:
              if self.scattering_law:
                  text_data +=  (
                      "thermr\n%(unitlaw)d -23 -35\n%(matlaw)d %(mat)d 16 "
                      "%(nbtmp)d %(typelaw)d %(elasopt)d %(nbatoms)d "
                      "%(matsab_inc)d 0/\n%(texttmp)s/\n0.001 4.0\n"
                      "moder\n-35 29\nstop\n" % self.__dict__)
              elif eaf == 0:
                  text_data +=  (
                      "thermr\n0 -23 -35\n0 %(mat)d 16 %(nbtmp)d "
                      "%(typelaw)d 0 %(nbatoms)d 221 0\n%(texttmp)s/\n"
                      "0.001 4.0\nmoder\n-35 29\nstop\n" % self.__dict__)
              else:
                  text_data +=  (
                      "moder\n-23 29\nstop\n" % self.__dict__)
          file_data = open("file_data",'w')
          file_data.write(text_data)
          file_data.close()
          os.system("ln -s " + self.evaluation_file + " tape20")
          os.system(mynjoy)
          os.system("mv tape29 pendf" + self.hmat)
          os.system("mv file_data file_data_pendf" + self.hmat)
          os.system("mv output out_pendf_" + self.hmat)
          os.system("chmod 644 out_pendf_" + self.hmat)
          for file_name in os.listdir(os.getcwd()):
              if file_name[:4] == 'tape':
                  os.remove(file_name)
          os.chdir(mycwd)
function_tokens: def pendf ( self , eaf = 0 ) : print ( " --- make pendf for " + self . hmat + " ---" ) mycwd = os . getcwd ( ) mynjoy = mycwd + '/' + self . execdir + "/xnjoy<file_data" if not os . path . isfile ( os . path . expandvars ( self . evaluation_file ) ) : raise PyNjoyError ( "evaluation file " + self . evaluation_file + " not found" ) if not os . path . isdir ( self . evaluation_name ) : os . mkdir ( self . evaluation_name ) os . chdir ( self . evaluation_name ) textdil = "" if self . dilutions : nbdil = len ( self . dilutions ) if nbdil > 10 : raise PyNjoyError ( "cannot have more than 10 dilutions" ) for dil in self . dilutions : textdil += " %E" % dil else : nbdil = 0 nbtmp = len ( self . temperatures ) if nbtmp > 10 : raise PyNjoyError ( "cannot have more than 10 temperatures" ) texttmp = "" for tmp in self . temperatures : texttmp += " %E" % tmp matsab_inc = 221 nbatoms = 1 elasopt = 0 if self . scattering_law : if self . scattering_mat == 1 : # Hydrogen in H20 nbatoms = 2 matsab_inc = 222 elif self . scattering_mat == 7 : # Hydrogen in ZrH nbatoms = 2 elasopt = 1 matsab_inc = 225 elif self . scattering_mat == 11 : # Hydrogen in D20 nbatoms = 2 matsab_inc = 228 elif self . scattering_mat == 26 : # Beryllium metal elasopt = 1 matsab_inc = 231 elif self . scattering_mat == 27 : # Beryllium in BeO  nbatoms = 2 elasopt = 1 matsab_inc = 233 elif self . scattering_mat == 31 : # Graphite elasopt = 1 matsab_inc = 229 elif self . scattering_mat == 37 : # Hydrogen in CH2 nbatoms = 2 matsab_inc = 223 elif self . scattering_mat == 40 : # Hydrogen in C6H6 (benzine) nbatoms = 2 matsab_inc = 227 elif self . scattering_mat == 58 : # Zirconium in ZrH nbatoms = 2 elasopt = 1 matsab_inc = 235 unitlaw = - 27 matlaw = self . scattering_mat typelaw = 4 os . system ( "ln -s " + self . scattering_law + " tape26" ) else : unitlaw = 0 matlaw = 0 typelaw = 1 nbatoms = 1 elasopt = 0 htime = time . ctime ( time . time ( ) ) self . __dict__ . update ( { "textdil" : textdil , "nbdil" : nbdil , "texttmp" : texttmp , "nbtmp" : nbtmp , "unitlaw" : unitlaw , "matlaw" : matlaw , "typelaw" : typelaw , "nbatoms" : nbatoms , "elasopt" : elasopt , "htime" : htime , "matsab_inc" : matsab_inc } ) if self . scattering_law : text_data = "moder\n20 -21\nmoder\n26 -27\n" else : text_data = "moder\n20 -21\n" text_data += ( "reconr\n-21 -22\n'pendf tape from %(evaluation_name)s'/\n" "%(mat)d 1/\n0.001  0.  0.005/\n" "'%(hmat)s from %(evaluation_name)s at %(htime)s' /\n0/\n" "broadr\n-21 -22 -23\n%(mat)d %(nbtmp)d/\n0.001/\n" "%(texttmp)s/\n0/\n" % self . __dict__ ) if self . dilutions and self . purr : text_data += ( "purr\n-21 -23 -24\n%(mat)d %(nbtmp)d %(nbdil)d 20 32/\n" "%(texttmp)s/\n%(textdil)s/\n0/\n" % self . __dict__ ) elif self . dilutions : text_data += ( "unresr\n-21 -23 -24\n%(mat)d %(nbtmp)d %(nbdil)d 1/\n" "%(texttmp)s/\n%(textdil)s/\n0/\n" % self . __dict__ ) if self . dilutions : text_data += ( "thermr\n0 -24 -35\n0 %(mat)d 16 %(nbtmp)d %(typelaw)d 0 " "%(nbatoms)d 221 0\n%(texttmp)s/\n0.001 4.0\nmoder\n-35 29\n" "stop\n" % self . __dict__ ) else : if self . scattering_law : text_data += ( "thermr\n%(unitlaw)d -23 -35\n%(matlaw)d %(mat)d 16 " "%(nbtmp)d %(typelaw)d %(elasopt)d %(nbatoms)d " "%(matsab_inc)d 0/\n%(texttmp)s/\n0.001 4.0\n" "moder\n-35 29\nstop\n" % self . __dict__ ) elif eaf == 0 : text_data += ( "thermr\n0 -23 -35\n0 %(mat)d 16 %(nbtmp)d " "%(typelaw)d 0 %(nbatoms)d 221 0\n%(texttmp)s/\n" "0.001 4.0\nmoder\n-35 29\nstop\n" % self . __dict__ ) else : text_data += ( "moder\n-23 29\nstop\n" % self . __dict__ ) file_data = open ( "file_data" , 'w' ) file_data . write ( text_data ) file_data . close ( ) os . system ( "ln -s " + self . evaluation_file + " tape20" ) os . system ( mynjoy ) os . system ( "mv tape29 pendf" + self . hmat ) os . system ( "mv file_data file_data_pendf" + self . hmat ) os . system ( "mv output out_pendf_" + self . hmat ) os . system ( "chmod 644 out_pendf_" + self . hmat ) for file_name in os . listdir ( os . getcwd ( ) ) : if file_name [ : 4 ] == 'tape' : os . remove ( file_name ) os . chdir ( mycwd )