## Appendix A Optimisation of PEPT-ML for Extended Scenarios  
The location data from the simulated LORs for Section 6.2 and later subsections in Section 6 were derived with an optimisation procedure with PEPT-ML that sought to find the parameter combination over two passes of the algorithm that led to the minimum location uncertainty for a target location rate, where the path uncertainty is a measure of the difference between the tracked and true paths as given in Equation (1). Using results from the simulation of non-sinusoidal oscillation described in Section 6, this is a short report on the methods used to optimise PEPT-ML with data that have a ground truth.  
It should be noted that, in theory, there will be different optimal combinations of the parameters for PEPT-ML when considering the turning point of the path and the part in constant motion for the simulated data in Section 6.2. However, in practice, it is difficult to know when processing experimental data whether the tracer is moving on a constant velocity path or an accelerating path. Therefore, a set of parameters was used to produce location data with a _global_ minimum of path uncertainty, which was derived with data from both characteristic sections of the path (linear and turning point). For the first pass, a gridsearch was used to find the optimal sample size \(SS1\) as shown in Figure 10(a), noting the overlap \(OL1\) was set to 0, as mentioned previously.  
The \(TF1\) optimisation can be seen in Figure 10(b), which ended once a minimum location uncertainty had been found. There was little reduction in the uncertainty for different values of \(TF1\), which is possibly related to the measurements being performed in the centre of the field of view of the scanner, a region with the highest geometric efficiency and with no other attenuating materials present. A value for the overlap of the second pass \(OL2\) was then found, as shown in Figure 10(c), where the second pass of the PEPT-ML algorithm reduces the uncertainty in the tracked path by smoothing and removing outliers that might be present in the first pass. This leads to a further reduction in the location uncertainty, which can be seen from comparing Figure 10(a),c. The optimisation processwas stopped once a parameter combination had been found that corresponded to a target location rate of approximately 1.0 kHz.  
In Figure 14d, the uncertainty stays constant and then suddenly decreases to a lower value, which is caused by the low true fraction removing a significant number of locations at a low \(TF2\) due to the low \(SS2\). Once the \(TF2\) reached 0.5, enough points remained that HDBSCAN was able to cluster these locations from the first pass of tracking.  
The maximum distance \(MD\) optimisation can be seen in Figure 2, where the optimal \(MD\) value was found to be 2.0 mm due to a diminishing reduction in uncertainty for higher values. In the main implementation of PEPT-ML [38], a value of \(MD\) = 0.1 mm to 0.2 mm is recommended; however, a value of 2.0 mm leads to a lower uncertainty for the measurements presented here. This is likely due to the use of a different camera configuration with the testing of PEPT-ML.  
In summary, the optimal parameters for Oscillatory [100 mm, 62.5 Hz] motion were found to be Clustering [140, 0, 2.0 mm, 0.55, 5, 4, 0.50]. The value of \(SS1\) = 140 was selected as giving a location rate of approximately 1.0 kHz. This appears to be optimal for this experiment because a higher location rate leads to an uncertainty larger than the tracer size, while a lower location rate produces a lower uncertainty but fewer locations to maintain tracking accuracy (see Figure 14). The value of \(OL2\) is always 1 less than \(SS2\), to maintain a constant location rate while smoothing the data relative to nearby locations.