A generalized event selection algorithm for AstroSat CZT Imager data
Ajay Ratheesh, A. R. Rao, N. P. S Mithun, Santosh V. Vadawale, Ajay Vibhute, Dipankar Bhattacharya, Priya Pradeep, S. Sreekumar, Varun Bhalerao
JJ. Astrophys. Astr. (0000) :
A generalized event selection algorithm for AstroSat CZT Imager data
A. Ratheesh , A. R. Rao , N.P.S. Mithun , S.V. Vadawale , A. Vibhute , D. Bhattacharya ,P. Pradeep , S. Sreekumar and V. Bhalerao Tata Institute of Fundamental Research, Homi Bhabha Road, Colaba, Mumbai, 400005, India. Department of Physics, Tor Vergata University of Rome, Via della Ricerca Scientifica 1, I-00133 Rome, Italy INAF - IAPS, Via Fosso del Cavaliere 100, I-00133 Rome, Italy. Inter University Centre for Astronomy & Astrophysics, Post Bag 4, Ganeshkhind, Pune, 411007, India. Physical Research Laboratory, Navrangpura, Ahmedabad, 380009, India. Vikram Sarabhai Space Centre, Kochuveli, Thiruvananthapuram, 695022, India. Indian Institute of Technology Bombay, Mumbai, India * Corresponding author. E-mail: [email protected], [email protected] received ; accepted
Abstract.
The Cadmium Zinc Telluride (CZT) Imager on board AstroSat is a hard X-ray imaging spectrometeroperating in the energy range of 20 −
100 keV. It also acts as an open hard X-ray monitor above 100 keV capableof detecting transient events like the Gamma-ray Bursts (GRBs). Additionally, the instrument has the sensitivityto measure hard X-ray polarization in the energy range of 100 −
400 keV for bright on-axis sources like Crab andCygnus X-1 and bright GRBs. As hard X-ray instruments like CZTI are sensitive to cosmic rays in addition toX-rays, it is required to identify and remove particle induced or other noise events and select events for scientificanalysis of the data. The present CZTI data analysis pipeline includes algorithms for such event selection, butthey have certain limitations. They were primarily designed for the analysis of data from persistent X-ray sourceswhere the source flux is much less than the background and thus are not best suited for sources like GRBs. Here,we re-examine the characteristics of noise events in CZTI and present a generalized event selection method thatcaters to the analysis of data for all types of sources. The e ffi cacy of the new method is reviewed by examining thePoissonian behavior of the selected events and the signal to noise ratio for GRBs. Keywords.
AstroSat—CZT Imager, Cosmic Rays, detectors—X-rays,detectors–Noise
1. Introduction
CZT Imager (hereafter CZTI) is one of the four co-aligned instruments used for pointed observations inthe Indian multi-wavelength astronomical satellite
As-troSat (Singh et al ., 2016). CZTI is a hard X-ray instru-ment operating above 20 keV (Bhalerao et al ., 2017).It uses passive collimation and coded mask imaging tomake spectral and timing measurements in the 20 – 100keV region. Above these energies the collimators andshield become increasingly transparent and the instru-ment can be used as an all sky monitor to detect tran-sient events like Gamma-ray Bursts (GRBs) and mea-sure their spectral, timing and, most importantly, po-larisation properties (Rao et al ., 2016; Chattopadhyay et al ., 2019). Though the basic CZT detectors are sensi-tive to only upto 200 keV, the Compton scattered eventscan be used to measure the total energy upto 380 keV.Further, some individual detector elements, called pix- els, happened to be of low gain and hence can be used toextend the energy range of the instrument to 700 keV(see Chattopadhyay et al. and Abhay et al., this vol-ume).Non-focussing hard X-ray instruments are gener-ally background dominated and in CZTI the codedmask technique e ff ectively measures the backgroundand the source simultaneously within its primary fieldof view. At higher energies, where CZTI has some at-tractive additional scientific features like the spectro-polarimetric study of GRBs, the background can behighly variable and unpredictable, limiting the sensi-tivity of measurements. There are, however, severaldesign features in CZTI, though used earlier in sev-eral hard X-ray instruments but rarely simultaneouslyin any instrument, which can be very useful in reduc-ing and eliminating background. AstroSat is in a lowinclination (6 ◦ ) low Earth orbit, thus making the satel-lite only skim the surface of the high background South © Indian Academy of Sciences 1 a r X i v : . [ a s t r o - ph . H E ] F e b J. Astrophys. Astr. (0000) :
Atlantic Anomaly (SAA) region in most of the satel-lite orbits. This drastically reduces the proton inducedradioactivity. Among the currently operating hard X-ray instruments only the NuSTAR satellite is in such anequatorial orbit. Secondly, CZTI uses a limited amountof shielding because it is used for imaging only up to100 keV. This results in a much lower amount of high-Z materials thus reducing the e ff ective induced back-ground. The most important feature of CZTI, however,is the continuous availability of the time-tagged infor-mation for each of the registered ionising event: energyof the event, its location in the detector plane, and thetime of arrival (correct to 20 µ s). Since hard X-ray de-tectors are single photon counting devices, the e ff ect ofbackground can be understood and perhaps eliminatedby examining the data in multiple dimensions (spatial,temporal and energy) and demanding a strict adherenceto the Poisson nature of random events. Thus a pixe-lated detector with information of time, energy and po-sition of interaction can distinguish between particles,particle induced noises, electronic pixel noises and gen-uine X-rays. This is due to the fact that the interactionprocess of the photons are di ff erent from particles, andtheir statistical properties in space, time and energy dif-fer. A pixelated detector like CZTI is an ideal de-tector to search for short transients ( < ff orts have been made to search for tran-sients in CZTI data, however such untriggered searchesfor transients require a substantial reduction of noise,without which such e ff orts will result in a large frac-tion of false alarms. Other than the electronic noises,the main source of noise in a semi conductor detectorin space is cosmic particle induced noises. Particles getscattered within the detector crystal resulting in a largeamount of ionisation. Apart from triggering pixels attime of arrival of a particle, pixels become ‘noisy’ fora further time period due to large deposition of charge.This time period is of the order of few tens of milli sec-onds, which a ff ects the search for transients especially at short time scales.In this work, we examine the properties of ‘events’in CZTI to segregate noise events from science anal-ysis to to develop a source independent algorithm forreducing the cosmic ray induced noises and to improvethe performance of the instrument. Primarily we studythe characteristics of the cosmic particle induced noisesin addition to a better handling of the electronic noises.In a companion paper (Paul et al. this volume) we pre-sented the results of the study of the data for spatialclustering and found signatures for particle track inter-actions that can mimic short transients at time scalesof a few hundred milli-seconds, as seen in the INTE-GRAL PICsIT instrument (Segreto et al ., 2003). Herewe take a holistic view and examine the data in allthe available dimensions (spatial, temporal, and ener-getic) and develop an improved algorithm to segregatethe noise from genuine X-ray ‘events’. The details ofthe event selection methods employed in the currentCZTI pipeline and its inadequacies are discussed in thenext section. Temporal, spatial, and spectral character-istics of noise events in CZTI are presented in Section 3and the details of a new algorithm for removal of theseevents is provided in Section 4. In Section 5, the e ffi -cacy of this algorithm is demonstrated and in the lastsection, we conclude discussing its advantages.
2. An overview of CZTI data and event selection inthe data analysis pipeline
CZTI consists of 4 independent quadrants each hav-ing an array of 16 pixellated CZT detector modules(Bhalerao et al ., 2017). Each CZT detector module isof size ∼
40 mm ×
40 mm and composed of 256 pixelswith 2.5 mm pitch. All quadrants of CZTI also includeveto detectors, made of CsI(TI), placed underneath theCZT detector plane, which helps in identifying and re-moving coincidentally detected particle events and highenergy gamma rays.CZTI operates in di ff erent modes, depending on thestorage space available, charge particle background andvarious other external and internal factors. The normalmode (M0) is the default mode of operation in whichit records the time tagged information for all the eventsthat are registered. For each event, the recorded datacontains the information regarding the detected energyof incident photons (PHA), pixel number, module iden-tification (id), time stamp correct to 20 µ s, a flag indi-cating if the event is from on-board calibration sourceand the energy deposited in the veto detector if it is aveto-tagged event. This list of events constitute the ba-sic data from CZTI for all subsequent analysis.Apart from genuine X-ray photons from the source . Astrophys. Astr. (0000) : and the X-ray background, charged particles also con-tribute to the ‘events’ recorded by X-ray detectors likeCZTI. Particles interacting with the detector lose en-ergy continuously and produce tracks in the detectorplane. Charged particles interacting with the instrumentor spacecraft body can produce secondary particles andX-ray photons, which can also deposit energy in the de-tectors. For the scientific use of data from instruments,such particle induced events are to be identified and re-moved by the data processing chain.As CZTI is composed of pixellated detectors, eachpixel acts as an independent X-ray or particle detector.One charged particle, however, can produce events inmany pixels of CZTI at the same time by the interactionof the same particle as well as its secondaries. Due tothe finite time required for polling and readout of eventdetails from each pixel, it is possible that these eventsare recorded with di ff erent time stamps, although theyoccurred at nearly the same time. Hence, such parti-cle interactions will be recorded as successive eventshaving time stamps that di ff er by zero or by the timeresolution element of CZTI: 20 µ s (The 20 µ s time binis digitally generated; the on board electronics is capa-ble of recording events at a time scale of ∼ µ s, andthe time required for polling and readout of an event isa few µ s, much shorter than the CZTI time resolutionelement). We call these train of events as ‘bunches’, asthey are bunched temporally. As the detectors in CZTIare designed for very high count rate applications, theyhave very short ( ∼ µ s ) charge readout time. Hence,when a high energy particle deposits significant amountof charge in a pixel, it can trigger multiple events thatare recorded individually. Thus, bunches also includemultiple events from one pixel. It may be noted that astwo events that are recorded within 20 µ s can be Comp-ton scattered events that carry information about the po-larization of the source (Vadawale et al ., 2018; Chat-topadhyay et al ., 2019), bunches are defined as three ormore events clustered in time.Since such bunched series of events are not from thesource under observation, an on-board algorithm iden-tifies them and removes them from the event recordswritten in the on-board storage for transmission toground. For each bunch of events discarded this way, asummary including the number of events in the bunch,total duration, full information for three events (first,second, and the last), detector numbers for additionalfour events, are recorded instead. For the rest of theevents, complete information as mentioned earlier aretransmitted to the ground and all further selection ofevents are carried out by the data analysis pipeline onground. In most cases the pruned data was found to bean order of magnitude lower in volume than the noisydata, thus providing a huge advantage in the data trans- mission time.Analysis of in-flight data has shown that often thereare residual additional events in time scales of the or-der of a milli-second after the end of bunched events.These are understood as due to electronic noise inducedby the ‘bunch’. The low energy threshold of the instru-ment is kept just above the electronic noise ( ∼
20 keV)to facilitate the collection of a large number of Comp-ton scattered events. This has the e ff ect of making thepixels prone to some false triggering. Some pixels be-come quite noisy and they are suppressed by groundcommands. Further, some pixels become noisy afterthe cosmic ray charge deposition and hence some lin-gering noise is also seen after the bunches induced bycosmic rays.In the CZTI level-1 to level-2 data processing chain,‘cztbunchclean’ task takes care of this post-bunch eventcleaning. Bunches are defined as series of events whichhave time stamps of successive events di ff ering by 20 µ s (the time resolution of CZTI) or less. Events thatare part of bunches are removed from the event list by‘cztbunchclean’. Further, events for certain duration af-ter each bunch are also removed by this task. As it isobserved that bunches with less number of events aregenerally localized in the detector plane, post bunchevents removal is done di ff erently for short bunches andlong bunches. For bunches with length less than 20, allevents within 1 ms ( T2 ) duration after the bunch, reg-istered in the same detector where the bunch occurredare discarded. For bunches with length more than 20,all events within 1 ms ( T3 ) are discarded irrespectiveof the detector. The algorithm also includes a provi-sion to ignore events after the bunch irrespective of thebunch length for certain duration ( T1 ); however, thisis not used in the default processing and is not recom-mended. It may be noted that there is provision to varythe threshold bunch length and time scales from the de-fault values.Although all the events removed in this manner areexpected to be particle induced events, a very smallfraction of genuine X-ray events coinciding with thebunch duration or post-bunch duration also get re-moved. Hence, the live time of the instrument needsto be corrected for this. The ‘cztbunchclean’ task alsocomputes the live time losses incurred by the removalof particle shower duration, which is used in subsequentstages to correct the exposure times. The reduction inexposure is of the order of ∼ − − .Apart from these particle induced train of events,other spurious events occur due to certain pixels having J. Astrophys. Astr. (0000) : higher noise. During the ground testing and in-flightcommissioning phases of the instrument, pixels thathave extremely high noise have been disabled. Similarexercise is carried out from time to time during themission operation. However, during each observation,it is likely that some additional pixels misbehave andgenerate spurious events, but not high enough to decideto disable that pixel. In such cases, events from these‘hot pixels’ also need to be removed from furtheranalysis. It is to be noted that near room temperaturepixelated semiconductor detectors like CZT are proneto increased noise in some pixels and these noisy pixelsare isolated and removed by ground software (see, forexample, Segreto et al ., 2010, for a description of thenoise reduction method for Swift / BAT.).In CZTI data analysis software, the task named‘cztpixclean’ identifies and discards events from thesenoisy pixels. This is carried out in two steps. In thefirst step, pixel-wise histograms for each quadrant forthe entire observation is computed. For a total of 4096pixels per quadrant, and with an average count rate of ∼ counts / s , none of the pixels are expected to devi-ate beyond 5 σ from the mean due to the Poisson statis-tics that a photon counting instrument should follow.Hence, pixels that show a deviation more than 5 σ fromthe total average in a Detector Plane Histogram (DPH)are considered as ”noisy” pixels and are removed fromany further analysis. At least a data set with at least2000 s are required to get enough statistics per pixel toallow such an analysis. This process is done iterativelyand the iteration is continued until all remaining pixelshave counts within the five sigma limit. In this process,the number of the events removed as noisy pixel eventsdepends on the number of noisy pixels and counts pernoisy pixel in that observation. In general around onepercent of the pixels are flagged as ”noisy pixels”.In the next step, flickering detectors and pixels thathave noisy events only within certain duration of theobservation are identified and events from them are dis-carded only for that duration. Such flickering pixelsand detectors are identified as those having count rateshigher than a certain limit, considering the maximumdeviations expected from a Poisson distribution withthe mean count rates. As the average count rates ob-served by CZTI is dominated by background, it is ex-pected to remain constant in case of observations ofpersistent X-ray sources and thus the default thresh-old rates (hereafter cztpipeline lowthresh run ) for pix-els and detectors required for the algorithm are esti-mated assuming the typical background rates. Thus,the algorithm discards events from pixels for one sec-ond time bins that register more than 2 counts / s andfrom detectors that register higher than 25 counts / s. However, this assumption is not valid in the caseof transients like GRBs, where the count rates in-crease significantly above the background rates. Insuch cases, this part of the algorithm in ‘cztpixclean’with the default parameters will tend to remove sig-nificant fraction of source events in addition to thenoise events. Thus, for purposes like search for tran-sients and analysis of GRBs with CZTI observations,this part of the event selection in the data analy-sis pipeline is bypassed by providing high values forthe detector and pixel count thresholds (hereafter czt-pipeline highthresh run ). While this ensures that nosource events are rejected, some of the spurious eventsremain in the final list of selected events. Various val-ues based on the flux level of the GRBs are manuallyset by trial and error to get the maximum signal to noiseratio and to get a stable background. Although it is pos-sible to optimize the threshold parameters based on thecount rate of an already identified GRB, it will not bepossible to do that in case of requirements like blindsearch for transients.The event selection algorithms employed in CZTIdata analysis pipeline as described here is found tobe e ff ective to identify and remove most of the noiseevents for observations of persistent X-ray sources.With the low threshold configuration in ‘cztpixclean’,it is estimated that the contribution from the residualnoise events in the clean event files is less than 10%of the statistical error due to the background (see Sec-tion 5). For the analysis of bright transients like GRBs,however, the software parameters had to be tweakeddepending on the brightness of the GRBs so that thesource counts are not suppressed as noise. Consideringthese limitations in the event selection algorithm in thecurrent data analysis pipeline, here we re-examine thecharacteristics of the noise events in CZTI and proposeimprovements to these methods that overcome theselimitations.
3. Noise characteristics at millisecond time scales
We have investigated the events at milli-second timescales to study the characteristics of the noise events.The main motivation to explore milli-second timescales is the observation that the lingering e ff ectsof cosmic particles can extend upto a few tens ofmilli-seconds, even though the primary interactionsand energy deposition are in nano-seconds. To performthis study, we use the output event file obtained from‘cztbunchclean’ with no post bunch cleaning ( T1 = T2 = T3 = . Astrophys. Astr. (0000) : Counts per 8 ms per module N u m b e r o f o cc u r e n c e s Figure 1 : Histogram of counts per 8 ms per detector module for obsID1 (top) and obsID2 (bottom). Columns fromthe left shows quadrant 0,1,2 and 3, respectively. The blue line shows the expected Poissonian distribution and thered line shows the observed count distribution.ysis: AstroSat observation IDs 9000000618 (hereafterobsID1) and 9000000276 (hereafter obsID2). The datasets are of su ffi ciently long duration so that they coverthe observed diurnal variation in the background. Wefurther flag the ‘noisy’ pixels from this analysis, astheir source is already identified as electronic noises.Since the cosmic rays interact locally at the modulelevel, the noise triggered by it should also be locallyclustered at the place of interaction of the particle.Hence we probe the time scale of lingering noise atthe module level. We generated lightcurves at 0.5ms, 1.0 ms, 2.0 ms, 4.0 ms, 8.0 ms and 16.0 ms foreach module. From the mean count-rate we estimatethe expected counts from a Poisson distribution andcompare it with the observed counts. The estimatedPoissonian counts and observed counts histogramfor each module is then added to get statistics at thequadrant level. Since the background of CZTI shows aslow orbital variation, we divide the data into chunksof 100 s intervals. The observed and expected countsfrom all these chunks are summed up to get the finalhistogram.An example of such a histogram for 8.0 ms bin-ning is shown in Fig. 1. A consistent behaviour isseen for both the obsIDs as well as for all quadrantsof CZTI. It can be seen that there are a large numberof occasions when counts in excess of 10 are found,while the expected number from Poisson distribution is practically zero. We note here that any deviation in thePoisson distribution by slow variation in the counts due Figure 2 : The noise counts at di ff erent time scales for allthe quadrants. The noise counts are estimated from thedeviation from Poissonian. Top and bottom plots are forobsID1 and obsID2. Di ff erent quadrants are labelledwithin the plot. J. Astrophys. Astr. (0000) : to orbital background variation is explicitly taken careof by calculating the expected Poisson distribution forthe each 100 s chunk of data. Further, by taking thecounts for each module we essentially reduce the aver-age expected rate and thus enhancing the contrast dueto noise because the noise variations are expected to belocalised to each module. We can use these histogramsto estimate the residual noise counts by integrating theobserved histogram and subtracting the expected Pois-son counts. Thus for the 8.0 ms binned data, the esti-mated noise count rates in all the quadrants are 23.53c / s and 17.9 c / s in obsID1 and ObsID2, respectively,for the 8.0 ms binned data. We use this technique toget an estimate of the clustered noise events at varioustime scales. The estimated noise event rates at 0.5 ms,1.0 ms, 2.0 ms, 4.0 ms, 8.0 ms and 16.0 ms timescalesare plotted in Fig. 2. Again a consistent trend is seenin the two obsIds and across quadrants: though thereis about 20% variation among the di ff erent sets of data.It demonstrates that the noise events have a time scaleof several ms and most of the noise events are capturedwhen we examine the data at 8 ms time scale. Hence wechose 8 ms for further estimating the amount of noiseevents.Since the expected Poissonian count histogram fallsto zero beyond 10 counts per 8 ms per module (see Fig.1), all the counts detected beyond it have to be noisecounts. We used these counts to study their distribu-tion in energy across the detector plane to further in-vestigate their characteristics. When we made a plotof the energy spectra of these events, it showed mul-tiple peaks at di ff erent energies (top panel of Fig. 3).On a closer inspection of the data we realised that thesepeaks are module dependent and hence we scaled theenergy scale of the plot to the Lower Level Discrimina-tor (LLD) value of each module (we note here that inCZTI there are no pixel wise LLD, rather there is onlya module wise LLD: each module having only one ana-log to digital converter). Di ff erent modules have theirLLDs in the range 15 keV to 65 keV. In the distributionof the normalized energy (taking the energy scale fromthe LLD of each module), we see that there is only asingle peak near the LLD, thus signifying that the noiseevents are clustered around the electronic LLD of themodules. Hence we keep a threshold of 10 keV fromthe LLD of each module to identify the clustered noiseevents if they satisfy further conditions as outlined inthe next section. 10 keV is an adequate value to coverthe entire range of post bunch noises and the genuineevents from being flagged based on trial and error ondi ff erent data sets.We also examined the detector plane histogram(DPH) of the above mentioned noise events. The countsare uniform across the quadrant except for a few re- Figure 3 : Top: The spectral energy distribution ofevents selected from 8 ms bins of module wise datawhen the observed counts go beyond 10 counts per bin(deemed to be noise events, see text). Multiple peaksare seen in the distribution. Bottom: The same distri-bution when the energy scale is re-normalised for eachmodule by taking the start point as the LLD of thatmodule. A clear peak is seen near the LLD and the redvertical line shows the energy threshold used for fur-ther selection criteria. Di ff erent quadrants are indicatedby the labels within the plots. The data corresponds toobsID2.maining ’noisy’ or ’flickering’ pixels as seen in thedetector plane histogram (DPH) of these events (Fig.4). This indicates that these are electronic noises, how-ever they are uniform and hence not associated to just afew ’noisy’ pixels. We conclude that these extra noiseevents are caused by the lingering e ff ects of cosmic rayinduced bunches in all active pixels and they appearuniform in the DPH.Now we examine the lingering e ff ects after a par-ticle interaction in the detector plane. When a particleinteracts and triggers multiple pixels within 20 µ s, thenthey are registered as a bunch as mentioned above. Wefind excess counts for few tens of milliseconds just afterthe interaction of many ‘bunches’. However these aremainly found for ‘bunches’ with more than 15 events.Fig. 5 shows the post bunch noise associated withthe bunch, the lightcurve showing excess counts afterthe bunch, and energy distribution which shows excesscounts near the LLD. The time interval for the energydistribution and the DPH are indicated as green shadedpart in the light curve. The time of the ‘bunch’ is indi- . Astrophys. Astr. (0000) : Figure 4 : The detector plane histogram (DPH) of thenoise events selected according to the criterion that theintegrated counts over 8 ms binsgoes beyond 10 counts. The plotted data correspond toobsID2.cated by the vertical red line. From the DPH the postbunch noise along the track left by the particle can beseen clearly. In most of the cases the time scale ofpost bunch e ff ects is around a few tens of milli-seconds,however in some extreme cases, the time scale can goas large as 250 ms. The plotted data corresponds toquadrant 0 of obsID2. Similar properties in energy andtemporal regimes for post bunch noises in comparisonto the non-Poissonian noise identified above indicatethat the post bunch noises are the main source of thenon-Poissonian noise.
4. A new event selection algorithm
Based on all the above findings, we have formulated astrategy for removing the noise events. This essentiallyreplaces the routines ‘cztbunchclean’ and ‘cztpixclean’in the present analysis pipeline. The algorithm is di-vided into four di ff erent subsequent tasks.At first we remove the gross noisy pixels from thedetector plane histogram (DPH) of a quadrant, as it isthe predominant component of noise in the detector.This is done in an iterative manner. All the pixels in aquadrant which register counts above 5 sigma from themean are classified as ‘noisy’ pixels and are removedfrom the analysis. Since normal pixels and ‘low gain’pixels have a di ff erence in the count rate, the flaggingis done separately for them. Since the edge pixels in amodule have less geometric area, all the counts in DPHare normalised by the geometric area of the particu-lar pixel. The mean and sigma are recalculated afterthe first iteration to catch and exclude fainter ‘noisy’ pixels. The iteration is repeated until no further pixelsare caught as ‘noisy’. The deviation from the mean (5 σ ) is parametrised as noisypixsigmathresh . This stepis similar to the algorithm employed in ‘cztpixclean’of the CZTI pipeline, but with some refinements suchas handling the low gain pixels separately. This samemethod of flagging pixels is additionally used in the fi-nal event file for identifying noises in the ‘neighbour-ing double’ events used for polarimetry. Two eventsoccurring within in the time resolution of the instru-ment are termed as ‘double’ events, and such events inneighbouring pixels are termed as ‘neighbouring dou-ble’ events. Since the corner pixels angles register lessevents, we flag the outliers separately for the corner andside double events. We further split the flagging processfor low gain pixels and normal pixels as the count rateobserved in them are di ff erent. If a pixel is found noisyfor any of the segregated DPHs, then no further Comp-ton events are used from that pixel for polarimetry.In the second stage of event selection, we identifyand remove post-bunch noise events. This task is car-ried out in two steps based on the number of eventsin the bunch. As bunches with more than 100 eventsspan more than one module, the module identificationbecomes tricky as they are identified from 7 modulenumbers among all the bunch events. When such abunch occurs it may trigger pixels across at least 2 mod-ules and hence can disturb a large number of pixels.However, these bunches can be identified from the to-tal number of events in a bunch. At present we keepa threshold of 100 events (parametrised as superbunch-size ) to distinguish such bunches. These bunches areclassified as ‘super bunches’. After identifying thesebunches we perform the DPHclean method outlined inPaul et al. (this volume) to check if there is a
DPH-structure or spatial clustering in the DPH for the next100 ms (parametrised as
DPHtime ) from the start timeof the bunch. If a clustering is found, that time intervalis excluded for that quadrant. The fractional live-timeduring this time are updated accordingly. In the nextpart of the post bunch clean, we include bunches withevents greater than 15 events (parametrised as heavy-bunchsize ) as well. These bunches are called as ‘heavybunches’, and the rest of the smaller bunches are termedas ‘small bunches’. These particle tracks that triggerless number of bunch events, can be locally identifiedin a module or two. For such a bunch, 4 further cri-teria determine if these post bunch events need to beexcluded. These events are excluded if all the four cri-teria are met at the same time • the event is within 250 ms (parametrised as heavybunchtime ) after the bunch, • the energy of the event is less than LLD +
10 keV.
J. Astrophys. Astr. (0000) :
Figure 5 : Left: The light curve binned at 0.01 s showing the post bunch noise after a bunch. The time of the bunchis indicated as red vertical line. The green shaded region shows time selection for the energy distribution and theDPH. middle and right: The energy distribution and DPH for the post bunch noise. aaa
Raw event list excluding bunchesCompute mean ( µ )and std deviation ( σ )of counts per pixelFind noisy pixels withcount > µ + N σ × σ Anynoisy?Discard eventsfrom noisy pixelsEvent list removing noisy pixelsYesNo Loop over each bunchInput event list for post-bunch filtering Length >SB len ?Check for DPH-Structure in DPH ofevents within t DPH
Present?Discard all eventswithin t DPH
Length >HB len ?Discard post-bunchevents within t HB if they meet en-ergy, pixel, andclustering conditionsDiscard all eventswithin t HBM inthe same module Discard all eventswithin t SBM inthe same moduleLastbunch?Event list after post-bunch filtering YesYesYes NoNo NoYes Input event list for flickpixcleanCompute µ i and expected σ i for normalized rate ineach pixel for 100s time binFind number of time bins( Nt i ) with rates higherthan µ i + FN σ ∗ σ i Discard all events frompixel i, if Nt i > Nt flick Generate normalized pixellc for 10s and 1s time binsDiscard events from pixelfor 1 or 10s time bins ifcounts exceeds thresholdFinal clean event list
Figure 6 : Flow chart outlining the new event selection algorithm sequentially. The abbrevations used are given inthe bracket for di ff erent parameters in Table 1.The LLD here is the LLD of the pixel in whichthe event is found, • the event is in the same module as the bunch, orin the neighbouring 4 columns and 4 rows of pix-els adjacent to that module, • the event is clustered in 8 ms with another eventthat also follows the above three criteria.Furthermore, all events from the same module or neigh-bouring pixels are excluded for 5 ms (parametrised as heavybunchtimedet ) or 1 ms (parametrised as small-bunchtimedet ) for ‘heavy bunches’ or ‘small bunches’.The pixel exposure values of each pixels are correctedaccordingly. The final task of the algorithm is to identify and re-move events from flickering pixels. Since pixels canflicker from very short time scales to long time scales,we apply two strategies to find and exclude events fromflickering pixels. The first strategy is to find pixels thatshow non-Poissonian behaviour with respect to timeand thus identified from the deviations in the individ-ual pixel light curves. The light curves are binned at100 seconds for each pixels and the deviations from themean are checked to find the flickering pixels. A binsize of 100 s is appropriate to find the flickering pixelsas it gives enough statistics per bin. The significance ofdeviation (parametrised as flickersigma ) and the num-ber of allowed times for the deviation (parametrised as flickernumtimes ) are decided by the total exposure of . Astrophys. Astr. (0000) : the observation. Since the overall background of CZTIfollows a trend, the pixel wise light curves are normal-ized by the total light curve for the quadrant. Thiswill essentially avoid flagging short time increase incount-rate due to genuine GRBs detection, as flicker-ing episodes because such increase will be more or lessuniformly distributed across the detector plane. Fur-ther, the count rate in each bin is corrected for the frac-tional exposures calculated from the good time inter-vals (GTIs) of each quadrants. Pixels caught as flicker-ing will be excluded for the entire observation period.The second strategy to find flickering pixels is look-ing for non-Poissonian behaviour in the DPH at shortertime scales, i.e. 1 s and 10 s. Depending upon the meancount rate in that time interval, the pixel counts whichare not probable to occur at least once are calculated,starting from 2 counts, and all the pixels that registercounts above that are removed for that particular inter-val. Pixel exposures are updated accordingly after thisstep. Table. 1 summarize all the parameters and the re-spective default values used in the new algorithm. Theflow chart given in Fig 6, outlines the entire algorithm.The abbreviations used in the flow chart for visual rep-resentation are given in the Table. 1. Table 1 : Parameters of the event selection algorithm. flickersigma and flickernumtimes are based on the ex-posure of an observation. The range of values used aregiven in the table.Parameter Default value noisypixsigmathresh (N σ ) superbunchsize (S B len ) DPHtime (t
DPH )
100 ms heavybunchsize (HB len ) heavybunchtime (t HB )
250 ms heavybunchtimedet (t
HBM ) smallbunchtimedet (t S BM ) flickersigma (FN σ ) flickernumtimes (Nt f lick )
5. Results
We now employ the algorithm described in the previoussection to obtain clean events for CZTI observations.The e ffi cacy of the new event selection strategy is eval-uated by examining any residual clustering in temporal, spatial, and spectral domains for the cleaned events. Fi-nally, we use data from detected gamma ray bursts toquantify the improvement in signal to noise ratio withthis method.5.1 Clustering at millisecond time scales
We re-examine the non-Poissonian behaviour at 8 mstime scale in the cleaned event files to quantify the re-duction in temporally clustered noise. We find that thenoise events calculated from the di ff erence in the ob-served and the expected count rates decreased by anorder of magnitude. The noise count rate after thecleaning is 3.33 c / s and 3.72 c / s in obsID1 and Ob-sID2 in comparison to 23.53 c / s and 17.9 c / s beforethe cleaning. We also compare these noise count rateswith the results of the both the cztpipeline run config-urations (as outlined in section 2) and for both the ob-servations. For the cztpipeline lowthresh run the noisecount rate is 5.16 c / s and 4.39 c / s in obsID1 and Ob-sID2, and in cztpipeline highthresh run is 20.43 c / s and14.96 c / s in obsID1 and ObsID2. Fig. 7 shows the ex-pected Poissonian counts in quadrant 0, the observedcounts before and after noise clean, and also for the czt-pipeline lowthresh run and cztpipeline highthresh run of the cztipipeline. The other three quadrants also showsimilar behaviour as in Fig. 7. From Fig. 7 and fromthe noise count rates, it is evident that the current al-gorithm decreases the number of noise events betterthan the cztpipeline lowthresh run of the cztpipeline,and at least by a factor of 5 with respect to the czt-pipeline highthresh run .5.2 Spatial clustering and DphStructures
Using the
DPHclean algorithm discussed in Paul et al .(2021) (this issue) we examine the level of spacialclustering within a bin size of 100 ms at di ff erent stepsevent selection algorithm. This DPHclean algorithm ispreviously used within the event selection algorithm toexclude time intervals after a bunch of size 100 events(see section 4), but here we use it on the entire dataset to quantify any spatial clustering in the remainingselected events. A bin size of 100 ms was used sincethis time scale is identical to the time scale of postbunch noises. DPH for every 100 ms starting from thestart time to the stop time is generated and checked forspatial clustering using the above mentioned algorithm.Those DPHs where spatial clustering was found aretermed as
DphStructures . In this section we try toquantify the rate of
DphStructures in event files atdi ff erent steps of the noise clean algorithm. Sincepost bunch noises are the prominent form of spatiallyclustered noises, the rate of DphStructures indicatesthe amount of residual post bunch noise remaining in
J. Astrophys. Astr. (0000) : obsID1 obsID2Counts per 8 ms per module N u m b e r o f o cc u r e n c e s Figure 7 : Histogram of counts per 8 ms per detector module for obsID1 (left) and obsID2 (right) after the newevent selection algorithm (green), as well as low thresh config (purple) and cztpipeline highthresh run (magenta)products. The plotted data corresponds to quadrant 0.The blue line shows the expected Poissonian counts and the red line shows the observed counts without any postbunch clean.the data. We find that the the rate of
DphStructures after the ‘noisy’ pixel clean is 0.93 per second and0.95 per second in obsID1 and obsID2. After the postbunchclean1 it reduced to 0.42 per second and0.48 per second for obsID1 and obsID2. Further after postbunchclean2 it reduces to 0.22 per second and 0.19per second for obsID1 and obsID2 respectively. After flickpixclean it again reduced to 0.08 per second and0.07 per second for obsID1 and obsID2. This indicatesthat the noise due to
DphStructures reduces by an orderof magnitude after the noise clean algorithm.5.3
Spectra of clean events
Now, we examine the spectra of cleaned events. Fig. 8shows the energy spectrum for clean single pixel eventsfor ObsID2, along with spectrum of the scattered eventsof the double pixel Compton events that are used forpolarimetry. The single event spectrum shows the ex-pected Tantalum K − α and K − β lines and an additionalline feature around 40 keV. This line feature at 40 keVis also seen in Compton event spectrum and is knownto be a prominent feature in the events that constitutethe ‘bunches’, as shown by the bunch event spectrum inthe figure. Thus, a small fraction of events having sim-ilar spectral characteristics as the bunch events remainpresent in the clean event files. To estimate the contri- bution of such events, the spectra around the line werefitted with a powerlaw continuum and a Gaussian lineand fraction of events within the line were computed. Itis seen that about 1-1.2 % of the total clean single andCompton events are arising from this line at 40 keV andthe line fraction is about 40 % for bunch events. As-suming that the spurious events left in the clean eventfiles have spectrum similar to the bunch events, we es- Figure 8 : The spectra of single and compton doubleevents showing peak around 40 keV as also seen in the‘bunches’ indicating the particle origin of these events. . Astrophys. Astr. (0000) :
Table 2 : Signal to noise ratio (S / N) and 3 σ outliers per quadrant calculated for 11 GRBs using the czt-pipeline lowthresh run , cztpipeline highthresh run and new event selection algorithm. For extremely brightGRB160821A cztpipeline lowthresh run shows a negative S / N since the counts during the GRB interval waskilled and instead of a peak it resulted in a drop in the lightcurve.
GRB name cztpipeline lowthresh run cztpipeline highthresh run new algorithmS / N 3 σ outliers S / N 3 σ outliers S / N 3 σ outliersGRB191225B 2 .
07 2 .
76 2 .
01 5 .
35 2 . . .
24 2 .
52 5 . .
01 5 .
54 0 . .
36 1 .
51 6 .
64 3 .
06 6 .
97 1 . .
89 1 .
69 4 .
15 3 .
48 4 .
22 0 . .
76 4 .
48 11 .
57 3 .
45 11 .
99 0 . .
01 3 .
06 5 .
09 5 .
92 5 .
45 2 . .
13 3 .
76 4 .
15 2 .
99 4 .
34 1 . . .
02 5 .
75 5 .
49 6 .
23 0 . .
97 2 .
88 5 .
54 2 .
09 6 .
43 1 . .
41 0 .
98 2 .
95 3 .
73 3 .
25 1 . − .
51 1 .
76 35 .
67 2 .
88 38 . . timate the fraction of residual noise events to be ∼ ff ect of these residual events arevisible in the energy spectrum, they do not show anyclustering in time or detector position, which is whythey are not removed even after the improved event fil-tering techniques. As these residual events are randomin time and uniform over the detector plane, they actas additional background events and thus get removedin background subtraction. Thus, this small fraction ofresidual events do not contribute to any additional sys-tematic errors.5.4 Signal to noise of GRBs
We calculated the signal to noise ratio in 11 gamma raybursts (GRBs), previously detected by CZTI to showthe reduction in the background noise without compro-mising on the source counts for the new algorithm. Wecompare our results with the cztpipeline lowthresh run and cztpipeline highthresh run of the cztpipeline. Thelight curve of the short and long GRBs were binnedat 1 s. Bins with exposure times less than 0.3 areexcluded from the analysis. The trigger time (T trig )are obtained from the AstroSat CZTI GRB catalog(http: // astrosat.iucaa.in / czti / ?q = grb). The sourceregion in the light curve was selected manually. 500seconds before and after the GRB region was selectedas background.However the background pre-and-post GRB background was taken 5 seconds away from the GRBto avoid contamination from the source counts inmodelling the background. Since the background ofCZTI follows a trend we fit a quadratic function tode-trend the pre-and-post GRB backgrounds for allthe quadrants. The fitted function was then subtractedfrom the light curve to obtain a background subtractedlight curve. The signal to noise ratio of the GRB isestimated by M / S, where M is the mean during thebackground subtracted GRB time interval, and S is thestandard deviation of the de-trended background. Thesample consists of 5 short GRBs (T < > cztpipeline highthresh run and czt-pipeline lowthresh run . We also calculated theamount of 3 σ peaks per quadrant above the poissonlimit. This is calculated by subtracting the esti-mated amount of peaks beyond 3 σ level from thePoissonian equation from the observed peaks in thelightcurve beyond the 3 σ level at the quadrant level.Table. 2 shows that while the signal have been lostin some cases for the cztpipeline lowthresh run , 3 σ peaks per quadrant increase in case of the czt-pipeline highthresh run . However the new algorithmretains the GRB signal without compromising on theamount of particle induced 3 σ peaks. It is also seen J. Astrophys. Astr. (0000) : (a) GRB180504B Quadrant 0(b) GRB180703B Quadrant 1(c) GRB191225B Quadrant 0
Figure 9 : CZTI Lightcurves of di ff erent GRBs at quadrant level from cztpipeline highthresh run (left) and the newevent selection algorithm (right). The vertical blue dotted line indicates the GRB trigger time. The 3 σ outliersare marked by red dots and are seen more in the cztpipeline highthresh run . . Astrophys. Astr. (0000) : that there is a slight improvement of the signal tonoise ratio, as well as a reduction in the particle peaksin comparison to both the methods from cztpipeline.Fig. 9 shows the lightcurves of the GRB from the cztpipeline highthresh run of cztpipeline and afternoise clean algorithm. The peaks that disappear afterthe new event selection algorithms are the particleinduced noises. It is evident from the lightcurves,that outliers in lightcurves in second and sub-secondtime scales has reduced significantly, and the searchfor astrophysical transients will not be influenced byparticle induced and electronic pixel noises. Hencethe false alarm rates due to particle induce noises willbe drastically reduced for an automatic transient search.
6. Conclusions
In this paper we have outlined a method of eventselection in the CZTI data based on their clusteringproperties at spatial, spectral and temporal dimensions.It is found that the cosmic ray induced noise in theCZTI data has been reduced by a significant amountwithout source flux dependent manual configurationof the parameters. The same algorithm providescleaned data for both highly variable short durationbright transient sources as well as for the backgrounddominated on-axis source observations, with thesame configuration of the parameters. We also foundthat the cosmic ray tracks which can mimick shortGRBs are also reduced significantly. Searches fortransients, especially short transients, like short GRBs,counterparts to gravitational wave events, counterpartsto fast radio bursts (FRBs), will benefit by using thisalgorithm as the false trigger rate will be reducedsignificantly. The reduction in the particle tracks notonly improves the transient and GRB searches butalso the science products like spectrum, polarisationand localisation for them. This is because the particletracks are not uniformly distributed across time forshort timescales like a few hundreds of seconds,which makes the background subtraction in energyand DPH improper. Since the new algorithm is robustat divergent count levels, it will be very useful forcombining data obtained for long duration at di ff er-ent flux levels like that needed for the o ff axis pulsarsearches, especially for the fainter milli-second pulsars.Further co-adding data to search for sources at lowerflux levels is easier with this new algorithm becausethe parameters can be set uniformly across data setsand an automatic analysis procedure can be established.With additional features in flagging ‘noisy’ and ‘flickering’ pixels, this algorithm has a better handlingof the pixelated noises in temporal and spatial regimesin comparison to the cztipipeline. Currently a beta ver-sion of the algorithm is available. This will be usedin multiple data sets for di ff erent uses. The algorithmis organised in a structured way such that the defaultparameters can be tweaked, the order and sequence ofanalysis can be experimented such that a robust under-standing of the various aspects of noise could be arrivedat. A new version of cztipipeline is currently being de-veloped to include improved aspects of energy calibra-tion and imaging and we plan to incorporate this noiseclean algorithm in the new pipeline. Acknowledgements
The data used in this work is from the
AstroSat missionof the Indian Space Research Organization (ISRO),archived at the Indian Space Science Data Centre(ISSDC). We acknowledge the
AstroSat
CZTI Payloadoperation centre at IUCAA for their help in develop-ing and testing this algorithm. The CZT Imager in-strument was built by a TIFR-led consortium of in-stitutes across India, including VSSC, ISAC, IUCAA,SAC, and PRL. The Indian Space Research Organisa-tion funded, managed and facilitated the project. Wethank Mayuri Shinde for her contributions in develop-ing the algorithm into a code in C ++ programming lan-guage. We also thank Avinash Aher for his contribu-tions in data analysis. References
Bhalerao, V., Bhattacharya, D., Vibhute, A., et al . 2017,Journal of Astrophysics and Astronomy, 38, 31Chattopadhyay, T., Vadawale, S. V., Aarthy, E., et al .2019, ApJ, 884, 123Paul, D., Rao, A. R., A., R., et al . 2021, Journal ofAstrophysics and Astronomy, this volume, , prima-ryClass = ”astro-ph.IM”, keywords = space vehicles:instruments – instrumentation: detectors – X-rays:detectors – X-rays: analysis.Rao, A. R. 2018, Journal of Astrophysics and Astron-omy, 39, 2Rao, A. R., Chand, V., Hingar, M. K., et al . 2016, ApJ,833, 86Segreto, A., Cusumano, G., Ferrigno, C., et al . 2010,A&A, 510, A47Segreto, A., Labanti, C., Bazzano, A., et al . 2003,A&A, 411, L215 J. Astrophys. Astr. (0000) :
Singh, K. P., Stewart, G. C., Chandra, S., et al . 2016, inProc. SPIE, Vol. 9905, Space Telescopes and Instru-mentation 2016: Ultraviolet to Gamma Ray, 99051EVadawale, S. V., Chattopadhyay, T., Mithun, N. P. S., et alet al