Astronomical Instrumentation, Telescopes, Observatories, and Site Characterization

CCDLAB: A Graphical User Interface FITS Image Data Reducer, Viewer, and Canadian UVIT Data Pipeline

and

Published 2017 October 2 © 2017. The Astronomical Society of the Pacific. All rights reserved.
, , Citation Joseph E Postma and Denis Leahy 2017 PASP 129 115002 DOI 10.1088/1538-3873/aa8800

1538-3873/129/981/115002

Abstract

CCDLAB was originally developed as a FITS image data reducer and viewer, and development was then continued to provide ground support for the development of the UVIT detector system provided by the Canadian Space Agency to the Indian Space Research Organization's ASTROSAT satellite and UVIT telescopes. After the launch of ASTROSAT and during UVIT's first-light and PV phase starting in 2015 December, necessity required the development of a data pipeline to produce scientific images out of the Level 1 format data produced for UVIT by ISRO. Given the previous development of CCDLAB for UVIT ground support, the author provided a pipeline for the new Level 1 format data to be run through CCDLAB with the additional satellite-dependent reduction operations required to produce scientific data. Features of the pipeline are discussed with focus on the relevant data-reduction challenges intrinsic to UVIT data.

Export citation and abstract BibTeX RIS

1. CCDLAB

The name CCDLAB is simply a take on Matlab, given that the graphical user interface was first prototyped in Matlab's GUIDE (Graphical User Interface Integrated Development Environment), for reducing and viewing astronomical CCD images. CCDLAB is now developed in Visual Studio C++ as a Window Forms project, and it retains some Matlab functionality with Matlab's Compiler for .Net. CCDLAB's remaining dependency on the Matlab Runtime is found in the execution of numerical routines such as 1D and 2D interpolation, and multi-parameter least squares optimization function fitting, for example for fitting a Gaussian or Moffat function to a point source, and in displaying 3D surface plots of such.

The underlying principle of CCDLAB is to provide immediate graphical results for typical (and with UVIT, atypical) operations on scientific image data via a graphical user interface which provides easy and simple access to controls which command image reduction operations. After witnessing students struggle with command-line or script interfaces on non-Windows operating systems with which they had little to no familiarity with for performing the mostly trivial tasks involved with astronomical CCD data processing, the author felt that a Windows GUI interface for such data-reduction procedures would help to maintain the focus and learning on the data-reduction concepts themselves rather than time spent and even wasted in learning new interfaces. Particularly helpful is being able to see the results of the data-reduction steps as they are performed in near-real time.

CCDLAB can perform all of the typical image data-reduction operations required for FITS image data, such as CCD data taken for some telescopes. Such operations are, for example, determining the mean, median, sum, minimum, maximum, or standard deviation of a set of images. The mean function optionally allows for clipping of pixels out of the image stack beyond a user-specified standard deviation, where the clipped pixels are replaced by the median of the pixel stack; the function iterates until there are no remaining offending pixels, given updates to the standard deviation of the image stack after each clipping of the image stack. Other operations are subtracting, adding, multiplying or dividing an image from a set of images, binning images, inverting and rotating images, shifting images, mathematical operations on images, and basic filtering such as a median filter given a user-specified kernel size, or Gaussian filtering with a user-specified FWHM. If there is no field rotation in an image set, then it can automatically register a set of images at the pixel scale and shifts at the pixel scale are conservative since this is simply a reorientation of the pixel matrix. It can also perform point-source extraction, determine a World Coordinate System with manual interaction, and the plan is to interface with the astrometry.net (Astrometry.net 2017; Lang et al. 2010) API to perform WCS "automatically."

Rotation of images in multiples of 90 degrees are handled internally by parallelized C++ code and are conservative because it merely amounts to an axis reorientation of the pixel matrix. If the rotation is an intermediate angle, then the Matlab Image Processing Toolbox is called using the imrotate function with bilinear interpolation, where the output pixel value is a weighted average of pixels in the nearest two-by-two neighborhood, and is hence a blurring process.

CCDLAB has mainly been developed for image reduction and viewing, but spectral data recorded on CCD or CMOS as images can be reduced the same way. Development of further spectrum reduction operations such as continuum normalization while viewing spectrum plots has not been developed because it has not been a need in the author's research, but such things could be added.

For image operations on a 64-bit machine with 32 GB of RAM memory, 200 double-precision images of 4096 × 4096 pixels can be processed in RAM, and all image operations that are capable of being multi-threaded are, using the OpenMP directives, included in Visual Studio. Reading and writing these images from disk is what takes most of the time, but with the solid-state M.2 PCI drives now being released, hard drive time is becoming rapidly reduced.

If larger image sets than are capable of being loaded into RAM need to be reduced, a list of the FITS files can be generated by CCDLAB with user interaction; then CCDLAB can operate on the images reading them one at a time from the hard disk. For example, the mean or sum of a set of images can be determined this way or subtracting dark frames, etc.

CCDLAB also provides source-fitting and curve-of-growth methods for determining photometry on point sources.

A limited set of screen shots of the CCDLAB GUI and some of its features are presented in Figures 14.

Figure 1.

Figure 1. CCDLAB screen shot.

Standard image High-resolution image
Figure 2.

Figure 2. CCDLAB can show row and column plots of the entire image range or only the subwindow region. Gaussian or Moffat fits can be determined for the row/column data in the plot window.

Standard image High-resolution image
Figure 3.

Figure 3. CCDLAB allows the user to interact with the primary image header in various ways.

Standard image High-resolution image
Figure 4.

Figure 4. CCDLAB can determine and fit a radial profile for a selected target.

Standard image High-resolution image

The CCDLAB and Matlab Runtime installer packages can be downloaded at http://www.ucalgary.ca/uvit. Please contact the author if help is needed.

CCDLAB is released under GNU General Public License v3.0 and its source code and support components can be found on SourceForge at https://sourceforge.net/u/user29a.

2. UVIT

The Ultra Violet Imaging Telescope (UVIT) is one of the instruments on board ISRO's ASTROSAT science mission (Kumar et al. 2012). The UVIT detector system (DS) was developed and produced in Canada via funding by the Canadian Space Agency (CSA), with development and calibration support provided by the University of Calgary via a grant from the CSA (Hutchings et al. 2007; Postma et al. (2011). It has three detection channels on two telescopes, with one telescope using a beam splitter to separate near-ultraviolet (NUV) from visible (VIS) frequencies, while the other telescope is for far-ultraviolet (FUV) only. The beam splitter and detector mounting orientation causes the NUV channel field on its CMOS array to be inverted and rotated by 33 degrees relative to the FUV channel.

The DS can operate in two modes: centroiding or integration. Centroiding is the mode for scientific FUV and NUV data, while in principle, the VIS channel is run in integration mode and is used for star tracking, although there are other ways to perform star tracking that the CCDLAB pipeline uses which does not require use of the VIS channel data.

Centroiding mode means that the DS is run at standard operating high voltage with the CMOS frames being scanned continuously, which at full-frame read (512 × 512 pixels) is about 28.7 Hz; sub-frame reads allows for higher-frequency scanning as only a sub-region of the CMOS chip is read out (600 Hz for 100 × 100 subwindow). Each frame is scanned for photon pulse point sources using a basic point-source detection algorithm, and each point-source pulse is centroided using a local weighted mean of the photon pulse. These operations are performed on onboard hardware, and by only recording detected photon events as centroids, the data accumulation rate is drastically reduced compared with if the entire frame were being recorded.

For scientific use, the UVIT DS is a 2D photon counter, with centroiding performed on the location of photon pulses to provide sub-CMOS-pixel resolution for final science data. While a CMOS pixel spans approximately 3.3'' on the sky, centroiding the photon pulse allows subpixel resolution of the pulse location to be determined, thus providing approximately one-third pixel resolution astrometry. Details on the centroiding algorithms can be found in Hutchings et al. (2007) and Postma et al. (2011). Point sources are typically resolved to a PSF of approximately 1.2'' FWHM via a Moffat fit to the radial or 2D profile, and occasionally 0.9'' is achieved.

The DS records centroids at one-thirty-second pixel resolution, along with an internal clock timestamp for each centroid (taken as the time of the beginning of the CMOS frame scan) measured in milliseconds, and also the frame number for the centroid. The value of the local minimum determined and used for background subtraction for each photon pulse in its weighted-mean centroid calculation is also recorded for each centroid, along with the variance of the possible background estimates which is affected by double-events or events which occurred very close together. From ground data, it was thought that such characterization of the photon pulses would allow for filtering of the quality of each centroid calculation, thus providing a metric by which the PSF of final science images could be improved.

Integration mode means that the DS is run with a slower scan rate of the CMOS chip, thus allowing photon pulses to integrate on the chip for some time before the chip is read out. However, at standard operating voltage, each photon pulse comprises on average approximately one-seventh of the CMOS electronic charge depth, and so only seven photons could be integrated before a CMOS pixel became charge saturated. Thus, the voltage is reduced for integration mode so that many photon pulses can fall onto the pixels without saturating the pixels. This is necessary particularly in the VIS channel because detected fluxes at these wavelengths are quite high. While the final PSF of point sources in this mode is much larger than those for centroid mode, point sources can still be detected and centroided on ground, and such data can be used for star-tracking drift corrections to be applied to the other two channels. The integration time for VIS tracking images is typically set to 1 second, and the data rate for storage of integrated full-frame data is much larger than for centroid mode.

Star tracking (drift tracking) is required because ASTROSAT is flown with an induced drift during UVIT imaging sessions, using a sine wave scan in orthogonal axes of amplitude 50 arcseconds and rate 1 arcsecond per second. The purpose of this to spread charge depletion of the multi-channel-plate (MCP) amplifier around the detector face. This drift must be tracked through time and corrected from each centroid in time to produce final science images.

The DS data also contains various telemetry of its state such as the current voltages, CMOS window size, read rate, etc. The data is downloaded from orbit and is then reformatted and packed with other spacecraft and observational metadata into FITS tables, and at this state is called Level 1 (L1) data. The raw DS data is formatted along the CCSDS protocol, and at that level is called Level 0 (L0).

As of this writing, it has recently been discovered that one to two percent of the centroid data may be being lost somewhere along the L0 to L1 data chain. This translates directly to an effect on the photometry at that level, if the missing data frames are not taken into account in the total integration time for an observation.

3. Pipeline Requirements

A pipeline for UVIT must ingest the L1 format data provided by ISRO to the Payload Operations Centre (POC) at the Indian Institute of Astrophysics (IIA), and then perform various detector-specific and observational corrections to it to reduce it to scientific level data. The L1 files contain a FITS binary extension that is a table of the centroid lists discussed in Section 2, along with other telemetry such as detector voltages and other states from the UVIT Electronics Unit (EU) and detector system (DS). The headers of these FITS files also contain observational information such as orbit number of observation, detector and filter used, target information, etc.

The integration time for the data contained in the centroid lists must be calculated from the centroid list itself, and one of the tables of the centroid list is the EU time timestamp for each centroid measured in milliseconds; the total integration time for a centroid list is the final centroid time minus the first centroid time, corrected for any missing data frames.

3.1. Data Corrections

3.1.1. Duplicated Data

Given hardware and data rate limitations, it is not generally possible to download newly generated onboard UVIT data every time an observation is made with UVIT. Thus, observations actually performed in one orbit may be downloaded in a later orbit, and if the orbit number of data-download is used for identification purposes (and it is), then this can lead to confusion as to when downloaded data actually originates. That is, there may be two or more L1 files with unique file names and unique file sizes, and with metadata indicating that the data contained therein is from different orbits; however, upon inspection it can be found that the two (or more) files contain at least partially, or totally, identical data sets.

While all of the data is eventually downloaded and the correlation of downloaded data can be made to the observation target to which it corresponds, the uniqueness of L1 data files for a particular target is not guaranteed. That is, observation data for a target may be replicated at least once in the L1 files which are subsequently generated for the target and which are intended for ingest in any down-stream pipeline. For example, data for a 20-minute stare using some filter and some channel may be replicated among one or more L1 files with different orbit numbers.

Given that this is expected to be a general condition of the L1 data files, then any pipeline must ensure that the set of L1 files for a particular target do not become reduced as if all data is unique data. That is, combining two (or more) data sets, assuming that they are unique observations, when the data sets are actually of duplicated data, is not scientifically meaningful. The Canadian UVIT Pipeline in CCDLAB ensures that this does not occur in its reduction of UVIT data by examining the centroid timestamps from different data files for repetition, and discarding such.

More recently, L1 data files are also being provided as a "merged" format in which data repeats have already been removed, but the procedure described here can still be run to ensure data fidelity.

3.1.2. Metadata Corrections

Related to the above-mentioned problem with data download limitations, and due to the fact that the filter electronics system and target identification metadata are packed into the L1 fits headers separately from the UVIT DS data, then the filter and target identification occasionally may not match to what was actually observed. To correct this, the L1 data set also contains auxiliary "housekeeping" files, as FITS tables, which correlate the time of observation to the filter and target ID. The time of observation used is an ASTROSAT-specific modified Julian date, and this table entry is found in both the L1 detector data table and the auxiliary housekeeping table. A pipeline must ensure that the filter and target ID actually correspond to what was observed, and by using the auxiliary housekeeping fits table this may be done.

More recently, L1 data files are being provided as a "1.2" version, in which the filter metadata has already been corrected, but the procedure described here can still be run to ensure data fidelity.

3.2. Detector Corrections

3.2.1. Field Distortion

Each detector has unique field distortion which should be corrected for astrometric accuracy (Girish et al. 2017). Field distortion is probably mainly due to the fiber optic taper, and runs in the range of 10–15 arcseconds.

3.2.2. Centroiding Bias

To get the astrometric accuracy and source resolution for which UVIT is designed, subpixel-accuracy centroiding is used, but the centroiding is of a very poorly sampled pulse distribution. A photon pulse on the CMOS chip falls almost entirely within only 3 × 3 pixels, with a FWHM of ∼1.5 pixels. A weighted-mean centroid performed on such a poorly sampled profile leads to a preferential centroid computation bias tending toward the center pixel of the 3 × 3 centroiding kernel. This centroid bias must be corrected for so that the subpixel resolution final science images are not affected by the astrometric and qualitative image problems that this bias creates at the one-half pixel scale. Correction of the centroiding bias is described in Hutchings et al. (2007) and Postma et al. (2011), and the bias correction table is provided with the UVIT Calibration Database at http://www.ucalgary.ca/uvit/.

3.2.3. Flat Field

As a single photon pulse is typically a few thousand counts on the CMOS chip and is recorded as a single count for its centroid location, the flat response of the CMOS chip itself is of much less consequence as compared with traditional direct imaging with a CMOS or CCD. However, the photocathode, phosphor, microchannel plate, and fiber optic taper do still provide for some modulation of the quantum efficiency (QE) across the detector field. The flat field for each detector was measured in Calgary using a UV-reflective integrating sphere with the detector window placed at the output of the sphere where its response is flat. The FUV and NUV channels must apply the inverse of the flat value as a weighting for each centroid, given its location on the detector, when the 2D sum of all centroids is performed to produce the final science image. The same would need to occur for VIS centroids; however, VIS centroids typically will not be produced for science purposes (although it can be done if needed).

The flat field as measured by a detector must also first have the distortion correction applied to its centroids for that detector. If there is spatial pinching and stretching of the detection field across the detector due to field distortion, then pinching transforms the initial uniform distribution of the light source into a higher frequency of counts in the region where there is pinching, and stretching causes the opposite lower frequency of counts to occur in regions of the detector where there is stretching. This will make it look like regional variations in QE, but it is not a QE effect because it is actually due to field distortion bunching together or diluting the incoming flat-distribution of photon pulse centroids in a region. To get the actual flat field for QE effects, the flat centroids must be corrected for detector distortion first before the flat-field centroids are summed into a 2D image. The centroids of science data are, of course, corrected for distortion too, so their corresponding flat-field weight in the distortion-corrected location where they are detected must be from the QE effect only and not from an effect due to distortion.

The CCDLAB pipeline creates a flat-field list where each entry is the flat weighting for the centroids in the centroid list; this weighting is (optionally) applied to each centroid when they are summed into a 2D image.

The flat fields for each channel are provided with the UVIT Calibration Database at http://www.ucalgary.ca/uvit/.

3.3. Satellite Corrections

3.3.1. Induced Field Drift and Field Rotation

To spread the charge depletion of the MCP over its surface area, ASTROSAT is commanded to oscillate its pointing with a sine drift about the center of the observation field with an amplitude of about 50'' and a rate of about 1'' per second. While this induced oscillation is very well behaved and low frequency, a generally unpredictable high-frequency field translation usually enters most observations, which is caused by movement of the scanning sky monitor (SSM) camera (Ramadevi et al. 2016). The induced field drift and the field movement caused by the SSM are, conveniently, translational only, with field rotation for a given observational pointing being negligible or undetectable. The field drift must be subtracted out of the centroid list.

Field rotation can come in for different orbits observing the same field, and if the observer desires a deep-field stack of all centroids for all observation orbits of a target, then each observation must be registered with both field translation and field rotation between them. CCDLAB provides an interactive routine to easily register all orbit observations for field translation and rotation.

3.3.2. Exposure Array

The field drift implies that not all portions of the imaging field are exposed to an equal total integration time. Typically, this effect only applies around the periphery of the imaging field while the central target of observation would be fully exposed. To correct for the areas that are not exposed to the full integration time, then one can utilize the drift series from the previous section to create an "exposure array" which is a normalized 2D map of the ratio of the local total integration time within the map to the total integration time for the fully exposed part of the image. It helps to pad the imaging field to a larger array size than is actually imaged for this process, as some field-edge sources may drift out of the mean field of view. The exposure array then provides weighting values for the final image which enter in the same way that a flat-field correction would; that is, areas of the image which are exposed to a normalized value of less than unity are divided by this value to scale those areas up to the total integration time.

3.4. Telescopic Corrections: Field Transformations

A pipeline should provide the ability to field-transform the channels to co-align the reduced centroid lists and final images. This is related to registration as in the previous section; however, due to the beam splitter, the NUV channel centroids also require a vertical inversion in addition to rotation by ∼33 degrees to align them with the FUV field, while the VIS field is rotated by ∼33 degrees to FUV.

4. Canadian UVIT Pipeline in CCDLAB

4.1. Digestion

At the end of an observation sequence of a particular target, there will be a number of Level 1 (L1) data files supplied by ISRO (Indian Space Research Organization). For example, during PV phase, the globular cluster NGC 1851 was observed and the result of those observations provided 87 L1 files for the NUV and FUV channels. The first step is thus to extract all data sets from the set of L1 files and examine them for scientific usefulness and to discard any data that is not.

Each L1 file may contain one or more unique observations for a given filter. Unique observations are determined by examining both the frame number and frame time of the centroid list, and checking for when they reset. The frame number is an unsigned 16-bit integer and the frame time is an unsigned 32-bit integer counting in milliseconds.

The frame number for a given operation of the UVIT DS will always reset to 0 when imaging is stopped and then started again. However, it will roll over to zero if more than hat 216-1 frames are taken in a given observation. Thus, while imaging full-frame at ∼29 Hz, approximately 37.6 minutes may be observed continuously before the frame number rolls over, while at 600 Hz for a 100 × 100 subwindow, this reduces to 1.8 minutes.

The EU time clock continues counting as long as the detector system is powered on and will continue from where it left off if the DS is shut down, so turns over every hat 232-1 milliseconds of powered-on time. This is approximately 4.3 megaseconds or 49.71 days of power-on time. Thus, uniqueness is more useful to test for here. Time allocations for target observations are on the order of tens of kiloseconds.

Thus, whenever the frame number or frame time resets to zero in the centroid list, CCDLAB considers this to be a new data set, and even if the new set is generated from a bit roll over and the data is continuous from the previous set, no data is lost and such continuous sets can be reduced independently and combined afterwards. Each reset to zero of the frame number does typically correspond to the beginning of a unique imaging session as the observation of a target, due to orbital constraints, usually is not much longer than 20 minutes, and the full-frame image rate is usually used with its 37.6 minute window for frame number roll over. If the frame number does roll over within an orbit observation because a subwindow is being used and the frame read rate is high, then these simply get extracted out as separate observations and processed for drift independently and then are all combined afterwards in any case.

The underlying principle here is to extract from each individual L1 file as unique of data as possible into unique subsets, because as mentioned, among a set of L1 files for a particular target there may be repeated data between them even though the L1 file metadata says that the data came from different orbits. The L1 files may either completely or only partially duplicate data while containing multiple data sets from unique imaging sessions within each file; this is why they must be stripped into subsets for as much uniqueness as possible.

After the set of L1 files is stripped into unique centroid lists as determined by frame number or frame time resets or roll overs, CCDLAB examines all of those for any overlap in the start and end frame time, respectively. Given that data is sometimes only partially duplicated, then one extracted centroid list may exist entirely within the contents of another larger one. The larger centroid list is then kept and the smaller one discarded; if they were equal in content, then either one is discarded. If there was only partial overlap of centroid lists, then the smaller centroid list is discarded, assuming that any loss of unique scientific data from the smaller non-overlapped part is negligible, or that it exists in another list which is not discarded. This algorithm consistently produces a set of temporally unique centroid lists where the set of source L1 data is known to contain a significant fraction of duplicated data; the uniqueness check is an option in the CCDLAB menu for L1 data digestion. It has also been found that for a target's given known observation time that no unique data is lost and that therefore the condition of partial overlap does not result in lost data by the algorithm; therefore, such data must always exist in other L1 files being processed for the target or that the condition of partial overlap does not occur.

Of the 87 L1 files for NGC 1851, comprising 2.94 GB of data on the hard disk, the L1 data digestion by CCDLAB returned 395 MB of unique centroid list data among 41 individual sets and had discarded 49% of the L1 file data as duplicated. This required about 1.25 minutes of wait time with all detector corrections applied and flat field lists produced, and duplicated data searched for and discarded.

At the beginning of any observation, a short observation sequence of 20 seconds is performed to test for bright object detect (BOD). These are short observations and typically do not contain enough data to be scientifically useful, so these data can be optionally discarded.

More recently, L1 data in a merged format is being supplied in which the data repetition problem does not occur, but the algorithm to check for data duplication can still be left to default on as a data fidelity check and for cases where merged data may not available.

4.2. Drift Correction

4.2.1. Channel Self Correction

While the VIS channel of the UVIT telescopes is intended to be used for drift correction, due to problems with temporal alignment of data from different channels during first-light and PV (payload verification) phase an alternative algorithm was developed which allows the NUV and FUV channels to track their own drift.

During any single observation it is found that field rotation is negligible, thus drift determination and correction only requires a solution which determines field translation. Thus, reducing the x and y axes of the background-subtracted frame to 1D vectors by binning the frame along either axis produces a sort of "emission spectrum" where point sources become emission spikes in the vector. These data vectors can be cross-correlated between a reference frame and comparison frame to get the x and y lag shift in the position of the "emission sources" between the frames. A cosine-bell function (i.e., Hanning window) is applied to the images before they are summed into vectors for cross-correlation to suppress ringing and to suppress bright edge sources that may come in and out of view during drift. The correlation lag, or drift shift, is then determined by fitting a quadratic to the top three points of the cross-correlation and using the center of the quadratic as the lag. The author used this technique in undergraduate work at the University of Western Ontario under Dr. David Gray, for determining radial velocity variations in stellar absorption spectra at subpixel accuracy; here, the author simply "inverted the spectrum." This method of image registration can be used in general as long as there is no or very little field rotation; it is usually helpful to subtract out any background gradients in the source (reference and comparison) images, and the cross-correlation vectors should be zeroed-out by subtracting their mean value.

Each individual frame read from the UVIT DS can only contain a single count at each source location, plus randomly placed single counts across the frame due to background "noise." Therefore, if a number of seconds worth of frames is first summed (stacked) together, then the sources begin to come out while the background noise remains spread out and generally singular in count. The slew rate is slow enough that for a stack of several seconds, a source is more or less stationary at the CMOS pixel scale. The CCDLAB drift-determination menu gives an option for stacking 1 through 20 seconds worth of centroid data for usage by the algorithm, and 2 seconds is typically found sufficient. Large stack intervals degrade the resolution of the drift series particularly when the high-frequency translations occur due to movement of the SSM camera. The algorithm automatically sets all count values equal to 1 in the stacked frame to be equal to zero because these will be background noise; source counts will be higher than one in the stacked frame.

For example, 2 sequential seconds of comparison centroid data will be stacked together into an image (a reference image will have been created for the initial 2 seconds of the centroid list), counts equal to one in the image are set to zero (as with the reference image), the image binned to x and y vectors after having the Hanning Window applied (as with the reference image), the vectors cross-correlated to the reference ones, and their lag shift recorded. The lag shifts are then interpolated for each frame time within the 2-second stack with the center time of the stacked frame set being the time of the lag shift.

When operating upon a single centroid list at a time, the user can optionally plot the drift curve determined by the algorithm; or, using the search functionality of the Windows open file dialog, one can search the main directory for all centroid lists just created by L1 digestion and then CCDLAB will process and apply the drift determination to each centroid list. A cancellable wait bar will show the progress. The procedure will also write FITS images of the drift-corrected data with the total integration time for the image written to the header, and at that point one basically has a science-ready image aside from normalization to the integration time and filter-dependent factors applied to transform counts/second into whatever other units are desired (Tandon et al. 2017).

For the 42 unique data sets which came out of the L1 digestion of the NGC 1851 data, drift determination and correction for all sets required a total of 8 minutes to process, including the creation of flat-corrected images of 1/8th pixel resolution (4096 × 4096 pixel images at double precision).

The user can re-run the drift-determination algorithm on the drift-corrected list to tighten up the PSF of the sources a little bit more. Simply select the new drift-corrected centroid lists from the same open file dialog for drift correction. In our example of NGC 1851 data, this required another 8 minutes to process. This is called second-order drift correction and it essentially is an attempt to pick up any residuals which may remain in the field position relative to the drift series calculated for a given position; this procedure has reliably been seen to reduce the PSF in processed images. If the first drift series was calculated with a 2-second cadence, then choosing a disharmonious cadence of 3 or 5 seconds for the second order may help to find residuals in the drift series, although simply running it at 2 seconds again has also been found to help. Third- and higher-order drift corrections can be performed as needed, but typically it is not necessary unless one is dealing with a particularly difficult (faint) source. Typical final PSF results are in the range of 1.1'' for NUV and 1.3'' for FUV with this method.

4.2.2. Channel to Channel Correction

For some targets, the flux in FUV and/or NUV channels is too low and the channel will not be able to track its own drift. If a larger time stack is used for tracking to gather more signal in each stack, then the resolution of the spacecraft drift pointing becomes degraded as the point sources get smeared through the running image stack, resulting in poor drift determination and thus degraded or useless final science images. Thus, VIS tracking of point sources can be used and the drift series determined from the VIS channel can be transformed and used for the NUV and FUV channels. The VIS channel is always expected to have at least one point source for a target's observation.

The CCDLAB UVIT Pipeline can determine the VIS drift series in two ways. The first is an automated routine that determines the x and y lags between the reference frame (first frame) and subsequent frames by the cross-correlation method discussed earlier. This routine requires at least one strong point source in the VIS images, which does not fall out of the field of view (due to drift) during the observation.

The second routine uses point-source tracking of one or more point sources in the image, and these point sources can be tracked at a much weaker source intensity. The routine is interactive, with the user selecting the point sources in the reference image, and then the routine continues to automatically track those point sources in subsequent images, gathering the mean differential in point-source positions relative to the reference frame to determine the drift series. Again, the point sources must not leave the field.

Once the drift series is determined for the tracking channel, then the series can be transformed and applied to another channel by the pipeline. One can repeat the drift-tracking procedure again to get a second-order correction, but this time using self-tracking at a stacking time of, say, 20 seconds if the source is quite faint. The VIS channel correction will have gotten most of the high- and low-frequency drift shifts, but performing a second-order self correction can pick up whatever residuals it may be able to detect. The VIS-only correction will give PSF results in the same range as with self correction, but when VIS correction and then second-order self correction has been able to be performed this is where PSF results down to 0.9'' for NUV and 1.1'' for FUV have been seen.

4.3. Exposure Array Correction

CCDLAB utilizes the drift series created in the previous section to create an exposure array for the final image, which gives the weighting, relative to the total integration time (or equally, total number of frames), for all parts of the final image. In principle, for every frame readout during the observation, the field of view must be tracked and its active portion incremented upon an exposure array. Here, the active field of view is referred to as an "exposure map," while the final exposure weighting array has typically been called the "exposure array." The exposure map is given by the flat field measured during ground-based calibration, except that all active areas of the detector have been given a value of unity and all other areas a value of zero. These can be seen in Figure 5.

Figure 5.

Figure 5. Exposure maps for FUV (left) and NUV (right).

Standard image High-resolution image

The exposure map drifts around the mean field of view for the duration of an observation, with its current location relative to the mean location given by the drift series calculated in the previous section. A given observation may typically have some 50,000 frames, so if one were to increment the exposure map upon the exposure array for every single frame, they would be looking at a fairly significant computation time. That is, one would increment through a 600 × 600 pixel array (the 600 × 600 array is the padded 512 × 512 array of the actual CMOS) 50,000 times; in testing, this required an additional 50 seconds of computation time after a drift series was itself just previously calculated, which took 30 seconds, and so a 266% increase in data-reduction time (this was on an Intel sixth-generation chip running at 3.5 GHz on DDR4 ram, testing a single-drift series from the NGC 1851 data set.) However, given that the drift rate is on the order of 1 arcsecond per second and that the pixel scale is ∼.416''/pixel and that the frame read rate is ∼29 Hz, then the exposure map moves at the pixel scale several less times than 50,000 frames. Therefore, one need only track the number of times that the exposure map should be incremented upon the exposure array until it is found that the drift series has moved by at least one pixel in either axis, and then apply those number of increments from the exposure map onto the exposure array. This reduced the computation time from an additional 50 seconds for the exposure array on top of 30 seconds for the drift series, to only 2 additional seconds. An example of an exposure array with fairly significant drift is shown in Figure 6.

Figure 6.

Figure 6. Example of an exposure array.

Standard image High-resolution image

Each centroid is then given a weighting value given by the exposure array, and this weighting can be optionally applied in the creation of the final image by CCDLAB. In practise, if a portion of the exposure array is less than 10%, then scaling a count in such a region by a factor of 10 is probably not that meaningful and therefore such counts can optionally be ignored in the creation of the final science image.

4.4. Centroid List Registration, General Frame Transformation

While a single observation of a target suffers only from the induced translational drift, subsequent observations in different orbits may occur at different field rotation angles. Therefore, if an observer desires the set of observations for a target to be co-aligned either for stacking the set into a deep field or for analyzing for variability, etc., then it is good for a pipeline to provide the ability to register the centroid lists to a common frame.

Image transformations with rotation at the pixel scale is generally a blurring process, reducing the quality of PSF in an image. However, the UVIT EU records centroids at one-thiry-second pixel precision and science images are finalized at one-eighth pixel precision. Therefore, the centroid lists are transformed at one-thirty-second resolution, and during the transformation a double-precision random number is added to each centroid at the one-thirty-second pixel scale so that centroids at bin positions in exact multiples of one-thirty-second precision become centroids at double precision falling somewhere within their appropriate one-thirty-second pixel bin. At the one-eighth pixel scale this method is found to have no deleterious effect on the PSF in the final science images.

Using the menu item for registration, the user will open a set of centroid lists and then be prompted to select point sources in the field of the reference frame, which is the first centroid list of the set. For subsequent lists, the user will use the mouse to grab the selected point sources and align them; the first point grabbed and translated becomes the anchor and any other point can then be grabbed and rotated about the anchor to align the set of points with the point sources. If only a single source point is used for the registration, then a solution only for translation can be and is determined.

The registered centroid lists can then be gathered into a single master list for the target's observation, producing a final science image.

For a target recently observed (at the time of this writing) continuously over 1.5 days (with breaks in observation when ASTROSAT is on the Sun-facing side of the orbit) which supplied 2.7 GB of L1 data, the total reduction time to produce final science master images from 21 orbits for all filters required about 30 minutes.

4.5. Other Tools

4.5.1. Saturation Correction

The frame rate sets a limit on the source photon rate detectable without approaching saturation, although statistical corrections can be made to photon rates which enter into saturation of the detector read rate. CCDLAB provides a saturation correction utility for point sources in reduced images. The saturation correction is made by examining the centroid list in the graphically specified local region of the saturated source, and counting the number of frames where no photons were detected in that region. Given the measured probability of detecting zero counts per frame read, the Poisson probability equation can be solved for the actual count rate as the natural log of the inverse of the probability of detecting zero counts per frame.

For example, in an observation of the white dwarf HZ4 during PV phase, the nearby star TYC 659-370-1 gave a probability of no photon arrival per frame of 0.418. This gives an actual photon rate of ln(1/0.418) = −ln(0.418) = 0.872 per frame, in comparison with a detected photon rate of 0.598 per frame. This corrected value would then be used, for example, for the photometry and/or flux calibration as in Tandon et al. (2017).

The uncertainty on desaturated photometry is as follows. For an actual rate of "X/frame" photon events, the observed number is N(1−exp(−X)) for N frames. The variance of the observed counts is then N*exp(−X)*(1−exp(−X)). The rate of change of observed counts with the actual counts is d(N(1−exp(−X)))/d(NX) = exp(−X). This relation can be used to relate estimates of rms variation of the observed counts to the rms variation of the actual counts and write: rms variation on the actual count of incoming photons (i.e., N X) = (N* exp(−X) (1−exp(−X)))o 0.5/(exp(−X)) =(observed counts/exp(−X))o 0.5.

4.5.2. Time Analysis

A region of interest can be graphically selected from which to extract the corresponding centroid data only, thus one can generate the centroid list for a particular target. This centroid list can be used for timing analysis of the centroid arrival times for the object selected in the region of interest.

Given that these times should be absolute times and not just detector clock times, the L1 data provides a file from which one can correlate detector clock times to ground-based UTC time. CCDLAB uses this to then transform the ground-based time into Barycentric Julian Day (BJD) times for each centroid for the target's coordinates, using the methods from the 2005 Astronomical Almanac which are stated to be accurate to about 0.1 minutes. More accurate methods will be incorporated in a future release via the International Astronomical Union's Standards of Fundamental Astronomy (SOFA) software library. The BJD times are generated as part of the main L1 file data reduction, and are extracted with the centroid data for a particular target in this method.

5. Sample UVIT Image Result and Conclusion

All of the corrections and data-reduction steps required to produce a final science image are of course essential, but what makes the function of the pipeline most clear is to compare the centroids in their drift-uncorrected form and then their drift-corrected form. This comparison can be seen in Figures 7 and 8.

Figure 7.

Figure 7. NGC2336 before drift correction.

Standard image High-resolution image
Figure 8.

Figure 8. NGC2336 after drift correction.

Standard image High-resolution image

CCDLAB and its UVIT pipeline has regularly been used by the Indian Payload Operation Center at the Indian Institute of Astrophysics for in-orbit calibration and for data reduction for scientists in India and Canada.

This work was made possible by ongoing funding contributions by the Canadian Space Agency to the University of Calgary for UVIT development and science support. The authors would like to thank John Hutchings (Canadian P.I. for UVIT), Shyam Tandon (Indian P.I. for UVIT), and all of the other people involved in making the UVIT observatory a scientific success: Amit Kumar, Sriram Sripadmanaban, Don Asquin, Jose Cayer, and many others.

Please wait… references are loading.