Author Topic: Modelling in PENEPMA calculating Kratios from pe-intens-01.dat files  (Read 4732 times)

Ben Buse

  • Professor
  • ****
  • Posts: 499
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
« Last Edit: January 28, 2016, 09:31:14 AM by Ben Buse »

Probeman

  • Emeritus
  • *****
  • Posts: 2858
  • Never sleeps...
    • John Donovan
Re: Modelling in PENEPMA calculating Kratios from pe-intens-01.dat files
« Reply #1 on: January 28, 2016, 08:38:01 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!
« Last Edit: January 28, 2016, 08:59:11 AM by Probeman »
The only stupid question is the one not asked!

Ben Buse

  • Professor
  • ****
  • Posts: 499
Re: Modelling in PENEPMA calculating Kratios from pe-intens-01.dat files
« Reply #2 on: January 28, 2016, 09:24:39 AM »
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
« Last Edit: January 28, 2016, 10:45:38 AM by Ben Buse »

Probeman

  • Emeritus
  • *****
  • Posts: 2858
  • Never sleeps...
    • John Donovan
Re: Modelling in PENEPMA calculating Kratios from pe-intens-01.dat files
« Reply #3 on: January 28, 2016, 11:00:05 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

  • Professor
  • ****
  • Posts: 82
Re: Modelling in PENEPMA calculating Kratios from pe-intens-01.dat files
« Reply #4 on: January 28, 2016, 03:06:07 PM »
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

  • Emeritus
  • *****
  • Posts: 2858
  • Never sleeps...
    • John Donovan
Re: Modelling in PENEPMA calculating Kratios from pe-intens-01.dat files
« Reply #5 on: January 28, 2016, 04:07:22 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

  • Professor
  • ****
  • Posts: 82
Re: Modelling in PENEPMA calculating Kratios from pe-intens-01.dat files
« Reply #6 on: January 28, 2016, 04:40:09 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

  • Emeritus
  • *****
  • Posts: 2858
  • Never sleeps...
    • John Donovan
Re: Modelling in PENEPMA calculating Kratios from pe-intens-01.dat files
« Reply #7 on: January 28, 2016, 04:58:09 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
« Last Edit: January 28, 2016, 05:02:03 PM by Probeman »
The only stupid question is the one not asked!