dataesr/scientific-paragraphs-categorization huggingface dataset:
This selection rejects a large part of the dataset but ensures that only well-defined cases are retained for the comparison. In total, 178 RS measurements from Trappes and 101 RS measurements from Brest were used for the overall comparison. Figure  9  displays how the three methods, KABL (blue bars), ADABL (brown bars) and manufacturer (orange bars), compare to BLH-RS. The first column represents RMSE E 2 (lower is better), and the second column represents the correlation ρ (higher is better). The upper row shows the results for the Brest site; the lower row shows the results for the Trappes site. While both KABL and ADABL outperform the manufacturer's algorithm at the Trappes site, neither algorithm does at the Brest site. While the correlation for both KABL and ADABL is higher than that for the manufacturer's algorithm at the Trappes site, it collapses to close to zero for KABL at the Brest site (0.
07 for ADABL). The RMSE values can be compared to the values given in  Haeffelin et al. (2012). For KABL, we find 770 m at the Brest site and 798 m at the Trappes site, while for ADABL, we find 675 m at the Brest site and 552 m at the Trappes site. Our values are notably higher than those in  Haeffelin et al. (2012). This is likely due to the larger extent of our dataset (178 RS at Trappes and 101 at Brest, spanning a 2-year period) and the low maturity of the algorithms. ADABL has better correlation and RMSE values than KABL at both sites. The manufacturer's algorithm performs well without any specific tuning on our part. It uses a wavelet covariance transform, as described in  Brooks (2003). This result is not surprising because the wavelet method has been shown to be robust in numerous studies, especially in  Caicedo et al.
Conclusions This paper described two algorithms based on machine learning to estimate the boundary layer height from aerosol lidar measurements. The first, KABL, is based on the K-means algorithm. The second, ADABL, is based on the AdaBoost algorithm. Both algorithms take the same input file, 1 d of data generated by the raw2l1 routine, and produce similar output, a BLH time series for the input day. KABL is a nonsupervised algorithm that looks for a natural separation in the backscatter signals between the boundary layer and the free atmosphere. ADABL is a supervised algorithm that fits a large number of decision trees in a labeled dataset and aggregates them in an intelligent manner to provide a good prediction. KABL, ADABL, and the lidar manufacturer's algorithm were tested on a 2-year dataset taken from the Météo-France operational lidar network.
Acknowledgements. The authors would like to thank  Alexandre Paci ,  Alain Dabas , and  Olivier Traullé  for their helpful reading and comments. We would like to thank  Marc-Antoine Drouin , from the  Site Instrumental de Recherche par Télédétection Atmosphérique , for providing us with the link to raw2l1 and all the Météo-France agents who install and maintain the lidar network. We thank  Martha Evonuk  from  Evonuk Scientific Editing  (http: //evonukscientificediting. com, last access: 14 December 2020) for editing a draft of this paper. Review statement. This paper was edited by  E. J. O'Connor  and reviewed by  Anton Sokolov  and three anonymous referees.
Code availability. The KABL source code is available to and usable by all users, including commercial users. The code is freely available under an open-source license at the following link: https:// github. com/ThomasRieutord/kabl (last access: 3 June 2021)  (Rieutord et al. , 2021). It is made in Python 3. 7 with regular statistics and machine-learning packages, namely, scikit-learn 0. 20  (Pedregosa et al. , 2011)  and SALib 1. 3. 7 (Herman and Usher, 2017), which are open source and available under free licenses. The repository contains all the necessary features to run the code on raw2l1 outputs. Several days of data are also provided as examples.
LOCUST is an algorithm designed specifically to use offthe-shelf GPGPU hardware to reach a computational performance that enables routine simulations of fast-ions in ITER-scale devices. For an ITER burning plasma scenario (electron density ∼10 20 m -3 , electron temperature ∼25 keV, twelve separate 3D field components at 1 cm precision (which add significant burden upon the code due to the need to reconstruct the 3D field at each timestep) and a wall mesh comprising 6 × 10 7 tetrahedra/3 × 10 6 surface triangles), LOCUST can track 250 000 markers over 1 s to thermalisation in 1 ns time steps in 15 h on a node with eight Nvidia P100 GPGPUs controlled by one Intel Xeon E5-2689. As part of the software life cycle, it is vital to continually verify that new tools like LOCUST are correctly implemented and to validate the accuracy of any underlying models by comparing with experiment.
To this end, LOCUST has been benchmarked over a range of test scenarios, with the aim that its performance matches multiple well-established tools. Emphasis has subsequently been placed on accurately verifying the fundamental implementation of the code, while reducing possible interference from high-order physics models, before validating this against experiment. In this paper, LOCUST is both described and rigorously tested. Section 2 describes the physical model, including its assumptions, their computational implications and the resulting information calculated by LOCUST. A description of the algorithm and its execution, along with the required inputs and outputs, is given in section 3. Results from cross-code benchmarks are presented in section 4. Finally a summary of findings is made in section 5.
Code design and execution The overall data flow to and from LOCUST is illustrated in figure  1 , along with preprocessing stages and related external physics solvers. The background equilibrium fields describing the 2D axisymmetric and 3D perturbative components are passed to LOCUST as separate numerical representations. These can be in the form of IMAS interface data structures (IDS), GEQDSKs, 3D rectilinear grids, or Fourier-decomposed data. The bulk species temperature and density are supplied to the collision operator numerically as interpolated functions of poloidal magnetic flux. The initial fast-ion ensemble is read from individual marker phasespace positions, often generated by external plasma heating codes. Finally, the 3D PFC power flux can be calculated from an axisymmetric limiter outline or an unstructured volumetric tetrahedral mesh, avoiding the need for runtime octrees.
3D meshes are generated by defeaturing and repairing elements of computer-aided design (CAD) engineering models, typically using CADfix or SpaceClaim, before remeshing volumetrically in Attila  [23]. Equally, this geometry can be represented by the IMAS generic grid description in the wall IDS. Once runtime settings and input data are specified, execution proceeds through stages 1-7 in figure  1. First, the X-point, magnetic axis and last-closed flux surface (LCFS) are precisely located. Since LOCUST is not storage bound, the rectangular 2D field is then effectively cached by storing pre-computed bicubic spline coefficients for each knot-either just the required derivatives and crossderivatives or the entire set. While this method is also offered in LOCUST for storing 3D fields as tricubic splines on a rectilinear grid, a Fourier-decomposed format is also available.
These positions take the integer form of the corresponding distribution function bin indices to lower data throughput. This process is scaled across multiple devices within a node using OpenMP. As marker trajectories are evaluated, the latest positions are cumulatively binned to build up the steady-state distribution function. This process, illustrated in figure  3 , occurs until markers either strike a PFC, reach a tracking time limit or slow to a prescribed velocity cut-off-typically 3T bulk /2. Upon completion, incident PFC power is collated and adaptively refined across the surface mesh.
Collisional transport To test collisional transport in the presence of a toroidally symmetric background plasma, comparisons were made against  Numerical algorithm for generating the steady-state distribution function f , shown here in black as a single function of marker energy f ( ). This is formed by cumulatively summing f ( , t i ), which are calculated independently at discrete time intervals t i. ASCOT4  [16]  (version 5 has since been shown to produce similar results  [36] ) and the NUBEAM [21] module of TRANSP  [37]  via OMFIT  [38]. ASCOT and NUBEAM each employ different definitions of the Coulomb logarithm, as described in appendix C, and truncate their collision operators to varying degrees. Data from a single time slice at 3 s was taken from DIII-D shot #157418  [39]. This discharge featured an ITER-similar shape designed for ELM suppression studies.
For the following studies, LOCUST used the Cash-Karp integrator scheme to track marker guiding-centres and the Strang-splitting scheme to track full-orbit positions. All codes produce similar results when fast-ion dynamics are isolated to within the plasma. To achieve this, an artificial axisymmetric PFC surface was created concentric to the LCFS but 5% further from the magnetic axis (R fac = 1. 05)-the closest permitted by NUBEAM. Figures  5  and 6  show the [R,Z] and [ ,λ] projections respectively of the calculated distribution functions collected at the marker GCs. Subfigures (a) show the same density contours as produced by each code while subfigures (b) and (c) both show the absolute elementwise differences, δ f (R, Z) and δ f (R, Z), between the ASCOT and LOCUST distribution functions.
discrepancies in the distribution function remain solely at the plasma edge. The previous methodology was repeated for a spherical tokamak topology. Such devices tend to have steeper gradients  [41] , meaning any inaccuracies in fast-ion models will be exacerbated; in MAST for example, r Larmor can approach the order of the minor radius, and the impact on the validity of the guiding-centre approximation has been questioned  [42, 43]. MAST shot #29034 was selected to allow for comparison with measured fast-ion D-α (FIDA) emission  [44]. Relevant 0D parameters for this discharge are given in table  1  above. The NBI deposition code BBNBI was included to enable comparison of full-orbit simulations. Like before, a single time slice of data describing the background plasma was extracted at 360 ms.
A quiescent period was chosen during the flat-top phase when core electron temperature and density were relatively constant. To create a realistic deposition, time-resolved NBI data from OMFIT were used to generate the NUBEAM deposition for the south-south neutral beam, while settings as similar as possible were chosen for BBNBI: a 62 keV co-current beam with 62% full, 27% half and 11% third energy fractions. Hence it is technically inappropriate, and out of the scope here, to cross-compare the results attached to each beam code in this case. GC and FO trajectories were then calculated by each code over 100 ms-enough to reach steady state. The co-current NBI confines the fast ions to the plasma core, where discrepancies are hard to distinguish and there is a systematic shift in spatial density due to the FLR displacement, so instead we examine f ( ), the distribution function integrated over all dimensions except energy , which still encodes some real-space information through the effects of the steep temperature and density gradients on the fast-ion diffusion rate.
Synthetic diagnostics To validate that these comparisons for MAST are realistic, the distribution functions calculated from the NUBEAM deposition by LOCUST (GC) and NUBEAM were fed into FIDASIM to generate synthetic FIDA measurements. The predicted and total measured signals for this spectral range are shown in figure  12 (a). Signals within a 660. 5-661. 5 nm gate are shown radially resolved in figure  12 (b), along with each predicted signal from FIDASIM. Within the core plasma, signals from LOCUST and NUBEAM are within the smallest error bars of each other so as to be indistinguishable by the FIDA diagnostic. Despite the gate, the presence of background bremsstrahlung emission is still observed outside of R major = 1. 25 m and the LCFS in figure  12(b ). Current error estimates do not take background light into account, or even the lack of a time-dependent background plasma, but if errors are increased globally by ∼70% then the reduced χ 2 approaches unity for data points within R major < 1.
Acknowledgments This project was undertaken on the Viking Cluster, which is a high performance compute facility provided by the  University of York. We are grateful for computational support from the  University of York High Performance Computing service, Viking  and the Research Computing team. Additional thanks are also owed to  Stuart Henderson ,  David Keeling ,  Marina Gorelenkova ,  James Buchanan ,  Clive Michael  and the team at  Aalto University. This work has been carried out within the framework of the  EUROfusion Consortium  and has received funding from the  Euratom  research and training programme 2014-2018 and  2019-2020  under Grant Agreement No. 633053. The project was partly undertaken on the  ITER Organization's Titan GPU server within its Scientific Data & Computing Centre (SDCC).
Results of studies on NVC rely on stable animal physiology, high-quality data acquisition, and unbiased data analysis, criteria, which are not easy to achieve. In the current study, we assessed NVC using two different imaging modalities, i. e. , LSCI and 2-PM, and analyzed our data using an investigator-independent Matlab-based analysis tool, after manually defining the area of analysis in LSCI and vessels to measure in 2-PM. By investigating NVC in 6-8 weeks, 1-, and 2-year-old mice, we found that NVC was maximal in 1-year old mice and was significantly reduced in aged mice. These findings suggest that NVC is differently affected during the aging process. Most interestingly, specifically pial arterioles, seem to be distinctly affected by the aging. The main finding of our study is that the automated analysis tool works very efficiently in terms of time and accuracy.
The final, but equally critical step is data analysis. The software provided with commercially available LSCI units has mainly been developed for data acquisition in single human subjects and has therefore only limited analysis capabilities. This is particularly true when it comes to the analysis of data sets acquired at different time points and in whole groups of subjects. Therefore, commercially available LSCI analysis solutions are not entirely suitable for research purposes. Also analyzing images obtained by 2-PM is a time-consuming manual process prone to investigator bias. Therefore, the main aim of the current study is to present a novel tool for the analysis of LSCI and 2-PM data to establish a flexible, software-based analysis pipeline for an automated and investigator-independent analysis of the obtained data sets.
Measurement and Analysis of Local Cerebral Blood Flow by Laser Speckle Imaging A laser speckle contrast imager (LSCI, Perimed, Järfälla, Sweden) was positioned 10. 4 cm above the chronic cranial window and a 0. 5 x 0. 5 mm field of the cortex was imaged at 4. 4 Hz. The data was recorded using the software supplied with the device (Pimsoft, Perimed, Järfälla, Sweden) and analyzed using a custom Matlab script (MATLAB, R2016b, The MathWorks, Natick, MA). First, a spherical region around the rim of the cranial window containing the exposed cortex (ROI), was drawn manually. For each pixel within the ROI, the perfusion signal was filtered with a cut-off frequency of 0. 004 Hz to remove any signal drift and allows re-alignment of the acquired frames. This process is important while the brain and cerebral vessels move slightly due to heart beat and breathing.
Hence, when using high resolution imaging, e. g. , LSCI or 2-PM, images acquired at different time points shift slightly. Therefore, re-alignment is necessary to correctly allocate measurements obtained over time to exactly the same pixel. This filter was implemented using the MATLAB functions cheby1 and filtfilt to design a Chebyshev Type I filter of order 2 and to perform zero-phase digital filtering. Then a threshold was defined using Otsu's method, to detect stimulation periods automatically. The correct detection of stimulation periods was verified visually. To account for a potentially ramp-like increase of the perfusion signal at the beginning of the stimulation, the perfusion signal was averaged within 10 and 30 s after the automatically detected stimulation onset and normalized to the baseline perfusion signal, defined individually for each stimulation period as the average signal within 40 to 10 s before the automatically detected stimulation onset.
For this device, a small brush and a voltage controller for frequency adjustments were mounted to a 300 rpm (6 V) battery-powered motor (Walfront, China). A gooseneck holder was used to fix the motor on the imaging platform, which allowed fine-tuning the angle of the brush. Vessel diameter analysis was performed using a custommade Matlab routine (MathWorks version R2020a, Natick, Massachusetts, USA; www. mathworks. com) based on imshow3D developed by Maysam Shahedi (https://www. mathworks. com/ matlabcentral/fileexchange/41334-imshow3d) and on a Zeiss LSM file reader developed by Cy Y (Zeiss Laser Scanning Confocal Microscope LSM file reader; https://github. com/joeof-all-trades/lsmread). First, all images have been inspected and the ones containing artifacts (heavy motion between frames, low signal-to-noise ratio) were removed.
Moreover, automatic detection of percentage peak change was provided thanks to the Matlab routine. This peak detection was based on three parameters defined in the graphical interface. Briefly, the algorithm first computed the baseline diameter by averaging a predefined number of initial frames (no stimulation). Mean depicts the average of all animals in one group. The dark blue color indicates no or small changes in cortical perfusion, while the yellow color indicates increases of cortical perfusion of up to 15%. (C) Quantification of maximal CBF changes. Young and 1-year-old mice had significantly higher NVC responses in comparison to 2 years old mice (*P < 0. 05: 6-8 weeks vs. 2 years old, ***P < 0. 001: 1 year vs. 2 year, One-way ANOVA). (D) Quantification of the velocity of CBF increase after whisker stimulation by slope analysis.
Statistics Statistical analyses were performed with GraphPad Prism 7. 0 software (GraphPad Software, San Diego, California USA). First, data were tested for normal distribution. Student ttest was used to compare two sets of normally distributed data. Multiple groups were compared with one-way ANOVA or one-way ANOVA on ranks depending on the presence or absence of normal distribution or two-way ANOVA for repetitive measurements. Differences with P < 0. 05 were considered statistically significant.
Decreased Neurovascular Coupling in Aged Mice Mice were given three subsequent whisker stimulations (Figure  1A ). All LSCI data were first acquired with Pimsoft software R. After the acquisition, data were extracted in binary format (. dat) and processed with a custom-made Matlab tool. The results were exported to a spreadsheet file and further analyzed and plotted. Furthermore, the Matlab tool generated an averaged image of all three stimulations, created CBF heat maps of individual mice, and allowed to average CBF values of all investigated mice in one single heat map (Figure  1B ). The heat maps show an increased CBF in the area of the somatosensory cortex whereas CBF remained unchanged in the unstimulated surrounding cortex. CBF values from the heat maps could be extracted as numerical data and plotted.
Reduced Vasodilation During NVC and Hypercapnia in Aged Mice To directly visualize vascular reactivity in young, adult, and aged mice, animals received the plasma label FITC dextran and cerebral microvessels we imaged by in vivo 2-PM. Time series were recorded with the Zen R software (Zeiss, Oberkochen, Germany). Afterwards, original files were processed with our novel, investigator-independent vessel diameter measurement script and diameter changes of different vessel segments (pial arterioles, penetrating arterioles, and capillaries) were analyzed. A straight line crossing the investigated vessel at an angle of 90 • was drawn and the inner diameter of the vessel was assessed based on the fluorescence of the injected plasma marker. Absolute changes of vessel diameter following whisker stimulation or hypercapnia were calculated by the script and expressed as % baseline (Figure  3A ).
DISCUSSION In the current study, we developed two Matlab-based software tools, the "NVC-ToolBox, " to analyze neurovascular reactivity by in vivo LSCI and 2-PM imaging following whisker stimulation and hypercapnia. The NVC-ToolBox allowed us to analyze neurovascular reactivity in a fully blinded, automatized, fast, and user-friendly manner. Moreover, we used aging as a paradigm to validate the NVC-ToolBox, since aging is well-known to reduce neurovascular reactivity. Our results demonstrate that the NVC-ToolBox is an easy to use and reliable tool for the assessment of neurovascular reactivity. Statistically significant changes in neurovascular reactivity between groups could be identified with a group size of six animals and a reasonable variability. Further, the time needed to analyze the data could be shortened by over 90% and investigator bias was completely eliminated from the analysis process.
In the manual analysis procedure, first, frames of 2-PM time series must be exported as separate images which is between 250 and 280 frames. Then these images are binarized, skeletonized and diameters were measured by another plugin using ImageJ software. This procedure takes for the manual analyzer approximately 5 min for each image. However, with the automated tool it takes only 1-2 s to analyze all frames. Therefore the differences between the manual and automated analysis in sense of time and quality is massive. In terms of the effect of age on neurovascular reactivity, our data suggest a differential response during aging. Further, 2-PM imaging revealed a distinct involvement of different vessel segments following NVC and hypercapnia, i. e. , the most pronounced vasodilation was found primarily at the capillary level and aging reduced vascular reactivity mainly in this vascular bed; to our surprise pial arteriole reactivity following whisker stimulation was even increased during the aging.
This technique is well-established and frequently used for dynamic imaging of CBF thanks to its high temporal resolution  (11). When NVC is induced by forepaw, hind paw, or whisker stimulation, cerebral arterioles in the respective cortical area dilate to redistribute blood flow to the activated area. The subsequent increase in CBF can be visualized by 2-D heat maps using LSCI. Commercially available LSCI devices display, store and allow analyzing heat maps of individual animals, however, lack modalities to analyze data from cohorts of animals, specifically longitudinally. Since CBF responses can be spatially distinct and vary in intensity, changes often became only apparent when individual values of a group of animals are averaged or superimposed. This approach termed "co-registration" is not completely novel, since it has already been successfully used for the analysis of large cohorts of human and animal MRI, BOLD, or PET data  (46, 47) , however, it has, to the best of our knowledge, never been employed for the analysis of LSCI data sets.