{'fraction_non_alphanumeric': 0.03119859924656444, 'fraction_numerical': 0.013583063617551865, 'mean_word_length': 4.522414298271316, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Point source detection performance of Hard X-ray Modulation Telescope imaging observation

The Hard X-ray Modulation Telescope (HXMT) will perform an all-sky survey in hard X-ray band as well as deep imaging of a series of small sky regions. We expect various compact objects to be detected in these imaging observations. Point source detection performance of HXMT imaging observation depends not only on the instrument but also on its data analysis since images are reconstructed from HXMT observed data with numeric methods. Denoising technique plays an import part in HXMT imaging data analysis pipeline alongside with demodulation and source detection. In this paper we have implemented several methods for denoising HXMT data and evaluated the point source detection performances in terms of sensitivities and location accuracies. The results show that direct demodulation with 1-fold cross correlation should be the default reconstruction and regularization methods, although both sensitivity and location accuracy could be further imporved by selecting and tuning numerical methods in data analysis of HXMT imaging observations.


Background
Hard X-ray Modulation Telescope (HXMT) is a planned Chinese space X-ray telescope. The telescope will perform an all-sky survey in hard X-ray band (1 -250 keV), a series of deep imaging observations at small sky regions and pointed observations.
We expect a large number of X-ray sources, e.g., AGNs, to be detected in its all-sky survey. We also expect through a series of deep imaging observations at the Galactic plane X-ray transients can be detected (Li, 2007;Lu, 2012). Therefore the point source detection performance is one of our concerns on HXMT data analysis.
Methods and corresponding sensitivities of pointed observation have been discussed by Jin et al. (2010). In imaging observations such as all-sky survey and deep imaging at small sky regions, a variety of data analysis aspects and methods are involved. First, images are computed instead of recorded directly by the optical instrument. Mapping as well as image reconstruction methods are useful. The direct scientific data products from imaging observations of HXMT are still scientific events, more specifically, X-ray photon arrival events. The attitude control system (ACS) of the spacecraft reports the attitudes periodically. We take these reported attitudes as nodes to perform certain interpolations to determine the instantaneous attitude for each scientific event. In this way, a set of parameters are assigned to each event, including the coordinates on the celestial sphere where the telescope is pointing at. Hence we call this process events mapping, where scientific events are mapped from time domain to the celestial sphere. The product of this process is refered to as the observed image, which implies the dimensionality of the data. Second, the exposure to a specific source is limited more strictly thus the signal-to-noise ratio (SNR) is tightly restricted. Hence the importance of regularization methods becomes prominent. Finally, a picture is worth a thousand words. Various information can be extracted from an image by numerical methods.
In this paper we investigate the point source detection performance of the imaging and detecting system synthesised from the telescope as well as diverse combinations of data analysis methods, especially the regularization methods.

Modulation in HXMT imaging observation
The PSF of HXMT HE, which is a composite telescope consisting of 18 collimated detectors, describes the response of the telescope to a point source when the telescope is pointing at the source as well as different locations around it. In other word, the PSF is a density function of the distribution of responses occur in different observation states, which is denoted by the instantaneous attitude of the telescope as a spacecraft. So the PSF takes the attitude of the telescope as its input.
We use the proper Euler's angles to describe the attitude of the telescope, i.e., φ and θ the longitude and latitude of the pointing, as well as ψ denoting the rotation angle of the telescope around its own pointing axis, namely, the position angle. The modulation equation that corresponds to the imaging observation over the sphere surface is where f (φ , θ ) is the object function (i.e., the image) defined in a compact subset of the sphere surface Ω, p(φ, θ, ψ, φ , θ ) is the modulation kernel function that relates the value of object function f (φ , θ ) defined on a neighbourhood of the point (φ , θ ) of the subset Ω to the instantaneous response of the telescope, while its status is (φ, θ, ψ). The modulation kernel function is determined by the point spread function (PSF) of the telescope. Suppose a unit point source is located at the zenith of the celestial sphere, i.e., the point (0, 0, 1) in the corresponding Cartesian coordinate system. Fix the position angle ψ, while slew the telescope across the polar cap, and assign responses of the telescope to the unit source to pixels on the celestial sphere. Then we obtain a map P (φ, θ) represents the PSF on the celestial sphere with fixed rotation angle ψ.
The map is then projected to a tangent plane of the celestial sphere z = 1 by gnomonic mapping, i.e., where u and v are local Cartesian coordinates on the tangent plane. Now we have i.e., the PSF defined on the tangent plane.
To provide for data analysis we have two discrete forms of P tan , where α i,j is the neighbourhood of the pixel (i, j) of the 2-D pixel grid, and the normalized form Given the discrete image F , the detection area A and the duration of exposure on each pixel τ , the observed data is where r b is the constant background count rate, * denotes the convolution, and H is the normalized PSF on the tangent plane. Eq. 6 approximates modulations in HXMT imaging observations. Distortion occurs when projecting a set of points from (or to) a sphere surface to (or from) a plane. For example, distance between any two points, area of any continuous subset, angle between any two crossing lines (or tangents of curves) are altered non-uniformly. On the other hand, the rotation angle ψ is not always fixed during HXMT imaging observations. Both distortions in image reconstruction from HXMT observed data and rotations during imaging observations have been discussed by Huo & Zhou (2013). Here for the sake of simplicity, we ignore them in this article.

Single point source detection performance estimation
We estimate the single point source performance in terms of sensitivity and position accuracy through the following procedures.
1. Determine flux threshold for point source detection.
(a) Simulate a frame of observed data contains only background counts. (b) Run denoise program on the simulated data to try to increase the signal-to-noise ratio.
(d) Run SExtractor, a source detection program, by Bertin & Arnouts (1996) on the demodulated image to detect point sources and extract their intensities, coordinates and other parameters. At this point a catalog of point sources is compiled from the simulated data. Point sources detected here, i.e., from images demodulated from background data are false detections. (e) Repeat previous steps (from 1a to 1d) and a series of catalogs are compiled. Draw a histogram of flux of false detections that could possibly been detected from background counts given a specific condition of both observation and detection. (f) Choose a cut from the histogram as the flux threshold so that a certain percent of the false detections are rejected and the rejection percentage is precise enough. The rejection percentage, e.g., 95% or 99.7% etc., reflects the significance of detections above the corresponding threshold. 2. Estimate detection efficiency and position accuracy of a point source of specific flux intensity.
(a) Simulate observed data contains a single point source of given flux intensity f m located at (x m , y m ) in the model image. (b) Perform steps from 1a to 1d. A catalog is compiled. (c) Examine each detection is the catalog. Provided the i−th source in the catalog is detected at (x i , y i ) in the demodulated image, the distance between the extracted source and the true point source as well as the flux of the extracted source f i are investigated to determine whether the i−th source is a true source or not. We define the score of the current catalog in detecting the single point source as where k is the index of the current catalog, ∆ and F thres are position accuracy and flux thresholds, therefore the score d k reveals whether the k−th catalog contains the true source or not, in other word, through the previous steps (simulated observation, denoising, demodulation, source extraction and thresholding) whether we have detected the true source effectively. If we have, the outcome of these steps is counted as an effective detection of the true source, otherwise it is ineffective. (d) Repeat the previous steps (from 2a to 2c) N times and calculate the percentage of effective detections amongst all detections, namely, which is defined as the detection efficiency.
Let (x k , y k ) be the position of the brightest source in the k−th catalog, the position accuracy is calculated as 3. Find an flux intensity F 0.5 so that the corresponding detection effeciency η = 50%. The intensity F 0.5 marks the point source sensitivity of the detecting system synthesised from both the telescope in specific status and the data analysis program chain.

Demodulation
Direct demodulation (DD) method (Li & Wu, 1994) is used to estimate the true image from observed data. Residual map calculated with CLEAN algorithm (Högbom, 1974) is used as lower limit constraint in DD method. The skewness of the residual map is calculated in each CLEAN iteration and its minimum absolute value serves as the main stopping criterion of iterations.

Cross-correlation
In contrary to detecting and extracting point sources from demodulated images, it is also feasible to do so from cross-correlated maps as long as the point sources are isolated with each other, compared to the FWHM of the PSF, since the position of a peak of the expected value of such a map coincides with the position of a source regardless of the PSF. Cross-correlating the observed data and the PSF yields the correlated map where star denotes cross correlation, D and H denote the observed data and the PSF respectively. The peak of C that coincides with a point source of flux intensity F is according to Eq. 6. On the other hand, the background variance of the correlated map is since τ · r b follows Poisson distribution. Hence the significance of the peak in term of numbers of σ is where T is total duration of exposure on the 2-D pixel grid, P 2 tan is the square root of the arithme mean of P tan over the 2-D pixel grid, which is determined by the PSF as well as the range of the pixel grid only, provided the pixel grid is fine enough (see Eq. 5).
Cross-correlation significance of isolated point source defined Eq. 14 can be evaluated directly, given only the flux intensity of the source, the background count rate, the duration of exposure, the detection area and the PSF. Hence it is determined by the object (i.e., the point source), the telescope and the status of observation thus effects from data analysis programs are minimized.
We use the cross-correlation significance as a reference. For example, in our simulations an isolated point source of 1 mCrab flux has 2.42σ significance.

Linear methods
Gaussian smoothing is often used in digital image processing to suppress the noise at the cost of reduction in resolution. Trade-off between noise suppression and resolution conservation is adjusted through the standard deviation σ of the Gaussian distribution serving as the smoothing kernel function. The best resolution of HXMT HE observed data is about 1.1 • , limited by the FWHM of its narrow-field collimator. We set σ to 28 so that the FWHM of the Gaussian kernel is also 1.1 • . N −fold cross correlation transform (N ≥ 1) can be used in DD method to regularize the ill-posed problem, more specifically speaking, to ensure the convergence as well as stability of the solution (Li, 2003). Here we put this technique in the denoising category. We have tested 1−fold and 2−fold cross correlated DD methods respectively in this article.

Non-linear methods
Non-local means denoising (Buades et al., 2005) is an edge-preserving non-linear denoising method. To increase its performance we have implemented this method with fast fourier transforms (FFTs). The pixel-wisely evaluation of the general Euclidean distance between the i−th pixel and other pixels of an image is replaced by where N i is neighbourhood of the i−th pixel, N i,k is the k− pixel in the neighbourhood, I is the image, W is weight coefficient of the distance function. We use 7 × 7 pixels Gaussian kernel with standard deviation σ = 2 (in pixels) as the weight coefficient W in our simulations. We reduce the complexity of NLMeans method by computing convolutions in Eq. 15 with FFTs instead of using searching windows. (Buades et al., 2008). Median filter is another non-linear edge-preserving denoising method. This method is effective in removing salt-and-pepper noise in digital images. In HXMT observed data such noise is incurred typically by missing data or charged particles of cosmic rays. We fixed the size of the filter at 2 • × 2 • (about 50 × 50 pixels) in HXMT HE data denoising.
The last non-linear denoising method included in this article is the adaptive wavelet thresholding with multiresolution support (Starck & Murtagh, 2006). The multiresolution support of a noisy image is a subset that contains significant coefficients only. So wavelet coefficients that dominated by noise are discarded. In this article we implemented the non-iterative algorithm. The 5 × 5 B 3 spline wavelet is used for multiresolution decomposition.

In-orbit background simulation
HXMT HE in-orbit background count rate r b ranges from 147.6 counts/s to 210.7 counts/s (Li et al., 2009). We use a constant count rate 180 counts/s to simulate the average in-orbit background of HXMT HE in this article.

Source energy spectrum and telescope detection efficiency
We use the formula proposed by Massaro et al. (2000) to model energy spectra of Crab-like sources from 20 keV to 250 keV, where E is in keV and the flux F (E) is in photons/s/cm 2 /keV. The detector efficiency of HXMT HE is derived from its simulated energy response, as shown in Fig. 1. Detection efficiency of HXMT HE to a Crab-like source is 67%. Count rate of HXMT HE corresponds to the 1 Crab intensity is 1 112 counts/s, given the detection area of HXMT HE is about 5 100 cm 2 .

PSF and modulation
We use the diagram shown in Fig. 2 to simulate the PSF P tan (u, v) on the tangent plane.
We use the concentric average of P (φ, θ), namely, to characterize the radial fade-out of the PSF and the concentration of the PSF respectively, as plotted in Fig. 3. From Fig. 3 we see that the FWHM of the simulated PSF is about 1.7 • while 99.7% responses occur in a diameter of 11 • . Despite the fact that the direct observed data is scientific events instead of 2-dimensional images, we start our simulation from simulated observed data in the form of images defined on 2-dimensional cartesian pixel grid. We use a 22 • × 22 • model image for simulations. Given the diameter of the PSF, the central 11 • × 11 • region is fully modulated, that is, all contributions to The average exposure per unit solid angle is 382 s/deg 2 in HXMT half-year all-sky survey. The partially modulated region is discretized by N × N pixel grid, so τ ≈ 382 × 33 2 /N 2 . The detection area of each HXMT HE detector is approximately 300 cm 2 so the total area of all the 17 HXMT HE detectors is 5 100 cm 2 .

Results
We have implemented several denoising methods (see Section 2.3). Fig. 4 shows denoising results by these methods.
With these simulated data we have estimated location accuracies as well as detection efficiencies by the method described in Procedure 2 of the following methods: 8. DD with adaptive wavelet thresholding. Implementation details of the above methods are in Sect. 2.3. Table 2 shows the location accuracies on simulated data of 1 mCrab, 2 mCrab, 5 mCrab and 10 mCrab point sources. 108 ± 5 48 ± 2 11.6 ± 0.2 5.9 ± 0.1 Table 2 Location accuracies, in arc minutes. Table 3 shows the detection efficiencies on simulated data of 1 mCrab, 1.5 mCrab, 2 mCrab, 2.5 mCrab and 3 mCrab point sources.
Although the RL iteration itself we employed in DD method is total-counts-conservative, i.e., the sum of counts of each pixel is conserved after the iteration (Richardson, 1972), the regularizations including the background constrains as well as various denoising techniques are not necessarily counts-conservative. As a result, the absolute flux threshold (Table 1) for rejecting false detections doesn't reflect the sensitivity directly but the detection efficiency (Table 3) does.
Errors of flux thresholds, location accuracies and detection efficiencies in Table 1, Table 2  and Table 3 are calculated by bootstrapping. For example, following Procedure 1 a set of 5 000 frames of demodulated images are obtained, from which false detections are calculated and a histogram is plotted, where both the 2σ and 3σ thresholds are determined. Now let's generate a new set with the same volume by resampling from the original set with replacement in order to calculate both the thresholds again. We repeat this resampling process until we get enough thresholds calculated to estimate their standard deviations. In Table 1, Table 2 and Table 3 each of the errors is a standard deviation that calculated from 1 000 resampled sets.  A comprehensive summary of all the tested methods on all simulated data is shown in Fig.  5.

CONCLUSION
According to the results from our tests no denoising method shows significant advantage over 1-fold cross correlated DD method in single point source detection efficiency. Therefore it's suggested that 1-fold cross correlation should be the default regularization method for single point source detection in HXMT imaging data analysis.
In the other hand, the location accuracy can be improved with alternative denoising methods, such as median filter, wavelet thresholding, Gaussian smoothing with little kernel, or without denoising, according to the results in this work.
This article is focused on the single point source detection of HXMT imaging data analysis, where other interesting topics can not be all covered. Although the alternative denoising methods have been out-performed more or less by the default 1-fold cross correlation in their contributions to the detection efficiency, they have shown certain advantages in location accu-