News:

:) Welcome to the Probe Software forum area!

Main Menu

Modelling in PENEPMA calculating Kratios from pe-intens-01.dat files

Started by Ben Buse, January 28, 2016, 06:59:47 AM

Previous topic - Next topic

Ben Buse

Hi,

PLEASE SEE JOHN'S POST BELOW IT ALREADY EXISTS IN PFE STANDARD

I've a simple python program to calculate kratios which I've put here in case anyone else is trying to do the same thing. What you do is specify the elements of interest; select the unknown pe-intens-.dat files and the standard pe-intens-.dat files; and it calculates k-ratios for all standards containing the elements.

download zip file from link - then run CalculateKratios.exe

https://dl.dropboxusercontent.com/u/34045548/CalculateKratio%20280116_v4.zip

Its a simple command line program as shown below



The results are like the following



Ben

Probeman

Quote from: Ben Buse on January 28, 2016, 06:59:47 AM
I've a simple python program to calculate kratios which I've put here in case anyone else is trying to do the same thing. What you do is specify the elements of interest; select the unknown pe-intens-.dat files and the standard pe-intens-.dat files; and it calculates k-ratios for all standards containing the elements.

Hi Ben,
Nice work- always good to see more programming going on!

But too bad you didn't ask me about this because I could have told you that there is a button in Standard that does this already!



This dialog is accessed from the Penepma Batch Mode button in the Penepma modeling window. Though I'm sure your dedicated method is better than my simple button!
The only stupid question is the one not asked!

Ben Buse

Hi John,

That's great you can do it from within PENEPMA batch mode - for its a really useful thing to be able to do. - I'll ask you next time!

Ben

Probeman

Quote from: Ben Buse on January 28, 2016, 09:24:39 AM
That's great you can do it from within PENEPMA batch mode - for its a really useful thing to be able to do. - I'll ask you next time!

Hi Ben,
Please feel free to try the button out.  I mostly wrote it for myself, but I'd be interested if it works intuitively for you.

The code I'm using for k-ratio extractions is on Github in the module Penepma08.bas (it works with Penepma 2008 or Penepma 2012 and maybe Penepma 2014 too- if they didn't change the file format!):

https://github.com/openmicroanalysis/calczaf

john
The only stupid question is the one not asked!

jon_wade

Ben - blimey, its huge! :)  got the raw .py code?

if anyone wants I wrote a bash script to do this - its good for extracting penelope/penepma data and aggregating the errors, but the 2015, roll-your-own, PENEPMA makes it kind of moot as it does (nearly) all the donkey work for you.  For penmain/penelope, its still useful (as is Ben's)


John, do you know where PENEPMA stores the line data?  i.e what line it is and what the energies are? I've looked through the tables and its not instantly obvious (you kind of need this to set the uncertainty limits (ILB4), so I guess its there somewhere?)

Probeman

Quote from: jon_wade on January 28, 2016, 03:06:07 PM
John, do you know where PENEPMA stores the line data?  i.e what line it is and what the energies are? I've looked through the tables and its not instantly obvious (you kind of need this to set the uncertainty limits (ILB4), so I guess its there somewhere?)

Hi Jon,
Do you mean this file?

\pdfiles\pdatconf.pen

By the way, check table 6.2 in Penelope-2006-NEA-pdf for the transition identities.
john
The only stupid question is the one not asked!

jon_wade

Quote from: Probeman on January 28, 2016, 04:07:22 PM


Hi Jon,
Do you mean this file?

\pdfiles\pdatconf.pen


THATS the one I think! sweet!  (I've only got the 2014 pdf - stupidly slung the earlier one, but I'll hunt down the table.  Gotta do something whilst waiting for my probe to magic up some electrons!)

Probeman

Quote from: jon_wade on January 28, 2016, 04:40:09 PM
Quote from: Probeman on January 28, 2016, 04:07:22 PM


Hi Jon,
Do you mean this file?

\pdfiles\pdatconf.pen


THATS the one I think! sweet!  (I've only got the 2014 pdf - stupidly slung the earlier one, but I'll hunt down the table.  Gotta do something whilst waiting for my probe to magic up some electrons!)

Here's the table (see attached).  Note that it is actually table 7.2 in the Penepma 2011 documentation!
john
The only stupid question is the one not asked!