Exemplo n.º 1
0
def suggestTransitionSets(mat, e0=20.0):
   """suggestTransitions(mat, e0=20.0)
   Suggest a list of XRayTransitionSet objects for the specified material."""
   mat = dtsa2.material(mat)
   fams = ("Ka", "Kb", "La", "Lb", "Ma", "Mb")   
   res = []
   for elm in mat.getElementSet():
      for fam in fams:
         xrts = dtsa2.getTransitionSet(elm, fam)
         removeMe = epq.XRayTransitionSet()
         if (xrts.size() > 0):
            for xrt in xrts:
               ee = epq.FromSI.keV(xrt.getEnergy())
               if (ee < 0.2) or (ee > 0.95 * e0):
                  removeMe.add(xrt)
            if removeMe.size() > 0:
               xrts.removeAll(removeMe)
            if xrts.size() > 0:
               res.append(xrts)
   return res
Exemplo n.º 2
0
nTraj = 100  # num Traj to run per pt 10000 for a long run
charF = True  # include characteristic fluorescence
bremF = True  # include continuum fluorescence
pc = 2.5  # nA
lt = 100.0  # sec
e0 = 15.0  # keV

dose = pc * lt  # nA sec
# start clean
DataManager.clearSpectrumList()

# create the materials
ag = material("Ag", density=10.5)

trs = [
    epq.XRayTransitionSet(epq.Element.Au, epq.XRayTransitionSet.L_ALPHA),
    epq.XRayTransitionSet(epq.Element.Cu, epq.XRayTransitionSet.K_ALPHA)
]

# start with bulk standards
#
# Au

auSpc = mc3.simulate(au,
                     det,
                     e0=e0,
                     dose=dose,
                     withPoisson=True,
                     nTraj=nTraj,
                     sf=charF,
                     bf=bremF,
Exemplo n.º 3
0
    sim.getProperties().setTextProperty(epq.SpectrumProperties.SpectrumComment,
                                        amcThickComment)
    return sim


start = time.time()

DataManager.clearSpectrumList()

c = material("C", density=2.266)
fe = material("Fe", density=7.86)
fe3c = material("Fe3C", density=4.93)

# only get FeL at 7 kV
trs = [
    epq.XRayTransitionSet(epq.Element.C, epq.XRayTransitionSet.K_FAMILY),
    epq.XRayTransitionSet(epq.Element.Fe, epq.XRayTransitionSet.L_FAMILY)
]

# First simulate the standards
# Start with C
startCycle = time.time()
c_std_spc = jm3.simBulkStd(c, det, e0, nTraj, lt=lt, pc=pc)
display(c_std_spc)
sName = "%s-std-%g-kV-%g-traj" % ("C", e0, nTraj)
fi = basePath + "/"
fi += sName
fi += ".msa"
if bSaveSpc == True:
    c_std_spc.save(fi)
endCycle = time.time()
Exemplo n.º 4
0
charF = True  # include characteristic fluorescence
bremF = True  # include continuum fluorescence cd ..
pc = 2.5  # nA
lt = 100.0  # sec
e0 = 3.0  # keV

dose = pc * lt  # nA sec
# start clean
DataManager.clearSpectrumList()

# create the materials
si = material("Si", density=2.32)
sic = material("SiC", density=3.21)

trs = [
    epq.XRayTransitionSet(epq.Element.C, epq.XRayTransitionSet.K_ALPHA),
    epq.XRayTransitionSet(epq.Element.O, epq.XRayTransitionSet.K_ALPHA),
    epq.XRayTransitionSet(epq.Element.Si, epq.XRayTransitionSet.K_ALPHA)
]

# start with bulk standards
#
# C

siSpc = mc3.simulate(si,
                     det,
                     e0=e0,
                     dose=dose,
                     withPoisson=True,
                     nTraj=nTraj,
                     sf=charF,
Exemplo n.º 5
0
lT = []  # will have t=0...
lPICmu = []  # an array for mean C peak integral
lPICuc = []  # an array for C peak integral uncertainty
lPISimu = []  # an array for mean Cu peak integral
lPISiuc = []  # an array for Cu peak integral uncertainty

# empty xtra-param
xp = {}

# empty x-ray transition set
xrts = []
# set a counter
iCount = 0

# get and add the C-K family
cTS = epq.XRayTransitionSet(epq.Element.C, epq.XRayTransitionSet.K_FAMILY)
cTrs = cTS.getTransitions()
for tr in cTrs:
    xrts.append(tr)

# get and add the Cu-L family
siTS = epq.XRayTransitionSet(epq.Element.Si, epq.XRayTransitionSet.K_FAMILY)
siTrs = siTS.getTransitions()
for tr in siTrs:
    xrts.append(tr)

xp.update(
    mc3.configureXRayAccumulators(xrts,
                                  charAccum=True,
                                  charFluorAccum=True,
                                  bremFluorAccum=True))