Author Topic: Penepma defocused beam  (Read 5604 times)

Ben Buse

  • Professor
  • ****
  • Posts: 498
Penepma defocused beam
« on: November 26, 2015, 05:36:17 AM »
Hi All,

I'm just running penepma for defocused beam to determine radial x-ray distributions. As I understand it the beam size is determined by the beam aperture.



Therefore the beam size should be calculated as follows.

Beam starts 1 cm above sample. So to generate a 5um beam - radius is 2.5um or 2.5e-4cm.

Therefore using trigonometry: The adjacent is 1 cm, the opposite is 2.5e-4 and theta (or beam aperature) is  Tan-1(opp/adj).



It seems to work I've looked at radial distributions for 5kV at 5um, 10um and 15um. Xrays come from the same volume as the spot size but no bigger -not sure this is right?. See below. I would expected it to be the beam size plus the size of the interaction volume at 0 nm beam. But maybe my expectations are wrong?



I've run the simulations for 15 min and 8 hrs and seem to give good agreement.

Also there seems to various versions of penepma around some of which you can specify probe diameter using SDIAM (as in Philippe Pinard pypenelope)  but this does not work with the calczaf penepma

Thanks

Ben
« Last Edit: November 26, 2015, 07:44:29 AM by John Donovan »

Philippe Pinard

  • Post Doc
  • ***
  • Posts: 22
Re: Penepma defocused beam
« Reply #1 on: November 26, 2015, 05:49:00 AM »
Hi Ben,

Yes I specifically modified PENEPMA to add an actual Gaussian beam diameter which keeps the electron beam perpendicular to the sample surface.

Phil
« Last Edit: November 26, 2015, 07:44:41 AM by John Donovan »

Probeman

  • Emeritus
  • *****
  • Posts: 2856
  • Never sleeps...
    • John Donovan
Re: Penepma defocused beam
« Reply #2 on: November 26, 2015, 08:24:23 AM »
Also there seems to various versions of penepma around some of which you can specify probe diameter using SDIAM (as in Philippe Pinard pypenelope)  but this does not work with the calczaf penepma

Hi Ben,
That is correct.  There are many options in the Penepma input file as seen here:

TITLE  Cu bulk 20 keV, simulation of Cu Ka line 
       .
       >>>>>>>> Electron beam definition.
SENERG 15e3                      [Energy of the electron beam, in eV]
SPOSIT 0 0 1                     [Coordinates of the electron source]
SDIREC 180 0              [Direction angles of the beam axis, in deg]
SAPERT 0                                      [Beam aperture, in deg]
       .
       >>>>>>>> Material data and simulation parameters.
MFNAME epma.mat                       [Material file, up to 20 chars]
MSIMPA 1.0e3 1.0e3 1e3 0.1 0.1 1e3 1e3      [EABS(1:3),C1,C2,WCC,WCR]
       .
       >>>>>>>> Geometry of the sample.
GEOMFN bulk.geo                  [Geometry definition file, 20 chars]
DSMAX  1 1.5e-2             [IB, Maximum step length (cm) in body IB]
       .
       >>>>>>>> Interaction forcing.
IFORCE 1 1 4 -10    0.1 1.0           [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 1 1 5 -400   0.1 1.0           [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
       .
       >>>>>>>> Photon detectors (up to 10 different detectors).
PDANGL 45 55  0 360 0                  [Angular window, in deg, IPSF]
PDENER 0   20e3 1000                 [Energy window, no. of channels]
       .
       >>>>>>>> Job properties
RESUME dump1.dat               [Resume from this dump file, 20 chars]
DUMPTO dump1.dat                  [Generate this dump file, 20 chars]
DUMPP  120                                   [Dumping period, in sec]
       .
NSIMSH 2.0e9                    [Desired number of simulated showers]
TIME   1.0e5                       [Allotted simulation time, in sec]


My main focus with Penepma has been on x-ray emission for bulk matrix quantification, as opposed to electron trajectory/distribution studies, so I settled on what you see in the CalcZAF/Standard/Penepma GUI as seen here:

http://probesoftware.com/smf/index.php?topic=202.msg1519#msg1519

More parameters could be added to the GUI of course, that said there is a beam aperture (in degrees) that can be specified (SAPERT). But if Philippe's GUI already contains a parameter for beam diameter (and is implemented in the Penepma FORTRAN), you should be OK.

But what exactly are you try to determine?
john
« Last Edit: November 26, 2015, 08:49:06 AM by Probeman »
The only stupid question is the one not asked!

Ben Buse

  • Professor
  • ****
  • Posts: 498
Re: Penepma defocused beam
« Reply #3 on: December 02, 2015, 03:30:15 AM »
Hi Phil & John,

Thanks for your replies. What I'm doing is using the CalcZAF GUI to create the standard material and penepma .in script. Then I'm modifying the .in script to include spatial distribution of xrays

       >>>>>>>> Spatial distribution of events.
GRIDX  0  5e-4 [X coordinates of the box vertices]
GRIDY  0  5e-4 [Y coordinates of the box vertices]
GRIDZ  -5e-4 0. [Z coordinates of the box vertices]
GRIDBN 60 60 60 [Numbers of bins]
XRAYE  1.02e3 1.06e3 [Energy interval where x-rays are tallied]
XRAYE  1.23e3 1.27e3 [Energy interval where x-rays are tallied]
XRAYE  1.46e3 1.50e3 [Energy interval where x-rays are tallied]
XRAYE  1.72e3 1.76e3 [Energy interval where x-rays are tallied]
XRAYE  3.67e3 3.71e3 [Energy interval where x-rays are tallied]
XRAYE  6.38e3 6.42e3 [Energy interval where x-rays are tallied]
     

Then I run the script using cmd prompt penepma.exe < file.in

Why I'm doing it - is to determine at 15kV and 20kV what is the maximum spot size I can use to analyse melt inclusions of different sizes.

Phil - I also tried running it through the penepma supplied with pypenelope but I can only get this working when I don't specify the spatial distribution in the file. I'm I doing anything wrong or is this not possible. (There I create material file separately using material.exe or through pypenelope as its a different version of .mat). I've tried creating the .in file  with pypenelope and the material file then modify to add xrays but there it starts simulation and gives up before writing first dump file.

John regarding the penepma supplied with CalcZAF this does not support SDIAM.

Thanks

Ben
« Last Edit: December 03, 2015, 12:23:38 PM by John Donovan »

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3304
  • Other duties as assigned...
    • Probe Software
Re: Penepma defocused beam
« Reply #4 on: December 02, 2015, 07:49:34 AM »
John regarding the penepma supplied with CalcZAF this does not support SDIAM.

Hi Ben,
That is correct.

This SDIAM parameter is unique to Philippe's PyPenelope.

My Penelope GUI is more specific to matrix corrections though an SDIAM parameter could be added if Philippe was willing to share his FORTRAN modifications with us.

By the way, you can also do a crude modeling of x-ray interaction volumes using the CalcZAF Run | Calculate Electron and Xray Ranges menu as described here:

http://probesoftware.com/smf/index.php?topic=86.msg309#msg309

It's actually not too bad as analytical models go...
john
« Last Edit: December 03, 2015, 12:24:02 PM by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

jon_wade

  • Professor
  • ****
  • Posts: 82
Re: Penepma defocused beam
« Reply #5 on: December 02, 2015, 03:13:58 PM »
Hi Ben

I'm being a bit thick - whats the axes on your graphs?

Call me a heretic (burn him!), but if you're editing the .in file, you may well be better off running penepma as a standalone - theres some funky options for speeding up the simulation in the latest version, and hey, its fun.  Or at least, its what passes for fun around here....If you yell, theres a big bearded chap hanging around your lab with the latest versions about his person, and no, he's not Father Christmas.

I'll also add that you should keep an eye on the error column of the output.   As a proportion of total counts , I guess far fewer will originate outside the interaction volume as the spot gets bigger (as a proportion of total counts),  so at least to me, your result is not entirely unexpected.
« Last Edit: December 03, 2015, 12:21:48 PM by John Donovan »

Ben Buse

  • Professor
  • ****
  • Posts: 498
Re: Penepma defocused beam
« Reply #6 on: December 07, 2015, 06:29:39 AM »
Hi Jon,

Its cm (default for penepma). I suspect your right. Yes I coming round to thinking the data is reasonable - I get clear differences between 5,15,20kV.

The beam aperture angle for 5um beam is 0.014 degrees and for 10 um beam is 0.028 degrees, so presumably at these angles it doesn't matter if the beam is parallel or divergent when it hits the sample - on the instrument its convergent anyway!

Ben