{'fraction_non_alphanumeric': 0.03152753108348135, 'fraction_numerical': 0.011767317939609237, 'mean_word_length': 4.799356223175966, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Single-grain dose-distribution measurements by optically stimulated luminescence using an integrated EMCCD-based system

We report on the feasibility of assessing single-grain dose-distributions by using an EMCCD-based imaging system with complementary analysis software. Automated image-processing was successfully applied to compensate sample motion and for automated grain identification. Following a dose recovery test, 74 % of the grains were recognized successfully, and 44 % exhibited a suitable OSL dose response behavior to interpolate an equivalent dose value and a central dose recovery ratio of 1.038 was obtained.


Introduction
Luminescence dating is based on the measurement of a signal emitted by minerals such as quartz and feldspar during light stimulation. Traditionally, this signal is detected by a photomultiplier tube (PMT), collecting without distinction photons expelled by several hundreds to thousands grains at the same time. Individual grains of a sample can, however, differ in terms of their initial and overall luminescence emission output and behavior. This can be due to variation in radiation sensitivity and saturation characteristics but also partial bleaching, multiple events or post-deposition disturbance recorded in the sample. When analyzing a signal integrated from several grains , this essential information is lost and wrong age estimates can result [1]. The determination of equivalent dose distribution on a single grain level can, in contrast, reveal the presence of partial bleaching or mixed grain populations [21], allowing to extract sub-population of interest by using statistical tools such as the Minimum Age Model [11] or the Finite Mixture Model [10]. The first attempts of single grain equivalent dose measurements using OSL were carried out by Lamothe et al. [17] and Murray and Roberts [19], who hand-picked each grains on individual aliquots and measured them one by one; a laborious and time consuming procedure. The approaches that have been pursued subsequently can be grouped into two principal strategies: Either the entire sample is stimulated simultaneously and a detector records the spatial luminescence intensity distribution (imaging) or confined parts of the sample are stimulated subsequently and any suitable photon counting device can be used for OSL detection (scanning). Both methods have to provide the accurate assignment of OSL intensity to a specific grain, which uncertainties in the definition of the area of signal integration, signal cross talk between adjacent grains, and variability in mechanical position of the sample during repeated irradiation and readout militate against.
The most widespread single grain system, an automated Risø reader with additional laser-scanning head [8], uses sample holders with 100 holes to host sunk-in single grains and a system of landmarks. This allows for assignment of the OSL intensity to individual grains. However, laser position, power fluctuation and non-uniform irradiation can yield variation in recorded luminescence which is not due to the respective grain properties [2].
Also, grains have to be removed from the original context, which for example deteriorates potential information on small-scale dose-rate variation [26].
More recently and with the advent of affordable, highly sensitive charged coupled devices (CCDs) and electron multiplier CCD (EMCCDs) it was shown that luminescence dating of stone surfaces [13,12] and sediment samples [22,4] based on the imaging approach is within reach. This would allow the simultaneous stimulation of all grains in a sample, avoiding problems of laser scanning, and thus a wide choice of light sources and potential samples (grain size, sample preserved in their original context etc.).
To constitute a viable alternative in luminescence dating with a sufficiently large number of grains, a process for automated identification (segmentation) of random grains and compensation of misalignment (registration) has to be accessible which is not yet the case.
In this article, we therefore report on the feasibility of routine single grain OSL dating by using a novel, EMCCD-based, integrated system with appropriate image-processing. We believe that three major issues have to be solved to implement the method: sample motion, automated grain identification and signal cross-talk, where we investigate the first two while the latter will be subject of a separate study.

Luminescence Reader
All measurements were performed with a Freiberg Instruments Lexsyg research luminescence reader (Fig. 1), built in 2012 and nicknamed Delorean. In addition to a UV-Vis-and a Vis-NIR-photomultiplier tube mounted besides the used EMCCD camera on a detector changer, the device is equipped with a solar simulator consisting of a multiwavelength power-LED-array [24] used for bleaching the sample before experiments. For dose regeneration with β-radiation a 90 Sr/ 90 Y ring source was used. It delivers a dose rate of about 0.0511 Gy·s −1 , with a variation of less than 5 % over the aliquot area [23].

Detector
To perform spatially resolved measurements, Delorean is equipped with a Princeton Instruments ProEM512B eXcelon EMCCD camera (ex works, [24]). The camera features a backilluminated, UV-fluorescence-coated e2v CCD97 sensor (512×512 pixels, 16x16 µm 2 ) which generates images of 16-bit signal depth. The sensor arrays quantum efficiency is approximately 45 % (380 nm UV quartz emission), 70 % (410 nm feldspars emission), or 85-95 % (visible range), respectively [16]. The device was operated in Electron Multiplier (EM) mode. In this mode, the photoelectrons induced by incoming photons are multiplicated before electron-to-count conversion by a high voltage gain register. This increases the signal level in proportion to the read out noise and therefore enhance the signal-to-noise ration in low light applications [28].

Optics
The optical setup comprises a lens for light collection built into the OSL stimulation image area and decreases further towards the field-of-view edges due to the secondary effect of astigmatism. Practically, this leads to blurry images and halos around a luminescent grain ( Fig. 4). On the other hand the setup has the advantage of increase depth of field, minimizing the effects of chromatic aberrations or sample height variation and thus dispensing the need for refocusing with respect to the detection wavelength or sample.

Sample discs and reflective images
Preliminary tests showed the necessity of obtaining reflective light images (photos) after each record. On the one hand, they are used to correct the positioning uncertainty of the sample arm (see 3.1.2). Also they serve as reference pictures for the grain detection algorithm (see 3.2). Therefore, special stainless steel sample discs of 10 mm diameter with mirroring surface were developed. They had been polished to remove potential stray light by reflecting the angular irradiating stimulation light to the opposite direction and not towards the camera optics.

Stimulation light and detection filters
For the experiments, blue stimulation light with an intensity of 60 mW/cm 2 at the sample was used, achieved by a ring five power LEDs narrowed to 458±5 nm by filters [24]. For OSL, the detection window was set from 340 nm to 390 nm (2.5 mm Hoya U340 and a Delta BP 365/50 EX interference filter). For reflected light images, no color filters were employed but overexposure was prevented by a ND40B neutral density filter (ThorLabs, optical density 4.0) and an additional aperture with 8.5 mm inner diameter limited spherical aberration and reflection caused by stimulation light flares.

Measurement software
The sequences were built using LexStudio2 version 1.0.6c (January 2014) with the new developed "photo" sequence command to take reflective images after each OSL measurement.

Image and data processing
The methodical work flow of single grain dose evaluation using an EMCCD detector can be divided into three main steps: (i) image stack correction, (ii) region-of-interest definition per grain, (iii) single grain equivalent dose calculation (Fig. 2).
To achieve the first and the second step, image processing methods were evaluated. The Public Domain biomedical image processing software ImageJ [27] was used as function library and plug-in platform. The third step, the equivalent dose evaluation, is performed by the free commando line based luminescence dose calculation software AgesGalore2, a lean redefined successor of AgesGalore [12]. Both software utilities are embedded in the free graphical interface software AgesGalore2GUI [18] 1 .
AgesGalore2GUI serves as input mask for all major algorithm parameters, displays the analysis results and performs the data file and sub-program handling 2 . It reads the Freiberg Instruments LexStudio2 sequence record (XSYG file) to register the images.
Although it is optimized for Freiberg Instruments lexsyg data, when processing the image registration manually and eventually pre-formatting the image stack file, AgesGa-lore2GUI can be used to evaluate none-lexsyg CCD luminescence measurements too. For this study the AgesGalore2GUI alpha version 0.1.0.3 (March 2014) was used.

Image manipulation
Preliminary tests have shown, that raw image data are corrupted by the following effects: • Randomly falsified CCD areas by the impact of high energy photons The first two issues were solved by applying image processing methods, realized in an AgesGalore2GUI controlled ImageJ macro. The last issue will be investigated in a separate study.

Cosmic ray and secondary X-ray impact removal
The ImageJ provided Outlier removal algorithm can decrease the influence of impacts of secondary x-rays (bremsstrahlung) due to the nearby beta source and cosmic rays on the 1 Both distributed freely under GNU General Public License v3. They can be used, redistributed and modified freely. The copyrights lay by Steffen Greilich (AgesGalore2) respectively Freiberg Instruments GmbH (AgesGalore2GUI). The copyrights and terms of use of ImageJ and his Plug-ins remain by their owners. 2 The GUI is programmed in C# using the .NET Framework 4.5 Process Class functionality to control a Java Virtual Machine where ImageJ and AgesGalore2 are executed by commando line scripting.
CCD [9]. Those rays cause small areas of a few pixels to have values up three to four orders of magnitude above the OSL signal. If an impact occurs inside a region-of-interest, the related L x /T x value would be falsified, distorting the dose response curve of the grain. The algorithm identifies the corrupted pixels by comparing them to the median of the surrounding pixels and replaces them with this median value if they are above a user-set threshold.

Image alignment
Over repeated measurements, the positioning uncertainty of the sample arm, though less than 50 µm, combined with sliding and rotating due to the arm velocity, can lead to a displacement of the sample carrier relatively to the detector of up to around 180 µm.
Therefore, if the the grains location on the CCD picture moves, grain definition and dose response curve calculation would be corrupted. The TurboReg registration plug-in [29] identifies both translational and rotational sample displacements between two images. In AG2-GUI, this plugin uses the light reflected pictures, which have been taken after each measurement steps. An ImageJ macro sets the first reflective image of the observed image stack as the reference and sets later reflective images as targets. The TurboReg plug-in minimizes the mean-square difference between reference and target and calculate the rotation and translation parameters from some automatically set landmarks. The macro then applies these parameters not just at the target but also on luminescence images progressed before the targeted reflective images was taken, assuming that no sample arm movement happened between them. In this way, the whole image stack is aligned. To prevent edge effects corrupting the grain definition algorithms, a circular mask is drawn after applying the plugin 3 .

Region of Interest definition per grain
3.2.1. Image segmentation strategy: Grain boundaries as ROI With the current system, using a Lexsyg reader and an EMCCD camera, digital images records the spatial distribution of luminescence emitted by grains spread over a flat aliquot surface. To attribute a signal per grains, it is therefore necessary to segment the image in regions of interest (ROIs) which will select clusters of pixels per grains. Two approaches can be applied for segmenting the images. Firstly, focusing on luminescent spot areas and segmenting directly on luminescence images (a posteriori segmentation). To isolate areas of bright signal spot emitted by individual grain, a background has to be removed. However, due to the necessity of brightness gradient between the grains, only the brightest grain will be considered while other grains, although bright enough for OSL traditional analysis (SAR, etc.), will be disregarded. In addition, such segmenting approach can yield large ROIs per grain, which are in turn more susceptible to integrate signal emitted by surrounding grains.
The second alternative is to define fixed geometrical areas for every grain and to analyze each signal integrated across these areas (a priori segmentation). By doing so, one does not aim to include all the pixels exhibiting a luminescence signal, but only those that were found beforehand to belong to a specific grain. Here, we assume that the signal recorded from the area corresponding to the physical grain is not contaminated by signal emitted by surrounding grains (cross talk), as long as a sufficient distance is kept between the grains (Fig. 3). As this effect is not clearly visible on the luminescent pictures, the identification of the grain boundaries (and whole segmentation procedure) is done using the light reflected pictures of the aliquot.

ROI segmentation workflow
Firstly, to automatically identify the grains boundaries, these objects have to be clearly distinguishable from the background, which is inconstant on the light reflected images (reflection light artifacts). The Background Substractor plug-in [3] can mitigate the variable background induced by aberrations and ADC offset. It uses a sliding window histogram approach and takes the most probable value as local background estimate. The side-length of the sliding window has to correspond to (or to be slightly larger as) the diameter of the largest object, i.e. grain Then the Threshold plug-in is applied to the pixel values as a first step of grain identification. This approach will transform a grey scale image in a binary image, with one color representing the pixels of interest, and the other the pixels disregarded (background). The plugin provides a choice of numerous algorithms for threshold computing from which will highly depends the binary image resulting (Fig. 4). Once the image has been correctly segmented, the ImageJ Watershed algorithm [9]recognizes notched areas and dissects them at their narrow point, assuming the areas displayed two overlapping grains.
The ImageJ Analyze Particle command converts this into ROIs. It uses geometrical constraints of the objects sought after set by the user, most prominently the circularity and the size ranges.

Single-grain equivalent-dose calculation
AgesGalore2 calculates the equivalent dose and the rejection criteria based on an adapted SAR protocol for every pixel and for two-dimensional integration areas (regions-ofinterests). The later ability is used to handle every region-of-interests as one quasi-aliquot with one particular dose response curve, evaluated similar to common evaluation methods [7] including error propagation. AgesGalore2 is of similar structure and functionality as its predecessor AgesGalore [14] but had been redefined in a number of aspects: • Based on the Java programming language, it has cross-platform compatibility. Thus, AgesGalore2 could be freed from unnecessary code, e.g. for handling image data, regions of interest, I/O, making the software and its development leaner and faster.
• AgesGalore2 was designed as a shell, to be controlled with text commands, scripts or a client/server connection. This allows a tiered structure and to separate graphical user interfaces and data management without intermingling with the functionality.
• The software was inherently designed to deal also with coarse grain data while its predecessor was mainly limited to rock slices.
A detailed description of the algorithms employed is given in Appendix A.

Experiments and results
In order to test our system, and especially the aliquot movement correction, grain boundaries ROI definition and data analysis throughput, we performed dose recovery measurements on quartz samples. Complexities linked to cross-talking are not investigated here and will be the object of a next study, as the sensitivity level evaluation of the system.

Experimental settings
Two aliquots with a total of around 250 grains were prepared. To limit signal cross talk, the grains were well separated by checking the disk under a stereo microscope and using

Rate of success for different image processing parameter settings
Four parameters were systematically varied in order to find the most successful combination for the grain segmentation step: the sliding windows side length for the Background Substractor plug-in, the algorithm for the Threshold plug-in, the minimum particle and the minimum circularity for the Analyze Particles tool. The best results for the Background Subtractor were achieved using a sliding window length of 20 pixels (equivalent to 360 µm, slightly larger as the average grain diameter). The default thresholding approach based on a variation of the isodata algorithm of [25] was found to yield best results (Tab. 2).
It calculates the averages of pixels below or equal and above a threshold value test, then computes a new composite average from the two previous mean values, and repeats this process incrementing the threshold value until the latter is above the composite average. The most efficient identification of grain boundaries has been found using a minimum circularity (= 4π · area perimeter 2 ) of 0.1 and a minimum size of 50 pixel 2 (Fig. 5).

Dose recovery test
The luminescence intensities were integrated over the 185 ROIs obtained from the best setting above, using the first image (, i.e. the first 0. Applying a recuperation threshold of 0.05 did not yield significant improvement, both in dose recover ratio (CAM: 1.012±0.019) and overdispersion (12.1 %). In contrast, an additional recycling ratio criterion of 0.1 reduced the overdispersion to 7.6 %.

Discussion and conclusion
The presented approach shows that both the attribution of OSL signal to specific grains and the aliquot movement can be successfully automatized for the needs of single grain dose determination by image processing. Although the success rate of the segmentation procedure is already encouraging, the employment of additional image processing tools (e.g. better thresholding, flat-field correction and deblurring techniques) and/or further development of the optic system should be pursued to allow higher identification rate, even under less ideal (and less artificial) arrangements of grain on the sample disc.
While the dose recovery test could successfully determine the equivalent dose and a reasonable overdispersion, these experiments do not allow yet assessing the full performance of the system, as this study was performed on well bleached homogeneously irradiated and separated grains, so any potential signal cross talk effects are minimized and not visible in the results. The importance of investigating the impact of this phenomenon in a following study has to be stressed. Even more, as the images are still subject of heavy blurring which most likely enhanced cross talk.
Appropriate signal-to-noise levels seem at a first glance -to be most challenging when using grains with lower radiation sensitivity and/or lower doses. For imaging devices such as EM-CCDs, the signal per pixel is inevitably lower than that of an integrating device.
However, noise cannot only be minimized by longer exposure time, but also lower resolution (e.g. binning per ROI). On the other hand, one is not able to minimize read-out noise beyond a certain limit with these methods. Thus, new expertise in the trade-off of time and spatial resolution has to be sought for this technique. Another solution to increase signal-to-noise ratio would be the adoption of an alternative signal acquisition and progression technique, called high pixel rate photon counting see [5,6]. While the used camera is technically capable of applying this technique, the practicability remains to be evaluated.

Author information
S.G. and N.G. share first authorship.    In case, the threshold value is too low (a) the algorithm will not be able to separate the influence sphere per grain in case of two bright grains next close by. In such a situation, it is necessary to increase the value (b, c), but this will lead to disregard dimer grains.

A. Data processing in AgesGalore2
A real-world detector is mimicked in AgesGalore2 as a set of functions f representing its properties to infer the actual number of photons arrivals λ at the detector and the corresponding uncertainty 4 ∆λ from the raw digital signalz ("intensity", "counts") that has been recorded. We follow the nomenclature used in [14]. The raw signal ("counts", "intensity") can be described as a series of data points indexed by n taken over several The unit ofz is assumed to be "counts" (although strickly spoken the quantity is mostly unitless).

A.1. From raw signal to net signal
The net signal is derived by ( [15,28]): where the notation has been adapted to this document and ξ denotes the bias (background). z dark arises due to the thermal creation of additional charge (electrons) and is estimated by where n e − dark is the thermal charge generation rate (unit: "number of electrons per second"). For a typical EMCCD camera, n e − dark is approximately 10 −3 e − /s at −70 C.
z Xray is the additional signal due to impact of photons from the build-in radioactive source. Since it was effectively removed by image processing, it was neglected here.

A.2. From net signal to photon arrivals
The number of photo electrons corresponding to a net signal z can be expressed as and the photon arrivals then be derived from the number of electrons by where η is the quantum efficiency which is here for the sake of simplicity set to unity, i.e.
Unphysical, negative photon arrival values can occur at low signals, since z can be negative (see Eq. A.3). Arithmetical operations, e.g. subtraction of two photon arrival values λ 1 − λ 2 = λ 3 with λ 3 being close to zero can strictly spoken be performed in a straight forward manner. While approaches exist to tackle this issue [14], we neglected this fact in this study for the sake of simplicity and discarded too low signals.
The uncertainty in photon arrivals is both determined by the shot noise ( (λ)) and the electronic read out noise σ readout . σ readout describes the variation (standard uncertainty) during amplification process and is given in "number of electrons". It is not influenced by G. A typical value for an EMCCD system is 2 − 3 e − .
To make the photon arrivals comparable if summed over time intervals of different length, the arrival rate λ is defined by where ∆t is the length of a time interval (frame, channel) in seconds.

A.3. MASS protocol
The Multiple Area Single Section (MASS) protocol is an extension of the well-known SAR protocol (single aliquot regeneration, [20]) to multipoint data, e.g. pixels of images, assuming that each data point represents its own independent source of light and dose/age information, respectively. Thus, MASS performs a SAR protocol on each point (yielding e.g. new images of spatial equivalent dose distribution, goodness of fit etc.) and on groups of points that have been binned on the level of the raw signal data, i.e. regions of interest (ROIs, e.g. for single grains) 5 . MASS uses the photon arrival rates from multiple (n > 1) regeneration measurements where D i are the regeneration doses (with i = 1...k, k > 1 and D i = D j for at least one combination of i and j) and m 1 , m 2 the first and last time interval the raw signal was summed over, respectively, with m 2 ≥ m 1 . A "background signal", obtained from later 5 This means especially that -as described in section A -the summed ROI raw signal data first are converted into photon arrivals and then used to establish a growth curve. This is an important difference between AgesGalore and AgesGalore2. AgesGalore computed equivalent doses for each pixel first and then binned/averaged them to a ROI equivalent dose. channels / image frames in the shine-down curve is used for correction, so that L X is defined as: with m 4 ≥ m 3 > m 2 . The corresponding test dose data Λ test reg (D test i ,z) are used to get T X : All D test i have to have the same magnitude. Eventually,L X = L X /T X constitute the points of the dose response (growth curve).

A.4. Equivalent dose
To compute the equivalent dose D eq , AgesGalore2 performs curve-fitting to theL X values assuming a functional dependency f fit (D, p i ) on dose D and a set of m parameters p i .
We chose an exponential saturation (m = 3): y = p 1 · (1 − e −x/p 2 ) + p 3 (A.13) With the best set of parametersp i found, the natural signalL nat is computed in the same way asL X . D eq is estimated using the model equation based on the reverse of f fit and the best set of parameters: D eq = f −1 fit (L nat ,p i ) (A.14) To estimate ∆D eq , AgesGalore2 resamples the growth curve elementsL X andL nat according to their corresponding uncertainty and assuming a normal distribution (i.e. parametric bootstrapping). This process is repeated 100 times and the standard deviation of the 100 individual D eq results is reported as ∆D eq .

A.5. Test criteria
AgesGalore2computes a number of test criteria partly as given by [20] and partly specific to the characteristics of pixelized data to check the integrity of the growth curve.
This can be done both on a ROI and on the pixel level. The recycling ratio R is computed by dividingL 1 for the lowest (first) regenerated dose D 1 > 0) by the recycled signalL rec TheL rec is recorded after the regenerated signals and has to have the same dose D 1 .
AgesGalore22 can -although not intended by [20] computer multiple recycling ratios if more than one recycled dose exists. The recuperation rate r is defined as the ratio of the last regenerated signal that followed an irradiation with dose 0,L X (0), and the natural signal L nat : r =L X (0) L nat (A. 16) As a measure of the discrimination between signal and background, AgesGalore2 computes a SNR according to: S =L nat ∆L nat (A.17)