Author Topic: Casino 3d  (Read 6549 times)

Ben Buse

  • Professor
  • ****
  • Posts: 499
Casino 3d
« on: March 12, 2018, 09:51:42 AM »
Hi,

I was looking at Hendrix paper on Casino 3

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3164775/

It seems to give good SE yields, I've just installed it and wondered is it possible to get spatial information for the SE emission. Or can I extract the coordinate data for SE leaving the surface

Looking at the exported data I get a list of trajectories which looks promising - see below - what's "order"?



Thanks

Ben
« Last Edit: April 13, 2020, 09:45:34 PM by John Donovan »

Ben Buse

  • Professor
  • ****
  • Posts: 499
Re: Casino 3d
« Reply #1 on: March 13, 2018, 03:29:10 AM »
Hi,

In case its useful I've attached a 10um box sample geometry file, - essentially a bulk (no x-rays so no secondary fluorescence modelled)



To load in "edit layers", click "create", then "file menu" "open"

Also attached is a 10nm film on a 10um substrate (film is -z; substrate is +z)

For translation z is the middle of the object so a film starting at zero, translation is the thickness/2
« Last Edit: April 13, 2020, 07:12:01 PM by John Donovan »

Ben Buse

  • Professor
  • ****
  • Posts: 499
Re: Casino 3d
« Reply #2 on: March 13, 2018, 04:11:14 AM »
Hi,

I can't get the film geometry to work quite right - any ideas. If you see below, on left is bulk (10um box), on right is film on bulk. On right there are blue lines going off in all directions? - what have I done wrong?



Thanks

Ben
« Last Edit: April 13, 2020, 08:55:43 AM by John Donovan »

hdemers

  • Moderator
  • Post Doc
  • *****
  • Posts: 13
Re: Casino 3d
« Reply #3 on: March 13, 2018, 05:57:44 PM »
Hi Ben,

"Order" means which electron generates it, from primary or another SE.

To get the data you can process the dat file when you export the trajectories or the pycasinotools Python code to read directly the information from the .cas:

https://github.com/drix00/pycasinotools

For your geometry, the two shapes overlap, so you need to push the substrate down (Z) to 5005.1. You should use a small gap of 0.1 nm between shapes.

Regards,
Hendrix

PS: It is easier for me if you share the simulation file .sim, so I can check all parameters and repeat the simulation.
« Last Edit: March 13, 2018, 06:31:08 PM by John Donovan »

Ben Buse

  • Professor
  • ****
  • Posts: 499
Re: Casino 3d
« Reply #4 on: March 14, 2018, 10:19:54 AM »
Hi Hendrix,

Thanks that's very helpful.

Yes I was thinking about processing the dat file. So would order be 0 if it was a primary electron.

Thanks

Ben

hdemers

  • Moderator
  • Post Doc
  • *****
  • Posts: 13
Re: Casino 3d
« Reply #5 on: March 15, 2018, 02:50:06 PM »
Hi Ben,

Which version of casino you are using? The last version of casino 3.3.0.4 does not write the order of the SE in the .dat file.

The order value start as follow:
- 1. Primary Electron
- 2. 1st order Secondary Electron
- 3. 2nd order Secondary Electron, i.e., generated by a 1st order Secondary Electron
...

Regards,
Hendrix

Ben Buse

  • Professor
  • ****
  • Posts: 499
Re: Casino 3d
« Reply #6 on: March 21, 2018, 04:25:59 AM »
Hi Hendrix,

Sorry I'm a bit perplexed - The first time I exported the dat file I had a parameter "order", but the subsequent .dat files do not have this parameter.

Is this because I'm using 3.3.0.4 - should v3.3.0.4 not export "order"?

Can I download an earlier version - or where there significant fixes.

Also I tried exporting "FSE" and it listed all the trajectories at type secondary electron. What does "FSE" do?

Thanks

Ben

Ben Buse

  • Professor
  • ****
  • Posts: 499
Re: Casino 3d
« Reply #7 on: March 21, 2018, 07:51:46 AM »
Sorry another question,

what is Rx, Ry, Rz compared to x,y,z

hdemers

  • Moderator
  • Post Doc
  • *****
  • Posts: 13
Re: Casino 3d
« Reply #8 on: March 21, 2018, 04:50:18 PM »
Hi Ben,

You need to modify the file "textExportOptions.ini" in the "Settings" folder and set the line:
Order=1

But I was not able to test it as the file is too big to open.

My recommendation is to use Python script to extract the information.

FSE is fast secondary electron and probably the only one generating 2nd order SE.

Rx, Ry, Rz are the direction cosine of the electron after each collision and X, Y, Z are the position of the collision.

Regards,
Hendrix

Ben Buse

  • Professor
  • ****
  • Posts: 499
Re: Casino 3d
« Reply #9 on: March 22, 2018, 03:50:24 AM »
Hi Hendrix,

Thanks once again,

I'll try both, I've a matlab script to read the dat file.

Regarding python tools .

I've install pycasinotools using pip (pip install pycasinotools; I couldn't get pip install casinotools to work). I've imported casinotools, but I can't figure out how to get started.

I want to try readFromFileObject

https://pycasinotools.readthedocs.io/en/latest/casinotools.fileformat.casino2.html#module-casinotools.fileformat.casino2.File

But its not any of the following

Code: [Select]
import casinotools
casinotools.readFromFileObject

or the same thing

Code: [Select]
import casinotools as cs
cs.readFromFileObject

can you point me in the right direction to get me started?

Thanks

Ben

Ben Buse

  • Professor
  • ****
  • Posts: 499
Re: Casino 3d
« Reply #10 on: March 22, 2018, 04:17:04 AM »
I've just tried the textExportOptions.ini settings and whilst it works for the other parameters it does not work for Order which it resets to 0.

Also is there a limit imposed on the size of the text file I increase number of trajectories and its still ca. 70mb max. - I've just done a test 10,000 electrons simulated. Exported to .dat. 80mb. If I count the number of primary electrons absorbed 132, primary electrons backscattered 76, secondary electrons 153148. So I'm guessing the first 208 (132+76) primary electrons have been exported and the SE they produced.
If I do the same thing for 100 electrons simulated. Exproted to .dat 40mb. 70 primary electrons absorbed; 31 backscattered electrons and 78311 secondary electrons. That's right(/the extra primary electron is at the end of the file and does not generate secondaries.).

I think I understand the dat file if you export all it does the following.

Tracks primary electron ("simple" or "backscattered")
Tracks generated secondary electrons.

Then does the next primary electron etc.

The main question I have is does it export slow SE or just fast SE?

I've plotted the energy distribution below



So it looks like it includes slow SE. With stop tracking of SE below 5eV. (These are SE from upper 10nm, Fe 20kV)

Thanks

Ben
« Last Edit: April 12, 2020, 10:04:34 PM by John Donovan »

hdemers

  • Moderator
  • Post Doc
  • *****
  • Posts: 13
Re: Casino 3d
« Reply #11 on: March 26, 2018, 06:38:15 PM »
Hi Ben,

It export both. You only have a couple of FSE and a lot of SE. You can see the FSE as long green trajectory in the CASINO display.
Also if you don't change the number of trajectories keep (200 by default) it will not export the number of electron simulated. Also CASINO does not have a limit to the size of the file, but your OS may have a limit. On my computer it take more than 10 minutes to export 200 trajectories with SE.

Regards,
Hendrix