Wednesday, July 19, 2017

[Revised] XRF Spectrum Data Analysis and MATLAB code

The MATLAB code to plot the X-ray spectrum, to find the K-Alpha value of the element and to plot the Moseley's Stright line has been altered and upgraded to accept data files that are directly taken for the XRF HD prime. The procedure to take the spectrum data from the HD prime and convert it into an excel data file is explained in the previous 'XRF HD Prime Spectrum Data Analysis' blog post i.e found at;

https://saintcenter2017.blogspot.com/2017/06/xrf-hd-prime-spectrum-data-analysis.html

Once the excel file has been created through the HD data viewer, simply open the '*.csv' excel data file to make sure the file is not corrupt. Some times, the data file is corrupt and you will be prompted to recover data. Click 'yes' and no data will be altered. Even though no changes were made to the data file, SAVE the file you opened and 'recovered corrupt data'. 

Note; The X-ray Characteristic line data file that is named 'Xrayline.xlsx' , should not be renamed and should be placed in the same location as the MATLAB code file. The MATLAB code that is named 'XRFSpectrum.m' should not be renamed either. The XRF HD prime data could be placed in a different folder since you are prompted to select the data file within the script.

Simply run the MATLAB code and follow the instructions to input and select the information that is required. It is important to accurately insert the Atomic symbol of the element in the correct format when prompted in MATLAB. The First letter of the symbol is UpperCase and the rest lowercase. Example; Iron would be 'Fe', NOT 'FE' or 'fe'. Vanadium would be 'V' and NOT 'v'.

The MATLAB code for the XRF Spectrum and the excel X-ray Characteristic line data file can be found in the google drive link provided below (Log-in using your Siena email);

https://drive.google.com/drive/folders/0B2ACmmug9K_UY2h1ejJNZVdsU0k?usp=sharing


No comments:

Post a Comment