conflux.FPYEngine ================= .. py:module:: conflux.FPYEngine .. autoapi-nested-parse:: Public modules. Classes ------- .. autoapisummary:: conflux.FPYEngine.FissionIstp conflux.FPYEngine.FPNuclide conflux.FPYEngine.FissionModel Module Contents --------------- .. py:class:: FissionIstp(Z, A, Ei, DB='ENDF', IFPY=False) Bases: :py:obj:`conflux.Basic.Spectrum` Class to handle all the Fission Nuclide Information. .. py:attribute:: Z :type: int The atomic number of isotope .. py:attribute:: A :type: int The atomic mass of isotope .. py:attribute:: Ei :type: float Incident neutron energy .. py:attribute:: IFPY :type: bool :value: False Whether to calculate independent fission product yields .. py:attribute:: FPYlist :type: dict Dictionary of cumulative or independent fission yields {"FPZAI", FPNuclide} .. py:attribute:: _DBtitle Dictionary of the two fission databases included in CONFLUX (can be downloaded using the file in the aux folder) .. py:method:: LoadFissionDB(Ei=None, DB='ENDF') Load fission product yeilds with given incident neutron energy. :param Ei: The incident neutron energy to ignite fission :type Ei: float :param DB: filename or names of default fission product databases, defaults to 'ENDF', alternative default DB is 'JEFF' :type DB: string, optional .. py:method:: LoadCovariance(DB='ENDF', percent=True) Read the prepackaged covariance csv file and calculate covariance matrix of fission product yields. This function should only be called after loading the fission DB for neutrino. :param DB: filename or names of default covariance of fission product, defaults to 'ENDF', alternative default DB is 'JEFF' :type DB: string, optional :param percent: let the function know whether the value in the data is percentage or fractional, defaults to True :type percent: bool, optional .. py:method:: LoadCorrelation(DB='ENDF') Read the prepackaged correlation csv file and calculate covariance matrix of fission product yields. This function should only be called after loading the fission DB for neutrino. :param DB: filename or names of default correlation of fission product, defaults to 'ENDF', alternative default DB is 'JEFF' :type DB: string, optional .. py:method:: CalcCovariance() Calculate the covariance matrix from inputted correlation information. This function is automatically called by :meth:`conflux.FPYEngine.FissionIsotope.LoadCovariance`. .. py:method:: CalcBetaSpectra(betaSpectraDB, processMissing=False, time=0, modelunc=True, silent=False) Calculate the summed beta/neutrino spectrum of this fission isotope. :param betaSpectraDB: the input beta engine that already calculated beta spectra from a given beta database :type betaSpectraDB: :class:`conflux.BetaEngine.BetaEngine` :param processMissing: Determine whether to include assummed spectrum calculated for missing branches in the beta database, defaults to False :type processMissing: bool, optional :param time: The time stamp (unit: second) of the IFP calculation. If time < 0, or the optional input is ignored, the engine will calculate neutrino spectra with CFP :type time: float, optional :param modelunc: Determine whether to include beta modeling uncertainty, defaults to True :type modelunc: bool, optional :param silent: whether to disable the tqdm output, defaults to False :type silent: bool, optional .. py:class:: FPNuclide(FPZAI, y, yerr) Class to save all fission product nuclides and their information. :param FPZAI: The identity of the fission products, contain Z, A, and isomeric state combined as Z*10000+A*10+I :type FPZAI: int :param y: The yeild of the fission product :type y: float :param yerr: The uncertainty of yield :type yerr: float .. py:attribute:: Z .. py:attribute:: A .. py:attribute:: N .. py:attribute:: isomer .. py:attribute:: FPZAI .. py:attribute:: y .. py:attribute:: cov .. py:attribute:: corr .. py:attribute:: yerr .. py:method:: Contribute(fraction, d_fraction=0) Add the fission yield of this nuclide to the total fission yield (called by the obsolete FissionModel class). :param fraction: The fractional contribution of this fission product to the overall reactor model :type fraction: float :param d_fraction: uncertainty of fraction, defaults to 0 :type d_fraction: TYPE, optional .. py:method:: AddCovariance(newNuclide) Add covariance relative to another fission product. :param newNuclide: another fission product :type newNuclide: :class:`conflux.FPYEngine.FPNuclide` .. py:class:: FissionModel(W=1.0) Build a fission reactor model with dictionary of all FPYs from all added `FissionIstp`s. (maybe obsolete) Attributes ---------- FPYlist : (dictionary) A dictionary of fission product yields. contains FissionIstps W : (int) The weight of this fission model Methods ------- AddContribution(isotope, Ei, fraction, d_fraction=0, IFP=False): Add all the daughter fission products associated with the given isotope into the FPYlist AddIstp(Z, A, fraction, isomer=0, d_frac=0.0): Add a specific fission product isotope into the FPYlist CustomCovariance(DBname, percent = False, rel = False): Method to load a customized covariance matrix into the model GetNuclide(ZAI): return nuclide ZAI < (ZAI = Atomic number, Atomic mass, Isomer number) SaveToFile(filename): save the Fission Product yields into a CSV file. DrawBranches(figname): Draw the branch fractions of associated with this fission model. .. py:attribute:: FPYlist .. py:attribute:: W :value: 1.0 .. py:method:: AddContribution(isotope, fraction, d_frac=0.0) Add the FPYs of a fission isotope into the the list of FPYs in the model Parameters: isotope (FissionIstp) : The fission isotope whose products you want to add to the model. Ei (float) : The neutron energy that is causing the fissions to occur (0.0, 0.4/0.5, 14) fraction (float) : The fractional contribution that this isotope has on the overall model d_frac (float) : The uncertainty in the contribution IFP (boolean) : determines whether to include the independant fission products in the model Returns: None .. py:method:: AddIstp(Z, A, fraction, isomer=0, d_frac=0.0) Adds a specific beta decaying isotope to the list of FPYs Parameters: Z (int) : The isotopes atomic number A (int) : The isotopes atomic weight fraction (float) : the fractional contribution this isotope has on the model isomer (int) : The isomeric number of this isotope d_frac (float) : The uncertainty in the fractional contribution Returns: None .. py:method:: CustomCovariance(DBname, percent=False, rel=False) Loads a user defined covariance matrix into the model. The loading of the covariance matrix into the model is very similar to the FissionIstp method LoadCovarianceDB Parameters: DBname (String) : The path to the user defined covariance csv file. has the format "/path/to/file" percent (boolean) : Determines whether the covarainces are relative or absolute rel (boolean) : Determines whether the product of the yields of each pair of isotopes is a value, or 1 Returns: None .. py:method:: GetNuclide(ZAI) Returns the nuclide information based on its' ZAI number Parameters: ZAI (int) : The ZAI number of the nuclide Returns: self.FPYlist[ZAI] (FissionNuclide) : The FissionNuclide associated with that ZAI number .. py:method:: SaveToFile(filename) A function that saves all FPYs into a CSV file for external use Parameters: filename (String) : The filename of the csv file you want to save Returns: None .. py:method:: DrawBranches(figname) Draw a histogram of the branch fractions for the model Parameters: figname (String) : The name of the image that will get generated Returns: None