Author: Vedant K. Naik Affiliation: Michigan State University Position: Student Technical Assistant I, Facility for Rare Isotope Beams (FRIB) Email: naik@frib.msu.edu Overview This MATLAB runtime based App analyzes energy loss data from particle beams for the Facility for Rare Isotope Beams (FRIB). It filters data, clusters r_para values, calculates various parameters like cumulative fluence and energy loss, fits a polynomial model to the data, and generates plots for each annulus region. Flow of the code:
- Loads data from an Excel file.
- Filters out rows where the electric beam current is negative and rows where foil verticle distance is outside the 0-50 mm range.
- Filters rows where energy loss is between 0.4 and 0.6.
- Extracts the electric beam current and particle/beam charge columns and converts the current to Amperes.
- Clusters r_para values using k-means clustering and determines the optimal number of clusters using the silhouette method.
- Finds the inner and outer radii of each annulus (ring-like region) formed by the clustering.
- Computes the area of each annulus.
- Plots the silhouette scores as a function of the number of clusters.
- Iterates through each annulus, filters data based on the annulus' inner and outer radii, calculates the particle per second, time differences between timestamps, and cumulative fluence (particle flux).
- Fits a 13th-order polynomial to model the relationship between cumulative fluence and energy loss.
- Calculates the standard deviation of the energy loss.
- For each annulus, plots the polynomial trendline, as well as a shaded region representing one standard deviation above and below the trendline.