Jian-Guo Wang, Jin-Ming Bai, Ying-He Zhao, Xiao-Bo Dong, Kai-Xing Lu , Chuan-Jun Wang,Ju-Jia Zhang , and Yu-Xin Xin
1 Yunnan Observatories, Chinese Academy of Sciences, Kunming 650011, China; wangjg@ynao.ac.cn
2 Key Laboratory for the Structure and Evolution of Celestial Objects, Yunnan Observatories, Kunming 650011, China
Abstract The Lijiang 2.4 m Telescope(LJT)is one of the most important telescopes for general astronomical observations in China.Yunnan Faint Object Spectrograph and Camera (YFOSC) is a widely used instrument mounted on the LJT,which occupies for ~80%of the observing time of the LJT,and thus instrument health and data quality of the YFOSC are very important for both the telescope maintenance team and users of the LJT.So we develop an automated data analysis system for the quality control (QC) of YFOSC data.This system is also a new function of the observing support of the YFOSC.Based on the system, YFOSC data can be reduced quickly as they are acquired and QC parameters are extracted.Observers can assess the quality of their data and make a possible revision of their observing plan in time.These parameters can also be used to check the health of the YFOSC,which is helpful for the telescope maintenance team to find potential problems.All of these aim at improving the productivity of the LJT.
Key words: methods: data analysis – methods: observational – methods: statistical
There are only three optical telescopes with diameter larger than two meters in China now: the Large Sky Area Multi-Object Fiber Spectroscopic Telescope (LAMOST; Cui et al.2012), the Lijiang 2.4 m telescope (LJT; Fan et al.2015) and the Xinglong 2.16 m reflector(Fan et al.2016).The LAMOST is the largest one and only for spectroscopic survey.The LJT and the Xinglong 2.16 m reflector are for general astronomical purposes in the sense that astronomers can design their own observing plans according to scientific goals, and have been equipped with several kinds of instruments for both imaging and spectroscopic observations (Fan et al.2016; Wang et al.2019).Moreover, the LAMOST and the Xinglong 2.16 m reflector are located at the Xinglong Observatory with coordinates of 117° 34′ 30″ (E) , 40° 23′ 39″(N), while the LJT is located at the Lijiang Observatory with coordinates of 100°1 ′4 8″ (E), 26°4 1′4 2″(N).Because of its coordinates, the LJT can observe targets with a large decl.range(~-40°–90°).Therefore, the LJT plays an important role in Chinese astronomical observations.Every year, hundreds of astronomers apply for the observing time of the LJT.
Several instruments have been mounted on the LJT (Wang et al.2019),including the Yunnan Faint Object Spectrograph and Camera (YFOSC), the Li-Jiang Exoplanet Tracker (LiJET), the High Resolution Spectrograph (HiRES), the Multicolor Photometric System (PI CCD) and the China Lijiang Integral Field Unit (CHILI).The YFOSC is the most important instrument mounted on the LJT, because both imaging and low/mediumresolution spectroscopic observations can be taken with it and it is easy to switch between these two observing modes.Every year,~80%of observing applications apply for using the YFOSC and~80%of the observing time of the LJT is assigned to the YFOSC.Therefore, the quality control (QC) of YFOSC data is vital for observers,because it will determine whether the data can achieve their scientific goals.Meanwhile, it is also important for the maintenance team to monitor the performance of instrument and telescope, which is helpful to find potential problems.
Formerly, the QC of YFOSC data has been performed by observers.It is a burdensome task for observers, because they are responsible for executing the observation and making a decision on the next exposures.Moreover,part of the observers are not very expert in YFOSC data.They have to spend more time on checking the quality of their data and even might not find potential problems.If the QC can be automatically performed, observers can concentrate on planning and executing their observations,and the telescope maintenance team can find potential problems of the YFOSC timely.In fact, such a QC system has been established for many instruments of different telescopes, such as the UV-Visual high-resolution echelle spectrograph and the fiber large array multi-element spectrograph on the VLT-Kueyen (Hanuschik et al.2002,2004), and the Hyper Suprime-Cam on the Subaru Telescope(Furusawa et al.2011, 2018).
In this paper, we present the first automated on-site QC system for the YFOSC on the LJT.The system can assist observers in checking the quality of their data and assist the maintenance team in doing the healthy check of the YFOSC.The paper is constructed as follows: in Section 2, the YFOSC and its common observation modes are described shortly.To do the QC, data should be reduced immediately after it is acquired.The pipeline of reducing YFOSC data is described in Section 3.In Section 4, analysis functions of the QC are described.A summary is presented in Section 5.
Figure 1.The GUI of the QC system for the YFOSC.The left part is used to display the raw data.The right part is used to display the basic message of the image(top), the possible warning message (middle) and the results given by our QC software (bottom).In the figure, an example of a bias frame is shown and its median value minus 20,000ADU is compared with those of the last 100 days.
The YFOSC can perform both imaging and low/mediumresolution spectroscopic observations and can switch between them easily.Both Johnson (UBVRI, rather than UBVRcIc) and SDSS (u′g′r′i′z′) filters are equipped (the sensitivities of these filters are presented in Xin et al.2022).Multiple prisms,which are usually called as grisms, and slits can be chosen according to scientific goals and weather conditions.There are several wheels in the YFOSC, which can be used to install filters and grisms (see more in Wang et al.2019).The CCD chip of the YFOSC has 2148×4612 pixels with a pixel size of 13.5 μ×13.5 μ.The pixel scale is 0 286.There are two overscan regions with a width of 50 pixels on both sides of the CCD (along the 2148-pixel direction).The previous controller of the CCD is 20 bit and the linear region of the CCD is~370,000 analog-to-digital unit (ADU).In 2022 September,the controller was updated and the new controller is 16 bit.However,this does not affect the function of the software.The dark current of the CCD is ~1e-/hr and it is negligible for most frames.So we do not take dark every day.
Commonly,there are three observing modes for the YFOSC.Different CCD pixels are used in different modes,described as follows:
imaging mode: This mode is commonly for imaging observations.Only the middle 2148×2048 pixels are used,which corresponds to a maximum field-of-view (FOV) of 9.′ 76 × 9.′76 depending on the position of filters installed(details in Wang et al.2019).For this mode,at least 10 frames of bias are obtained at nightfall and dawn,which are named as“bias_img”; at least four frames of sky flat are taken for each filter at twilight if the sky is clean, which are named as “flat.”Scientific images are named as “img.”
spectroscopic mode: This mode is commonly used for both long-slit and cross-dispersion spectroscopic observations.All of the CCD pixels are used.For this mode,at least 10 frames of bias are obtained at nightfall and dawn, which are named as“bias_spec;”at least five frames of Halogen lamp are obtained for each grism and slit assemble at nightfall and dawn to produce the flat-field, which are named as “Halogen.”Spectroscopic data of scientific targets are named as “spec.”After exposure(s) of scientific targets, at least one of He/Ne/FeAr lamps should be taken to calibrate the wavelength scale,which are named as “lamp;”at least one spectrophotometric standard star should be observed for each grism and slit assemble every night.
Figure 2.An example of a Halogen lamp.The raw image is shown in the left part.The distribution of ADUs along the dispersion-axis is shown in the right part and the red curve is the B-spline fit to the data.
slit mode:Before spectroscopic observations,we must check whether the target is located around the center of the slit.If the target is not around the center,we need to adjust the pointing of the telescope.Usually, several frames might be taken.To save the readout time, only the middle 2148×400 pixels are used.These images are named as “slitimg.”
Furthermore,the size of CCD window can be set depending on the demand of observers.
The pipeline is written in the Interactive Data Language(IDL) based on these packages: astrolib,3https://idlastro.gsfc.nasa.govidlspec2d,4https://www.sdss.org/dr15/software/products/xidl,5https://www.ucolick.org/~xavier/IDL/lpipe6https://sites.astro.caltech.edu/~dperley/programs/lpipe.htmland so on.Sextractor (Bertin & Arnouts 1996), PSFex(Bertin 2011) and Astrometry.net (Lang et al.2010) written in C will be called.
The pipeline for imaging data is as follows:
Overscan correction:For each row,the median value of the two overscan regions should be subtracted.
Bias correction: Master bias is created from the median of all bias frames and is subtracted from other frames.
Flat correction: Each frame of the sky flat is scaled by its median value first and then the master flat is created from the median of all scaled frames, because the sky brightness is varying.All scientific frames should be divided by the master flat.
Fringe correction: There are fringes on the image when filters toward the red end of the visible spectrum are used(e.g.,Johnson R/I and sdssi′z′ in the YFOSC).The pattern of these fringes is stable for a given filter,but its amplitude depends on the atmospheric condition and the exposure time.The pattern can be created by the median value of multiple images with different pointings during the same night (each image is normalized by its median to reduce the effect of exposure time).Then the fringe of an image can be discarded by scaling the pattern.If too few images for a filter are obtained during a night, the fringe pattern of close nights will be used.
Figure 3.An example of the wavelength calibration lamp.Sometimes the Helium and Neon lamp are simultaneously turned on because they have similar brightness.In the example,only lines of the Neon lamp are detected(green curve);lines of the Helium lamp are lost,which should be at the positions of the red curve.A warning message will be given, which will inform the maintenance team to check the lamp.
Photometry: After applying the above corrections, Sextractor(Bertin & Arnouts 1996) is employed to extract all the sources from images and to measure their fluxes.The major configuration parameters of Sextractor are listed in Table 1.Bad pixels and cosmic rays, which are identified by their different sharpness from astronomical sources, are masked during photometry.
PSF: The point-spread function (PSF) of an image is measured by the PSFex package (Bertin 2011) using the catalog generated by Sextractor.
Astrometric calibration:Using source positions on the CCD measured by Sextractor, astrometric calibration can be done with Astrometry.net(Lang et al.2010).The reference catalog is adopted from the GAIA DR2 (Lindegren et al.2018).
Overscan and bias correction: Same as that for imaging data.
Flat correction: Multiple frames of Halogen lamp are merged into one frame using their median values at each pixel.The frame is trimmed to keep only the 1st-order dispersion andis fitted with a B-spline function along the dispersion and the space direction, respectively.The frame is normalized by the fitted results, which is also called as the master flat.All scientific frames should be divided by the master flat.
Table 1 Key Configuration Parameters for Sextractor
Figure 4.An example of dust on the slit.Our QC system can detect the position of the dust and give a warning message.
Tracing target:Along the dispersion direction,the ADUs of every 10 rows are merged into one row, which improves the signal-to-noise ratio (SNR), and then is fitted with a Gaussian function to get the mean center of the target at these rows.Then centers at different bins are fitted with a low-order polynomial function.Interpolation of the polynomial function will give the center of the target on each row of the frame.The aperture width can also be obtained from the median width of different bins (in the units of the width of Gaussian function, i.e., σ).
Sky background subtraction: By default, 30 pixels on each side of target are selected to estimate the sky background,which must deviate 5σ from the target center.The width of the sky background region should not be very large, because there is flexure along the space direction arising from the optical design of the YFOSC.The configuration parameters listed above work well for point targets.If the target is extended or there is another source close to the target,the width of the background region and the deviation to the target center can be set accordingly.
Wavelength calibration: A template of each wavelengthcalibration lamp is made for each grism by identifying the lines visually.Each wavelength-calibration lamp following the target can be automatically identified by shifting the template.Then each line is fitted by a Gaussian function to get the accurate position on the frame.Then the wavelength solution can be obtained using these lines.The default function used for wavelength solution is a polynomial.Alternatively, the Chebyshev polynomial and the cubic spline can also be adopted.
Extraction: The optimal extraction algorithm of Horne(1986) is employed to improve the SNR.Alternatively, a boxcar profile for the aperture can be set.The extracted spectrum is corrected using the typical extinction curve of the Observatory (hereafter, un-calibrated spectrum).
Flux calibration: Using spectrophotometric standard stars,the response curve can be obtained by comparing the uncalibrated spectrum with its real spectrum.The response curve is fitted with a B-spline curve.The observed spectrum can be calibrated by applying the response curve to the un-calibrated spectrum.
Figure 5.An example of an image.The raw image is shown in the left part.Usually,the target is at the center of the bottom-left panel if the coordinates at Epoch 2000 of the target are accurate.The finding chart from the Digitized Sky Survey is shown at the bottom-right panel.
The reduction pipeline for cross-dispersion spectroscopic data is the same as that for long-slit spectroscopic data.However, it is reduced order by order.Using a frame of Halogen lamp with a high-enough SNR, we measure the position of each order on the CCD and make a template.Every day, the position of each order can be obtained by matching a frame of Halogen lamp to the template.The sky background region might be smaller and constrained to be in the region of the order.
The QC deals with the quality of the raw data and products,and the performance of the instrument and the telescope.The paper focuses on the former and possible instrument problems that will affect the quality of data products.The results of data and QC parameters should be shown to observers as soon as possible.To achieve these goals, a graphical user interface(GUI) is developed through the IDL widget tools.The GUI is also based on the ATV package (Barth 2001).
The GUI is shown in Figure 1.The left part of our GUI is roughly identical to the ATV package (Barth 2001), which is used to display an image and is similar to the SAOImage DS9.7https://ds9.si.eduThe right part of our GUI is divided into three parts:the top two rows are used to display the basic information of a frame; the middle text window is used to display the warning message given by our QC software,which should be blank if there is no warning message; the bottom window is used to display the results produced by our QC software,where different functions can be selected if the frame is an image.
The raw data will be automatically grouped by the software.These groups are listed in Section 2.For different groups, our software will extract different QC parameters, as follows:
Figure 6.An example of the un-calibrated spectrum of a target.The photon number (white curve) and associated error (red curve) at each wavelength are shown,which can be used to calculate the SNR at a given wavelength.
bias_img and bias_spec: The median value and standard deviation will be collected.The median value will be plotted together with those of the last 100 days, as shown in Figure 1.A warning message will be shown if the deviation between the current value and the median of those over the last 100 days is larger than 3σ,or the difference between the standard deviation and the median of those over the last 100 days is larger than 30 ADU.The warning message will remind the maintenance team to check the cooling of the CCD or its controller.
flat:A histogram of the ADUs of all pixels will be shown.If the median value of the frame exceeds the linear region of the CCD or is too low, a warning message will be given, which will inform the observer to adjust the exposure time.
Halogen: The frame is trimmed to keep only the 1st-order dispersion and is fitted with a B-spline curve along the dispersion direction,as shown in Figure 2.The peak of the fit is normalized by its exposure time and then is compared with the median value over the last 30 days.If the frame becomes too dim, our software will inform the maintenance team to replace the Halogen lamp.Usually, the Halogen lamp need to be replaced every few years.
lamp: The center column of the frame is fitted by shifting and scaling the template.According to the scaling factor, we can check the brightness of the lamp.If the lamp is too dim,our software will inform the maintenance team to replace the lamp,as shown in Figure 3.Usually,the wavelength-calibration lamp need to be replaced every few months to several years.Meanwhile, the wavelength calibration is done.
slitimg: Usually, a smaller region centered on the target is displayed in the bottom-left panel, which is convenient for observers to check whether the target is at the center of the slit.By accident, the slit might be masked by dust.Using the image of slit mode, the software can check whether there is dust on the slit.If there is dust on the slit, as shown in Figure 4, the software will inform the maintenance team to clean it.
Figure 7.An example of the un-calibrated spectrum of a wrongly observed spectrophotometric standard star.The photon number(white curve)and associated error(red curve)at each wavelength are shown.The simulated un-calibrated spectrum of the standard star is shown by the green curve.The observed un-calibrated spectrum is obviously different from the simulated one, which suggests that a wrong star is possibly put into the slit.
img: The imaging data will be reduced using the imaging pipeline described above.The raw image will be shown and the target is marked according to the input coordinates, which is helpful for the observer to identify the target.Meanwhile, the finding chart from the Digitized Sky Survey8https://archive.stsci.edu/cgi-bin/dss_formis shown at the bottom-right panel, as shown in Figure 5.Alternatively, the ellipticity,FWHM and PSF of the image can also be displayed.The photometric zero-point of each frame is calculated by comparing the Kron-like automated aperture magnitude (i.e.,MAG_AUTO) with the magnitude from the point-source catalog from the Pan-STARRS data release 2 (Flewelling et al.2020).The zero-point is saved to a log file.The variation of zero-points during a night is an indicator of the sky transparency.Most of the time, the YFOSC is used to conduct spectroscopic observations.There are few photometric frames for a filter during one night, and thus the zero-point is not displayed in the system.The statistics of these zero-points over a long timescale will be presented in a following paper.
spec: The spectroscopic data will be reduced using the spectroscopic pipeline described above.The resultant spectrum and its error will be displayed,which is helpful for observers to check whether the SNR at a given wavelength is high enough.If no spectrophotometric standard star is observed for the grism and slit assemble,the un-calibrated spectrum will be displayed,as shown in Figure 6.Occasionally, a wrong source could be put into the slit due to target misidentification.For spectrophotometric standard stars, their un-calibrated spectra can be simulated using the sensitivity curve of the grism and their real spectra.The QC software can check whether the standard star is wrongly identified by comparing its observed and simulated un-calibrated spectra.If it is misidentified, a warning message will be given to inform the observer to re-observe the correct standard star, as shown in Figure 7.
After the software is run,it will start to work by clicking the“start”button located at the bottom-left corner.By default, the software will scan the database of the current day and perform the QC frame by frame.The observer can change the acquiescent settings by clicking the “PauseUpdate”button at the bottom-left corner first, and then select a different function by clicking the corresponding button.Finally,the software will start the QC of following frames when the “PauseUpdate”button is pressed again.For example,if the last frame needs to be checked, please click the “PauseUpdate”button first, and then click the “Open”button at the top-left corner, and then select the frame in a new interface.The software will perform the QC of the rest frames of that day by clicking the“PauseUpdate”button again.If the software is not shut down,it can still work on the next day.
The operation described in the last section is frame by frame.However, master bias and flat for both imaging and spectroscopic modes will be used in the process of the scientific data.These calibration data (bias_img, bias_spec, flat and Halogen)are usually taken before the scientific observations and are reduced at the interval between the accomplishment of the exposure of the sky flat and the beginning of the scientific observations.For spectroscopic observations,we suggest that a frame of the wavelength-calibration lamp should be taken first when pointing to a new target; then the lamp spectrum can be reduced during the exposure of the target.Meanwhile, we suggest that a frame of one spectrophotometric standard star for each grism and slit assemble should be taken first; then the response curve can be obtained during the exposure of the scientific target(s), which can, in turn, be used for the flux calibration.
A QC system is developed for the YFOSC mounted on the LJT.Employing the system, scientific data can be reduced quickly and the QC of YFOSC data is also done quickly.We test the consumed time of our QC software on a typical PC.The typical consumed time is 1–2 s for most data types of the YFOSC,such as bias_img and bias_spec,flat,Halogen,slitimg and lamp; For each image (named as “img”in the paper), the total consumed time for photometry and measuring the PSF is~10 s; For long-slit spectroscopic data, the consumed time is~10 s; For cross-dispersed spectroscopic data, the consumed time is ~70 s.
Trial runs of the QC software over the past years indicate that the QC software can detect most of possible problems,such as the dimming of Helium lamp on 2022 May 29, bias fluctuation on 2022 March 18 and so on.The QC system is useful for the health check of the YFOSC and is helpful for observers to assess the quality of their data and to revise their observing plan in time,which,in turn,increase the productivity of the LJT.
Acknowledgments
We thank the anonymous referee for providing a series of suggestions that helped us to improve the paper.This work was supported by the National Natural Science Foundation of China(U1931131) and West Light Foundation of Chinese Academy of Sciences.
ORCID iDs
Kai-Xing Lu https://orcid.org/0000-0002-2310-0982
Ju-Jia Zhang https://orcid.org/0000-0002-8296-2590
Yu-Xin Xin https://orcid.org/0000-0003-1991-776X
Research in Astronomy and Astrophysics2023年3期