Exemplo n.º 1
0
def anaMcNiCuKa(spc, det, stdBase, maxCh=1200):
  props=spc.getProperties()
  e0 = props.getNumericProperty(epq.SpectrumProperties.BeamEnergy)
  lt = props.getNumericProperty(epq.SpectrumProperties.LiveTime)
  pc = props.getNumericProperty(epq.SpectrumProperties.FaradayBegin)
  wkDst = props.getNumericProperty(epq.SpectrumProperties.WorkingDistance)
  spc = jmg.cropSpec(spc, end=maxCh)
  unSpc = jmg.updateCommonSpecProps(spc, det, liveTime=lt, probeCur=pc, e0=e0, wrkDist=wkDst)
  dt2.display(unSpc)
  
  # define the transitions I want to measure
  tsNiKa = epq.XRayTransitionSet(epq.Element.Ni, epq.XRayTransitionSet.K_FAMILY)
  tsCuKa = epq.XRayTransitionSet(epq.Element.Cu, epq.XRayTransitionSet.K_FAMILY)
  trs = [tsNiKa, tsCuKa]
  relStd = "/%gkV/" % (e0)
  stdDir = stdBase + relStd
  niFile = stdDir + "Ni-sim.msa"
  cuFile = stdDir + "Cu-sim.msa"

  spc = dt2.wrap(ept.SpectrumFile.open(niFile)[0])
  props=spc.getProperties()
  e0 = props.getNumericProperty(epq.SpectrumProperties.BeamEnergy)
  lt = props.getNumericProperty(epq.SpectrumProperties.LiveTime)
  pc = props.getNumericProperty(epq.SpectrumProperties.FaradayBegin)
  wkDst = props.getNumericWithDefault(epq.SpectrumProperties.WorkingDistance, wkDst)
  spc = jmg.cropSpec(spc, end=maxCh)
  niSpc = jmg.updateCommonSpecProps(spc, det, liveTime=lt, probeCur=pc, e0=e0, wrkDist=wkDst)
  dt2.display(niSpc)

  spc = dt2.wrap(ept.SpectrumFile.open(cuFile)[0])
  props=spc.getProperties()
  e0 = props.getNumericProperty(epq.SpectrumProperties.BeamEnergy)
  lt = props.getNumericProperty(epq.SpectrumProperties.LiveTime)
  pc = props.getNumericProperty(epq.SpectrumProperties.FaradayBegin)
  wkDst = props.getNumericWithDefault(epq.SpectrumProperties.WorkingDistance, wkDst)
  spc = jmg.cropSpec(spc, end=maxCh)
  cuSpc = jmg.updateCommonSpecProps(spc, det, liveTime=lt, probeCur=pc, e0=e0, wrkDist=wkDst)
  dt2.display(cuSpc)
  niStd = {"El":dt2.element("Ni"), "Spc":niSpc}
  cuStd = {"El":dt2.element("Cu"), "Spc":cuSpc}
  stds  = [niStd, cuStd]
  theKR = jmg.compKRs(unSpc, stds, trs, det, e0)
  krNiCalc = theKR[0]
  krCuCalc = theKR[1]
  return [krNiCalc, krCuCalc]
Exemplo n.º 2
0
# should not need to change below here...
#
wd = gitDir + edsRel + "/py"
os.chdir(wd)
pyrDir="testCorPC Results"

# start clean
DataManager.clearSpectrumList()


spcDir = gitDir + edsRel + "/spc"
unCuFi = spcDir + "/unCuSpc-12.spc"
rfCuFi = spcDir + "/rfCuSpc-12.spc"

rfCuSpc  = wrap(ept.SpectrumFile.open(rfCuFi)[0])
rfCuSpc  = jmg.updateCommonSpecProps(rfCuSpc, det, probeCur=1, e0=e0, wrkDist=wrkDist)
display(rfCuSpc)

unCuSpc  = wrap(ept.SpectrumFile.open(unCuFi)[0])
unCuSpc  = jmg.updateCommonSpecProps(unCuSpc, det, probeCur=1, e0=e0, wrkDist=wrkDist)
display(unCuSpc)

rpc = jmg.measProbeCurrentFromCu(unCuSpc, rfCuSpc, det, e0)
print(rpc["pcMu"])
print(rpc["pcSE"])

unCuSpc = jmg.updateCommonSpecProps(unCuSpc, det, probeCur=rpc["pcMu"], e0=e0, wrkDist=wrkDist)
display(unCuSpc)

rpc = jmg.measProbeCurrentFromCu(unCuSpc, rfCuSpc, det, e0)
print(rpc["pcMu"])
Exemplo n.º 3
0
e0       =    15 # kV
maxCh    =  1200

# define the transitions I want to measure
trs = [epq.XRayTransitionSet(epq.Element.Ni, epq.XRayTransitionSet.K_FAMILY),
epq.XRayTransitionSet(epq.Element.Cu, epq.XRayTransitionSet.K_FAMILY)]



cuFil = "C:/data/eds/CuNiSpc/dtsa-sim/corBulk/15kV/CuSim.msa"
niFil = "C:/data/eds/CuNiSpc/dtsa-sim/corBulk/15kV/Ni-Sim.msa"
unFil = "C:/data/eds/CuNiSpc/dtsa-sim/StrataGemNiCu/103-nm-Ni-on-198-nm-Cu-15-kV.msa"

spc = wrap(ept.SpectrumFile.open(niFil)[0])
spc = jmg.cropSpec(spc, end=maxCh)
niSpc = jmg.updateCommonSpecProps(spc, det, liveTime=liveTim, probeCur=probeCur, e0=e0, wrkDist=wrkDist)



import dtsa2.jmGen as jmg
ni  = material("Ni", density=8.90)
det=findDetector("FEI FIB620 EDAX-RTEM")
niSpc = jmg.simBulkSpcUnCor("Ni-sim", ni, det, e0=15, nTraj=100, lt=60, pc=1)
display(niSpc)






Exemplo n.º 4
0
eds = os.environ['EDS_ROOT']
spcDir = eds + "/CuPdSpc/qm-04062-3C3006/spc/stds/"

# the project directory
wd = git + "/OSImageAnalysis/dtsa2/other-macros/testScripts"
os.chdir(wd)
pyrDir = wd + "/testIntegrals Results/"


# start clean
DataManager.clearSpectrumList()

spcFil = spcDir + "Cu-15-1.spc"
cuSpc1  = wrap(ept.SpectrumFile.open(spcFil)[0])
liveTim = cuSpc1.getProperties().getNumericProperty(epq.SpectrumProperties.LiveTime)
cuSpc1  = jmg.updateCommonSpecProps(cuSpc1, det, liveTime=liveTim, probeCur=1, wrkDist=wrkDist)
display(cuSpc1)

spcFil = spcDir + "Cu-15-2.spc"
cuSpc2  = wrap(ept.SpectrumFile.open(spcFil)[0])
liveTim = cuSpc2.getProperties().getNumericProperty(epq.SpectrumProperties.LiveTime)
cuSpc2  = jmg.updateCommonSpecProps(cuSpc2, det, liveTime=liveTim, probeCur=1, wrkDist=wrkDist)
display(cuSpc2)

spcFil = spcDir + "Cu-15-3.spc"
cuSpc3  = wrap(ept.SpectrumFile.open(spcFil)[0])
liveTim = cuSpc3.getProperties().getNumericProperty(epq.SpectrumProperties.LiveTime)
cuSpc3  = jmg.updateCommonSpecProps(cuSpc3, det, liveTime=liveTim, probeCur=1, wrkDist=wrkDist)
display(cuSpc3)

eL = jmg.getLalphaEnergy("Cu")