-
Notifications
You must be signed in to change notification settings - Fork 1
4. ALPSS Program Workflow
The first step in ALPSS is to import the necessary data. ALPSS provides the capability to only import a certain domain of time in your signal, increasing program speed by ignoring unnecessary parts of the voltage signal. ALPSS has only been tested importing .txt files with time in column 1 and voltage in column 2. I expect that the import would work fine for a .csv, but this has not been tested.
Locating the region of interest (ROI) is perhaps the most import part of ALPSS. This is done by finding where the spall signal intersects with the carrier band in the binary spectrogram (binarization is performed using Otsu's method, which maximizes the inter-class variance of two groups of pixels). The point of intersection is taken as the "signal start time" and the ROI window is extended around the start time according to user input parameters. The signal start time also marks where ALPSS will begin to filter out the carrier frequency. If the ROI is not selected correctly then nothing else can happen correctly. I have found that the method currently implemented is generally effective for the types of signals we usually see. But more robust methods will have to be developed in the future.
Isolating the spall signal consists of two different filtering steps. The first is a band pass filter that zeros the power of all frequencies outside the frequency range of interest specified by the user. This eliminates high frequency noise as well as other noise below the frequency of the carrier band. The second step is to apply a Gaussian notch filter to eliminate the carrier band after the spall signal has started.
Calculation of the velocity is done by differentiating the phase angle of the voltage signal. Information on the derivation of the this process can be found in Mallick et al. Differentiation is done using the 9-point central difference method. After differentiation the signal must be smoothed, for which a Gaussian weighted moving average is used. The user may modify the function to use the smoothing method of their choice, but I have found the Gaussian weighted moving average to work the best in smoothing noise without overly smearing the shock front. Moving median smoothing also works well but is not implemented in ALPSS.
The estimated instantaneous velocity uncertainty for all points in the velocity trace is calculated analytically using Eq. (6) in the paper here. In this equation,
In order to calculate the spall strength and strain rate ALPSS must have the peak and pullback velocities from the velocity trace. The peak velocity is taken to be global maximum velocity of the signal. The pullback velocity is the velocity difference between the peak and the local minimum that immediately follows. The local minimum is found using the native scipy peak finding function. Following the first local minimum after the global maximum, ALPSS also locates the following local maximum. This point can be used for calculations involving the damage growth rate, but these types of calculations are not currently implemented in ALPSS.
To calculate the global uncertainties in the spall strength and strain rate ALPSS follows the method of Mallick et al., which uses the first-order second moment of contributing underlying uncertainties to compute the overall uncertainty. This method requires the user to input several underlying values of uncertainty and should refer to Mallick et al. for a discussion of these values.
Upon completion of the run ALPSS outputs a figure that shows plots for each sub function of the program. This allows the user to quickly assess the accuracy of an analysis or visually diagnose issue when they arise. If the user chooses, ALPSS will also save six files. These files are a plot of the final figure, a table of the function inputs used for the run, the noisy velocity trace, the smoothed velocity trace, the filtered voltage data, and a table of final results. Note, when saving is enabled the program will automatically overwrite any files with the same name in the output directory.
In a case where ALPSS throws an error the program is passed to an exception block where a plot of the imported voltage data and its spectrogram will be displayed along with the error traceback. If even that fails the program will display only the error traceback. For example, if using the sample file and the input t_after is changed to 1500e-9 (exceeding the window of imported data) the following traceback and plot will be displayed:
ValueError: x and y must have same first dimension, but have shapes (87224,) and (87021,)