This thread is for those of you that have come across some problematic secondary boundary fluorescence situations, either through modeling or measurement. In fact it would be nice to compare the modeling with any measurements you all have performed.
To start off I thought I would mention the simple point that if the boundary fluorescence is extremely large as in the Co-Cu default example in Standard.exe (Analytical | PENFLUOR/FANAL (Monte-Carlo) Calculations menu) and seen in the first attachment below, one can often ascertain that there is a significant issue without even running a model since the totals will often be obviously too high if the boundary fluorescence effect is large enough.
This is often seen in the case of a traverse over a boundary and noting that the totals at the boundary are usually significantly higher than 100%. Clearly these cases usually involve both a pure boundary fluorescence effect where most electrons come to rest in the beam incident material, but as the beam approaches the boundary there will be some degree of electron excitation of both phases on each side of the boundary and this will yield incorrect matrix corrections usually also resulting in high totals. And of course combinations of both effects depending on the exact beam position relative to the boundary and the physics details.
It should be also noted that in less common cases where the self-fluorescence of one phase is very large, one can also observe a low total in the measurement when the fluoresced element is *not* present in the boundary material. This has been noted by John Fournelle and Xavier Llovet and published in this paper on inclusions in a non-fluorescing matrix (e.g. epoxy):
http://www.geology.wisc.edu/~johnf/g777/777Penelope/Llovet_Valovirta_et_2000.pdf
John also has a nice presentation on this:
http://epmalab.uoregon.edu/Workshop2/Fournelle-Penelope.pdf
But the point I'm attempting to make here is that in many cases where the secondary fluorescence artifact is much smaller the effect is less obvious in the totals, especially when a trace or even minor element is being measured as in a diffusion profile. In these cases only MC modeling will reveal the magnitude of the error.
The second attachment below demonstrates a 100 PPM artifact at over 500 um distance from the boundary. This boundary artifact was observed at Oak Ridge National lab and was a cause for some concern at the time. Note the log scale in the concentration axis.
Hi John,
I've run the Penepma secondary boundary fluorescence GUI in Standard.exe for a number analytical problems, but would you mind posting an example for all of us showing the steps for doing this calculation, both for modeling the situation and also for correcting measured intensity data for these artifacts, maybe a simple system such as Ti Ka in quartz next to rutile or Ti Ka in zircon next to rutile?
Cheers,
Gareth
Excellent idea!
I'll do this in several parts to make it manageable.
We will make use of Standard.exe and CalcZAF.exe for these calculations. Both programs are available for free by downloading the CalcZAF.msi installer from here:
https://www.probesoftware.com/resources/
Note that the Penepma12.ZIP (Penepma 2012 file and data set) is now included with the CalcZAF.msi installer and will be installed automatically to your UserData folder when CalcZAF or Standard are run the first time if it is not already installed.
The first section using Standard.exe will describe creating the material (*.MAT) and parameter (*.PAR) files for the boundary modeling (and matrix modeling as well if the beam incident and boundary phases are the same composition!)
The second section (again using Standard.exe) will describe using the PAR files for boundary (and bulk matrix modeling) to determine if a problematic situation is present by extracting k-ratios based on the stage coordinates of the analysis positions and the boundary distance and orientation.
The third section will focus on correcting intensity measurements for boundary artifacts if the sample k-ratios are imported into CalcZAF along with the stage positions. The CalcZAF correction implementation that will be shown below is for demonstration and testing purposes, and is limited to corrections for one element at a time.
Finally please note that the k-ratio intensities are reported in % in order that they can be displayed together with the concentrations in wt. %.
The Probe for EPMA software will provide a full automatic correction for boundary artifacts for multiple elements once it is fully implemented in our main EPMA software later this year.
Stay tuned...
First section: Creation of material and parameter files.
The first step in modeling boundary artifacts is to check if the material phases you plan to model, already have PAR files calculated for them.
This is because once a PAR file is calculated for a specific material (~10 hours each for typical precision), one can utilize this PAR file to extract k-ratio intensities for *any x-ray emission line*, at *any keV* (between 5 and 50 keV) and at *any distance* from the boundary. So the PAR file calculation is time consuming but provides many re-uses for different analytical situations.
Therefore, before beginning the creation of material and parameter files for a phase, first check that the phase under investigation hasn't already been calculated. Note that all pure elements are already calculated along with approximately 200 common phases. Additional phases are continually being calculated and uploaded. A thread discussing newly calculated compounds which can be downloaded is found here:
http://smf.probesoftware.com/index.php?topic=13.0
After starting Standard.exe and clicking on the Analytical | Penepma (Secondary Fluorescence Profile) Calculations menu to open the Calculate Penepma 2012 Fluorescence Couple Profiles window (see attached screen shot of the full window at the very bottom for reference), the first step then is to check the Penfluor folder for existing PAR files by clicking on the Browse button as shown here:
(https://smf.probesoftware.com/oldpics/i44.tinypic.com/xp8n7l.jpg)
Be sure to check the Compound sub folder as shown here as most compounds will be stored there at first (pure elements will be found in the Pure subfolder):
(https://smf.probesoftware.com/oldpics/i40.tinypic.com/2u8v70w.jpg)
We will need three materials for each boundary fluorescence calculation. The beam incident material, the boundary material and the standard for the k-ratio calculation. If the boundary calculation is for modeling purposes only, then one should generally use a pure element as the standard since then the program can calculate additional information which may be saved to an Excel spreadsheet for further study.
However, if the calculation will be used for correction of measured k-ratio intensities, one must use the same standard as used for the measured k-ratio intensities on the instrument.
If all three phases are already calculated as PAR files, one can skip to the second section. Otherwise proceed by either selecting a material from the current standard database (making sure that the density value in the text field is correct) as shown here:
(https://smf.probesoftware.com/oldpics/i43.tinypic.com/4smy6g.jpg)
and click the Create Material A From List button, or enter the density of the phase (density is important since the intensities are reported in linear distances) and click the Create Material A From Formula button. Three sets of buttons are provided in case one needs to calculate all three materials.
These material calculations only take 30 to 60 seconds for each material and the newly created .MAT files are loaded automatically in the PAR file calculation area below.
When the necessary material files are ready to be calculated as PAR files one can click any of the buttons circled here to calculate all three or any one:
(https://smf.probesoftware.com/oldpics/i40.tinypic.com/2gviucx.jpg)
Again, each PAR file calculation takes approximately 10 hours each. The next section will describe how to use the PAR files for extracting k-ratio intensities to model boundary artifacts or matrix corrections.
Second Section: Extraction of K-ratio Intensities From PAR Files.
Continuing our modeling of Ti Ka in SiO2 adjacent to TiO2, we turn our attention to the Calculate Secondary Fluorescence Profiles For The Specified Element and Xray section of the window, and make sure that the Material A (beam incident) is specified as SiO2, Material B (boundary) is specified as TiO2, and Material B Std (primary std) is either the pure element (Ti) or the standard actually used in the measurement on the instrument (e.g., TiO2) as seen here:
(https://smf.probesoftware.com/oldpics/i39.tinypic.com/9zr3up.jpg)
Next make sure the correct element and x-ray line is selected, in this case Ti Ka, and that the correct take off angle and beam energy is specified (e.g., 15 keV).
Finally specify the total distance the modeling should cover in microns and the number of points to calculate. The default values of 50 um and 50 points (i.e., 1 um per point) is usually sufficient but can be modified as desired. Note again that because the intensities are reported in linear distances (um), the correct material densities are very important for accuracy.
One can also opt that the quite extensive output file kratio2.dat also be saved to an Excel spreadsheet, but all other output files are automatically saved. For example, For example, this calculation would be saved to a folder named 15_SiO2_TiO2_Ti_22_1 in the C:\UserData\Penepma12\fanal\couple folder. Where 15 is the keV, SiO2 is the beam incident material, TiO2 is the boundary material, Ti is the standard and 22_1 refers to the emitting element and line (1 = Ka, 2 = Kb, 3 = La, etc).
For more information on the data types saved please refer to the Probe for EPMA Reference manual by hitting F1 as shown in the attached screenshot at the end of the post. Remember that one needs to be logged in to see attachments!
When ready click the Run Fanal (generate k-ratio file for couple boundary) button and after 20 to 30 seconds the data will be displayed in the graph area as shown here:
(https://smf.probesoftware.com/oldpics/i39.tinypic.com/2zdujpt.jpg)
Note that the material densities and other essential information is displayed in the graph title. The critical information are the k-ratio intensity points. These intensities are utilized in the correction procedure that will be described in the third section.
Several other concentration related data types are plotted as follows:
Boundary Wt.%: This is the concentration of the boundary intensity artifact that is contributed from the boundary material *only*. However since there is no Ti in this SiO2 material, the "Calc Wt.% and the "Boundary Wt.%" plot on top of each other.
In situations where the beam incident material contains a non-zero concentration of the emitted element, the "Calc Wt.% and the "Boundary Wt.%" will plot differently.
Calc Wt.%: The concentration that should be reported if the software was properly noting the fact that the Ti concentration is *not* actually present in the beam incident material (SiO2), but instead is in the boundary material (TiO2). However, since the "spurious" concentration of Ti in the SiO2 is relatively small, the matrix correction of Ti ka in pure SiO2 is approximately 1.202 while the matrix correction for Ti ka in SiO2 with 0.4 wt.% Ti is approximately 1.201. Therefore the former calculation in pure SiO2 is reported as the "Calc. Wt.%, while the latter calculation in SiO2 with a minor amount of Ti is reported as the "Meas. Wt.%".
Meas. Wt.%: As stated above, the "Meas. Wt.%" is the concentration that would be reported by your microprobe software since it incorrectly assumes that the Ti Ka is being emitted in an SiO2 matrix. Of course this reported value is "not even wrong" since the Ti Ka is actually being emitted from the TiO2 boundary phase!
As an aside, the default example of Co ka measured in Cu adjacent to Co, shows an example of how a large artifact affects the assumed matrix correction as seen here:
(https://smf.probesoftware.com/oldpics/i44.tinypic.com/2w65gf4.jpg)
It is interesting to note in the above Co Ka example, that since the beam incident, boundary materials and standard are pure elements, the k-ratio intensities (in %) and Calc. Wt.% concentrations are the same.
Finally it should be mentioned again that since the correction of this artifact utilizes the modeled k-ratio intensities, it is critically important that the correct standard be modeled for use in the third section in the subsequent post. But the pure element is sufficient for general modeling and in fact allows the program to output additional matrix information since the standard k-factor does not need to be calculated.
An example of the Ti Ka in SiO2 adjacent to TiO2 using TiO2 as a standard as opposed to pure Ti is shown here:
(https://smf.probesoftware.com/oldpics/i41.tinypic.com/205388n.jpg)
Note that the reported concentrations are same but that the k-ratio intensities are quite different due to the use of the TiO2 as the standard instead of Ti.
Third Section: Correction of Secondary Boundary Fluorescence Artifacts
This section will describe how to correct for SF boundary artifacts using CalcZAF. CalcZAF will only correct for one element artifact at a time, which is sufficient for demonstration and testing, but by the end of this year (2013) we hope to have a multi-element SF boundary artifact correction implemented in Probe for EPMA. This PFE implementation will use the same dialog as below but will also have the ability to store and recall all specified parameters automatically for all elements for your probe run.
Begin by first generating a model of the analytical situation in Standard.exe where you suspect a secondary boundary fluorescence exists as described in the previous replies above.
As a slight aside, note that these artifacts usually cause an increase in the apparent concentration of the measured element, but in certain situations where the sample under investigation is self-fluorescing and the boundary phase (or matrix in the case of an inclusion geometry) does *not* contain that fluoresced element, one may see a *decrease* in apparent concentration as discussed in the first post of this thread. Another example of a "negative" SF artifact can be seen in certain boundary situations as shown here:
(https://smf.probesoftware.com/oldpics/i44.tinypic.com/2i0vr7k.jpg)
So the first step is to decide if there is a significant secondary boundary fluorescence artifact worth correcting using Standard.exe.
In any event, once you have modeled your specific analytical situation in Standard.exe with the appropriate materials, keV and element/x-ray parameters and preferably out to a distance from the boundary so that the artifact intensity is close to zero, you can proceed to the correction of this boundary fluorescence using CalcZAF.
From the Analytical | Correct Secondary Fluorescence Boundary Effects menu in CalcZAF you will see this window when it is first opened:
(https://smf.probesoftware.com/oldpics/i42.tinypic.com/2s61rh0.jpg)
You will note that there are two methods for SF correction, but only the first (top) option is currently available. Start by browsing to the folder where your SF model was automatically saved to. As previously mentioned, the file we are looking for (kratios.dat) will be in a folder named for the analytical conditions.
For example, for Ti Ka in SiO2 adjacent to TiO2 using a Ti standard at 15 keV, the kratios.dat file would be saved to a folder named 15_SiO2_TiO2_Ti_22_1 in the C:\UserData\Penepma12\fanal\couple folder. Where 15 is the keV, SiO2 is the beam incident material, TiO2 is the boundary material, Ti is the standard and 22_1 refers to the emitting element and line (1 = Ka, 2 = Kb, 3 = La, etc).
(https://smf.probesoftware.com/oldpics/i39.tinypic.com/hv5d1c.jpg)
The program will confirm the essential parameters of the selected kratios.dat file as shown here:
(https://smf.probesoftware.com/oldpics/i42.tinypic.com/34gr5ft.jpg)
Now enter the boundary coordinates that will apply to the correction. One may manually specify the boundary by typing in a fixed distance, stage coordinates and angle, or two stage coordinates, but the easiest method if you are using Probe for EPMA, is to import a stage calibrated SE or BSE image acquired from PFE using the Browse For Image button as shown here:
(https://smf.probesoftware.com/oldpics/i40.tinypic.com/a42060.jpg)
If you imported an image, now you simply draw the boundary using the mouse. You can draw the boundary as many times as you like until you feel it is correct:
(https://smf.probesoftware.com/oldpics/i43.tinypic.com/2llesrs.jpg)
Now you will need to import a data file containing the measured k-ratios. The easiest way to do this is to export the analysis intensities from Probe for EPMA using the Output | Save CalcZAF Format menu (I'll be adding another right click method to the Analyze! window for exporting specific samples to the CalcZAF format soon).
The format of the CalcZAF import file is documented in detail in the User's Reference but the basic structure is fairly obvious:
3,2,15,40., "SiO2 adjacent to TiO2 (Elemental K-ratios)", -25, 0., 0.
1,"si","",0.0,"","",0.0
"ti","ka",1,1,0,0.,.00075,0.0
"si","",1,2,0,0.,.0,0.0
The above example is for a single data point, but there are sample data sets with a full Ti ka SiO2 traverse for both JEOL and Cameca stages in the C:\UserData\CalcZAFDATData (or your default user data) directory named:
Wark-Watson Exper. Data (CalcZAF format)_Cameca.dat
Wark-Watson Exper. Data (CalcZAF format)_JEOL.dat
For this data importation one can use the CalcZAF app File | Open CalcZAF Input Data File menu and process the data points one at a time using the Calculate button to see the analysis *without* the SF correction, or using the Calculate Current Composition button to see the the analysis *with* the SF correction.
Use the Load Next Dataset From Input File button to advance through the import file one data point at a time. See the two attachments at the end of this post for examples of both with and without the SF correction for the first data point in the example files.
Finally one can also process a complete data set using the Open Input File and Calculate/Export All button as shown here:
(https://smf.probesoftware.com/oldpics/i42.tinypic.com/j5xkza.jpg)
Pretty neat!
Edit 02/04/14 : right click method for CalcZAF output has been implemented in the Analyze! window sample list for output of selected samples.
Hi John,
Thanks for your posts on this very interesting topic. I will try those corrections/steps and see how it goes.
Meanwhile, I am attaching a BSE image showing the Qti data I measured sometime back on a Qtz_Ti couple (the grains glued next to each other and polished).
The picture (attached below) describes it all.
Thanks John for the nice plot and comparison with Wark & Watson's data!
Hi all
I hope John doesn't mind me chipping in, but I thought I would post an example or two of where secondary fluorescence can give rise to 'erroneous' data and how tools such as PENEPMA and FANAL, embedded within P4W, can offer a handle on the SF contribution.
The first one is the high precision analysis of trace Ca within the olivine. This is the basis for the olivine-CPX geobarometer, however, the fine-grained nature of the rocks often leads to problems of secondary fluorescence masking the true Ca content of the olivines. To show how good the simulations are, I recreated the work of Adams and Bishop (1986) who performed a very detailed EPMA study to 'back out' the SF contribution. I did this by recreating a synthetic ol-cpx couple in PENEPMA (see below). The nice thing is that these codes allow you to use both the actual, measured, compositions , and also change the geometry of both the sample (i.e. buried sphere, crystal etc) and the detector (i.e. take-off angle, size etc).
Adams and Bishop, through an exceptional series of EPMA analyses concluded that at 15um from a planar CPX:Ol boundary, their Ca-free olivine would exhibit ~220ppm of Ca, arising purely from SF of the Ca in in the neighbouring CPX.
My PENEPMA simulations gave ~230ppm at the same distance using the same compositions (and a lot less effort!).
I did this using PENEPMA, but FANAL gives a similar result in a lot less time, and better still converts k-ratio to concentration for you. This allows us to correct the real EPMA data by simply subtracting the SF concentration, derived from the simulation, from the real EPMA data collected at the same distance from the phase boundary.
Edit by John: Jon, I cherish your "chipping in"! I particularly like the comparison of the two detector geometries. Please continue chipping in!
Ok, so I now believe the simulation codes work (and are an order of magnitude or two easy to perform than the equivalent probe analyses) what can I do with them?
One obvious application is analysing high pressure experiments. A inevitable consequence of performing very high pressure experiments is that there's a corresponding decrease in sample size - and very high pressure experiments obviously lead to very small samples!
Element partitioning studies are often anchored upon the analysis of trace components within a phase, surrounded by a host where the element of interest is a major component. Furthermore, high-pressure experiments often compound the analytical difficulty, as phases are often small in size and incapable of being physically separated and mounted individually. In such a case there is always the potential that the assumption of a chemically homogeneous matrix (required for the matrix correction routine) is not valid and/or neighbouring phases contribute to the analysis. This is especially true of very high pressure samples generated in the Diamond Anvil Cell (DAC), where samples are often so small as to be extremely difficult to handle.
To explore the potential influence of SF, I simulated a 22.4GPa DAC experiment of (Bouhifd and Jephcoat, 2003). This work investigated the conditions of planetary core formation, and in particular the partitioning behaviour of Ni and Co between Ni-rich metal and Ni-poor silicate phases. As an aside, theres often been a bit of a 'mismatch' between the Ni partitioning data generated using multi-anvil high pressure devices and DACs, and the suspicion has been that this is either an experimental or analytical 'artefact' of some kind.
I used this work simply because it helpfully (and unusually) includes both the elemental data of both phases present, together with a micrograph of the experiment from which it was obtained and the location of where the analyses were made. This means that its possible to perform a realistic simulation with PENEPMA and assess the SF contribution on the Ni analyses of the silicate (if any), arising from the near-by Ni rich metal.
I simulated an simplistic version of the experiment using either a half - or 2/3 buried ball of metal, in a matrix of silicate of the correct composition (but Ni free) and simulated analyses of the silicate at various distances away from the metal (again, see below).
The result is that, at the analytical conditions the authors used, the simulations show that if the analyses were performed ~ 5um from the phase boundaries, the reported Ni concentrations need to be reduced by ~25%. A not insignificant amount, but more importantly, this brings the results back into line with those generated by multi anvil high pressure devices (which typically generate larger sample volumes at these pressures).
I hope this has been of some interest; I'm a fully paid-up member of the PENEPMA/FANAL fan club, and find their application to a variety of problems (FIB-sections, thin films etc etc) really useful, and if anyone wants any more info, feel free to post, message or email me.
All the best
Jon
[edit] the figure captions in the attached files - B refers to a cartoon of the SEM picture of the run product , C&D to the results. figure A was going to be a the original micrograph from the paper, but the household picture editor informed me of copyright rules just in time!
Finally fixed the data cursor when the K-Ratio% plot is in log10 scale as seen here:
(https://smf.probesoftware.com/oldpics/i62.tinypic.com/2i1h6w3.jpg)
This is the proper thread for Penfluor/Fanal calculations...
I decided to ZIP up all the low energy PAR files that I have already done and make them available here:
http://probesoftware.com/download/PAR_lessthan1000eV.zip
The ones labeled 500eV are good for oxygen Ka and fluorine Ka, the 200eV ones are good for carbon Ka and nitrogen Ka.
Note that these 200 eV PAR files could also be used for oxygen and fluorine emission modeling, but the 200 eV files will have somewhat poorer statistics for the oxygen and fluorine primary (electron beam) excitation intensities, so better to use PAR files that are calculated to an energy no lower than the emitted energy (which will always be less than the edge energy).
Remember, these PAR files currently can only be utilized in a "couple" geometry, that is, a straight line vertical boundary by Fanal. For (hemi)sphere geometries, the intensities must be calculated using the full Penepma method, which is the subject of this topic:
http://smf.probesoftware.com/index.php?topic=59.0
I've been doing some interesting comparisons between couple and hemisphere geometries for C Ka in Fe99Ni adjacent to pure carbon for Ed Vicenzi as seen here:
http://smf.probesoftware.com/index.php?topic=59.msg1384#msg1384
One of the tests I ran using Penepma was a zero distance boundary measurement where the beam would impact exactly at the boundary, ideally producing a k-ratio close to 0.5 (neglecting the small C ka SF issue).
The results from 50K seconds of calculations at 20 keV are here:
0 um distance intensity = 9.6009E-05 +/- 4.95E-06
Bulk Carbon intensity = 1.8832E-04 +/- 2.73E-06
K-ratio = 0.5098
Of course we expect a slightly higher than 0.5 k-ratio due to a small amount of C ka SF and the extra 0.0098 we see here is similar to the Penpema value at 1 um distance plotted in the above link.
PS: the 200eV PAR files ZIP used for such calculations has been updated here:
http://probesoftware.com/download/PAR_lessthan1000eV.zip
This plot relates to the discussion in the modeling inclusions topic here:
http://smf.probesoftware.com/index.php?topic=59.msg1384#msg1384
But I am posting it here to discuss the intensity differences between the full Monte-Carlo calculated by Penepma and the Penfluor MC and Fanal SF analytical modeling of couple boundaries. Here is a plot of Penepma and Penfluor/Fanal calculating the secondary fluorescence effect on C ka in Fe99Ni1 adjacent to pure carbon.
(https://smf.probesoftware.com/oldpics/i59.tinypic.com/abgj1g.jpg)
Note that the extra C Ka intensity seen in the Penepma intensity calculations at distances less than 2 microns from the boundary are due to electron scattering across the couple boundary. This effect will be much larger for the inclusion geometry.
Note also that the Penfluor/Fanal intensity output is in K-ratio% and so should be divided by 100 to compare to the Penepma k-ratios obtained by dividing intensities from the pe-intens-01.dat files.
By the way, if you'd like to run the Penfluor/Fanal calculation with Fe/Ni adjacent to epoxy as opposed to pure carbon, the 200 eV PAR file (HCNO_200eV.par) is attached below.
I finally got around to creating an epoxy PAR file (Epon 828 which apparently contains ~0.3% of Cl) and I ran it next to a mineral glass to see what level of secondary fluorescence one might obtain and at 15 keV this is what you see:
(https://smf.probesoftware.com/oldpics/i60.tinypic.com/n16n15.jpg)
Obviously this could be a concern for determining trace levels of Cl in glass adjacent to epoxy, e.g., mounted tephra specimens.
The epoxy PAR file will soon in the normal distribution but I've attached it below for now.
Note also that the full Penepma GUI in Standard.exe now supports multiple detector geometries:
0. Annular (0 to 360 degrees)
1. North
2. East
3. South
4. West
(https://smf.probesoftware.com/oldpics/i61.tinypic.com/dot47p.jpg)
Each "cardinal" direction detector is +/- 20 degrees from 0, 90, 180 and 270 degrees around the specimen. The detectors all are centered on the takeoff angle +/- 5 degrees (e.g., for 40 degrees take off they are 35 to 45 degrees from the specimen surface or 45 to 55 degrees from the perpendicular).
The latest update of CalcZAF (and Probe for EPMA) has a small change in the output of the Fanal "couple" calculations.
First the output folder name now contains the takeoff angle for the model as seen here:
(https://smf.probesoftware.com/oldpics/i57.tinypic.com/rvvadk.jpg)
And the actual conditions and materials are now documented in an additional Fanal.txt text file as seen here:
(https://smf.probesoftware.com/oldpics/i61.tinypic.com/1zck07c.jpg)
The contents of this file as as follows:
"SiO2.par" <- Material A (beam incident phase)
"TiO2.par" <- Material B (boundary phase)
"Ti.par" <- Material BStd (standard)
40 <- take off angle (surface takeoff though Fanal input uses polar takeoff)
15 <- beam energy in keV
22 <- emitted element atomic number
1 <- emitted element x-ray
I have mentioned previously an issue with using Penflur/Fanal in Standard.exe to model secondary fluorescence for low energy emission lines such as oxygen Ka as seen here:
http://smf.probesoftware.com/index.php?topic=119.msg479#msg479
The same thing applies to modeling low energy x-ray lines for secondary fluorescence from boundary phases such as the L family of first row transition elements. In this example we look at Fe La (not Ka) in Ni adjacent to pure Fe. But because the Fe L edge is below the default minimum electron/photon energy of 1 keV, the Fanal application is unable to correctly model the production of Fe La and we obtain the following bogus SF artifact as seen here:
(https://smf.probesoftware.com/oldpics/i62.tinypic.com/2ihmalx.jpg)
However by recalculating the Fe-Ni system to below the Fe L edge energy we can obtain a more accurate calculation for secondary fluorescence from L family lines as seen here:
(https://smf.probesoftware.com/oldpics/i57.tinypic.com/w2i04x.jpg)
The good news is that I have modified the Standard GUI for Penfluor/Fanal so that the program will *automatically* adjust the minimum electron/photon energy in order to include the K emission lines for elements below Na.
For modeling of higher Z elements with emission line edge energies below 1 keV, you will still need to recalculate the PAR file by setting the minimum electron/photon energy as usual. The modified window is seen here:
(https://smf.probesoftware.com/oldpics/i59.tinypic.com/r72no4.jpg)
I need a favor from CalcZAF/Standard/Probe for EPMA users.
If you've utilized the Standard program GUI for modeling secondary fluorescence across boundaries (this topic) or the "fast Monte-Carlo" matrix corrections in CalcZAF (or Probe for EPMA), described here:
http://smf.probesoftware.com/index.php?topic=47.0
please reference the paper by Llovet et al.
I would like Xavier to update the Penfluor/Fanal code to implement the new Penepma 2014 code, but he says he hasn't seen much in the way of citations for this paper, and so he's not sure there is enough interest in the method. I really only contributed the GUI and the matrix method (matrix.mdb), but think it is an outstanding contribution and I also would like to see it cited, if anyone has utilized the Standard GUI for secondary fluorescence modeling or the fast MC methods in CalcZAF or PFE.
The citation would be:
Llovet, et al., "Secondary fluorescence in electron probe microanalysis of couple materials", J. Appl. Phys., (2012)
Thanks and please feel free to post your publication in this topic as well!
john
Quote from: Ravi on September 27, 2013, 11:24:55 AM
Hi John,
Thanks for your posts on this very interesting topic. I will try those corrections/steps and see how it goes.
Meanwhile, I am attaching a BSE image showing the Qti data I measured sometime back on a Qtz_Ti couple (the grains glued next to each other and polished).
The picture (attached below) describes it all.
Hi Ravi,
Thanks for posting your data. Should we assume the center of the first point (using a 10 um beam size) was 6 um from the boundary?
I'm not sure what beam size Wark and Watson used for their measurements, but your data is roughly comparable to theirs as plotted here:
(https://smf.probesoftware.com/oldpics/i39.tinypic.com/2i1p5ox.jpg)
Good work!
john
Edit by John: there is a silly typo in the plot above. It says that if the boundary axis is at right angles to the spectrometer axis, there will be little or no defocusing. But...
It should say "if the boundary axis is
parallel to the spectrometer axis, there will be little or no Bragg defocusing"! That is, little or no Bragg defocus effect on the measured intensity of the secondary fluorescence due to the boundary.
Attached below is a corrected version of the plot above
I'm at AGU this week to give my trace MAN talk, but I've seen a few talks where I wonder if secondary fluorescence boundary effects have been considered enough.
On that note I've attached a few plots from the Standard.exe that model some trace element situations used to estimate thermometry and/or barometery in geological systems. Remember to login to see attachments!
john
And remember, secondary fluorescence boundary effects can also be negative as shown in the attachments below.
In these examples, the loss in intensity as the boundary is approached is *not* due to electrons leaking into the boundary phase. The intensity loss is because the emission line in question is fluoresced by its own matrix, and because the boundary phase does not contain the measured element, there is less self-excitation of the emitted line as the boundary is approached.
As John Fournelle has demonstrated, this self excitation intensity loss is also seen in epoxy mounted grains. The point being that no matter how small one's electron excitation volume is, the x-rays produced within that volume still travel tens to hundreds of microns further.
john
Just corrected data for Ca secondary fluorescence in olivine - where olivine contains Ca.
Fanal model. Olivine ca. 300ppm Ca.
(https://smf.probesoftware.com/gallery/453_26_01_17_1_41_30.png)
Calczaf works really well! Exported data from PFE to CalcZAF. Loaded an image, then drew the boundary. Calculated results:
(https://smf.probesoftware.com/gallery/453_26_01_17_1_52_31.png)
Thanks John!
Ben
Quote from: Ben Buse on January 26, 2017, 01:53:33 PM
Just corrected data for Ca secondary fluorescence in olivine - where olivine contains Ca.
Fanal model. Olivine ca. 300ppm Ca.
Thanks John!
Ben
Hi Ben,
You are more than welcome. I appreciate you working with me!
We have to find a way to get information on these secondary boundary fluorescence artifacts more visible to geologists (and metallurgists for that matter!), and have them start checking for these effects (in Standard.exe) and if necessary, correct for them as well (in CalcZAF)!
Since CalcZAF (and Standard) are freely downloadable apps, there really is no excuse for not doing so (except perhaps because the Llovet, et al. paper on this was published in the Journal of Applied Physics!) :-\
I'm no geologist, but it seems to me that these trace element diffusion profiles at mineral grain rims are being significantly degraded by including these fluorescence artifacts in the thermodynamic chemical models for estimating the pressure/temperature/duration conditions of formation... are there any modelers out there that can speak to this question?
john
Hi John,
I agree, when we (Bristol, Leeds, Oxford, Cambridge and Manchester) teach our NERC (research body) ATSC (Advanced Training Short Course) on EPMA we cover secondary fluroscence modelling using Standard.exe.
I should also mention for anyone with sharp eyes - the above data is a first approximation - corrected using already simulated materials (although a reasonable match) - for the final correction the actual compositions will be simulated where important/materials deviating significantly.
I guess also for clarity - in the data given above - its important to mention that it does not matter that the modelled material which the beam is hitting contains a small and possibly different about of Ca - for the calczaf correction subtracts the amount of Ca generated by secondary fluorescence.
Quote from: Ben Buse on January 26, 2017, 11:26:42 PM
I guess also for clarity - in the data given above - its important to mention that it does not matter that the modelled material which the beam is hitting contains a small and possibly different about of Ca - for the calczaf correction subtracts the amount of Ca generated by secondary fluorescence.
Hi Ben,
That is actually a very good point. I hadn't quite considered that implication, but you are correct.
As you said, in CalcZAF (and soon PFE!), the correction for secondary fluorescence by a boundary phase is based on the contribution only from the boundary material. Therefore the beam incident material's composition only matters so far as the production of characteristic and continuum x-rays produced by the beam incident phase stimulates secondary fluorescence in the boundary material.
That said, it is important when subtracting larger secondary fluorescence effects to perform this correction during the sample matrix iteration, because if you are subtracting 2 or 3 wt% of an SF artifact from your sample matrix, the quant matrix correction needs to be recalculated, and especially if the fluoresced element is one of the elements in an interference correction.
For example, if you are measuring trace Ni in a Cu alloy adjacent to a Co rich phase, you will measure a large Co signal (up to 4 wt.%) near the Cu-Co boundary and since Co Ka/Kb interferes with Ni Ka, you would be over correcting the interference correction of Co on the trace Ni in the Cu alloy.
However, since I implemented both the spectral interference correction and the secondary boundary fluorescence correction within the matrix iteration, all these issues are handled automatically!
john
Maybe this will only confuse things, but I think some further explanation might be helpful with regard to the correction for secondary fluorescence from nearby phases. Here is an example of Zr diffusion from a zircon crystal into the surrounding glass. The investigator in this case wanted to be sure that the halo of Zr we see around the zircon crystal is real diffusion and not simply an artifact of Zr fluoresced by x-rays emitted from the glass phase.
(https://smf.probesoftware.com/gallery/395_08_02_17_1_09_11.jpeg)
Note that the units here are log(wt.%) as a normal wt.% plot would not show the low level variation in Zr around the zircon crystal.
Below is a plot of the wt% Zr (from point A to point B in the above image), showing the actual EPMA measurement, and also the secondary fluorescence modeling from the Standard application, assuming the glass composition as the beam incident phase (with ~1400 PPM Zr), and zircon as the boundary phase. Note that point A in the plot below is on the left and point B is on the right.
Now, if the boundary artifact is relatively large and the matrix composition changes significantly, then one should perform the secondary boundary fluorescence correction in CalcZAF so the matrix correction is recalculated automatically as the boundary artifact is subtracted. But if the boundary artifact is relatively small (as in this Zr in glass example), then a simple subtraction is more than sufficient accuracy.
(https://smf.probesoftware.com/gallery/395_08_02_17_1_09_26.jpeg)
The "hatched" area is the degree of actual diffusion of Zr in to the glass phase. To obtain this concentration we can simply subtract the boundary artifact from the EPMA measurement and we have the actual Zr diffusion profile...
This is an "old chestnut", but worth pulling out once in a while because I occasionally still see investigators thinking this effect is compositional, when it is simply a secondary fluorescence edge artifact. Here we see intensity as a function of distance in a beam incident composition of 1% Fe 99% Ni adjacent to a boundary material of pure Ni.
(https://smf.probesoftware.com/gallery/395_13_02_17_4_56_29.png)
Note that all electrons come to rest in the beam incident material in this model, so there is no "electron leakage" going on here. Question for discussion: why does the Fe Ka intensity drop off as the edge is approached? And before we answer consider that we see a similar situation in pure Fe adjacent to pure Ni:
(https://smf.probesoftware.com/gallery/395_13_02_17_5_04_26.png)
So what is going on here?
Hi John
Yes this was a timely reminder reading this yesterday - because it's a small effect and only effects limited number of elements - but could potentially be important in analysing small inclusions in a host - where getting accurate stoichiometry is important. This absence of expected self-fluorescence - in a bulk Fe would be fluorescenced by the Fe adjacent to the excitation volume - seems only to effect heavy elements like Fe - I guess where self-fluorescence from kb? is important. It has no impact on lighter elements
Ben
Quote from: Ben Buse on February 22, 2017, 01:10:28 AM
Yes this was a timely reminder reading this yesterday - because it's a small effect and only effects limited number of elements - but could potentially be important in analysing small inclusions in a host - where getting accurate stoichiometry is important. This absence of expected self-fluorescence - in a bulk Fe would be fluorescenced by the Fe adjacent to the excitation volume - seems only to effect heavy elements like Fe - I guess where self-fluorescence from kb? is important. It has no impact on lighter elements
Hi Ben,
My understanding is that the effect is from additional Fe K shell fluorescence from continuum fluorescence produced in the beam incident sample (Fe), and because there is no Fe in the boundary phase to be fluoresced by the emitted continuum radiation as the boundary is approached. Yes, the same thing will occur for inclusions mounted in epoxy as John Fournelle and Phil Gopon pointed out a few years ago when studying iron silicide inclusions in epoxy.
Note that Fe Kb cannot fluoresce the Fe K shell.
The same thing happens for pure Si, but to a smaller degree:
john
(https://smf.probesoftware.com/gallery/395_22_02_17_8_00_04.png)
I should also mention that because of this decrease in self fluorescence near boundaries for elements such as Fe, Phil Gopon and I spent considerable time and effort adding 6 additional "non-traditional" lines for quantitative analysis in probe for EPMA as seen here:
http://smf.probesoftware.com/index.php?topic=152.msg3498#msg3498
These are the Ln, Lg, Lv, Ll, Mg, Mz lines.
john
Quote from: Probeman on February 22, 2017, 08:02:24 AM
Hi Ben,
My understanding is that the effect is from additional Fe K shell fluorescence from continuum fluorescence produced in the beam incident sample (Fe), and because there is no Fe in the boundary phase to be fluoresced by the emitted continuum radiation as the boundary is approached. Yes, the same thing will occur for inclusions mounted in epoxy as John Fournelle and Phil Gopon pointed out a few years ago when studying iron silicide inclusions in epoxy.
Note that Fe Kb cannot fluoresce the Fe K shell.
The same thing happens for pure Si, but to a smaller degree:
john
Hi John,
Thanks - had to read that twice - but it makes sense - now I understand it :)! (Of course Fe kb can't fluoresce: its < binding energy)
Therefore the strength of the effect is the degree to which an element is fluoresced by the continuum.
Thanks
Ben
Hi Ben,
Because of this effect, John Fournelle and Phil Gopon had me add quantification of Ln and Ll lines (La lines are affected by chemical bonding and are not quantitative enough) to Probe for EPMA.
Here is an example for Ln and Ll lines. Note that the boundary effect is *much* smaller for these emission lines.
(https://smf.probesoftware.com/gallery/395_22_02_17_12_05_17.png)
(https://smf.probesoftware.com/gallery/395_22_02_17_12_05_32.png)
To allow everyone to perform these calculations themselves (without performing the 10 hour Monte Carlo simulations themselves), I've attached all my PAR files which are calculated below 1 keV. Just extract these to your user data folder Penfluor folder (usually C:\UserData\Penepma12\Penfluor), and you can run these simulations yourself.
john
Yes so you have two options either correct for depleted continuum fluorescence or switch to L lines - which are an important option, good in some situations (use at low kV - have small interaction volume) - but not without their own problems (low intensity, affected by carbon contamination etc.)
Ben
I am reminded of a talk I heard here a few weeks ago from a highly regarded Professor at a California school which shall remain nameless. There was a particular slide claiming to see differential diffusion profiles towards a grain boundary. Some quick modeling after the talk showed that it could all be explained by secondary fluorescence. I know the three Jo/h/n's (Wade, Donovan, and Fournelle) are adamant about trying to educate the public. What can we do to actually make this point sink in?
Anyways: There are essentially two solutions to this problem as Ben mentioned
1) Acquire the data normally and run it through PENEPMA, modeling the influence of secondary fluorescence. Then removing the influence of secondary fluorescence on each data point during the transect towards the grain boundary. A bit time consuming right now, but I wonder if PfEPMA wouldn't be able to do that quite easily now that is has the modeling built in.....
2) Alternatively use the non-traditional lines J.D. mentioned and use low accelerating potential (<8 keV). The influence of secondary fluorescence goes away for most elements in this case. You could also use the normal L lines if all you are after is the diffusion profile, and not absolute concentrations.
Quote from: Ben Buse on February 22, 2017, 11:12:44 PM
Yes so you have two options either correct for depleted continuum fluorescence or switch to L lines - which are an important option, good in some situations (use at low kV - have small interaction volume) - but not without their own problems (low intensity, affected by carbon contamination etc.)
Hi Ben,
Yes, that's exactly how it looks to me. The good news is that using Standard.exe, we can at least tell if the secondary fluorescence boundary problem is likely to be negligible, minor or severe.
john
Quote from: pgopon on February 23, 2017, 02:40:54 AM
I am reminded of a talk I heard here a few weeks ago from a highly regarded Professor at a California school which shall remain nameless. There was a particular slide claiming to see differential diffusion profiles towards a grain boundary. Some quick modeling after the talk showed that it could all be explained by secondary fluorescence. I know the three Jo/h/n's (Wade, Donovan, and Fournelle) are adamant about trying to educate the public. What can we do to actually make this point sink in?
Hi Phil,
Yes, it is dismaying to see. I saw several talks at AGU last December, that claimed to be modeling trace element diffusion, but merely showed secondary fluorescence artifacts.
For now, the best thing is to spread around the link to the secondary fluorescence boundary paper to everyone. Here is the link again:
http://epmalab.uoregon.edu/publ/Llovet,%20et%20al.,%20Secondary%20fluorescence%20in%20electron%20probe%20microanalysis%20of%20couple%20materials.pdf
The next best thing of course would be for us all to publish some geology papers that actually cite this paper- because apparently geologists don't read the Jour. Appl. Phys!
And just FYI, I am planning on implementing an automatic multi-element secondary fluorescence from boundary correction into Probe for EPMA, but the GUI is non trivial.
And even more important for real world correction of these artifacts is that we will need to calibrate the degree and extent of our Bragg defocusing for each WDS spectrometer/crystal (and probably sin theta) combination as well (the SF boundary modeling/correction in Standard/CalcZAF assumes no WDS Bragg defocusing so it only rigorously applies to EDS spectrometers). This is because the amount of SF artifact from a boundary phase is highly dependent on the relative orientation of the phase boundary to the WDS spectrometer. This is also non-trivial to implement.
I would welcome collaboration on this effort.
john
I decided to draw up a couple of simple schematic diagrams to help explain the Bragg defocus effect on secondary fluorescence from boundaries.
Let's take the impressive example of measuring Cr in a basaltic glass adjacent to a chromium phase, for example Cr2O3 or chromite, as seen here:
(https://smf.probesoftware.com/gallery/1_09_03_17_5_05_54.png)
Because the Fe x-rays emitted from the beam spot in a basaltic glass easily fluoresce the Cr K shell in the adjacent oxide, we get almost 1 wt.% of SF artifact at 1 um from the boundary and even at 100 um from the boundary we still should measure ~100 PPM of Cr in the glass, even if there is no Cr in the glass at all!
Now, there is a strong orientation effect, though *not* for EDS. With an EDS detector we will see essentially the secondary fluorescence artifact we have modeled because EDS detectors show no collimation effects for several millimeters or more from the beam position (hence the origin of so-called "system" peaks).
And for WDS spectrometers where the glass to oxide boundary is oriented parallel to the length of the WDS Bragg crystal there is also minimal defocusing effect, therefore what the Standard SF model shows is what one will observe in actual measurements. This is the situation shown in this schematic:
(https://smf.probesoftware.com/gallery/1_09_03_17_5_06_29.png)
However, if the glass to oxide interface is oriented perpendicular to the length of the WDS Bragg crystal we will have a strong defocusing effect, and the actual secondary fluorescence artifact from the adjacent oxide phase will be decreased depending on the spectrometer geometry details (spectral resolution, sin theta, etc). This is the situation shown here:
(https://smf.probesoftware.com/gallery/1_09_03_17_5_06_48.png)
And for "in between" spectrometer to boundary orientations, the degree of Bragg defocusing is also "in-between"! :o
My next project will be to start devising a procedure to characterize the degree of Bragg defocusing for one's WDS spectrometers, in order to provide a defocus correction to the secondary fluorescence from boundary phases correction in the matrix correction! A correction of a correction of a correction!
Please let me know if I didn't explain this clearly enough. It's quite complicated.
john
like this...
(https://smf.probesoftware.com/gallery/453_13_03_17_9_13_00.png)
Very nice Ben! Much better than my crude schematic!
Just to bring them together a little, here is roughly the orientation of the Bragg crystals for the map defocusing that Ben's image shows:
(https://smf.probesoftware.com/gallery/395_13_03_17_3_47_19.png)
The red rectangles being the Bragg crystals in the spectrometers (not to scale!). Spectrometers mounted on opposite sides of the instrument will produce this Bragg defocus orientation.
john
Hi,
I was working through the secondary fluorescence ouput - reminding myself what everything is. And something stuck me as odd.
The calc. conc. is the concentration of the component from material A and material B calculated seperately correcting for the matrix effects that each component suffers.
I thought Calc. conc. for B should be: Calc. B Flu Conc. % = Fluor. B Only %. * B ZAF.
As Calc. conc% is the actual matrix effects undergone by the secondary fluorescence x-ray from generation to detection. In the case of Fluor B it will undergo matrix effects in mat. B. Is this right?
But for a case where there is no Al in A it seems to be
Calc. B Flu Conc. % = Fluor. B Only %. * ZAF u/s or A ZAF.
As shown by the following
(https://smf.probesoftware.com/gallery/453_12_04_17_9_30_45.png)
Measured conc. % is the bulk composition measured by microprobe - so ZAF correction is given by
(https://smf.probesoftware.com/gallery/453_12_04_17_9_32_32.png)
Thanks
Ben
Quote from: Ben Buse on April 12, 2017, 09:38:25 AM
I was working through the secondary fluorescence ouput - reminding myself what everything is. And something stuck me as odd.
The calc. conc. is the concentration of the component from material A and material B calculated seperately correcting for the matrix effects that each component suffers.
I thought Calc. conc. for B should be: Calc. B Flu Conc. % = Fluor. B Only %. * B ZAF.
As Calc. conc% is the actual matrix effects undergone by the secondary fluorescence x-ray from generation to detection. In the case of Fluor B it will undergo matrix effects in mat. B. Is this right?
But for a case where there is no Al in A it seems to be
Calc. B Flu Conc. % = Fluor. B Only %. * ZAF u/s or A ZAF.
Hi Ben,
I love that someone is checking all this. It's been a long time since I wrote this so I would have to work through it, but since you're already deep into it (and I am swamped with work)... you can download the entire CalcZAF (and Standard) source code from Github and run through it yourself. But here is the calculation routine in question for you to see exactly what I am doing:
Sub Penepma12OutputKratios(tfolder As String)
' Ouput the original k-ratios and the modified k-ratios, "apparent" concentrations and correction factors
' analysis.StdAssignsZAFCors(1,chan%) = absorption correction
' analysis.StdAssignsZAFCors(2,chan%) = fluorescence correction
' analysis.StdAssignsZAFCors(3,chan%) = atomic number correction
' analysis.StdAssignsZAFCors(4,chan%) = ZAF correction (abscor*flucor*zedcor)
' analysis.StdAssignsZAFCors!(5, i%) = stopping power
' analysis.StdAssignsZAFCors!(6, i%) = backscatter
' analysis.StdAssignsZAFCors!(7, i%) = std intensity
' analysis.StdAssignsZAFCors!(8, i%) = unk intensity
ierror = False
On Error GoTo Penepma12OutputKratiosError
Dim i As Integer, j As Integer
Dim ipA As Integer, ipB As Integer, ipBStd As Integer
Dim unk_int_pri As Double, unk_int_flu As Double, unk_int_all As Double
Dim tzafA(1 To MAXZAFCOR%) As Double
Dim unk_krat_meas As Double, unk_zaf_meas As Double, unk_conc_meas As Double
' Initialize module values if case they are not loaded (Mat A does not contain the measured element)
Fanal_Krats! = 0#
Fanal_ZAFCors!(1) = 0#
Fanal_ZAFCors!(2) = 0#
Fanal_ZAFCors!(3) = 0#
Fanal_ZAFCors!(4) = 0#
unk_krat_meas# = 0#
unk_zaf_meas# = 0#
unk_conc_meas# = 0#
' Get composition from each .par file (loads MaterialMeasuredTakeoff# and MaterialMeasuredEnergy# for Penepma12CalculateMatrix)
Call Penepma12GetParFileComposition(Int(3), PENEPMA_Root$ & "\Fanal\db\" & ParameterFileBStd$, PENEPMA_SampleBStd())
If ierror Then Exit Sub
Call Penepma12CalculateMatrix(PENEPMA_Analysis, PENEPMA_SampleBStd(), Penepma_TmpSample())
If ierror Then Exit Sub
' Load BStd parameters for calculations below
For i% = 1 To MAXCHAN%
MatBStd_Krats!(i%) = PENEPMA_Analysis.StdAssignsKfactors!(i%)
MatBStd_StdPercents!(i%) = PENEPMA_Analysis.StdAssignsPercents!(i%)
For j% = 1 To MAXZAFCOR%
MatBStd_ZAFCors!(j%, i%) = PENEPMA_Analysis.StdAssignsZAFCors!(j%, i%)
Next j%
Next i%
' Do material B
Call Penepma12GetParFileComposition(Int(2), PENEPMA_Root$ & "\Fanal\db\" & ParameterFileB$, PENEPMA_SampleB())
If ierror Then Exit Sub
Call Penepma12CalculateMatrix(PENEPMA_Analysis, PENEPMA_SampleB(), Penepma_TmpSample())
If ierror Then Exit Sub
' Load B parameters for calculations below
For i% = 1 To MAXCHAN%
MatB_Krats!(i%) = PENEPMA_Analysis.StdAssignsKfactors!(i%)
MatB_StdPercents!(i%) = PENEPMA_Analysis.StdAssignsPercents!(i%)
For j% = 1 To MAXZAFCOR%
MatB_ZAFCors!(j%, i%) = PENEPMA_Analysis.StdAssignsZAFCors!(j%, i%)
Next j%
Next i%
' Do material A last!!!! (to keep specified element wt%s for non-absorbers in Penepma12OutputKratios3 calculation)
Call Penepma12GetParFileComposition(Int(1), PENEPMA_Root$ & "\Fanal\db\" & ParameterFileA$, PENEPMA_SampleA())
If ierror Then Exit Sub
Call Penepma12CalculateMatrix(PENEPMA_Analysis, PENEPMA_SampleA(), Penepma_TmpSample())
If ierror Then Exit Sub
' Load A parameters for calculations below
For i% = 1 To MAXCHAN%
MatA_Krats!(i%) = PENEPMA_Analysis.StdAssignsKfactors!(i%)
MatA_StdPercents!(i%) = PENEPMA_Analysis.StdAssignsPercents!(i%)
For j% = 1 To MAXZAFCOR%
MatA_ZAFCors!(j%, i%) = PENEPMA_Analysis.StdAssignsZAFCors!(j%, i%)
Next j%
Next i%
' Determine measured element in sample arrays
ipA% = IPOS1%(PENEPMA_SampleA(1).LastChan%, Symlo$(MaterialMeasuredElement%), PENEPMA_SampleA(1).Elsyms$())
ipB% = IPOS1%(PENEPMA_SampleB(1).LastChan%, Symlo$(MaterialMeasuredElement%), PENEPMA_SampleB(1).Elsyms$())
ipBStd% = IPOS1%(PENEPMA_SampleBStd(1).LastChan%, Symlo$(MaterialMeasuredElement%), PENEPMA_SampleBStd(1).Elsyms$())
' Correct intensity data for matrix effects (k-ratio is in %)
If ipA% > 0 And ipBStd% > 0 Then
' First calculate total fluorescence from each material
Call IOWriteLog(vbNullString)
For i% = 1 To nPoints&
If std_int#(i%) = 0# Then GoTo Penepma12OutputKratiosStdIntZero
' Calculate and load total fluorescence and primary k-ratios
fluA_k#(i%) = 100# * (flach#(i%) + flabr#(i%)) / std_int#(i%)
fluB_k#(i%) = 100# * (flbch#(i%) + flbbr#(i%)) / std_int#(i%)
prix_k#(i%) = 100# * pri_int#(i%) / std_int#(i%)
Next i%
' Calculate CalcZAF matrix correction from current ZAF selection (in case it is needed when measured element is not in Mat A)
tzafA#(1) = MatA_ZAFCors!(1, ipA%) / MatBStd_ZAFCors!(1, ipBStd%) ' 1 = A only, 2 = F only, 3 = Z only, 4 = ZAF
tzafA#(2) = MatA_ZAFCors!(2, ipA%) / MatBStd_ZAFCors!(2, ipBStd%) ' 1 = A only, 2 = F only, 3 = Z only, 4 = ZAF
tzafA#(3) = MatA_ZAFCors!(3, ipA%) / MatBStd_ZAFCors!(3, ipBStd%) ' 1 = A only, 2 = F only, 3 = Z only, 4 = ZAF
tzafA#(4) = MatA_ZAFCors!(4, ipA%) / MatBStd_ZAFCors!(4, ipBStd%) ' 1 = A only, 2 = F only, 3 = Z only, 4 = ZAF
' Calculate Mat A matrix correction based on known intensities and concentrations from Fanal (to be self consistant)
For i% = 1 To nPoints&
unk_int_pri# = pri_int#(i%) ' calculate Mat A primary intensity
unk_int_flu# = flach#(i%) + flabr#(i%) ' calculate Mat A fluorescence intensity
' If performing bulk matrix correction, load fluorescence contribution from material B also
If ParameterFileA$ = ParameterFileB$ Then unk_int_flu# = unk_int_flu# + flbch#(i%) + flbbr#(i%)
' Calculate Mat A total intensity (or Mat A and Mat B total intensity if bulk matrix)
unk_int_all# = unk_int_flu# + unk_int_pri#
' Load material A matrix corrections with Fanal values (1 = A only, 2 = F only, 3 = Z only, 4 = ZAF)
If unk_int_all# <> 0# Then
Fanal_Krats! = unk_int_all# / std_int#(i%) * MatBStd_StdPercents!(ipBStd%) / 100#
Fanal_ZAFCors!(4) = MatA_StdPercents!(ipA%) / MatBStd_StdPercents!(ipBStd%) * std_int#(i%) / unk_int_all#
' Overload tzafA ZAF value for self consistent "apparent" concentration calculations below
tzafA#(4) = Fanal_ZAFCors!(4)
' If B std is a pure element and primary intensity is non-zero, then calculate fluorescence and combined ZA terms
If MatBStd_StdPercents!(ipBStd%) = 100# And pri_int#(i%) > 0# Then
Fanal_ZAFCors!(2) = 1# / (1# + unk_int_flu# / unk_int_all#) ' calculate fluorescence only
'Fanal_ZAFCors!(3) = MatA_StdPercents!(ipA%) / MatBStd_StdPercents!(ipBStd%) * std_int#(i%) / unk_int_pri#
'Fanal_ZAFCors!(1) = MatA_StdPercents!(ipA%) / MatBStd_StdPercents!(ipBStd%) * std_int#(i%) / unk_int_pri#
Fanal_ZAFCors!(3) = Fanal_ZAFCors!(4) / Fanal_ZAFCors!(2) ' calculate combined ZA
Fanal_ZAFCors!(1) = Fanal_ZAFCors!(4) / Fanal_ZAFCors!(2) ' calculate combined ZA
End If
End If
' Calculate "measured" concentration using CalcZAF matrix correction based on actual apparent intensities
If MatBStd_StdPercents!(ipBStd%) = 100# Then
Call Penepma12OutputKratios3(ipA%, PENEPMA_Analysis, PENEPMA_SampleA(), yktotal#(i%), unk_krat_meas#, unk_zaf_meas#, unk_conc_meas#)
If ierror Then Exit Sub
' Load "measured" concentration
yktotal_meas#(i%) = unk_krat_meas#
yztotal_meas#(i%) = unk_zaf_meas#
yctotal_meas#(i%) = unk_conc_meas#
nsets& = 4
Else
nsets& = 3
End If
' Apply full material A correction to total intensity to obtain "apparent" concentration in material A
yctotal#(i%) = yktotal#(i%) * tzafA#(4) * MatBStd_StdPercents!(ipBStd%) / 100#
' Apply full material A correction to material A fluorescence to obtain "apparent" concentration from material A fluorescence
ycA_only#(i%) = fluA_k#(i%) * tzafA#(4) * MatBStd_StdPercents!(ipBStd%) / 100#
' Apply full material A correction to material B fluorescence (boundary) to obtain "apparent" concentration from material B fluorescence
ycb_only#(i%) = fluB_k#(i%) * tzafA#(4) * MatBStd_StdPercents!(ipBStd%) / 100#
' Apply full material A correction to primary x-ray to obtain "apparent" concentration
yc_prix#(i%) = prix_k#(i%) * tzafA#(4) * MatBStd_StdPercents!(ipBStd%) / 100#
' Output dist and k-ratio to log window
If ParameterFileA$ <> ParameterFileB$ Then
Call IOWriteLog("Penepma12OutputKratios: dist=" & Format$(xdist(i%)) & " um, kratio%= " & Format$(yktotal(i%)))
Else
If i% = nPoints& Then Call IOWriteLog("Penepma12OutputKratios: matrix kratio%= " & Format$(yktotal(i%)))
End If
Next i%
Else
GoTo Penepma12OutputKratiosElementNotFound
End If
' Create modified k-ratio output file
Call Penepma12OutputKratios2(tfolder$)
If ierror Then Exit Sub
Exit Sub
' Errors
Penepma12OutputKratiosError:
MsgBox Error$, vbOKOnly + vbCritical, "Penepma12OutputKratios"
Close #Temp1FileNumber%
Call IOStatusAuto(vbNullString)
ierror = True
Exit Sub
Penepma12OutputKratiosElementNotFound:
msg$ = "The measured element " & Symlo$(MaterialMeasuredElement%) & " was not found in the material A or the material B Std compositions. This error should not occur, please contact Probe Software with details."
MsgBox msg$, vbOKOnly + vbExclamation, "Penepma12OutputKratio"
Close #Temp1FileNumber%
Call IOStatusAuto(vbNullString)
ierror = True
Exit Sub
Penepma12OutputKratiosStdIntZero:
msg$ = "The standard intensity for the measured element " & Symlo$(MaterialMeasuredElement%) & " " & Xraylo$(MaterialMeasuredXray%) & " was zero for the material B Std composition (" & ParameterFileBStd$ & ") at " & Format$(MaterialMeasuredEnergy#) & " keV. This error should not occur, please contact Probe Software with details (and check the Fanal\k-ratios.dat file)."
MsgBox msg$, vbOKOnly + vbExclamation, "Penepma12OutputKratio"
Close #Temp1FileNumber%
Call IOStatusAuto(vbNullString)
ierror = True
Exit Sub
End Sub
And here is the output code:
Sub Penepma12OutputKratios2(tfolder As String)
' Output k-ratio and modified results to a text file for off-line plotting
' analysis.StdAssignsZAFCors(1,chan%) = absorption correction
' analysis.StdAssignsZAFCors(2,chan%) = fluorescence correction
' analysis.StdAssignsZAFCors(3,chan%) = atomic number correction
' analysis.StdAssignsZAFCors(4,chan%) = ZAF correction (abscor*flucor*zedcor)
ierror = False
On Error GoTo Penepma12OutputKratios2Error
Dim astring As String
Dim i As Integer
Dim ipA As Integer, ipB As Integer, ipBStd As Integer
Dim temp1 As Single, temp2 As Single
' Load the modified k-ratio output file name
KRATIOS_DAT_File2$ = tfolder$ & "\k-ratios2.dat"
Open KRATIOS_DAT_File2$ For Output As #Temp1FileNumber%
' Create column labels
astring$ = vbNullString
astring$ = astring$ & VbDquote$ & "TO/keV/Elm/Xray" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "Distance (um)" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "Total Inten. %" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "Fluor. Only %" & VbDquote$ & vbTab
' Calculate and load total fluorescence and primary k-ratios
astring$ = astring$ & VbDquote$ & "Fluor. A Only %" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "Fluor. B Only %" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "Pri. Int. Only %" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "Calc. Total Conc. %" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "Calc. A Flu Conc. %" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "Calc. B Flu Conc. %" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "Calc. Pri. Conc. %" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "Meas. Total Inten. %" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "Meas. ZAF" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "Meas. Total Conc. %" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "Actual A Conc. %" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "Actual B Conc. %" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "Actual B Std Conc. %" & VbDquote$ & vbTab
' Output Fanal matrix factors (unkZAF/stdZAF)
astring$ = astring$ & VbDquote$ & "ZA u/s (Fanal)" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "Flu u/s (Fanal)" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "ZAF u/s (Fanal)" & VbDquote$ & vbTab
' Output related CalcZAF factors
astring$ = astring$ & VbDquote$ & "ZA u/s (CalcZAF)" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "Flu u/s (CalcZAF)" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "ZAF u/s (CalcZAF)" & VbDquote$ & vbTab
' Output normal CalcZAF matrix factors
astring$ = astring$ & VbDquote$ & "A Abs (CalcZAF)" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "A Flu (CalcZAF)" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "A Zed (CalcZAF)" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "A ZAF (CalcZAF)" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "B Abs (CalcZAF)" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "B Flu (CalcZAF)" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "B Zed (CalcZAF)" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "B ZAF (CalcZAF)" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "B Std Abs (CalcZAF)" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "B Std Flu (CalcZAF)" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "B Std Zed (CalcZAF)" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "B Std ZAF (CalcZAF)" & VbDquote$ & vbTab
astring$ = astring$ & VbDquote$ & "Distance (ug/cm2)" & VbDquote$ & vbTab
Print #Temp1FileNumber%, astring$
' Determine measured element in sample arrays (only ipB can be zero)
ipA% = IPOS1%(PENEPMA_SampleA(1).LastChan%, Symlo$(MaterialMeasuredElement%), PENEPMA_SampleA(1).Elsyms$())
ipB% = IPOS1%(PENEPMA_SampleB(1).LastChan%, Symlo$(MaterialMeasuredElement%), PENEPMA_SampleB(1).Elsyms$())
ipBStd% = IPOS1%(PENEPMA_SampleBStd(1).LastChan%, Symlo$(MaterialMeasuredElement%), PENEPMA_SampleBStd(1).Elsyms$())
If ipA% = 0 Or ipBStd% = 0 Then GoTo Penepma12OutputKratios2NoEmittingElement
' Check for number of points
If nPoints& < 1 Then GoTo Penepma12OutputKratios2NoPoints
' Output data
For i% = 1 To nPoints&
astring$ = vbNullString
astring$ = astring$ & VbDquote$ & Format$(MaterialMeasuredTakeoff#) & "/" & Format$(MaterialMeasuredEnergy#) & "/" & Trim$(Symup$(MaterialMeasuredElement%)) & "/" & Xraylo$(MaterialMeasuredXray%) & VbDquote$ & vbTab
astring$ = astring$ & MiscAutoFormatD$(xdist#(i%)) & vbTab
astring$ = astring$ & MiscAutoFormatD$(yktotal#(i%)) & vbTab
astring$ = astring$ & MiscAutoFormatD$(ykfluor#(i%)) & vbTab
astring$ = astring$ & MiscAutoFormatD$(fluA_k#(i%)) & vbTab
astring$ = astring$ & MiscAutoFormatD$(fluB_k#(i%)) & vbTab
astring$ = astring$ & MiscAutoFormatD$(prix_k#(i%)) & vbTab
astring$ = astring$ & MiscAutoFormatD$(yctotal#(i%)) & vbTab
astring$ = astring$ & MiscAutoFormatD$(ycA_only#(i%)) & vbTab
astring$ = astring$ & MiscAutoFormatD$(ycb_only#(i%)) & vbTab
astring$ = astring$ & MiscAutoFormatD$(yc_prix#(i%)) & vbTab
astring$ = astring$ & MiscAutoFormatD$(yktotal_meas#(i%)) & vbTab
astring$ = astring$ & MiscAutoFormatD$(yztotal_meas#(i%)) & vbTab
astring$ = astring$ & MiscAutoFormatD$(yctotal_meas#(i%)) & vbTab
' Only output material B concentration if measured element is present in material B
astring$ = astring$ & MiscAutoFormat$(MatA_StdPercents!(ipA%)) & vbTab
If ipB% > 0 Then
astring$ = astring$ & MiscAutoFormat$(MatB_StdPercents!(ipB%)) & vbTab
Else
astring$ = astring$ & MiscAutoFormat$(INT_ZERO%) & vbTab
End If
astring$ = astring$ & MiscAutoFormat$(MatBStd_StdPercents!(ipBStd%)) & vbTab
' Output Fanal matrix factors (unkZAF/stdZAF)
astring$ = astring$ & MiscAutoFormat$(Fanal_ZAFCors!(1)) & vbTab ' combined ZA terms
astring$ = astring$ & MiscAutoFormat$(Fanal_ZAFCors!(2)) & vbTab ' fluorescence only
astring$ = astring$ & MiscAutoFormat$(Fanal_ZAFCors!(4)) & vbTab ' ZAF correction
' Output related CalcZAF matrix factors (unkZAF/stdZAF)
temp1! = MatA_ZAFCors!(1, ipA%) * MatA_ZAFCors!(3, ipA%)
temp2! = MatBStd_ZAFCors!(1, ipBStd%) * MatBStd_ZAFCors!(3, ipBStd%)
astring$ = astring$ & MiscAutoFormat$(temp1! / temp2!) & vbTab ' combined ZA term
astring$ = astring$ & MiscAutoFormat$(MatA_ZAFCors!(2, ipA%) / MatBStd_ZAFCors!(2, ipBStd%)) & vbTab ' fluorescence only
astring$ = astring$ & MiscAutoFormat$(MatA_ZAFCors!(4, ipA%) / MatBStd_ZAFCors!(4, ipBStd%)) & vbTab ' ZAF correction
' Output CalcZAF matrix factors
astring$ = astring$ & MiscAutoFormat$(MatA_ZAFCors!(1, ipA%)) & vbTab ' absorption
astring$ = astring$ & MiscAutoFormat$(MatA_ZAFCors!(2, ipA%)) & vbTab ' fluorescence
astring$ = astring$ & MiscAutoFormat$(MatA_ZAFCors!(3, ipA%)) & vbTab ' atomic number
astring$ = astring$ & MiscAutoFormat$(MatA_ZAFCors!(4, ipA%)) & vbTab ' ZAF correction
' Only output material B matrix corrections if measured element is present in material B
If ipB% > 0 Then
astring$ = astring$ & MiscAutoFormat$(MatB_ZAFCors!(1, ipB%)) & vbTab ' absorption
astring$ = astring$ & MiscAutoFormat$(MatB_ZAFCors!(2, ipB%)) & vbTab ' fluorescence
astring$ = astring$ & MiscAutoFormat$(MatB_ZAFCors!(3, ipB%)) & vbTab ' atomic number
astring$ = astring$ & MiscAutoFormat$(MatB_ZAFCors!(4, ipB%)) & vbTab ' ZAF correction
Else
astring$ = astring$ & MiscAutoFormat$(INT_ZERO%) & vbTab
astring$ = astring$ & MiscAutoFormat$(INT_ZERO%) & vbTab
astring$ = astring$ & MiscAutoFormat$(INT_ZERO%) & vbTab
astring$ = astring$ & MiscAutoFormat$(INT_ZERO%) & vbTab
End If
astring$ = astring$ & MiscAutoFormat$(MatBStd_ZAFCors!(1, ipBStd%)) & vbTab ' absorption
astring$ = astring$ & MiscAutoFormat$(MatBStd_ZAFCors!(2, ipBStd%)) & vbTab ' fluorescence
astring$ = astring$ & MiscAutoFormat$(MatBStd_ZAFCors!(3, ipBStd%)) & vbTab ' atomic number
astring$ = astring$ & MiscAutoFormat$(MatBStd_ZAFCors!(4, ipBStd%)) & vbTab ' ZAF correction
' Calculate mass distance (thickness in ug/cm2)
mdist#(i%) = PENEPMA_SampleA(1).SampleDensity! * Abs(xdist#(i%)) * CMPERMICRON# * MICROGRAMSPERGRAM&
astring$ = astring$ & MiscAutoFormatD$(mdist#(i%)) & vbTab
Print #Temp1FileNumber%, astring$
Next i%
Close #Temp1FileNumber%
' Confirm with user
msg$ = "Modified K-ratio file " & MiscGetFileNameOnly$(KRATIOS_DAT_File2$) & " was saved to " & tfolder$
Call IOWriteLog(msg$)
' Calculate hemispheric intensities for all radii
ReDim yhemi(1 To nPoints&) As Single
Call Penepma12CalculateHemisphere(nPoints&, xdist#(), ykfluor#(), yhemi!())
If ierror Then Exit Sub
Exit Sub
' Errors
Penepma12OutputKratios2Error:
MsgBox Error$, vbOKOnly + vbCritical, "Penepma12OutputKratios2"
Close #Temp1FileNumber%
Call IOStatusAuto(vbNullString)
ierror = True
Exit Sub
Penepma12OutputKratios2NoEmittingElement:
msg$ = "The emitting element is not in paramter A or in parameter BStd (this error should not occur)"
MsgBox msg$, vbOKOnly + vbExclamation, "Penepma12OutputKratios2"
Close #Temp1FileNumber%
Call IOStatusAuto(vbNullString)
ierror = True
Exit Sub
Penepma12OutputKratios2NoPoints:
msg$ = "The number of intensity points output is less than one so something went wrong with the Fanal calculation (try typing Fanal < Fanal.in from the Fanal prompt and see what happens)"
MsgBox msg$, vbOKOnly + vbExclamation, "Penepma12OutputKratios2"
Close #Temp1FileNumber%
Call IOStatusAuto(vbNullString)
ierror = True
Exit Sub
End Sub
And here is the "apparent" concentration calculation code:
Sub Penepma12OutputKratios3(ipA As Integer, analysis As TypeAnalysis, sample() As TypeSample, kratio#, unk_krat_meas#, unk_zaf_meas#, unk_conc_meas#)
' Perform an iteration to calculate the "apparent" concentration (B Std must be a pure element)
ierror = False
On Error GoTo Penepma12OutputKratios3Error
Dim i As Integer
Dim zerror As Integer
Dim unk_krats(1 To MAXCHAN%) As Single
' Load all elements as elemental k-ratios
For i% = 1 To sample(1).LastChan%
unk_krats!(i%) = MatA_Krats!(i%)
If i% = ipA% Then unk_krats!(i%) = kratio# / 100# ' load calculated (measured) k-ratio
Next i%
' Reload the element arrays based on the unknown sample setup
Call ElementGetData(sample())
If ierror Then Exit Sub
' Initialize calculations (0 = phi/rho/z, 1,2,3,4 = alpha fits, 5 = calilbration curve, 6 = fundamental parameters)
If CorrectionFlag% <> MAXCORRECTION% Then
Call ZAFSetZAF(sample())
If ierror Then Exit Sub
Else
'Call ZAFSetZAF3(sample())
'If ierror Then Exit Sub
End If
' No assigned standard used in k-ratio calculation
For i% = 1 To sample(1).LastElm%
sample(1).StdAssigns%(i%) = MAXINTEGER% ' fake standard assignment
Next i%
' Init intensities for unknown and standard
For i% = 1 To sample(1).LastChan%
analysis.StdAssignsCounts!(i%) = 1#
analysis.StdAssignsKfactors!(i%) = 1#
analysis.StdAssignsPercents!(i%) = 100#
Next i%
' Calculate ZAF weights
Call ZAFSmp(Int(1), unk_krats!(), zerror%, analysis, sample())
If ierror Then Exit Sub
' Return k-ratios and concentrations
unk_krat_meas# = analysis.UnkKrats!(ipA%) * 100#
unk_zaf_meas# = analysis.UnkZAFCors!(4, ipA%)
unk_conc_meas# = analysis.WtPercents!(ipA%)
Exit Sub
' Errors
Penepma12OutputKratios3Error:
MsgBox Error$, vbOKOnly + vbCritical, "Penepma12OutputKratios3"
ierror = True
Exit Sub
End Sub
Please let me know where you think I'm doing it wrong.
john
Thanks John - that's good to have the code - and see what it's doing
I may be barking up the wrong tree - For I also looked at Fe secondary fluorescence in Anorthite (grass valley), which also contains Fe. And I couldn't figure out why calc. B conc./fluor. B conc. didn't equal ZAF (see below). So its good to see the code
(https://smf.probesoftware.com/gallery/453_12_04_17_9_43_30.png)
and
(https://smf.probesoftware.com/gallery/453_12_04_17_9_43_47.png)
Ben
Its not the best - too many words, but John, here it is. I may one day get around to writing this up. One day.....
Quote from: jon_wade on November 15, 2017, 02:37:25 AM
Its not the best - too many words, but John, here it is. I may one day get around to writing this up. One day.....
Hi Jon,
You really should write this up soon! People need to know about this.
john
I was trying to find Julie Chouinard's poster from 2014 M&M on secondary fluorescence effects for melt inclusions and couldn't locate it, so here it is attached below (please login to see attachments).
john
John - nice poster. You modelled the melt inclusion with FANAL, but the region of interest is pretty small (0.25 um to 4um). The effects of direct interaction would really exacerbate the effect and have a big effect on the interpretation of this data when stripped out. You should point this out to the diffusion crowd.
Quote from: jon_wade on December 04, 2017, 02:16:08 PM
John - nice poster. You modelled the melt inclusion with FANAL, but the region of interest is pretty small (0.25 um to 4um). The effects of direct interaction would really exacerbate the effect and have a big effect on the interpretation of this data when stripped out. You should point this out to the diffusion crowd.
Hi Jon,
We just submitted a paper to Chemical Geology with Anastassia Borisova (Grenoble) as first author, and Xavier, Paul Asimov (Cal Tech) and myself and others on this very topic!
I sort of instigated this effort after I went to AGU last year, and to my shock around a third of the diffusion profiles I saw in presentations were mostly (if not completely) secondary fluorescence artifacts!
john
I'm happy to say that our paper on secondary fluorescence issues in geological samples has been published. A free link (for 50 days I think) is here:
https://www.sciencedirect.com/science/article/pii/S0009254118302304
Also I've attached a pdf of the paper below (please login to see attachments).
john
no idea who reviewed it.....
Quote from: jon_wade on May 23, 2018, 02:52:46 PM
no idea who reviewed it.....
Ha!
But we certainly appreciated the reviewer's very helpful suggestions nonetheless... :)
After posting about heterogeneous interaction volumes and secondary fluorescence at boundaries I decided to take a more real world example than the simple Fe-Ni boundary. So here is a FeNi alloy adjacent to pure Ni:
(https://smf.probesoftware.com/gallery/395_01_10_18_4_25_56.png)
A negative drop of 1.5% absolute in the Fe concentration and still significant at 10 um from the boundary! The physics gods have their revenge on us! The world is complicated to model!
After I posted the above I realized that a more "real world" example would be FeNi alloy adjacent to epoxy, but as expected, it's pretty much the same effect:
(https://smf.probesoftware.com/gallery/395_01_10_18_4_29_36.png)
Remember: the effects you are seeing here are *NOT* due to electrons "leaking" into the Ni or epoxy. The calculation assumes that all electrons come to rest in the "beam incident" material.
And just in case anyone else is wondering, yes, these "self" secondary fluorescence effects at boundaries can also occur for silicates!
Here is an example of iron in fayalite measured adjacent to anorthite. The iron in the olivine is being self fluoresced by the continuum radiation produced by the electron beam, but since there is no iron in the anorthite (or at least not much), as the analysis position approaches the boundary, the Fe signal decreases because there is no Fe in the anorthite that can be fluoresced by the continuum radiation produced in the beam incident material.
(https://smf.probesoftware.com/gallery/395_02_10_18_1_17_29.png)
This decrease is significant even 10 to 15 um away from the boundary. Again, not because of electron leakage into the boundary material, but because, you know, physics. :)
That is a really nice example. I wanted to see how close one needed to get to the boundary to get a significant C X-ray from the Epoxy. DTSA-II has a nice python function (interface() in the mcSimulate3.py file in the lib directory) to permit one to analyze such a system where one places a secondary material (Epoxy) at a specified distance from the primary material (NBS NiFe). CalcZAF has these materials in the database, so it was easy for me to create the DTSA-II materials and put them into the DTSA-II database and I wrote a python script to do the simulation. I am attaching two images: 1) overlay of spectra with the boundary 0.25, 0.5, and 2.0 microns from the C and 2) a montage of the three C emission images. My apologies to those who have R-G colorblindness. DTSA uses R & G as default colors as part of the first three spectra.
Here's the same C Ka in Fe2SiO4 calculation in Standard using the Penfluor/Fanal GUI:
(https://smf.probesoftware.com/gallery/395_06_10_18_9_36_18.png)
The magnitude of the SF effect is highly dependent on how penetrating the emitted x-ray is, and for carbon it's not much. By comparison, for a high energy x-ray such as Zn Ka, one can obtain a 100 PPM signal in a Al or Mg matrix up to 500 um away from the boundary!
(https://smf.probesoftware.com/gallery/395_06_10_18_9_43_41.png)
Here is the same geometry but calculated out to 500 um from the boundary and plotted on a log scale:
(https://smf.probesoftware.com/gallery/395_06_10_18_9_44_02.png)
These calculations suggest to us that if we want to avoid SF boundary effects, then we should try to utilize the lowest energy emission line possible. So switching this Al/Zn boundary to the Zn La line, we obtain this:
(https://smf.probesoftware.com/gallery/395_06_10_18_9_47_47.png)
Which is more similar to the C Ka emission plot above.
I realized today that the C Ka adjacent to epoxy calculation I did was for Fe2SiO4, while John Minter's calculation was for a NiFe alloy. So I recalulated the NBS NiFe alloy down to 200 eV to capture the carbon intensity and the results are seen here:
(https://smf.probesoftware.com/gallery/395_08_10_18_12_37_37.png)
Note the high absorption of C ka in the difference between the concentration at 30 PPM and the k-ratio at 5 PPM.
If anyone would like to play with these low keV calculations I've attached a ZIP file below with a number of PAR files calculated to below 1 keV. Just unzip these folders to your Penepma12\Penfluor folder and you can load them into the Standard app for modeling. Remember you need to login to see attachments.
john
SF effect of non-contiguous TiO2 phase when measuring Ti in quartz?
Hello all,
I am measuring Ti in individual quartz grains (less than 20 micron long diameter). Problematically, there are small (approximately <5 micron long diameter) TiO2 particles interspersed densely throughout my sample. I did most of my analyses in the centers of crystals that were as far away from the TiO2 phase as possible, ~40 micron away from the nearest particle in most cases. See image below.
I am unfamiliar with modeling complex geometries in Penepma and am hoping that someone has encountered a similar issue and will be able to help. The problem is that the grain of interest is separated from the contaminant crystal in multiple directions by several grain boundaries as well as epoxy. Any help is greatly appreciated,
-Marisa
Quote from: macosta on March 07, 2019, 02:05:05 PM
SF effect of non-contiguous TiO2 phase when measuring Ti in quartz?
Hello all,
I am measuring Ti in individual quartz grains (less than 20 micron long diameter). Problematically, there are small (approximately <5 micron long diameter) TiO2 particles interspersed densely throughout my sample. I did most of my analyses in the centers of crystals that were as far away from the TiO2 phase as possible, ~40 micron away from the nearest particle in most cases. See image below.
I am unfamiliar with modeling complex geometries in Penepma and am hoping that someone has encountered a similar issue and will be able to help. The problem is that the grain of interest is separated from the contaminant crystal in multiple directions by several grain boundaries as well as epoxy. Any help is greatly appreciated,
-Marisa
Hi Marisa,
This sort of thing can get complicated real fast. I try to approach complicated things by first looking at worst case but simplified models. So we already know, using the quick secondary fluorescence GUI for Penfluor/Fanal in Standard (CalcZAF), that if our TiO2 is 40 um away (and I'll assume you're running 15 keV, but maybe not, though it won't be a big effect if you're at 20 keV), the apparent signal from TiO2 is about 0.05 wt% Ti SF effect for an infinite boundary between SiO2 and TiO2. Or 500 PPM. This SiO2/TiO2 SF calculation is described step by step here:
https://smf.probesoftware.com/index.php?topic=58.msg214#msg214
But that doesn't apply to your situation of a 5 um (or less) TiO2 inclusion. So we need to pull out the "big gun" and run the Penepma model using the geometric model for an inclusion in a matrix. Instructions for running Penepma are here:
https://smf.probesoftware.com/index.php?topic=322.0
But the discussion on modeling inclusions using Penepma is here:
https://smf.probesoftware.com/index.php?topic=59.0
Probably should be updated...
So anyway, our next simple but a little more accurate model would be to use Penepma for a 5 um particle inclusion. In this screen shot I created input files for a 5 um TiO2 particle 0, 10, 20, 40 and 80 microns away from the beam position. The 0 um beam position will be in the center of the 5 um TiO2 particle and we can use that as a pseudo standard for the k-ratio (I just realized that I should have added 2.5 microns to all the non-zero distances due to the radius of the 5 um inclusion. Oh well).
Anyway, here is the screen shot, which also shows the basic steps to create the input files and run them from the Penepma batch window:
(https://smf.probesoftware.com/gallery/395_08_03_19_4_22_57.png)
So you should feel free to play around with these Penfluor/Fanal and Penepma GUI interfaces, especially if your samples were run at 20 keV and (oops!), I see from your BSE image that you did. So yes, you should re-do what I'm doing but at 20 keV. But on Monday we can look at the 15 keV models and see what we get.
The point will be that instead of 500 PPM Ti SF effect, we'll get something much smaller. Then the next thing to consider is the fact that you've also got some epoxy in between your SiO2 and your 5 um TiO2 particle. So what will that do?
Well since we know that no characteristic emission lines will be produced from SiO2 that are capable of fluorescing the Ti K edge, we need to only think about continuum emission from the SiO2, and again, only those continuum x-rays that have enough energy to fluoresce the Ti Ka edge in our 5 um TiO2 particle.
To model this in Penepma, will require the use of three materials in our geometric model. Jon Wade and I did create some "trilayer" .geo files but these are intended for a substrate with two thin films deposited on it, so there would some work needed to create a .geo file specifically for your SF situation with SiO2, TiO2 and epoxy.
In the meantime we can imagine what might happen if there was some intervening epoxy between our SiO2 and our TiO2. The continuum x-rays will be produced at the beam incident spot and will travel (roughly) in a spherical direction and until they reach our 5 um TiO2 particle. What will the intervening epoxy do to these high energy continuum x-rays (between 5 and 15 or 20 keV)?
Specifically will these continuum x-rays will tend to be more absorbed by epoxy or less absorbed by epoxy, than SiO2? Nothing like running a physics model I say, so I used Mn Ka traversing 40 um of both SiO2 matrix and epoxy, to see what happens to x-rays that are enough to excite the Ti K edge. Because the Mn Ka is 5.89 keV and the Ti K edge is 4.96 keV so Mn Ka will be a "stand-in" for our high energy continuum x-rays until we do a proper modeling in Penepma with three materials in the proper geometry.
So using the Model Electron and X-Ray Ranges window in CalcZAF, I looked at 40 um of SiO2 for Mn Ka:
Si-O2 = Si1O2 = 60.086g/mol, Si 46.74% O 53.26%
15 keV, 2.7 grams/cm^3
Electron range radius = 2.449919 um
Mn ka, at 15 keV, (6.539 keV edge energy)
X-ray production range radius = 1.837592 um
mn ka absorbed by si = 145.0962
mn ka absorbed by o = 28.13147
Mn ka, x-ray transmission fraction through thickness 40 um (average u/p = 82.8043) = 0.4088993
So about 40% of the Mn Ka x-rays are transmitted through 40 um of SiO2.
And here for Mn Ka in epoxy:
15 keV, 1.16 grams/cm^3
Electron range radius = 5.316666 um
Mn ka, at 15 keV, (6.539 keV edge energy)
X-ray production range radius = 3.987831 um
mn ka absorbed by c = 10.91245
mn ka absorbed by h = .01601
mn ka absorbed by o = 28.13147
mn ka absorbed by cl = 240.9663
Mn ka, x-ray transmission fraction through thickness 40 um (average u/p = 14.06128) = 0.9368385
So about 93% of these Mn Ka x-rays (acting as a "stand-in" for our high energy continuum x-ray that would tend to fluoresce the Ti K edge), will get transmitted through epoxy.
So Mn Ka is a lot less absorbed by epoxy than by SiO2, so whatever SF effect we see in our Penepma modeling, it will be somewhat larger when we run a Penepma model with intervening epoxy. So your question turns out to be very important! We would be underestimating the SF effect if there is some epoxy in between our SiO2 and our TiO2 inclusion!
Now on the other hand, depending on the beam position and TiO2 orientation to the WDS spectrometer, there may also be Bragg defocus effects which will tend to *reduce* the SF effect:
https://www.cambridge.org/core/journals/microscopy-and-microanalysis/article/secondary-fluorescence-in-wds-the-role-of-spectrometer-positioning/94F6F5D3992B37BFBB8B4116BB4605D3
Told you it gets complicated! :D Let's see what we get on Monday and we can take it from there.
Unless someone has already run these models and can share them with us?
I'm waiting for the 40 um distance from a 5 um TiO2 inclusion Penepma run to finish and I'll post those results tomorrow, but I could really use some help from someone with experience in Penepma .geo files to create a .geo file for 3 materials for us with a geometry shown in the attachment below.
The idea being that we could run it twice, once with epoxy as the matrix and a second time with SiO2 as the matrix.
Thanks!
OK, I've got some preliminary results at 15 keV for a 5 um TiO2 particle in an SiO2 matrix:
"Ti ka in Sample" "Distance or Radius (um)" "Std.Tot.Int." "Unk.Tot.Int." "Unk.Tot.Int.Var." "K-ratio" "K-ratio Var."
"5um_TiO2_in_SiO2_10um" 2.5 4.97e-05 2.29e-09 5.90e-10 .000046 .000012
"5um_TiO2_in_SiO2_20um" 2.5 4.97e-05 5.06e-10 2.87e-10 .000010 .000006
"5um_TiO2_in_SiO2_40um" 2.5 4.97e-05 1.21e-10 1.37e-10 .000002 .000003
These k-ratios where calculated using the Extract K-Ratios button in the Standard app, from the Penepma Batch Mode window as described here:
https://smf.probesoftware.com/index.php?topic=202.msg1506#msg1506
For the standard intensity I simply utilized the 0 um distance TiO2 particle model, which isn't exactly correct, but for a trace element, it works just fine.
Note that the "Distance or Radius (um) only refers to the radius of the inclusion which was 5 um in diameter. The actual distances (because I forgot to add the inclusion radius to my beam location distance) are 7.5, 17.5 and 37.5 um.
So converting the k-ratios to % k-ratio and applying a matrix correction of ~1.2 (TiO2 std k-factor = 0.5546) for Ti Ka in SiO2 we get the following results:
Dist from inclu k-ratio % k-ratio wt% matrix corrected
"5um_TiO2_in_SiO2_10um" 7.5 .000046 .0046 .00300 (30 PPM)
"5um_TiO2_in_SiO2_20um" 17.5 .000010 .0010 .00066 (6.6 PPM)
"5um_TiO2_in_SiO2_40um" 37.5 .000002 .0002 .00013 (1.3 PPM)
Therefore we're seeing only about 1-2 PPM SF effect from a 5 um TiO2 particle 40 (37.5) um away from our beam spot in SiO2. I have to admit, it surprises me a bit that at 7.5 um from a 5 um particle and we're only getting 30 PPM of SF effect. Can anyone confirm these calculations?
Next question is how much SF effect will there be when we replace some of that 40 um of SiO2 with epoxy?
Also, does anyone have a .geo file for the geometry for three materials as described in the attachment in the above post (please login to see attachments)?
Quote from: pgopon on February 23, 2017, 02:40:54 AM
I am reminded of a talk I heard here a few weeks ago from a highly regarded Professor at a California school which shall remain nameless. There was a particular slide claiming to see differential diffusion profiles towards a grain boundary. Some quick modeling after the talk showed that it could all be explained by secondary fluorescence. I know the three Jo/h/n's (Wade, Donovan, and Fournelle) are adamant about trying to educate the public. What can we do to actually make this point sink in?
Anyways: There are essentially two solutions to this problem as Ben mentioned
1) Acquire the data normally and run it through PENEPMA, modeling the influence of secondary fluorescence. Then removing the influence of secondary fluorescence on each data point during the transect towards the grain boundary. A bit time consuming right now, but I wonder if PfEPMA wouldn't be able to do that quite easily now that is has the modeling built in.....
2) Alternatively use the non-traditional lines J.D. mentioned and use low accelerating potential (<8 keV). The influence of secondary fluorescence goes away for most elements in this case. You could also use the normal L lines if all you are after is the diffusion profile, and not absolute concentrations.
Hi Phil,
I realize this is a two year old post, but it's worth mentioning again that now there is a geology paper on these SF effects:
https://www.sciencedirect.com/science/article/pii/S0009254118302304
john
Quote from: Probeman on March 11, 2019, 04:07:24 PM
...I could really use some help from someone with experience in Penepma .geo files to create a .geo file for 3 materials for us with a geometry shown in the attachment below.
The idea being that we could run it twice, once with epoxy as the matrix and a second time with SiO2 as the matrix.
Thanks!
Here's the geometry for a .geo file that we need from a Penepma .geo file expert:
(https://smf.probesoftware.com/gallery/395_18_03_19_1_18_38.png)
The materials are arbitrary, we just need help with creating the .geo file. The beam position could be varied but normally we'd put it in the center of the 20 um inclusion.
Does anyone have a file of this (or similar) geometry that they can share with us?
I think this should work (see attachment). I shifted the TiO2 inclusion by 40um, so a beam at (x=0, y=0) hits in the centre of the SiO2 inclusion.
Hello Philippe,
Thank you for your help! It is much appreciated. Just a quick clarifying question - is the TiO2 inclusion shifted 40 micron with respect to the edge of the sphere or the center of it (i.e. is the center or the edge of the TiO2 inclusion 40 microns from the center of the SiO2 phase?) ?
Best,
Marisa
Quote from: Probeman on March 12, 2019, 11:29:52 AM
So converting the k-ratios to % k-ratio and applying a matrix correction of ~1.2 (TiO2 std k-factor = 0.5546) for Ti Ka in SiO2 we get the following results:
Dist from inclu k-ratio % k-ratio wt% matrix corrected
"5um_TiO2_in_SiO2_10um" 7.5 .000046 .0046 .00300 (30 PPM)
"5um_TiO2_in_SiO2_20um" 17.5 .000010 .0010 .00066 (6.6 PPM)
"5um_TiO2_in_SiO2_40um" 37.5 .000002 .0002 .00013 (1.3 PPM)
Therefore we're seeing only about 1-2 PPM SF effect from a 5 um TiO2 particle 40 (37.5) um away from our beam spot in SiO2. I have to admit, it surprises me a bit that at 7.5 um from a 5 um particle and we're only getting 30 PPM of SF effect. Can anyone confirm these calculations?
Someone might wonder where the matrix correction of ~1.2 comes from. Well it's a good question because while the matrix correction for 15 keV, Ti Ka in SiO2 is ~1.2, one might note that in this case the Ti Ka emissions are *not* coming from the SiO2 inclusion, but instead they are emitted from the TiO2 inclusion, which is 37.5 um away from the SiO2!
So we might use a matrix correction for Ti Ka in TiO2, which is roughly 1.08. But in this context of secondary fluorescence I'm not exactly sure what it means to even have a matrix correction for the SF emission. This is why in the Penfluor/Fanal calculation plot we show the concentrations calculated two ways, because I'm not exactly sure how the matrix correction should be applied. Because, let's be honest, secondary fluorescence is not electron-solid physics, it's x-ray fluorescence!
Ben Buse discusses this issue here:
https://smf.probesoftware.com/index.php?topic=58.msg5891#msg5891
and I responded with the code, because frankly, I'm not sure how these SF intensities should be matrix corrected:
https://smf.probesoftware.com/index.php?topic=58.msg5893#msg5893
Perhaps just a simple absorption correction for the fluoresced matrix? Now one might ask: why do we even care about the "apparent" concentration of the secondary fluorescence? The only reason is because our analysis results will assume the concentration is emitted from the beam incident matrix, and will therefore apply the matrix correction for that matrix.
If we then intend to subtract that "apparent" concentration from our results, we will want to be self consistent with those concentrations. Of course in reality we do not want to simply subtract concentrations, for example in an Excel spreadsheet. Instead we would want to subtract the simulated *intensity* during the matrix iteration procedure to obtain the most accurate correction of the secondary fluorescence effect. This procedure in already implemented in the CalcZAF utility and described here:
https://smf.probesoftware.com/index.php?topic=58.msg223#msg223
Quote from: macosta on March 19, 2019, 03:17:43 PM
Hello Philippe,
Thank you for your help! It is much appreciated. Just a quick clarifying question - is the TiO2 inclusion shifted 40 micron with respect to the edge of the sphere or the center of it (i.e. is the center or the edge of the TiO2 inclusion 40 microns from the center of the SiO2 phase?) ?
Best,
Marisa
The 40um is from the center of each half-sphere. This distance is defined by the x-shift of the TiO2 inclusion.
If it helps, I attached the Python script I used to create this geometry. You need Python3 and pypenelopetools https://github.com/pymontecarlo/pypenelopetools (https://github.com/pymontecarlo/pypenelopetools) library, which you should be able to install using
pip install pypenelopetools
Hi Philippe,
Thanks.
We modified and renamed the .geo file to obtain a distance of 40um between the boundaries of the inclusions by setting the x distance of the TiO2 inclusion to 52.5 um (0.525E-02 cm) as seen here highlighted in red.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Nasty fluorescence case
0000000000000000000000000000000000000000000000000000000000000000
SURFACE ( 1) Plane Z=0.00 cm
INDICES=( 0, 0, 0, 1, 0)
X-SCALE=(+1.000000000000000E+00, 0) (DEFAULT=1.0)
Y-SCALE=(+1.000000000000000E+00, 0) (DEFAULT=1.0)
Z-SCALE=(+1.000000000000000E+00, 0) (DEFAULT=1.0)
OMEGA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
THETA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
PHI=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
SURFACE ( 2) Sphere of radius 0.00 cm
INDICES=( 1, 1, 1, 0,-1)
X-SCALE=(+0.200000000000000E-02, 0) (DEFAULT=1.0)
Y-SCALE=(+0.200000000000000E-02, 0) (DEFAULT=1.0)
Z-SCALE=(+0.200000000000000E-02, 0) (DEFAULT=1.0)
OMEGA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
THETA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
PHI=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
SURFACE ( 3) Sphere of radius 0.00 cm
INDICES=( 1, 1, 1, 0,-1)
X-SCALE=(+0.500000000000000E-03, 0) (DEFAULT=1.0)
Y-SCALE=(+0.500000000000000E-03, 0) (DEFAULT=1.0)
Z-SCALE=(+0.500000000000000E-03, 0) (DEFAULT=1.0)
OMEGA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
THETA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
PHI=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
SURFACE ( 4) Cylinder of radius 3.00 cm along z-axis
INDICES=( 1, 1, 0, 0,-1)
X-SCALE=(+3.000000000000000E+00, 0) (DEFAULT=1.0)
Y-SCALE=(+3.000000000000000E+00, 0) (DEFAULT=1.0)
Z-SCALE=(+1.000000000000000E+00, 0) (DEFAULT=1.0)
OMEGA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
THETA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
PHI=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
MODULE ( 1) Inclusion TiO2
MATERIAL( 2)
SURFACE ( 1), SIDE POINTER=(-1)
SURFACE ( 3), SIDE POINTER=(-1)
1111111111111111111111111111111111111111111111111111111111111111
OMEGA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
THETA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
PHI=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
X-SHIFT=(+0.525000000000000E-02, 0) (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
MODULE ( 2) Inclusion SiO2
MATERIAL( 3)
SURFACE ( 1), SIDE POINTER=(-1)
SURFACE ( 2), SIDE POINTER=(-1)
1111111111111111111111111111111111111111111111111111111111111111
OMEGA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
THETA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
PHI=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
MODULE ( 3) matrix
MATERIAL( 1)
SURFACE ( 1), SIDE POINTER=(-1)
SURFACE ( 4), SIDE POINTER=(-1)
MODULE ( 1)
MODULE ( 2)
1111111111111111111111111111111111111111111111111111111111111111
OMEGA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
THETA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
PHI=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
END 0000000000000000000000000000000000000000000000000000000
That is, 40 um plus 10 um radius for the 20 um SiO2 inclusion plus 2.5um radius for the 5 um TiO2 inclusion. The renamed .geo file is attached below.
Attached below are the 10 and 20 um distance (edge to edge) between the TiO2 and SiO2 inclusions .geo files. Hopefully on Monday I can post a small table with the results.
I thought I would share how Marisa and I manually edited the Penepma .in input files to work with Penepma .geo files containing three materials. This manual editing is necessary because the Penepma GUI in Standard only supports one or two materials. This two material limitation covers most modeling situations, e.g., a single phase (bulk.geo), a SF boundary fluorescence (couple.geo), a thin file on a substrate (bilayer_200nm.geo), and an inclusion in a matrix (50mic_sphere.geo).
The reason for not supporting more than two materials in the Standard GUI is that the possible configurations gets complicated, and so it was decided to limit the Penepma GUI in Standard to two materials. But we can add a third material to the Penepma .in input files manually using a text editor, and then still be able to run these input files from the Penepma GUI in Batch Mode, which automatically copies each completed simulation to a specified subfolder for subsequent review and/or k-ratio extraction.
But first let me mention that after manually modifying the Penepma .in files for a third material and then reloading the modified .in file into the Penepma GUI, we discovered a small bug that caused an error message about a missing control index (for the manually edited third material). This bug still allowed the batch mode option to run the simulation, but one had to "click through" the error message for each .in file containing more than two materials. The current version of the Penepma GUI in Standard (update to PFE and CalcZAF v. 12.6.0) now handles three materials for running in batch mode. But please note that loading a manually edited three material .in file into the Penepma GUI (by using the Browse button), and re-saving that .in file, will cause the third material to be excluded from the saved .in file. Bottom line: don't click the Create PENEPMA Input File button if your .in file contains more than two materials. Or if you do, simply re-edit the .in file afterwards, by adding the third material manually, as I am about to describe below.
So, let's start by looking at a three material .geo file, specifically the one created by Philippe Pinard for two inclusions (each a different material) separated by a specified distance, in a matrix (a third material).
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Nasty fluorescence case
0000000000000000000000000000000000000000000000000000000000000000
SURFACE ( 1) Plane Z=0.00 cm
INDICES=( 0, 0, 0, 1, 0)
X-SCALE=(+1.000000000000000E+00, 0) (DEFAULT=1.0)
Y-SCALE=(+1.000000000000000E+00, 0) (DEFAULT=1.0)
Z-SCALE=(+1.000000000000000E+00, 0) (DEFAULT=1.0)
OMEGA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
THETA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
PHI=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
SURFACE ( 2) Sphere of radius 0.00 cm
INDICES=( 1, 1, 1, 0,-1)
X-SCALE=(+0.200000000000000E-02, 0) (DEFAULT=1.0)
Y-SCALE=(+0.200000000000000E-02, 0) (DEFAULT=1.0)
Z-SCALE=(+0.200000000000000E-02, 0) (DEFAULT=1.0)
OMEGA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
THETA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
PHI=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
SURFACE ( 3) Sphere of radius 0.00 cm
INDICES=( 1, 1, 1, 0,-1)
X-SCALE=(+0.500000000000000E-03, 0) (DEFAULT=1.0)
Y-SCALE=(+0.500000000000000E-03, 0) (DEFAULT=1.0)
Z-SCALE=(+0.500000000000000E-03, 0) (DEFAULT=1.0)
OMEGA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
THETA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
PHI=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
SURFACE ( 4) Cylinder of radius 3.00 cm along z-axis
INDICES=( 1, 1, 0, 0,-1)
X-SCALE=(+3.000000000000000E+00, 0) (DEFAULT=1.0)
Y-SCALE=(+3.000000000000000E+00, 0) (DEFAULT=1.0)
Z-SCALE=(+1.000000000000000E+00, 0) (DEFAULT=1.0)
OMEGA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
THETA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
PHI=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
MODULE ( 1) Inclusion TiO2
MATERIAL( 2)
SURFACE ( 1), SIDE POINTER=(-1)
SURFACE ( 3), SIDE POINTER=(-1)
1111111111111111111111111111111111111111111111111111111111111111
OMEGA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
THETA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
PHI=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
X-SHIFT=(+0.525000000000000E-02, 0) (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
MODULE ( 2) Inclusion SiO2
MATERIAL( 3)
SURFACE ( 1), SIDE POINTER=(-1)
SURFACE ( 2), SIDE POINTER=(-1)
1111111111111111111111111111111111111111111111111111111111111111
OMEGA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
THETA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
PHI=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
MODULE ( 3) matrix
MATERIAL( 1)
SURFACE ( 1), SIDE POINTER=(-1)
SURFACE ( 4), SIDE POINTER=(-1)
MODULE ( 1)
MODULE ( 2)
1111111111111111111111111111111111111111111111111111111111111111
OMEGA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
THETA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
PHI=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
END 0000000000000000000000000000000000000000000000000000000
The lines highlighted in red above, indicate which material is assigned to each geometric body. In this particular .geo file, material 2 is the TiO2 inclusion (separated from the SiO2 inclusion by a non-zero distance), material 3 is the SiO2 inclusion (centered on the incident beam when the beam incident X/Y distances are zero), and material 1 is the matrix (SiO2 or epoxy). Note that these three geometric bodies could be any material (as defined in the .in file), and the comments in the .geo file are simply there to assist in their identification in the .geo file. By the way, these .geo files are normally saved to the C:\UserData\Penepma12 folder.
So now we look at a corresponding .in file created using the Penepma GUI in Standard (note that the Penepma .in input files are normally stored in the C:\UserData\Penepm12\Penepma folder). Let's start with a two material .in file, by utilizing the default couple.geo file and modifying it for our two inclusion materials:
(https://smf.probesoftware.com/gallery/395_22_03_19_8_36_44.png)
After the .in file is saved in the 6th step, let's look at it in a text editor:
TITLE Secondary Fluorescence Couple X-ray Production Model
.
>>>>>>>> Electron beam definition.
SENERG 1.50E+04 [Energy of the electron beam, in eV]
SPOSIT 0.001 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 SiO2_atom.mat [Material file, up to 20 chars]
MSIMPA 1.0E+3 1.0E+3 1E+3 0.1 0.1 1E+3 1E+3 [EABS(1:3),C1,C2,WCC,WCR]
MFNAME TiO2_atom.mat [Material file, up to 20 chars]
MSIMPA 1.0E+3 1.0E+3 1E+3 0.1 0.1 1E+3 1E+3 [EABS(1:3),C1,C2,WCC,WCR]
.
>>>>>>>> Geometry of the sample.
GEOMFN 20um_40um_5um.geo [Geometry definition file, 20 chars]
DSMAX 1 1.5e-4 [IB, Maximum step length (cm) in body IB]
DSMAX 2 1.5e-4 [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]
IFORCE 1 2 2 -10 1e-4 1.0 [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 1 2 3 -10 1e-4 1.0 [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 2 1 4 -10 0.1 1.0 [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 2 1 5 -400 0.1 1.0 [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 2 2 2 -10 1e-4 1.0 [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 2 2 3 -10 1e-4 1.0 [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
.
>>>>>>>> Photon detectors (up to 10 different detectors).
PDANGL 45.0 55.0 0.0 360.0 0 [Angular window, in deg, IPSF]
PDENER .0 20e+03 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.0e+09 [Desired number of simulated showers]
RSEED 1 1 [Seeds of the random-number generator]
TIME 100000 [Allotted simulation time, in sec]
In this case material 1 is the first material (SiO2), and material 2 is the second material (TiO2). These material designations could be reversed if the beam incident and boundary materials were swapped in the Penepma GUI.
Now we know from our .geo file that we need the following material ordering:
Material 1 = matrix (SiO2 or epoxy for these particular set of simulations)
Material 2 = TiO2
Material 3 = SiO2
So we need to add a third material for the matrix (SiO2 or epoxy) and then re-arrange the order of the TiO2 and SiO2 materials as seen here:
TITLE Secondary Fluorescence Couple X-ray Production Model
.
>>>>>>>> Electron beam definition.
SENERG 1.50E+04 [Energy of the electron beam, in eV]
SPOSIT 0.001 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 Epon 828 Epoxy.mat [Material file, up to 20 chars]
MSIMPA 1.0E+3 1.0E+3 1E+3 0.1 0.1 1E+3 1E+3 [EABS(1:3),C1,C2,WCC,WCR]
MFNAME TiO2_atom.mat [Material file, up to 20 chars]
MSIMPA 1.0E+3 1.0E+3 1E+3 0.1 0.1 1E+3 1E+3 [EABS(1:3),C1,C2,WCC,WCR]
MFNAME SiO2_atom.mat [Material file, up to 20 chars]
MSIMPA 1.0E+3 1.0E+3 1E+3 0.1 0.1 1E+3 1E+3 [EABS(1:3),C1,C2,WCC,WCR]
.
>>>>>>>> Geometry of the sample.
GEOMFN 20um_40um_5um.geo [Geometry definition file, 20 chars]
DSMAX 1 1.5e-4 [IB, Maximum step length (cm) in body IB]
DSMAX 2 1.5e-4 [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]
IFORCE 1 2 2 -10 1e-4 1.0 [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 1 2 3 -10 1e-4 1.0 [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 2 1 4 -10 0.1 1.0 [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 2 1 5 -400 0.1 1.0 [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 2 2 2 -10 1e-4 1.0 [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 2 2 3 -10 1e-4 1.0 [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
.
>>>>>>>> Photon detectors (up to 10 different detectors).
PDANGL 45.0 55.0 0.0 360.0 0 [Angular window, in deg, IPSF]
PDENER .0 20e+03 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.0e+09 [Desired number of simulated showers]
RSEED 1 1 [Seeds of the random-number generator]
TIME 100000 [Allotted simulation time, in sec]
Note that if one has utilized different SIMPA values for each material, you will want to move those lines along with their corresponding MFNAME lines. But in this case all the minimum electron/photon energies are 1 keV for all three materials.
Now finally one can go to the Batch Mode window from the Penepma GUI and select the .in files to run as seen here where we created different .geo files with different distances, but we used the same .in file, except of course for the Ti standard which will get used for extracting the k-ratios once it's all finished the simulations (note the Ti standard only needs to run a short time compared to the SF inclusion simulations which are expected to be in the PPM range):
(https://smf.probesoftware.com/gallery/395_22_03_19_8_55_40.png)
It's so *simple*... :) seriously though, it's a lot simpler than editing everything by hand, and besides, the two material GUI works for almost all modeling situations.
And you didn't forget the specify the correct beam energy in the .in files for all the models, right? :)
So our 20 keV simulations for a 5um TiO2 inclusion 10, 20 and 40 um from a 20 um SiO2 grain *in an epoxy* matrix, finished over the weekend. I forgot to optimize for secondary fluorescence but the variances are smaller than the k-ratios so perhaps it's OK:
"Ti ka in Sample" "Distance or Radius (um)" "Std.Tot.Int." "Unk.Tot.Int." "Unk.Tot.Int.Var." "K-ratio" "K-ratio Var."
"5um_TiO2_40um_from_20um_SiO2" 0 1.69e-04 7.65e-10 1.37e-10 .000005 .000001
All ti ka k-ratios were calculated and output to folder C:\UserData\Penepma12\Penepma\Batch\5um_TiO2_10-20-40um_from_20um_SiO2_epoxy_matrix\5um_TiO2_40um_from_20um_SiO2
"Ti ka in Sample" "Distance or Radius (um)" "Std.Tot.Int." "Unk.Tot.Int." "Unk.Tot.Int.Var." "K-ratio" "K-ratio Var."
"5um_TiO2_20um_from_20um_SiO2" 0 1.69e-04 1.81e-09 2.08e-10 .000011 .000001
All ti ka k-ratios were calculated and output to folder C:\UserData\Penepma12\Penepma\Batch\5um_TiO2_10-20-40um_from_20um_SiO2_epoxy_matrix\5um_TiO2_20um_from_20um_SiO2
"Ti ka in Sample" "Distance or Radius (um)" "Std.Tot.Int." "Unk.Tot.Int." "Unk.Tot.Int.Var." "K-ratio" "K-ratio Var."
"5um_TiO2_10um_from_20um_SiO2" 0 1.69e-04 3.50e-09 2.94e-10 .000021 .000002
All ti ka k-ratios were calculated and output to folder C:\UserData\Penepma12\Penepma\Batch\5um_TiO2_10-20-40um_from_20um_SiO2_epoxy_matrix\5um_TiO2_10um_from_20um_SiO2
Expressing the k-ratio in PPM we get:
10 um from: 21 +/- 2 PPM
20 um from: 11 +/- 1 PPM
40 um from: 5 +/- 1 PPM
So about the same (~ 1/2) as we got for an SiO2 matrix (at 15 keV), but the distances were a little different so I'm going to re-run the SiO2 matrix simulations with the correct distances and at 20 keV again over the weekend so we can compare apples to apples.
By the way, I'm sure others have already thought of this, but it just occurred to me that if one acquires the Ti signal on *all 5* WDS spectrometers (for ultimate sensitivity as Marisa is doing in her trace element measurements), then the Penepma simulations are actually somewhat more applicable to these WDS measurements because there won't be such a Bragg defocus effect as reported in Ben Buse's paper on this.
https://www.cambridge.org/core/journals/microscopy-and-microanalysis/article/secondary-fluorescence-in-wds-the-role-of-spectrometer-positioning/94F6F5D3992B37BFBB8B4116BB4605D3
Because, the Penepma secondary fluorescence simulations don't account for WDS Bragg defocussing. So acquiring a trace element on all 5 WDS spectrometers reduces the uncertainty from the direction of the fluoresed phase (or boundary) being at different orientations from the fluorescing phase.
So acquiring a trace element on all 5 spectrometers is almost sort of an annular WDS detector! :D
Edit by John: I realized last week that I had used input files that contained a 10 um offset for the calculations below, That placed the incident beam right at the edge of the 20 um diameter SiO2 inclusion, which explains the odd reults as thye distance between the SiO2 and TiO2 incusions (in SiO2 matrix) were decreased.
So after re-running the calcualtions over the weekend, I have edited this post for the correct results and will follow up with a summary post. Sorry for the confusion!
And finally, the above simulation for a 5 um TiO2 inclusion 10, 20 and 40 um from a 20 um SiO2 grain (with the electron beam centered on the 20 um SiO2 inclusion), but this time in an SiO2 matrix. Again, one didn't really need to model 3 materials for this, but just to compare apples to apples...
"Ti ka in Sample" "Distance or Radius (um)" "Std.Tot.Int." "Unk.Tot.Int." "Unk.Tot.Int.Var." "K-ratio" "K-ratio Var."
"5um_TiO2_10um_from_20um_SiO2" 0 1.69e-04 3.25e-09 2.82e-10 .000019 .000002
All ti ka k-ratios were calculated and output to folder C:\UserData\Penepma12\Penepma\Batch\5um_TiO2_10-20-40um_from_20um_SiO2_SiO2_matrix\5um_TiO2_10um_from_20um_SiO2
"Ti ka in Sample" "Distance or Radius (um)" "Std.Tot.Int." "Unk.Tot.Int." "Unk.Tot.Int.Var." "K-ratio" "K-ratio Var."
"5um_TiO2_20um_from_20um_SiO2" 0 1.69e-04 1.76e-09 2.08e-10 .000010 .000001
All ti ka k-ratios were calculated and output to folder C:\UserData\Penepma12\Penepma\Batch\5um_TiO2_10-20-40um_from_20um_SiO2_SiO2_matrix\5um_TiO2_20um_from_20um_SiO2
"Ti ka in Sample" "Distance or Radius (um)" "Std.Tot.Int." "Unk.Tot.Int." "Unk.Tot.Int.Var." "K-ratio" "K-ratio Var."
"5um_TiO2_40um_from_20um_SiO2" 0 1.69e-04 4.79e-10 1.12e-10 .000003 .000001
All ti ka k-ratios were calculated and output to folder C:\UserData\Penepma12\Penepma\Batch\5um_TiO2_10-20-40um_from_20um_SiO2_SiO2_matrix\5um_TiO2_40um_from_20um_SiO2
Expressing the Ti Ka k-ratios in PPM we get for the SiO2 matrix (again at a 20 keV electron energy):
10 um from: 19 +/- 2 PPM
20 um from: 10 +/- 1 PPM
40 um from: 3 +/- 1 PPM
So the SF effect is slightly more pronounced when the SiO2 inclusion and the TiO2 inclusion are separated by epoxy when compared to an SiO2 matrix, and this makes sense since the absorption of continuum x-rays which are of sufficient energy to excite the Ti K edge are less absorbed in epoxy than in SiO2.
After recalculating the SiO2 matrix effect in Penepma for a three material geometry, and editing the above post, here is a summary of the two matrices:
Expressing the Ti Ka k-ratios in PPM we get (for the beam in the center of a 20 um SiO2 inclusion adjacent to a 5 um TiO2 inclusion) in an epoxy matrix (at a 20 keV electron energy):
10 um from: 21 +/- 2 PPM
20 um from: 11 +/- 1 PPM
40 um from: 5 +/- 1 PPM
Expressing the Ti Ka k-ratios in PPM for the same but with an SiO2 matrix (at a 20 keV electron energy):
10 um from: 19 +/- 2 PPM
20 um from: 10 +/- 1 PPM
40 um from: 3 +/- 1 PPM
We can see the effect of less absorption of the continuum (greater SF effect) by the epoxy matrix, by modeling the x-ray absorption in CalcZAF using the Calculate Electron and X-Ray ranges menu as described here:
https://smf.probesoftware.com/index.php?topic=86.0
Doing that we can see that assuming a Cr or Mn Ka radiation as a proxy for continuum x-rays sufficient to excite the Ti K edge (at ~4.9 keV), for a distance of 10 um we get roughly a transmission of 0.8 for an SiO2 matrix, and a transmission of 0.95 for an epoxy matrix.
Therefore the epoxy matrix produces a slightly larger secondary fluorescence effect for Ti Ka than an SiO2 matrix. Sorry for the earlier confusion! :-[
I was recently contacted by Di Zhang at the Institute of Geology and Geophysics, Chinese Academy of Sciences (IGGCAS) and they asked where the Epon 828 epoxy composition comes from (it has 0.3 wt% Cl) and I cannot remember where I found it.
(https://smf.probesoftware.com/gallery/395_28_03_22_11_15_07.png)
It's not a huge contribution is this case as there is only about 40 PPM Cl a few microns from the boundary, but maybe other epoxies have higher Cl contents?
Does any one have compositional data on other epoxies?
This also reminds me of a time a few years ago when we started seeing about 100 PPM of Cl in all our samples, and we finally traced it to our carbon coater, in which the engineer had replaced a piece of vacuum tubing to the roughing pump with PVC tubing, that turned out was out gassing Cl into the system and getting into our carbon coats!
I should also mention that, for the purposes of modeling the boundary fluorescence of Cl by x-rays generated from a (volcanic) glass, the CNOH composition of the epoxy isn't especially important. That is to say, the composition of the organic compounds isn't as important as the Cl content of the epoxy. In other words, the fluorescence of chlorine by X-rays from the glass interaction volume will primarily be from the continuum.
To that end, has anyone here ever attempted to analyze the concentration of Cl or other (non-CNOH) elements in epoxy?
Yeah, I know that normally one always tries to avoid hitting epoxy! :o But if we actually needed to know the Cl concentrations in various epoxies, how might one go about that using the EPMA? Obviously a very gentle, defocused beam, but even then would it be possible?
I also note that asking Google this question I got the following response:
QuoteEpoxy resin used in various applications is superior in adhesive strength, heat resistance and has good handling, too. However, epoxy resin usually includes several percent chlorine as impurities.
So if indeed there are epoxy formulations with several percent Cl, then the boundary fluorescence issue of this element at trace concentrations (near epoxy boundaries) could become a much larger concern for us.
I'll attempt to calculate a PAR file with "several percent chlorine" and present these results...
I found this reference but the pdf is apparently only available in Russian:
"Content of chlorine in epoxy resins and assessment of his [sic] influence on quality of production on their basis" September 2017
As always, the Edinburgh SIMS lab webpage on epoxies is useful here. They don't have absolute Cl concentrations but they identify the epoxy resins with elevated Cl contents.
https://www.ed.ac.uk/geosciences/about/facilities/all/ionprobe/instrument-capabilities-and-sample-requirements/specimen-requirements/epoxy-resins/results/compositions (https://www.ed.ac.uk/geosciences/about/facilities/all/ionprobe/instrument-capabilities-and-sample-requirements/specimen-requirements/epoxy-resins/results/compositions)
It is not trivial in some cases. I definitely ran into this problem when doing analyses of apatite grain mounts where the apatites would get more Cl-rich towards the rims, although that was probably more a problem of mixed analyses than secondary fluorescence.
Interesting.
Any ideas on how we could measure some epoxy Cl concentrations?
The Athens 2022 EPMA just concluded and there were questions about how to correct data for modeled secondary fluorescence effects.
This post here provides one example:
https://smf.probesoftware.com/index.php?topic=58.msg5603#msg5603
It should be noted however, that ideally one should perform a matrix correction after the concentrations have been modified after this subtraction as the "apparent" concentration of the fluoresced element is of course not actually present in the matrix. However, so long as the subtracted concentration is a fraction of a percent the effect should be minimal, particularly on the measured element itself.
In fact the CalcZAF software actually includes this matrix iteration in the secondary fluorescence correction based on defined distances from the boundary. See here for details:
https://smf.probesoftware.com/index.php?topic=58.msg223#msg223
Unfortunately this SF subtraction/iteration GUI not yet implemented in the Probe for EPMA software, though soon perhaps.
But it should also be pointed out that the modeled secondary fluorescence concentrations from Fanal or Penepma are only accurate for EDS detectors (without any Bragg defocusing) and WDS detectors in the two directions parallel to the spectrometer orientation. This is described by Ben Buse in the paper linked to this post here:
https://smf.probesoftware.com/index.php?topic=1447.msg10718#msg10718
To avoid this WDS defocusing effect on the secondary fluorescence from a boundary, one should orient the sample so the boundary is parallel to the spectrometer orientation, hence one of the reasons we are trying to document this spectrometer orientation in JEOL and Cameca microprobes.
Llovet et al. (2022), just published a new paper on correction of secondary boundary fluorescence effects near grain boundaries.
If you ever perform trace/minor element analysis near a boundary, then you should read this new paper attached below (login to see attachments).
I also include one other earlier paper on this subject that is referenced in the above new paper.
Hello all,
I went through the SF correction and have successfully modeled my own standards file (so many hours!)
However, from what I understand, to do SF correction for my own data would require a DAT file that can be easily done with Probe for EPMA? unfortunately our probe doesn't install this but could only export csv file, and I also always copy the raw files (.cor, .wt, .qnt, and .cnd) file. I was wondering in this case can I still do the SF correction with these files or I would have to install Probe for EPMA in our probe PC?
Thanks in advance,
Eason
Quote from: Yishen Zhang on October 20, 2022, 12:50:51 PM
I went through the SF correction and have successfully modeled my own standards file (so many hours!)
So you have run your standards to create .PAR files for your standard compositions using Standard.exe? Nice!
Note that for the purposes of simply modeling a boundary fluorescence to get an idea if there is a significant boundary fluorescence issue, you can just utilize the closest compositions you can find that are already modeled. But it's fine to model your own standard compositions of course, though many/most/some will be pretty much identical to the compositions already provided.
But for the purposes of performing a boundary fluorescence correction you need to model the actual compositions of the boundary in your unknown samples. You will need to model both the beam incident and the boundary materials from your probe analyses.
Now it may be that your standard compositions are very similar to your unknown boundary materials, e.g., SiO2 adjacent to TiO2. In that case you are all set to proceed with the boundary fluorescence correction process.
This procedure is explained here:
https://smf.probesoftware.com/index.php?topic=58.msg214#msg214
Quote from: Yishen Zhang on October 20, 2022, 12:50:51 PM
However, from what I understand, to do SF correction for my own data would require a DAT file that can be easily done with Probe for EPMA? unfortunately our probe doesn't install this but could only export csv file, and I also always copy the raw files (.cor, .wt, .qnt, and .cnd) file. I was wondering in this case can I still do the SF correction with these files or I would have to install Probe for EPMA in our probe PC?
It should be pointed out first of all, that if your boundary fluorescence effect is relatively small, e.g., a trace or minor level fluorescence, then one can simply subtract the fluorescence profile from your analysis measurements. There is no need for a full matrix correction of the composition after subtracting the modeled boundary fluorescence, since you will be subtracting such small concentrations from the matrix. You simply need to relate the analysis points to a linear distance scale in microns. An example of this is found here:
https://smf.probesoftware.com/index.php?topic=58.msg5603#msg5603
However, if your boundary fluorescence is a significant contribution to the matrix effects, say greater than a few weight percent, you might want to perform the fluorescence correction in CalcZAF with an iterative matrix correction. This is described here:
https://smf.probesoftware.com/index.php?topic=58.msg223#msg223
I don't know if the files you describe above are JEOL or Cameca files, but in any case you will need to create your own CalcZAF input files containing the k-ratios (and stage coordinates) in order to perform this boundary fluorescence correction in CalcZAF.
Maybe someone on this forum has a application which can read these OEM files and output a CalcZAF input file format? In any case, here is a post which describes the CalcZAF input file format:
https://smf.probesoftware.com/index.php?topic=81.msg9330#msg9330
Good luck and please feel free to share your results with us.
This relatively recent paper by Llovet et al. is a very complete treatment of secondary fluorescence near mineral boundaries:
https://www.cambridge.org/core/journals/microscopy-and-microanalysis/article/abs/correction-of-secondary-fluorescence-across-phase-boundaries-in-electron-probe-microanalysis-of-mineral-inclusions/788EBDD9322BEE557AB4E3F39C28C09D
Xavier Llovet with Cesc Salvat developed the PENFLUOR and FANAL software to quickly model secondary fluorescence across boundaries and is implemented with an easy to use GUI in the CalcZAF/Standard open source package distributed by Probe Software and can be downloaded here:
https://probesoftware.com/download/CalcZAF.msi
And instructions for generating these models are found here:
https://smf.probesoftware.com/index.php?topic=58.msg214#msg214
It should be noted that although these boundary fluorescence effects are easily modeled in the Standard application, EPMA (or EDS) measurement data can also be corrected for these secondary fluorescence effects using numerical or graphical methods in the CalcZAF application as described here:
https://smf.probesoftware.com/index.php?topic=58.msg223#msg223
This new paper "Secondary fluorescence effect quantification of EPMA analyses of olivine grains embedded in basaltic glass" makes life easier for experimental petrologists who deal with trace element chemistry of synthetic olivine crystals:
https://www.sciencedirect.com/science/article/abs/pii/S0009254123000281
A new correction algorithm (a system of analytical expressions), integrated into a single MS Excel file (attached here), makes it possible to correct EMP analyses (Ca, Ti, Al) of olivines embedded in a basaltic glass matrix.
The only assumption is real olivine grains have to be equant (+/-), close to the hemispherical (1/2 buried sphere) geometry used in PENEPMA modeling.
Fast fluorensence check using FANAL and the par files in compound which derive from the default standard.mdb materials, seem to be missing a spinel MgAl2O4, any plans to add one.
I will have to simulate my local standard ;),
Are Osc Strength & Osc Energy zero?
Quote from: Ben Buse on March 14, 2023, 06:12:33 AM
Fast fluorensence check using FANAL and the par files in compound which derive from the default standard.mdb materials, seem to be missing a spinel MgAl2O4, any plans to add one.
I will have to simulate my local standard ;),
Are Osc Strength & Osc Energy zero?
Hi Ben,
Sure, there are lots of compounds missing. The ones provided are just a sampling of what is possible.
As for the Oscillator Strength and Oscillator Energy, always set those to zero. I believe they get calculated automatically if they are zero. At least that's what I think Cesc Salvat told me once.
Thanks John
Once you've created a .MAT file, just look at any .MAT file using a text editor. These .MAT file are found in the Penepma12\pendbase folder, and you'll see something like this (in this case a NiP compound):
PENELOPE (v. 2012) Material data file ...............
Material: NiP
Mass density = 8.12000000E+00 g/cm**3
Number of elements in the molecule = 2
atomic number = 28, atoms/molecule = 1.00000000E+00
atomic number = 15, atoms/molecule = 9.99658540E-01
Mean excitation energy = 2.53469861E+02 eV
Number of oscillators = 13 (E/P inelastic model)
1 4.99897562E+00 0.00000000E+00 1.93895546E+01 0 30
2 9.99931708E+00 1.13766238E+01 3.05590405E+01 0 30
3 4.00000000E+00 7.30000000E+01 1.84760010E+02 28 7
4 2.00000000E+00 7.50000000E+01 1.89528229E+02 28 6
5 2.00000000E+00 1.17000000E+02 2.95420833E+02 28 5
6 3.99863416E+00 1.34000000E+02 3.38447105E+02 15 4
7 1.99931708E+00 1.35000000E+02 3.40821399E+02 15 3
8 1.99931708E+00 1.91000000E+02 4.82095035E+02 15 2
9 4.00000000E+00 8.60000000E+02 2.17026773E+03 28 4
10 2.00000000E+00 8.77000000E+02 2.21314391E+03 28 3
11 2.00000000E+00 1.01500000E+03 2.56138568E+03 28 2
12 1.99931708E+00 2.14800000E+03 5.42051604E+03 15 1
13 2.00000000E+00 8.33800000E+03 2.10410571E+04 28 1
Number of shells = 13 (Compton IA model)
1 4.99897562E+00 0.00000000E+00 6.85706871E-01 0 30
2 9.99931708E+00 1.13766238E+01 4.58123112E-01 0 30
3 4.00000000E+00 7.30000000E+01 2.02278000E-01 28 7
4 2.00000000E+00 7.50000000E+01 1.99846000E-01 28 6
5 2.00000000E+00 1.17000000E+02 3.20679000E-01 28 5
6 3.99863416E+00 1.34000000E+02 1.34312000E-01 15 4
7 1.99931708E+00 1.35000000E+02 1.33772000E-01 15 3
8 1.99931708E+00 1.91000000E+02 2.49749000E-01 15 2
9 4.00000000E+00 8.60000000E+02 5.93958000E-02 28 4
10 2.00000000E+00 8.77000000E+02 5.86296000E-02 28 3
11 2.00000000E+00 1.01500000E+03 1.15436000E-01 28 2
12 1.99931708E+00 2.14800000E+03 5.88756000E-02 15 1
13 2.00000000E+00 8.33800000E+03 3.06276000E-02 28 1
I'm not sure why one would edit these values from the defaults, but you could ask Xavier.
We found and fixed a small bug related to the oxygen-sulfur equivalence code implemented in v. 13.2.7 of Standard.exe and described here:
https://smf.probesoftware.com/index.php?topic=1247.msg11664#msg11664
which caused an error when calculating boundary fluorescence models for compounds containing sulfur. This error is now fixed. If you have v. 13.2.7 of CalcZAF/Standard please use the Help | Update CalcZAF menu to update your CalcZAF/Standard applications.
Note that if you have Probe for EPMA you can perform a boundary fluorescence correction directly on your unknown data from the Analyze! Window:
https://smf.probesoftware.com/index.php?topic=1545.0
Note that the SF boundary correction does not yet incorporate a Bragg defocus calibration, so at the moment it is a worse case scenario correction. Which depends on the orientation of the boundary relative to the Bragg crystal on the spectrometer being utilized.
But I believe a Bragg defocus calibration is currently being developed...
Quote from: Probeman on October 20, 2022, 01:33:05 PM
Quote from: Yishen Zhang on October 20, 2022, 12:50:51 PM
I went through the SF correction and have successfully modeled my own standards file (so many hours!)
So you have run your standards to create .PAR files for your standard compositions using Standard.exe? Nice!
I have a question regarding the .PAR files used in the FANAL program. What parameters exactly does Standard simulate for set file for an specific material and what information is in the .PAR file? And why does it take a long time to simulate those parameters?
Quote from: Probeman on April 03, 2024, 10:31:03 PM
Note that if you have Probe for EPMA you can perform a boundary fluorescence correction directly on your unknown data from the Analyze! Window:
https://smf.probesoftware.com/index.php?topic=1545.0
Note that the SF boundary correction does not yet incorporate a Bragg defocus calibration, so at the moment it is a worse case scenario correction. Which depends on the orientation of the boundary relative to the Bragg crystal on the spectrometer being utilized.
But I believe a Bragg defocus calibration is currently being developed...
Until this Bragg defocus correction is implemented and one wants to correct for secondary boundary fluorescence (as opposed to FIBing out the sample and mounting the individual grains to avoid fluorescence from nearby phases), you should orient your sample in the stage so that the spectrometer making the trace element is aligned with the boundary. That is the phase boundary you are making measurements adjacent to, should point towards the spectrometer making the trace measurement. Then as one moves the stage away from the adjacent boundary, there is little to no Bragg defocus effects.
And because the Bragg defocus effects are minimized, the boundary fluorescence model calculated from PENFLUOR/FANAL will not over correct the k-ratios.
Of course the opposite approach can also be attempted whereby one orients their specimen in the sample stage so that the adjacent boundary points directly *away* (at 90 degrees) from the spectrometer making the trace measurement. And then one limits their trace measurements to points being at least 50 or 100 um away from the adjacent boundary. Then one might hope that the WDS Bragg defocus reduces the detection of the boundary fluorescence emissions and no boundary fluorescence correction is necessary.
Of course with EDS there are no Bragg defocus effects, so the model from PENFLUOR/FANAL should apply as is for elements measured by EDS.
Quote from: Facundo Bilbao on June 04, 2024, 06:50:19 AM
Quote from: Probeman on October 20, 2022, 01:33:05 PM
Quote from: Yishen Zhang on October 20, 2022, 12:50:51 PM
I went through the SF correction and have successfully modeled my own standards file (so many hours!)
So you have run your standards to create .PAR files for your standard compositions using Standard.exe? Nice!
I have a question regarding the .PAR files used in the FANAL program. What parameters exactly does Standard simulate for set file for an specific material and what information is in the .PAR file? And why does it take a long time to simulate those parameters?
The Standard application merely provides the GUI for the PENFLUOR/FANAL FORTRAN programs. The PAR calculations are performed in PENFLUOR (the left side of the GUI in Standard), while the boundary fluorescence k-ratios are extracted by FANAL (the right side of the GUI in Standard).
(https://smf.probesoftware.com/gallery/1_16_01_20_1_43_39.png)
Note that if the same material is specified for both the beam incident and boundary phases, the k-ratios calculated are for a bulk sample:
https://smf.probesoftware.com/index.php?topic=152.0
I've attached the paper on the FORTRAN programs and also the source code below. One helpful thing is to look at the output in Excel by checking the "Send To Excel" checkbox. That would the the output to the k-ratios2.dat file and also check here:
https://smf.probesoftware.com/index.php?topic=58.msg5895#msg5895
There are some minor modifications to the FANAL code by Donovan, so I've provided both the modified and original code from Llovet.
Quote from: Facundo Bilbao on June 04, 2024, 06:50:19 AM
...And why does it take a long time to simulate those parameters?
The PENFLUOR code is basically the PENELOPE/PENEPMA Monte Carlo code modified to simulate multiple keVs. Monte Carlo can take a long time to obtain reasonable precision on a PC. The default is 3600 seconds per keV, but one can reduce that time if precision is not important.
The advantage of PENFLUOR/FANAL is that once the PAR file has been calculated one can extract k-ratios for any keV and element/x-ray line and distance from the boundary in seconds. Previously we had to run PENEPMA hours for each boundary distance.
Quote from: Probeman on March 29, 2022, 04:27:59 AM
So if indeed there are epoxy formulations with several percent Cl, then the boundary fluorescence issue of this element at trace concentrations (near epoxy boundaries) could become a much larger concern for us.
I'll attempt to calculate a PAR file with "several percent chlorine" and present these results...
Just wondering if you ever did this, and whether par files or images available
Quote from: Ben Buse on October 03, 2024, 05:24:53 AM
Quote from: Probeman on March 29, 2022, 04:27:59 AM
So if indeed there are epoxy formulations with several percent Cl, then the boundary fluorescence issue of this element at trace concentrations (near epoxy boundaries) could become a much larger concern for us.
I'll attempt to calculate a PAR file with "several percent chlorine" and present these results...
Just wondering if you ever did this, and whether par files or images available
Ha, I don't think I did.
But it only takes a few seconds using the PENFLUOR-FANAL GUI in Standard...
If one selects compounds already calculated in the PENEPMA12 distribution, e.g., you can find an orthoclase (high K so possibly fluorescing Cl), an Epon epoxy (0.3 wt% Cl) and a Cl std (pure Cl):
(https://smf.probesoftware.com/gallery/395_03_10_24_9_12_24.png)
Looks like it's less than 10 PPM or so a few microns away from the epoxy boundary, so not too much of a problem it would seem. A much bigger problem for trace Cl was this incident that occurred a few years ago in our lab:
https://smf.probesoftware.com/index.php?topic=423.msg2288#msg2288
We have modified the secondary boundary fluorescence code in CalcZAF so that one can perform the correction on more than a single element at a time (though this particular example does not show this), but the new element list does allow for multiple elements to be corrected for secondary boundary fluorescence at a time:
(https://smf.probesoftware.com/gallery/1_20_11_24_2_01_19.png)
Note that if the contribution of secondary fluorescence is less than a one percent or so, running the boundary correction in CalcZAF in probably not necessary as the matrix correction will not be affected much. Therefore one can simply subtract the contribution from secondary fluorescence using the k-ratios2.dat file in Excel or other post processing application.
But it depends on the physics details. If performing this subtraction manually be sure to utilize the total concentration (beam incident material or MatA PLUS boundary material or Mat B) MINUS the concentration only from the beam incident material (MatA). This is to ensure you only subtract the contribution from the boundary material from your measurements in the beam incident material.
Exceptions to this rule would include things like correction of an element that is interfering with another element and of course secondary fluorescence artifacts that are larger than a percent or so.
These situations are more common than people realize. For example here is the secondary fluorescence of Fe measured in carbon adjacent to Fe metal:
(https://smf.probesoftware.com/gallery/1_20_11_24_11_22_15.png)
And it gets worse:
(https://smf.probesoftware.com/gallery/1_20_11_24_11_25_26.png)
In the previous Fe in carbon example one might get away with a simple subtraction, but in the Cr in Fe example, one must perform the secondary boundary fluorescence correction in CalcZAF, inside the matrix correction (or using Probe for EPMA where it is very easy).
Just for fun I modeled the Fe Ka intensity measured in SiO2 adjacent to FeS2 at 20 keV in both PENEPMA and PENFLUOR, to see how close their results were at 5 um distance from the boundary:
(https://smf.probesoftware.com/gallery/1_07_04_25_8_19_38.png)
Even though PENFLUOR utilizes a much simpler fluorescence model (a point source at the surface), it gives a result within ~80 PPM (~3.6% relative) to PENEPMA.
Note that to output an unknown composition as a PENEPMA or PENFLUOR .MAT (material file) from Probe for EPMA, you can use this button here, once a composition has been calculated in the Analyze! window:
(https://smf.probesoftware.com/gallery/1_08_04_25_2_25_39.png)
This material file can then be used in either the PENEPMA GUI here:
https://smf.probesoftware.com/index.php?topic=322.msg1641#msg1641
or the PENFLUOR GUI here:
https://smf.probesoftware.com/index.php?topic=58.msg214#msg214