Functions | Variables
printscintfd Namespace Reference

Functions

def tot_weight (compos)
 
def tot_fractions (fs)
 
def elem_frac (compos, elem)
 
def elem_frac_total (elem, comps, fs)
 
def scintfd_composition ()
 

Variables

dictionary compositions
 
dictionary fractions
 

Function Documentation

def printscintfd.elem_frac (   compos,
  elem 
)

Definition at line 30 of file printscintfd.py.

References tot_weight().

Referenced by elem_frac_total().

30 def elem_frac(compos, elem):
31  if elem in compos:
32  return compos[elem] / tot_weight(compos)
33  else:
34  return 0
35 
def elem_frac(compos, elem)
Definition: printscintfd.py:30
def tot_weight(compos)
Definition: printscintfd.py:18
def printscintfd.elem_frac_total (   elem,
  comps,
  fs 
)

Definition at line 36 of file printscintfd.py.

References elem_frac(), and tot_fractions().

Referenced by scintfd_composition().

36 def elem_frac_total(elem, comps, fs):
37  frac = 0
38  for material, compos in comps.items():
39  frac += elem_frac(compos, elem) * fs[material]
40  return frac / tot_fractions(fs)
41 
def elem_frac(compos, elem)
Definition: printscintfd.py:30
def tot_fractions(fs)
Definition: printscintfd.py:24
def elem_frac_total(elem, comps, fs)
Definition: printscintfd.py:36
def printscintfd.scintfd_composition ( )

Definition at line 42 of file printscintfd.py.

References elem_frac_total(), and util.print_composition().

43 
44  the_composition = { }
45 
46  for elem in elemlist:
47  the_composition[elem] = elem_frac_total(elem, compositions, fractions)
48  return the_composition
49 
51 
def print_composition(composition)
Definition: util.py:55
def elem_frac_total(elem, comps, fs)
Definition: printscintfd.py:36
def scintfd_composition()
Definition: printscintfd.py:42
def printscintfd.tot_fractions (   fs)

Definition at line 24 of file printscintfd.py.

Referenced by elem_frac_total().

24 def tot_fractions(fs):
25  tions = 0
26  for material, fraction in fs.items():
27  tions += fraction
28  return tions
29 
def tot_fractions(fs)
Definition: printscintfd.py:24
def printscintfd.tot_weight (   compos)

Definition at line 18 of file printscintfd.py.

Referenced by elem_frac().

18 def tot_weight(compos):
19  weight = 0
20  for element, number in compos.items():
21  weight += number
22  return weight
23 
def tot_weight(compos)
Definition: printscintfd.py:18

Variable Documentation

dictionary printscintfd.compositions
Initial value:
1 = {
2  'air' : air_composition(),
3  'scint early': scint_composition_early(),
4  'scint late' : scint_composition_late(),
5 }
def air_composition()
Definition: air.py:49

Definition at line 5 of file printscintfd.py.

dictionary printscintfd.fractions
Initial value:
1 = {
2  # Mix in 300kg of air for the otherwise-unmodeled air bubbles.
3  # Distinct from dissolved gasses!
4  'air' : 300,
5  'scint early': 760497,
6  'scint late' : 7935040,
7 }

Definition at line 10 of file printscintfd.py.