A new algorithm for detecting X-ray shots in Cyg X-1
Abstract
The short-term X-ray variability of Cyg X-1 can be interpreted as random occurrence of mini-flares known as the shots, whose physical nature is still unclear. We propose a new algorithm for shot identification in the X-ray light curve, based on baseline detection and template fitting. Compared with previous techniques, our algorithm allows us to detect shots with lower amplitudes and shorter time separations. With NICER observations, we find that, after correction for detection sensitivity, both the shot amplitude and recurrence rate are positively scaled with the mean count rate, while the recurrence rate has a much higher dependence on the count rate. These suggest that a higher mass accretion rate will drive more and slightly larger shots. We also find that the abrupt hardening near the shot peak found in previous studies is attributed to different shot profiles in different energy bands; there is no need to involve a rapid physical process to suddenly harden the emitting spectrum.
1 Introduction
The Galactic X-ray binary Cygnus X-1 (Cyg X-1) consists of a black hole with a mass of and a high-mass companion star. The binary system has an orbital period of and an inclination of , and is located at a distance of (Miller-Jones et al., 2021). The X-ray emission is persistent and transitions between two major spectral states, the low/hard and high/soft state (Tananbaum et al., 1972).
Cyg X-1 shows strong X-ray variability over a variety of timescales from milliseconds to years, among which the non-periodic variability known as “shots” resembles second-duration mini-flares (Terrell, 1972). The shots have been observed in the full X-ray band, from up to (Yamada et al., 2013; Bhargava et al., 2022), and also in different spectral states (Feng et al., 1999). Similar shots have also been observed in other black hole X-ray binaries, e.g., GX 339–4, GS 2023+338, and GS 1124–68 (Negoro, 1999). Since the X-ray is emitted in the immediate proximity to the black hole, from the inner accretion disk, corona, or jet base, studying the shots can help us further understand the physical processes of the hot plasma around the black hole.
Shots in Cyg X-1 have been intensively studied in the past. Terrell (1972) found that the Cyg X-1 shots were consistent with random pulses that resembled the observed power spectra. While the rough shape of power spectrum can be reproduced by the shot model with appropriate shot parameters (e.g., Miyamoto & Kitamoto, 1989; Belloni & Hasinger, 1990; Lochner et al., 1991), it is difficult to explain other details and the amplitude variations of the power spectrum, e.g., the rms-flux relation (Uttley & McHardy, 2001). The average shot profile was revealed to be slightly asymmetric with a slow rise and a fast decay (Miyamoto & Kitamoto, 1989; Feng et al., 1999; Negoro et al., 2001). The profile can be modeled by the sum of two exponential components, a fast one with a timescale of and a slow one with a timescale of (Negoro et al., 1994; Feng et al., 1999; Negoro et al., 2001). The shot profile was found to be narrower and more asymmetric in the higher energy band, and vary in different spectral states (Feng et al., 1999). Both the shot amplitude and waiting time (time between shots) follow an exponential distribution (Negoro et al., 1995); whether or not there is a deficit of shot occurrence at short time separations is controversial (Negoro et al., 1995; Focke et al., 2005). Negoro & Mineshige (2002) further suggested that the two distributions could be log-normal, implying a physical link between shots and gamma-ray bursts due to similar behaviors (Li & Fenimore, 1996).
The hardness or spectral parameters were found to vary with time within a shot (Negoro et al., 1994; Feng et al., 1999; Yamada et al., 2013; Bhargava et al., 2022). In particular in the hard state, the hardness ratio gradually decreases before the peak but abruptly returns to the average around the peak (Negoro et al., 1994; Feng et al., 1999; Yamada et al., 2013). Below the frequency of a few Hz, the Fourier power and cross spectra, at least the shapes, can be interpreted as due to shot variability (Negoro et al., 2001). A near-unity coherence between different RXTE energy bands was obtained in this frequency range (Nowak et al., 1999; Negoro et al., 2001). Also, a hard time lag was found (Miyamoto et al., 1988; Feng et al., 1999).
Based on these observations, several possible physical mechanisms for the shot have been proposed. The magnetic flare model suggests that the energy release of magnetic reconnections on the accretion disk is responsible for the shots (Galeev et al., 1979; Pudritz & Fahlman, 1982; Poutanen & Fabian, 1999), and is able to explain the prompt spectral hardening (Yamada et al., 2013). The disturbance propagation is another physical model to explain the shot behavior (Manmoto et al., 1996). With numerical simulations, Manmoto et al. (1996) demonstrated that the propagation and reflection of the disturbance wave can naturally reproduce the observed shot profile. When the disturbance propagates toward the innermost region where the radius is comparable to the characteristic scale of the disturbance, the disturbance will evolve from the initial thermal mode into a mixture of thermal and acoustic modes because the plasma is inhomogeneous. While the inward modes are swallowed by the black hole, the acoustic mode can propagate outward, producing the decaying tail of the shot (Kato et al., 1996; Manmoto et al., 1996). Although the disturbance propagation model can successfully reproduce the shot profile, it has difficulties in explaining the prompt hardening around the peak. On the other hand, the magnetic flare model can reproduce the prompt hardening but is difficult to explain the gradual hardness decrease before the peak. Therefore, some authors proposed that both mechanisms might have been involved (Negoro et al., 2001; Yamada et al., 2013).
In the previous studies, shots were detected by techniques based on their relatively high fluxes (e.g., Negoro et al., 1994; Focke et al., 2005; Bhargava et al., 2022). These techniques perform well for strong shots but are less efficient in detecting weak ones. Moreover, they may have difficulties in distinguishing proximate shots and lead to biases in some statistical results (see Focke et al., 2005). In this paper, we propose a new technique that is unbiased for shots with small amplitudes and temporal proximity, enabling us to obtain a more complete and unbiased shot sample. We describe the observations and introduce our new shot detection algorithm in Section 2, including comparisons with previous techniques, and present the results in Section 3. The shot mechanisms are discussed in Section 4.
2 Observations and Detection Algorithm
Neutron Star Interior Composition Explorer (NICER, Gendreau et al., 2012) observations of Cyg X-1 with an effective exposure as of 2023 January 1 are adopted. The level 2 data are downloaded from HEASARC and reprocessed with the nicerl2 tool in HEASoft 6.33.2 with the NICER CALDB version 20240206. We extracted the light curves with a time resolution of using the tool nicerl3-lc, normalized to 52 FPMs. Cyg X-1 may show dips in its light curve, possibly due to absorption of clumpy winds or clumps in the accretion flow (Feng & Cui, 2002). We identified such dips with a duration of in 13 observations111ObsIDs 1100320101, 1100320102, 1100320103, 1100320104, 1100320106, 1100320107, 1100320119, 1100320120, 1100320121, 1100320122, 2636010102, 5100320129, and 5100320134. and discarded them, as dips with a duration similar to that of the shot may cause problems in shot detection. We also found that when the count rate is high, the shots occur so frequently that the typical waiting time is similar to the shot duration, which may affect the shot extraction. We therefore excluded another 17 observations222ObsIDs 0100320102, 0100320110, 1100320108, 1100320109, 1100320118, 2636010201, 5100320120, 5100320124, 5100320125, 5100320126, 5100320127, 5100320128, 5100320130, 5100320131, 5100320132, 5100320139, and 5100320140. and only used those with an average count rate below . In summary, 30 observations are discarded and 70 observations with a total exposure of 402 ks are used in this work.
We fit the NICER spectra with a single power-law model to determine the spectral state, and found that the photon index is always less than 2.2 in all observations, corresponding to the hard or intermediate state, but not the soft state (Grinberg et al., 2013). Following Grinberg et al. (2013), we also checked the MAXI (Matsuoka et al., 2009) and Swift/BAT (Krimm et al., 2013) data to cross-check the spectral state of Cyg X-1 during the NICER observations, and obtained consistent results.
The new shot detection technique is based on the baseline detection and template fitting. Shots are identified from a baseline-subtracted light curve by fitting with an average shot profile iteratively. The light curve is in the unit of counts.
(a) Baseline subtraction. The baseline is subtracted from the original light curve to get the new one , in which the long-term variations are removed. We adopted the Asymmetric Least Squares algorithm (asls; Eilers, 2003) for baseline detection. This technique calculates the baseline by minimizing the object function
(1) |
where is the number of bins in the light curves, is the th order finite-difference operator, and is a penalty scale factor. The first term in Equation 1 represents the contribution from residuals, and a small () tends to generate positive residuals. The second term is associated with the roughness, which requires the baselines to vary smoothly. The baseline is calculated using the Python library pybaselines (Erb, 2022), with and .
(b) Profile construction. An average shot profile is constructed using strong and isolated shots identified from the baseline-subtracted light curve. A time bin is marked as the potential peak position of a shot if it has the maximum count over the neighboring 21 bins (). Initially, shots with a peak count greater than a certain threshold are selected and summed to generate the shot profile by aligning the peak position. The shot profile is normalized to have a unity peak amplitude. To exclude superimposed shots, we fit each individual shot with the average profile,
(2) |
where and are the counts of the data and normalized shot profile at bin , respectively, is the baseline-subtracted peak amplitude of the shot, and is the variance of the data. Shots with are used to construct a new profile, where is an empirical cut for the goodness of fit. This procedure is repeated until the input and output shot samples become identical.
(c) Shot detection. The shots are detected by slide fitting with the shot profile in the light curve one after another. By moving the average shot profile through the whole light curve, one fits the shot amplitude at each time bin and finds the strongest shot that leads to the largest . A shot component is then added into the model light curve and the search is repeated to find the next strongest one until due to the new shot component is lower than a given threshold .

When applying the technique on the NICER data, in each observation, we chose an such that the stronger half of shots are selected. We set in step (b). Different and , which only determine the shot profile, have almost no influence on the scientific results. The stopping criterion is set as . Figure 1 shows and the shot amplitude vary as a function of the iteration step. As one can see, is roughly scaled with the amplitude of detected shots. We obtained consistent results if is used.


We examined the shot profiles generated in different observations and found that they have a small variation. They have almost the same normalized shape, although the amplitudes may vary. Thus, a combined shot profile from all observations is used, shown in Figure 2. We notice that there is convex (deficit in count rate) on both wings. This is simply because we have used isolated shots to construct the profile. Shots outside the time window raise the outer wings. If we do not require isolated shots for the profile, the composite shot profile decreases monotonically away from the peak, just like those shown in previous studies. In step (c), we only use the central part of the shot profile (see Figure 2), and the convex has no impact on the results. We note that our shot profile shows only a single temporal component with an exponential timescale of 0.07–0.08 s (fitted with an exponential function). It is hard to determine whether or not there exists a second, slow component (1 s) as reported in the literature (Negoro et al., 1994; Feng et al., 1999; Negoro et al., 2001), due to shot superpositions.
With this algorithm, we successfully detected shots in the 70 NICER observations. A segment of NICER light curve is displayed in Figure 3 for illustration.
Previous shot detection techniques are mainly based on flux comparison (e.g., Negoro et al., 1994; Feng et al., 1999; Yamada et al., 2013; Bhargava et al., 2022). For example, they required that the shot peak should have the maximum counts among a certain time interval, and also be significantly higher than the local average (Negoro et al., 1994; Yamada et al., 2013; Bhargava et al., 2022). In Figure 3, we also marked shots detected using the technique described in Negoro et al. (1994) and Bhargava et al. (2022). As one can see, the previous techniques cannot effectively detect shots with small amplitudes and those superimposed on each other, e.g., the shots near 39 s and 52 s in Figure 3.
3 Shot Analysis
3.1 Statistical distributions


We divided the light curves into segments with a duration of 200 s, and for each segment, calculated the average count rate , the average shot amplitude , and the average waiting time , defined as the time interval between successive shots. We plotted and as a function of in Figure 4, and vs. in Figure 5.
The detected sample is incomplete, because the search cannot find relatively weak shots. As a consequence, the average amplitude and waiting time measured against the observed sample will be overestimated. Corrections are needed to remove the bias. The intrinsic values can be restored as follows. When a new shot component is successfully detected (one has ), the decrease in can be expressed as
(3) |
suggesting that the sensitivity of shot detection . Previous studies (e.g., Negoro et al., 1995) show that the shot amplitude obeys an exponential distribution, which is also consistent with our findings (Figure 6). We assume that the shot amplitude follows an exponential distribution,
(4) |
where is the true average amplitude of shots. The measured average amplitude is therefore
(5) |
The true average waiting time is related to the measured average waiting time as
(6) |
where is the number of detected shots, and is the true number of shots. According to Equations (5) and (6), the intrinsic and are restored, and plotted as orange points in Figure 4 and Figure 5. The shot amplitude is positively scaled with the mean count rate. The shot waiting time is inversely scaled with the mean count rate until approaches 1 s, which is roughly the detection limit of the shot waiting time. The limiting also causes a break in the relations shown in Figure 5 at small or ; only the orange data points with s can be regarded as being successfully restored. We further plot the median in different ranges, and there is a weak dependence between them. We tested with other segment durations, e.g., and , and the conclusions remain.


The distributions of the shot amplitude and waiting time are shown in Figure 6 and Figure 7, respectively. As the shot properties are tightly correlated with the average count rate, the distributions are divided into sub-groups based on the mean count rate. Both the amplitude and waiting time distributions follow an exponential law, with a cutoff below the peak due to detection sensitivity. For the waiting time distribution, the exponential slope increases with increasing mean count rate, suggesting that the shot recurrence rate increases with increasing count rate.

3.2 Hardness evolution
To reproduce the abrupt hardening around the shot peak found in previous studies (e.g., Negoro et al., 1994; Feng et al., 1999; Yamada et al., 2013), we plot the hardness ratio variation between two energy bands, and , along with the composite shot profiles in the two bands (see Figure 8).
As one can see, if the two curves are normalized to have the same peak amplitude, the hard band shows a rise pattern narrower than the soft band, leading to a gradual softening before the peak. The decay timescales in the two bands are almost identical, corresponding to a constant hardness ratio. Thus, there must be an abrupt jump of the hardness near the peak.
4 Discussion
In this paper, we introduced a new algorithm for shot detection. How the detection sensitivity affects the results and how to restore the intrinsic shot amplitude and waiting time is presented in Section 3.1. Our technique allows us to find shots with a time separation down to 1 s, close to the shot duration. This is consistent with the minimum shown in Figure 7, contradicting the conjecture of a deficit of shots below a time separation of (Negoro et al., 1995).
As shown in Figure 6 and Figure 7, the distributions of shot amplitude and waiting time are both exponential. The lower cutoff is consistent with the sensitivity of the technique. In particular, the lower cutoff in the distribution in Figure 6 is scaled with . For the waiting time, the exponential slope of the distribution is a strong function of the mean count rate. Therefore, if one plots the distribution in a wide range of count rate, one may see a log-normal distribution as reported in the literature (Negoro et al., 1995; Negoro & Mineshige, 2002).
The mean count rate can be regarded as the mean mass accretion rate. The correlations between the mean count rate and the shot properties may imply that the generation of shots is simply modulated by the accretion rate. At a higher accretion rate, both the average shot amplitude and shot recurrence rate are higher (Figure 4). However, the dependence of the shot amplitude on the waiting time is weak (Figure 5). These mean that the mass accretion rate has a higher impact on the shot recurrence rate than on the shot amplitude. These results can be useful in constraining the shot models.
Negoro et al. (2001) and Yamada et al. (2013) proposed that both magnetic flares and disturbance propagation are needed in the shot generation to account for both the long timescale (1 s) flux evolution and short timescale (0.1 s or less) hardening, with the disturbance propagation for the longer one and the magnetic reconnection for the shorter. As we demonstrate here that the slightly different flux rising timescales in the two energy bands can lead to a prompt rise of the hardness ratio, there is no need to invoke any short timescale physical processes. An energy dependence of the flux rising timescale is also consistent with the disturbance propagation from the cooler outer disk into the inner hotter disk (Feng et al., 1999). Therefore, the disturbance propagation alone can explain both the shot profile and hardness evolution.
References
- Belloni & Hasinger (1990) Belloni, T., & Hasinger, G. 1990, A&A, 227, L33
- Bhargava et al. (2022) Bhargava, Y., Hazra, N., Rao, A. R., et al. 2022, MNRAS, 512, 6067, doi: 10.1093/mnras/stac853
- Eilers (2003) Eilers, P. H. C. 2003, Analytical Chemistry, 75, 3631, doi: 10.1021/ac034173t
- Erb (2022) Erb, D. 2022, pybaselines: A Python library of algorithms for the baseline correction of experimental data, 1.0.0, Zenodo, doi: 10.5281/zenodo.7255880
- Feng & Cui (2002) Feng, Y. X., & Cui, W. 2002, ApJ, 564, 953, doi: 10.1086/324284
- Feng et al. (1999) Feng, Y. X., Li, T. P., & Chen, L. 1999, ApJ, 514, 373, doi: 10.1086/306946
- Focke et al. (2005) Focke, W. B., Wai, L. L., & Swank, J. H. 2005, ApJ, 633, 1085, doi: 10.1086/462407
- Galeev et al. (1979) Galeev, A. A., Rosner, R., & Vaiana, G. S. 1979, ApJ, 229, 318, doi: 10.1086/156957
- Gendreau et al. (2012) Gendreau, K. C., Arzoumanian, Z., & Okajima, T. 2012, in Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series, Vol. 8443, Space Telescopes and Instrumentation 2012: Ultraviolet to Gamma Ray, ed. T. Takahashi, S. S. Murray, & J.-W. A. den Herder, 844313, doi: 10.1117/12.926396
- Grinberg et al. (2013) Grinberg, V., Hell, N., Pottschmidt, K., et al. 2013, A&A, 554, A88, doi: 10.1051/0004-6361/201321128
- Kato et al. (1996) Kato, S., Abramowicz, M. A., & Chen, X. 1996, PASJ, 48, 67, doi: 10.1093/pasj/48.1.67
- Krimm et al. (2013) Krimm, H. A., Holland, S. T., Corbet, R. H. D., et al. 2013, ApJS, 209, 14, doi: 10.1088/0067-0049/209/1/14
- Li & Fenimore (1996) Li, H., & Fenimore, E. E. 1996, ApJ, 469, L115, doi: 10.1086/310275
- Lochner et al. (1991) Lochner, J. C., Swank, J. H., & Szymkowiak, A. E. 1991, ApJ, 376, 295, doi: 10.1086/170280
- Manmoto et al. (1996) Manmoto, T., Takeuchi, M., Mineshige, S., Matsumoto, R., & Negoro, H. 1996, ApJ, 464, L135, doi: 10.1086/310097
- Matsuoka et al. (2009) Matsuoka, M., Kawasaki, K., Ueno, S., et al. 2009, PASJ, 61, 999, doi: 10.1093/pasj/61.5.999
- Miller-Jones et al. (2021) Miller-Jones, J. C. A., Bahramian, A., Orosz, J. A., et al. 2021, Science, 371, 1046, doi: 10.1126/science.abb3363
- Miyamoto & Kitamoto (1989) Miyamoto, S., & Kitamoto, S. 1989, Nature, 342, 773, doi: 10.1038/342773a0
- Miyamoto et al. (1988) Miyamoto, S., Kitamoto, S., Mitsuda, K., & Dotani, T. 1988, Nature, 336, 450, doi: 10.1038/336450a0
- Negoro (1999) Negoro, H. 1999, Nuclear Physics B Proceedings Supplements, 69, 344, doi: 10.1016/S0920-5632(98)00237-0
- Negoro et al. (2001) Negoro, H., Kitamoto, S., & Mineshige, S. 2001, ApJ, 554, 528, doi: 10.1086/321363
- Negoro et al. (1995) Negoro, H., Kitamoto, S., Takeuchi, M., & Mineshige, S. 1995, ApJ, 452, L49, doi: 10.1086/309704
- Negoro & Mineshige (2002) Negoro, H., & Mineshige, S. 2002, PASJ, 54, L69, doi: 10.1093/pasj/54.5.L69
- Negoro et al. (1994) Negoro, H., Miyamoto, S., & Kitamoto, S. 1994, ApJ, 423, L127, doi: 10.1086/187253
- Nowak et al. (1999) Nowak, M. A., Vaughan, B. A., Wilms, J., Dove, J. B., & Begelman, M. C. 1999, ApJ, 510, 874, doi: 10.1086/306610
- Poutanen & Fabian (1999) Poutanen, J., & Fabian, A. C. 1999, MNRAS, 306, L31, doi: 10.1046/j.1365-8711.1999.02735.x
- Pudritz & Fahlman (1982) Pudritz, R. E., & Fahlman, G. G. 1982, MNRAS, 198, 689, doi: 10.1093/mnras/198.3.689
- Tananbaum et al. (1972) Tananbaum, H., Gursky, H., Kellogg, E., Giacconi, R., & Jones, C. 1972, ApJ, 177, L5, doi: 10.1086/181042
- Terrell (1972) Terrell, Jr., N. J. 1972, ApJ, 174, L35, doi: 10.1086/180944
- Uttley & McHardy (2001) Uttley, P., & McHardy, I. M. 2001, MNRAS, 323, L26, doi: 10.1046/j.1365-8711.2001.04496.x
- Yamada et al. (2013) Yamada, S., Negoro, H., Torii, S., et al. 2013, ApJ, 767, L34, doi: 10.1088/2041-8205/767/2/L34