# Semiautomated Statistical Discontinuity Analyses from Scanline Data of Fractured Rock Masses
## 3 The Discontinuity Analysis Workflow  
The work flow of the discontinuity analyses is grouped into six steps (Figure 2). With the exception of step one, all calculations are performed using the open-source software Octave [22].  
Step I is related to the cluster analyses of the data record in order to identify and delimitate individual discontinuity sets. Due to the large number of existing free or commercial software products, e.g., Dips [36] and Stereonet [37], and their implemented individual methods for cluster analyses, it is recommended to perform Step I with those products. For the first step, all sampled data of a selected study site (assuming a homogenous rock mass domain) with multiple scanline sections are used. Whereas the most basic cluster analyses are based on a lower hemisphere contouring plot visually showing the individual sets, more advanced products use their implemented statistical clustering algorithms. As a result, the mean orientation for each set and a table of discontinuity numbers assigned to each set will be obtained. For the subsequent calculation, a consecutive number is assigned to each discontinuity of the raw data set.  
Step II is necessary to determine the acute angle between the scanline orientation and mean orientation of each set for all selected scanlines. As input, a six-column table comprising set number, scanline number, scanline trend, scanline plunge, mean set dip direction, and mean set dip angle is loaded. After executing the Octave script (m-file _calculation_cos_delta.m_), the table is completed by three columns, i.e., trend and plunge of the normal to the mean set and the value of \(\cos\left(\delta\right)\).  
Step III is performed to filter and separate the spacing data for each set from the full table of spacing values according to a table of discontinuity numbers for each set  
Figure 2: Workflow of the discontinuity analysis procedure, grouped into six steps.  
(m-file _spacing_filtering.m_). As a result, a 3-column text file comprising the discontinuity number, the scanline number and the intersection distance along the scanline is generated and saved.  
Step IV is executed to calculate the normal set spacing values and the mean normal set spacing, as well as the mean linear frequency for all selected scanlines (m-file _normal_set_spacing.m_). As input, the following data are required: (i) the total number of the scanlines, (ii) the assigned number of the scanlines, (iii) the data file for the selected discontinuity set, and (iv) the mean cos (\(\delta\)) values for each scanline. After executing the script the intersection distances are multiplied by the mean cos (\(\delta\)) value for each scanline and then the difference between each value in the column is calculated, i.e., resulting in one-column matrix of set spacing and normal set spacing values. In addition, for each scanline, the mean set spacing and mean normal set spacing as well as the mean frequency for both is determined.  
In Step VI, the resulting column vector of normal set spacing values is visualized by histograms and a negative exponential probability distribution is fitted to the data (m-file _spacing_histogram.m_).  
Step V is performed to calculate the full trace length over the entire face and the mean full trace length according to the four selected methods mentioned above. The Octave script _trace_length_calculation.m_ loads the trace length data file, which is structured as a six-column matrix of discontinuity number, scanline number, trace length above, trace length below, termination above, and termination below. By executing the m-file, the full trace lengths of measured data are determined by summing columns 3 and 4 (i.e., the semi-trace length above and below), and written in a new column 7. In addition, the mean full trace lengths and the termination indices are calculated.  
In Step VI, the data record of semi- or full trace lengths intersecting the scanline is visualized by a user-specified histogram (m-file _trace_length_histogram.m_).