# 2. PANIC Quick-Look Tool (PQL)¶

## 2.1. Purpose¶

PANIC Quick-Look (hereafter PQL) performs some on-line data processing for quick-look or quality check of the data being acquired, taking a close look at a raw near-infrared image and getting a quick feedback of the running observation.

PQL is an application with a graphical user interface which monitors the GEIRS data output, waiting for new FITS files coming from GEIRS. When a new file is detected, it is added to the file list view in the main panel, and then PQL will perform the task previously specified by the user in the setup configuration. Some of the available tasks are:

• Only display the FITS image with no processing
• Dark subtraction, flat division
• Sky subtraction (using N-nearest frames or own sky )
• Field distortion removal
• Image align and stacking
• Preliminary astrometric solution
• Preliminary photometry

In addition, PQL allows you to execute manually in an interactive way some tasks with the data. For example, you will be able to select a file, compute some statistics values (background, FWHM, min, max, …) or ask for the sky subtraction looking for the nearest N frames around the selected one. Other option available is to select a set of files and request to shift and align them.

PQL can be operated in both near-real time mode (during the observation) and offline mode (after the observation, with all data files already stored in the disk); however, its functionalities have been provided mainly in near-real time to check the status and progress of the observation during the night.

The visualization application used to display the images is SAOImage ds9, which supports FITS images, multiple frame buffers, region manipulation, and many scale algorithms and colormaps.

## 2.2. FITS files and headers¶

PQL only supports FITS (Flexible Image Transport System) with two-dimensional image formats. Because PANIC has a FPA of four detector, the FITS files can be Single Extension FITS (SEF) or Multi-Extension FITS (MEF), however MEF are prefered.

The complete definition of the FITS headers can be found on the GEIRS documentation.

For general purpose, such as viewing and simple analysis, only minimal headers keywords are required. However, and in order to group and reduce observing sequences, the following header keywords are also required:

OBS_TOOL= 'OT_V1.1 '           / PANIC Observing Tool Software version
PROG_ID = '        '           / PANIC Observing Program ID
OB_ID   = '6       '           / PANIC Observing Block ID
OB_NAME = 'OB CU Cnc Ks 2'     / PANIC Observing Block Name
OB_PAT  = '5-point '           / PANIC Observing Block Pattern Type
PAT_NAME= 'OS Ks 2 '           / PANIC Observing Secuence Pattern Name
PAT_EXPN=                    1 / PANIC Pattern exposition number
PAT_NEXP=                    5 / PANIC Pattern total number of expositions
IMAGETYP= 'SCIENCE '           / PANIC Image type


These keywords are automatically added to the FITS header by the PANIC Observation Tool, as each file is created. If these are not saved, PQL will not work correctly.

## 2.3. Starting PQL¶

To start PQL GUI, you can lauch it from the PANIC computer (panic22/panic35) once you are logged as obs22/obs35 user. Thus, as any one of the workstations of the observing room, open a X terminal window and log into the PANIC computer as follow:

for 2.2m:

$ssh -X obs22@panic22 (ask Calar Alto staff for password)  for 3.5m: $ ssh -X obs35@panic35


Once you are logged into the PANIC computer, to launch PQL GUI type next command:

$start_ql &  The next figure shows a snapshot of the main window of PQL GUI that will bring up the start_ql command. ## 2.4. Configuration files¶ The configuration files used by PQL are located in the$PAPI_HOME/config_files. The main config file is the same file used by PAPI, ie., $PAPI_CONFIG, and usually called papi.cfg. This file includes a lot of parameters used by PAPI, and therefore by PQL during the processing; however at the end of the$PAPI_CONFIG file there is section called quicklook, where the user can set some specific parameters for PQL:

##############################################################################
[quicklook]
##############################################################################
# Next are some configurable options for the PANIC Quick Look tool
#
# some important directories
#
source = /data1/PANIC/
output_dir = /data2/out   # the directory to which the resulting images will be saved.
temp_dir = /data2/tmp    # the directory to which temporal results will be saved
verbose = True

# Run parameters
run_mode = Lazy # default (initial) run mode of the QL; it can be (None, Lazy, Prereduce)


Although the user can edit these values in the config file, some of them can be set easily on PQL’s GUI.

### 2.8.8. How do I report a issue ?¶

Please submit issues with the issue tracker on github.