Wednesday, June 14, 2017

Lead Sample

Lead Sample
Here is a blog that consists our data about the Lead (Pb) Sample taken under the Scanning Electron Microscope (SEM). Dr. Hassel and Dr. McColgan provided us with 3 stages that each consisted of 6 different element samples in them. This is the data we collected when we studied the Lead Sample from these stages. Below is the data we collected:


Data Number: SAInTCentr
Magnification: 2300
Accelerating Voltage: 30000 Volt
Emission Current: 87000 nA
Working Distance: 15100 um


Above is a picture of the stages we used that consisted of the 6 different metal samples.


Here is a picture of our Research Team enjoying our time studying metal samples on the SEM. The picture is of Tristen Protzmann (left), Chamidu Warnakulasuriya (middle), and Brendan Waffle (right).




Above is the spectrum for our Lead Sample.


In the Lead Sample we found traces of Lead(Pb) and Chromium(Cr). The peaks we found were that Lead peaked at 0.278 keV, 1.835 keV, 2.335 keV, 9.179 keV, 10.544 keV, and 12.610 keV. As for the Chromium, it peaked at 0.523 keV and 5.409 keV.


 Below is the data we collected using the HD Prime X-Ray Flourescence (XRF) Analyzer:


Monday, June 12, 2017

XRF HD Prime Spectrum Data Analysis

Saving Data


The XRF HD Prime provides a variety of ways to save the quantified results from the sample which includes the full results or summarized results. Either way, the results of the spectrum which represents the counts recorded with respect to each energy (in keV) are not recorded in these files. 

Simultaneously hold the buttons 'Ctrl' + 'Shift' on the keyboard connected to the HD prime, to view the spectrum.  This will prompt a dialog to enter the expert password which will grant you access to view the spectrum along with the spectrum line for each element.

Each time the XRF quantifies a sample, a copy of the all the data related to the sample is automatically saved under one file (.hdx extension) to the folder with the date of data collection.

(Common Folder:  C:\Data\[Date of Data Collection])

A software named HD Data Viewer can be used to open such a file to view and save spectrum data. This software shows all the data including the full results, summary, a picture of the sample from the camera, and all the spectrum data, both in linear and log axes. This software is required to export the spectrum data we need to plot the spectrum in Matlab and calculate the peak values.

In HD Data Viewer;
-Import the data by clicking on the 'open' button and selecting the correct '.hdx' file.
-If the scanning information found on the bottom-left corner and the sample picture is correct, the data has been sucessfully imported.
-To view the spectrum data, click on the 'spectrum view' Tab on the top. (Ctrl + 3 for Windows PC)
-The spectrum can be viewed in Log or linear scale. The spectrum for each element listed on the right can also be viewed by simply marking the check-up box next to the particular element.
-Only the 'Raw spectrum' will be selected to export all the necessary data. 
-The drop-down menu in the 'CSV' button will provide you with the option to export the spectrum data from Low, Medium and High energies as shown below.




- Save '.csv' file to a convenient folder.
- To import data to MATLAB easily, the data table in Excel file should be Transposed.

Preparing data fro MATLAB

  • Open the excel sheet exported from HD Data Viewer and select all the data.
  • Simply select the first cell (A1), scroll all the way to the last cell (BZU4), Hold 'Shift' and select the last cell.
  • Right click and Copy.
  • Open a new blank Excel worksheet. 
  • Select the First cell (A1), right click and do a 'Transpose (T)' paste.
  • Save the new excel data sheet






XRF Spectrum in MATLAB

The goal is to use MATLAB to recreate the XRF spectrum, find the peak that is the highest counts and the corresponding energy that represents the K-Alpha value of the primary element.
Furthermore, we can find the counts acquired to the actual value of K-Alpha value of the element/metal.

The 'uiimport' function can be simply used in a script to prompt the user to import the data that we prepared in the previous step. The data will be already selected and ready to be placed in variables that are automatically created. 

The 'pause(time in seconds)' function is also used to give a user enough time to select data before executing the rest of the script.

Select the correct excel data file that was prepared and the data will be automatically selected. MATLAB will prompt the following dialog;



Four new variables will be created which will be seen using 4 blue underlined names. The Data Import dialog can be closed after the data was successfully imported and the rest of the code that depends on the data that was imported will be executed. 

The script that I used to plot the spectrum, find the peak and the other necessary values is shown below;


------------------------------------

prompt = 'How many Samples? ';
N = input(prompt);
Kerror = zeros(N,1);
K = zeros(N,1);
Atomic = zeros(N,1);

for i=0:N-1;
    
close all
clearvars -EXCEPT N Kerror K Atomic i

prompt = 'What is the K alpha of the primary element? ';
realalpha = input(prompt);
prompt = 'What is the Atomic Number of the primary element? ';
Z = input(prompt);

uiimport

pause(20)

LnLE=log(LESubstrateRawSpectrumCounts);
LnME=log(MESubstrateRawSpectrumCounts);
LnHE=log(HESubstrateRawSpectrumCounts);
figure(1)
plot(EnergykeV,LnLE)
title('LE')
xlabel('Energy (keV)')
ylabel('ln (Counts)')
figure(2)
plot(EnergykeV,LnME)
title('ME')
xlabel('Energy (keV)')
ylabel('ln (Counts)')
figure(3)
plot(EnergykeV,LnHE)
title('HE')
xlabel('Energy (keV)')
ylabel('ln (Counts)')

[value, location] = max(LnLE(:));
PeakCount=value
Kalpha = EnergykeV(location)

loc = find(EnergykeV>=realalpha);
LiteratureCount = LnLE(loc(1,1))
% loc2 = find(EnergykeV<=realalpha);
% LiteratureCount2 = LnLE(loc(1,1))
% AvgLiteratureCount= (LiteratureCount+LiteratureCount2)/2
Diff = abs(Kalpha-realalpha);

ind = logical(i);

Kerror(ind+1) = Diff;
Atomic(ind+1) = Z;
K(ind+1) = Kalpha;

end

figure(4)
[m,c] = polyfit(Atomic,K,1);
y = polyval(m,Atomic,c);
plot(Atomic,K,'r.'); hold on;
errorbar(Atomic, y, Kerror);
title('Mosleys Plot')
xlabel('Atomic Number')
ylabel('Energy (keV)')

------------------------------------
The script also produces the Mosley's Plot from the Kalpha and atomic numbers of all the samples that are inserted.

Manganese Sample

Manganese Sample

Here is a blog that consists our data about the Manganese (Mn) Sample taken under the Scanning Electron Microscope (SEM). Dr. Hassel and Dr. McColgan provided us with 3 stages that each consisted of 6 different element samples in them. This is the data we collected when we studied the Manganese Sample from these stages. Below is the data we collected:






Above is the spectrum for the Manganese Sample.


In the Manganese Sample we found traces of Potassium(K), Sodium(Na), Sulfur(S), and Manganese(Mn). The peaks we found were that Manganese peaked at 5.896 keV and 6.491 keV. For Potassium, it peaked at 3.316 keV. For Sodium, it peaked at 1.046 keV. Finally, for Sulfur it peaked at 2.311 keV.


 Below is the data we collected using the HD Prime X-Ray Flourescence (XRF) Analyzer:

Iron Sample


Iron Sample

Here is a blog that consists our data about the Iron (Fe) Sample taken under the Scanning Electron Microscope (SEM). Dr. Hassel and Dr. McColgan provided us with 3 stages that each consisted of 6 different element samples in them. This is the data we collected when we studied the Iron Sample from these stages. Below is the data we collected:



Data Number: SAInTCentr
Magnification: 3000
Accelerating Voltage: 30000 Volt
Emission Current: 84000 nA
Working Distance: 15400 um




Above is the spectrum for the Iron Sample.
In the Iron sample we observed we found both traces of Iron(Fe) and Chromium(Cr). The Iron traces peaked at 0.707 keV, 0.619 keV, 6.406 keV, and 7.058 keV. The Chromium peaked only at 5.416keV.


 Below is the data we collected using the HD Prime X-Ray Flourescence (XRF) Analyzer:


Quantum Dot Sample

We received 6 different quantum dot samples, each with a different UV Abs Peak. The various peaks can be seen in the following images for each of our quantum dots samples. Notice the change in color as the peak changes. Also notice each of the samples has a +/- 10 nm error. The images of our samples can be seen below.

The Individual images of each quantum dot can be seen here.






Steel Sample

Steel Sample

Here is a blog that consists our data about the Steel Sample taken under the Scanning Electron Microscope (SEM). We obtained a Steel Sample from Metal Supermarkets located in Albany, NY. They were nice enough to donate some metal samples to us so we could conduct our research on various metal samples under the SEM. Below is the data we collected:

Image result for metal supermarkets

Owner/Manager - Diane H Watters
1054 Broadway, Albany, NY 12204
(518) 435-0024
dwatters@metalsupermarkets.com





Data Number: SAInTCentr
Magnification: 2300
Accelerating Voltage: 30000 Volt
Emission Current: 86000 nA
Working Distance: 9700 um



Above we can see the spectrum for the Steel Sample.

We found that Steel consists of Iron(Fe), Aluminium(Al), and Chlorine(Cl). The Iron traces peaked at 0.708 keV, 6.404 keV, and 7.061 keV. The Aluminium peaked at 1.487 keV. The Chlorine peaked at 2.622 keV, and interestingly enough there were also some traces of Silicon(Si). The Silicon peaked at around 1.744 keV.


 Below is the data we collected using the HD Prime X-Ray Flourescence (XRF) Analyzer: