Author Topic: Missing peaks from thin film  (Read 2192 times)

jon_wade

  • Professor
  • ****
  • Posts: 62
Re: Missing peaks from thin film
« Reply #15 on: July 19, 2018, 11:04:25 am »
Hi John
 
The output files 'pe-spect-x.dat' files contain the full spectra data (i.e. lines plus background, plotted here) and the 'pe-intens-x.dat' files contain the characteristic lines and how they are generated.

Blasphemy I know, but the full version of Penepma is worth a look if you're scripting it.  It also has a fair few things to help refine the simulation and speed it up.  I've done similar to you in python and bash scripts for extracting the data (I think I posted one here once upon a time) but I'd be interested in seeing your R versions (I'm tossing up wether to invest a bit of time learning R)

Do you use DTSA for quanting the data ?
all the best

Jon

jrminter

  • Professor
  • ****
  • Posts: 47
Re: Missing peaks from thin film
« Reply #16 on: July 22, 2018, 02:22:15 pm »
Thanks for the additional information. I'm still refining my simulations and want to get to quantification. I'd like to get the full version of penepma2014. I have a working version of penepma2012 from CalcZaf that I have been using. I got the source code for penelope2014 and built most of it. It doesn't have the penepma code. I emailed Xavier Llovet with a request for the 2014 penepma code... I've been going through the geom files and trying to get format straight. Some of the headers don't match with the Z_SHIFT values... The docs say this is supposed to be in cm and the ZSHIFT values are cumulative sums. One of the functions I wrote was to take a list of layer thickenesses and convert it to the right format for Z_SHIFT. The format is not "DRY" - it is easy to get inconsistent values...

My R package is a work-in-progress. I host it on github here: https://github.com/jrminter/rpemepma. I'll add capabilites to it as I progress. I really like the combination of R/RStudio/github. RStudio is a great IDE and lets one work with RMarkdown for documentation. Rmarkdown also can include code-chunks in bash, python, and R if need be. I can use LaTeX math if need be but markdown is a pretty easy format to work in. This afternoon I am running some simulations with my corrected input files. The results I'm getting now make more sense to me and look like what DTSA-II reports for the "emitted spectrum". I'll attach some when the simulations finish...

Best regards,
John

Probeman

  • Emeritus
  • *****
  • Posts: 1690
  • Never sleeps...
    • John Donovan
Re: Missing peaks from thin film
« Reply #17 on: July 22, 2018, 02:48:36 pm »
Attached below are Penelope-2016 and Penepma-2016.

I cannot promise that they will work with CalcZAF/Standard as Salvat and Llovet sometimes change the input/outfile file formats without warning, and are often not backward compatible with older version of Penelope/Penepma...  but 2016 does fix some problems with boron and lighter element emissions.
The only stupid question is the one not asked!

jrminter

  • Professor
  • ****
  • Posts: 47
Re: Missing peaks from thin film
« Reply #18 on: July 22, 2018, 03:31:00 pm »
Greatly appreciated, Probeman!

jrminter

  • Professor
  • ****
  • Posts: 47
penepma 16 woes...
« Reply #19 on: July 22, 2018, 06:48:08 pm »
Probeman, I got everything to compile on penelope16 and penepma16 but I am ripping my hair out over an error I get when I run penepma16 and I can't find the problem.

The error writes to the screen and is recorded in the penepma.dat file: No problems with the mat files as far as I can tell...
(I generated them with material.exe from penelope16...)
The program complains that I did not declare photon detectors... The program didn't read NBE...

  ------------------------------------------------------------------------
  >>>>>>  Energy and angular distributions of emerging particles.
  E:       NBE = ***,  EMIN = 1.000000E+01 eV,  EMAX = 3.000000E+04 eV
  Theta:  NBTH =  90 (linear scale)
  Phi:    NBPH =   1
 No photon detectors were defined.
 You must define at least one photon detector.

I tried several permutations. I can't find any way for it to read the NBE. Hopefully another pair of eyes will help... Hope you see something I missed... Thanks for the help...

Probeman

  • Emeritus
  • *****
  • Posts: 1690
  • Never sleeps...
    • John Donovan
Re: Missing peaks from thin film
« Reply #20 on: July 22, 2018, 10:08:11 pm »
Hi John,
Sorry to hear that.  I haven't had a chance to try Penepma-2016 myself, so I can't really help.  Maybe Jon Wade or Ben Buse have used it?   It's on my "to-do" list but just haven't gotten around to looking at it in any detail.

Otherwise you'd be best off contacting Xavier directly.
john
The only stupid question is the one not asked!

Ben Buse

  • Professor
  • ****
  • Posts: 376
Re: Missing peaks from thin film
« Reply #21 on: July 22, 2018, 11:18:21 pm »
Hi John,

Just looking quickly it seems you've got an extra '.' between photon detectors and their definition

Code: [Select]
>>>>>>>> Photon detectors (up to 25 different detectors).
                IPSF=0, do not create a phase-space file.
                IPSF=1, creates a phase-space file.
       .
PDANGL 50.0 60.0 0.0 360.0 0             [Angular window, in deg, IPSF]

Also I not sure but should

Code: [Select]
NBTH   45                     [No. of bins for the polar angle THETA]
NBPH   30                   [No. of bins for the azimuthal angle PHI]

be

Code: [Select]
NBANGL 45 30              [Nos. of bins for the angles THETA and PHI]
Maybe it doesn't matter, or I've got the versions wrong

Also are you aware that the good thing is you can now stop penepma simulations when the required error is reached using:

Code: [Select]
REFLIN 50040900 1 1E-2           [IZ*1e6+S1*1e4+S2*1e2,detector,tol.]
in job properties
« Last Edit: July 22, 2018, 11:27:36 pm by Ben Buse »

jon_wade

  • Professor
  • ****
  • Posts: 62
Re: Missing peaks from thin film
« Reply #22 on: July 23, 2018, 05:02:24 am »
what ben says.

if you open up the uncompiled .f version the comments have  a good explanation of what the .in file should be, as well as the various options.
The big change with this version appears to be the ability to map the origin of x-rays received by the detector.

( I dunno if this has changed, but years ago, when I was working somewhere that really cared about such things, we had to get the uncompiled version of PENELOPE thru the NEA.
There was some reason for this, I cant remember what, but I can speculate)

https://www.oecd-nea.org/tools/abstract/detail/nea-1525


jrminter

  • Professor
  • ****
  • Posts: 47
Re: Missing peaks from thin film
« Reply #23 on: July 23, 2018, 05:32:47 am »
Thank you, Ben and Jon!!! The extra dot was not the problem. I made the other edits and it is running now. Attaching the final version for others who struggle...

I thought I should add that I compiled this on a Windows 7 x64 box. I am a R user so I have the Rtools application installed that supplies the Fortran compilers I need. I wrote a compile.cmd file that I stored in my ./work/compile folder. I commented out (using REM) the parts I wasn't compiling on each run and hard-coded the path to the 64 bit compiler. I am attaching the file in case it helps some who follows...
« Last Edit: July 23, 2018, 05:39:57 am by jrminter »