Determination of Zenith Angle Dependence of Incoherent Cosmic Ray Muon Flux Using Smartphones of the CREDO Project

The Cosmic-Ray Extremely Distributed Observatory (CREDO) was established to detect and study ultra high-energy cosmic ray particles. In addition to making use of traditional methods for ﬁnding rare and extended cosmic ray events such as professional-grade Extensive Air Shower (EAS) arrays, as well as educational ‘class-room’ detectors, CREDO also makes use of cameras in smartphones as particle detectors. Beyond the primary scientiﬁc goal of the CREDO project, to detect Cosmic Ray Ensembles, is the equally important educational goal of the project. To use smartphones for EAS detection, it is necessary to demonstrate that they are capable of eﬀectively registering relativistic charged particles. In this article we show that the events recorded in the CREDO project database are indeed tracing incoherent cosmic ray muons. The speciﬁc observed distribution of the zenith angle of the charged particle direction corresponds to that expected for muons. It is diﬃcult, if not impossible, to imagine the diﬀerent mechanisms leading to such a distribution, and we believe it clearly demonstrates the suitability of smartphone-based detectors in supporting the more traditional cosmic ray detectors.


Introduction
The cosmic ray energy spectrum extends from below ∼100 MeV [1] up to ∼10 20 eV [2]. In the case of ultra high-energy cosmic rays it seems that there are a few places capable of accelerating particles above 10 20 eV: large-scale shocks surrounding galaxy clusters, internal or external shocks of starburst-superwinds, Active Galactic Nuclei (AGN), or Gamma-Ray Bursts, AGN flares, jets, magnetars, lobes of giant radio galaxies, see [3] for a review of these.
Some of the exotic models of ultra high-energy cosmic rays origin can be verified by searching for new, rather unexpected behaviour of cosmic rays at the highest energies. One of them is the focus of the Cosmic-Ray Extremely Distributed Observatory (CREDO) Collaboration [4]. This global approach allows the testing of hypothesized events of ultra-high energy cosmic ray 'bunches' observed as simultaneous Extensive Air Showers (EAS) over the entire exposed surface of the Earth: so-called Cosmic Ray Ensembles (CRE) [5][6][7]. Such a phenomenon has never been seen, but there are several models under which such an event is a possibility.
To observe such events, a system operating on that global scale is required. Due to the extreme geographical scale of the data acquisition, the CREDO Collaboration makes use of non-expert science enthusiasts (with their own smartphones). The idea of using an array of smartphones as cosmic ray/muon detectors is a quite recent possibility -as the density of smartphones per squared km is a significant feasibility parameter [8].
To have an EAS smartphone array comparable to large experiments like Pierre Auger Observatory or Telescope Array we would require millions of phone cameras across an area of thousands of square kilometers, all permanently 'on'. The goal of registering every EAS from each CRE at close to 100% effectiveness is simply unfeasible. However, it may be possible to detect some signal from any CRE -using a coincidence across very distant sets of detectors (smartphones).
Another noted challenge is the contamination of smartphone camera signals by sources other than cosmic rays. In principle this includes the housing of the camera itself, as a smartphone is not made to be "low radiation background". Ultimately we need to determine experimentally whether smartphones can be used as cosmic ray particle detectors, or if this background noise removes the possibility of measurement in practice.

Registration and Analysis of the Smartphone Recordings
The cosmic ray CREDO Detector application for smartphones is available freely at Google Play. The active users send their records to the CREDO database. In the CREDO database there are approximately a million images registered with the smartphone camera's lens obscured.
If a particle of secondary cosmic radiation passes through the active layer of the smartphone camera, it will stimulate a few to several dozen pixels, distributed in a cluster of shapes that range from circular to extended lines, and they should appear brighter on the roughly homogeneous almost black background. Events in which very long traces are visible can potentially be the tracks of cosmic ray muons that passed through the camera at large angles. This possibility is, in theory, easily verifiable. The zenith distribution of such incident angles of single incoherent muons is well established [9][10][11][12][13]. In this paper, we will show that the majority of CREDO registered events are due to real muons with a recovered zenith angle distribution as expected.

Tadeusz Wibig
The data used to obtain the results presented below consist of more than 100,000 CREDO database registrations obtained by one (very active) user with only one camera. The CREDO application draws a lot of power, and practically can only be used for extended periods when connected to a charger. Therefore, the cameras actively connected to the CREDO network usually rest permanently (and horizontally) in the same place.
The registrations are available as PNG files cropped from the whole camera frame to 60 × 60 pixels around the brightest pixel in the frame. Examples are shown in the top row in Figure 1. Signals are roughly proportional to the ionization energy loss in the particular matrix pixels, but it should be noted that some corrections (unknown in practice) have been applied to the photos by the internal camera software. The box 2D-histograms are given in the middle row in Figure 1 which scale in size with the ionisation energy.
Then, for each registered event we determined the average dark pixel brightness and its standard deviation using only regions far from bright pixels (these are either intrinsic 'hot spots' on the chip or from the suspected signal itself). This procedure was then repeated after removing the pixels which exceeded 2 above the initially estimated average. At this stage, all pixels containing (potentially) everything associated with the registration of a cosmic ray muons (and 'hot spots') are omitted. Statistics from the 3000 remaining pixels in each frame allowed us to obtain a well-defined average brightness of dark pixels and its intrinsic variance. These are considered reliable values attributable to the noise in each recorded event.
The next step in the analysis was to find the main symmetry axis of the track. First, we selected all pixels that exceeded the threshold (equal to the previously estimated average signal of the dark pixel noise, plus 10× its finally determined standard deviation). We have confirmed that using a factor of 5 instead of 10 does not significantly influence the results, as the signal we observe is so much brighter than the average noise value.
For the selected pixels (i.e., those above the dark pixel threshold) we determined the 'main axis' of the track. There are, in principle, many ways to determine this, and we have tested several: inertia ellipses, the Hough algorithm line, the smallest sum of squared distances weighted by squares of the brightness, and even the brightness only. They all give very similar results as the images of the tracks in each picture are clear, and regardless of how they are linearized the 'main axis' of the track is (almost) always the same. The lines are shown in the bottom row in Figure 1.
All pixels exceeding the threshold shown in the bottom row are projected onto the identified main axis of the analyzed trace.The respective examples are shown in Figure 2. If we deal with a trace of a relativistic cosmic ray particle (muon), the signal pixels should have roughly the same brightness (with obvious geometric corrections). Such idealised situations are encountered only rarely, however.
The ends of the track were found by tracking to the left (and to the right) from the point with the highest projected brightness, until the signal values become smaller than limit chosen by trial and error. For simplicity we will, hereafter, measure all distances, the track length, and as well as the thickness of the matrix sensitive layer, using as a unit a single matrix pixel size (px).
We defined this limit as a fraction of the second projected brightest bar in the histogram. The value shown in Figure 2 as dashed lines was selected comparing the results of the algorithm with the subjective perception of the observer. Eventually, the value of 30% was established. Using just the brightest histogram bar value, the procedure could be subject to fluctuations to a larger extent. The zenith angle of the particle track Θ, if we assume that it is indeed the trace left by a particle passing through the entire photosensitive layer of the camera, is naturally determined by the track length observed in the camera plane ( ) and thickness of the photosensitive layer of the camera matrix itself (ℎ): Θ = arctan ( /ℎ). Measuring the track length distribution, we can obtain the zenith angle dependence of the observed particle flux.

PoS(ICRC2021)199
The cosmic ray single muon zenith inclination angle distribution has been known for nearly 80 years [14,15] and many different measurements confirm that it is quite accurately described as cos Θ with the index of ∼ 2. We will use this simple relation to test our algorithms for observed track identification.

Results
We study the distribution of the length of the tracks recorded on smartphone photos stored in the CREDO database, to determine whether it is consistent with the zenith angle distribution of the muon (∼cos 2 (Θ)). The degree of the expected accordance will show the confidence of using the smartphone cameras as cosmic particle detectors.
We start detailed studies with the distribution of the track length as it is shown as the histogram in Figure 3.
Predictions assuming that we are dealing with cosmic ray muons with the known zenith angle distribution are also shown. These distributions differ for different values of the camera photosensitive layer thickness ℎ. The thickness of the particular camera we used in this work is not known precisely, leaving the value of ℎ to some extent a free parameter which can be constrained by the data itself. We present here the results for 3 px, 5 px, 10 px, and 15 px and the predictions of the best fitted value of ℎ.
In Figure 3 we see that the measured distribution is close to the predictions for a width (ℎ) close to 5 px. However, it can be seen that this agreement is not perfect for both long track lengths, as well as for very short lengths.
Regardless, the distribution of track length presented in Figure 3 can be converted to the zenith angle distribution (assuming we have captured cosmic ray particle traces). Zenith angle distribution is more suitable for studying cases of small angles (short trace lengths). In Figure 4 we present the comparison between the predictions obtained using different values of ℎ.
The length of the track determined with the algorithm described above, if expressed in single pixel size (px), is, by definition, a discrete quantity (especially for small values of ℎ which are expected in modern smartphone cameras), thus the measured zenith angle given by Θ = arctan ( /ℎ) would have to be discrete numbers.
The distribution of the variable cos(Θ) illustrates very nicely the behaviour of the long and very long (horizontal) tracks. The resolution for small angles, at which most particles arrive at, is very limited. For larger angles, longer tracks, where the resolution of a determined angle is superior, the flux is substantially smaller, thus the simple zenith angle is not the best variable to study. However, Figure 4 also suggests that for small angles, where most of the events occur, the matrix sensitive layer thickness is close to 5 px. While the short track discrepancy may be due to the measurement uncertainty, the discrepancy for large values can be mitigated by selecting an appropriate value for the photosensitive layer thickness ℎ. The 2 minimization procedure was used on the cos(Θ) distribution shown in Figure 5 where results are obtained for different assumptions about the thickness of the photosensitive layer parameter ℎ. We have compared it with the expected power-law spectrum with a slope corresponding to the distribution of cosmic ray muons. This slope is given by the thick line in Figure 5.

Determination of Zenith Angle Dependence of Incoherent Cosmic Ray Muon Flux
Tadeusz Wibig It should be noted here that in [16,17] a similar analysis was performed and the authors concluded that the camera they used had a matrix sensitive layer thickness (termed in their work the "depletion thickness") of 29.2 ± 1.5 px, greatly exceeding our measurements. The more recent measurement of [9] have results that are compatible with a thickness of the camera matrix close to 3 px. The former analysis was based on as few as 200 registered events, the later on approximately 230 tracks. The analysis presented in this paper is based on about 60,000 tracks and hence we believe it represents a significant advancement in the field.
More details are given in [18].

Summary and conclusions
We have explored the method of analyzing pictures taken by a smartphone camera with the lens obscured. In these instances, some tracks are clearly visible exceeding the dark frame camera noise. In most cases, the determination of this track length is not a significant challenge. Different methods of determining the track's main axis were tested, and lead to near indistinguishable results overall. There was some uncertainty for very long tracks corresponding to the incoming particle with zenith angles greater than 80 • (almost horizontal). We removed these associated ambiguities by eliminating 'long gap events', showing this ultimately to be a satisfactory solution.
The analysis of the track length distribution with the camera sensitive layer thickness considered as a 'free parameter' adjusted to the observations, agreed well with the results obtained found with a reasonable value of about 5 px (5.73 ± 0.04 px), where the unit of measure (px) is the size of the individual camera matrix pixel. Thus we have shown that the distribution of the zenith angle of particles responsible for the emergence of tracks in the smartphone captured images is in agreement with the expected distribution of the zenith angle of single incoherent cosmic ray muons. This confirms the idea that smartphones can operate in practice as 'particle pocket detectors', sensitive to charged relativistic cosmic particles and hence can be used effectively by the CREDO Project and other similar initiatives.