AKARI IRC Data User Manual
Version 2.2
Fumi Egusa3 ,Rosario Lorente1 , Takashi Onaka2 , Yoshifusa Ita3,5,7 , Youichi Ohyama3,9 ,Toshihiko Tanabé2 , Chris Pearson6 and Takuji Yamashita3with contributions from:

Martin Cohen4 , Daisuke Ishihara2,8 , Hideo Matsuhara3 , Itsuki Sakon2 , Takehiko Wada3 ,and Issei Yamamura3
1 European Space Astronomy Centre (ESAC), ESA
2 Tokyo University, Japan
3 Institute of Space and Astronautical Science (ISAS), JAXA
4 University of California, Berkeley
5 National Astronomical Observatory, Japan (NAOJ)
6 Rutherford Appleton Laboratory (RAL)
7 Astronomical Institute, Tohoku University, Japan
8 Nagoya University, Japan
9 Academia Sinica Institute of Astronomy and Astrophysics, Taiwan

July 6, 2016

Version 2.2 (July 6, 2016)i

Date
07 March 2007
21 March 2007

Revision
Version 1.0
Version 1.1

18 June 2007

Version 1.2

06 September 2007

Version 1.3

28 May 2008

Version 1.4

26 December 2014

Version 1.6

31 March 2015

Version 2.0

01 December 2015

Version 2.1

06 July 2016

Version 2.2

Comments
Release of version 1.0
Updated Table 4.6.7 (photometric conversion
factors)
Updated Sections: 4.6.3, 4.10, 4.13, 5.13.2, 5.14,
6.1
Updated Chapter 4, 5 and 6
Included ghosts in Np observations (section
4.13)
Chapter 6 updated according to spectroscopy
pipeline 20080528
Major updates in Chapters 3, 4, and 5 according to the revised imaging toolkit for Phase 1&2(ver. 140003)
Updates in Chapters 3, 4, and 5 according to
the imaging toolkit for Phase 1&2 (ver. 150331)
and processed data release
Updated Chapter 4
Added the diﬀerence between MIR-S and -L
shift values (Section 4.16)
Proofread some sentencesin Sections 4.12.1, 4.17, 5.7.2, and 5.13.

Contents
1 Introduction
1.1 Purpose of this document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Operational phases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3 Relevant information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1
1
1
2

2 Instrument overview
2.1 Focal plane arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.1 Near-InfraRed Camera: NIR . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.2 Short wavelength Mid-InfraRed Camera: MIR-S . . . . . . . . . . . . . .
2.1.3 Long wavelength Mid-InfraRed Camera: MIR-L . . . . . . . . . . . . . .
2.1.4 Arrays operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Instrument AOTs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.1 IRC00 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.2 IRC02 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.3 IRC03 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.4 IRC04 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.5 IRC05 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.6 IRC11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.7 IRC51 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.8 AOT parameters for imaging observations . . . . . . . . . . . . . . . . . .
2.3 In-orbit sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3
5
5
6
8
8
9
9
10
10
10
10
10
10
11
11

3 Distributed Data Products
3.1 IRC FITS file naming rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1.1 Raw data package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1.2 Processed data package . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 Raw data description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.1 Raw data naming convention . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.2 AKARI FITS Primary HDU (common information) rawdata header . . .
3.2.3 Raw data dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3 Quick look data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3.1 IRC imaging: IRC00, IRC02, IRC03, and IRC05 . . . . . . . . . . . . . .
3.3.2 IRC spectroscopy: IRC04 . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4 IRC04 image orientation and dispersion direction . . . . . . . . . . . . . . . . . .

13
13
13
13
14
14
14
18
18
19
19
19

ii

Version 2.2 (July 6, 2016)

iii

4 IRC Calibration and Accuracy
4.1 Dark image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1.1 Long-term variation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1.2 Intermediate-term variation . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1.3 Short-term variation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2 Flatfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2.1 Flatfileds for imaging data . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2.2 Flats for spectroscopy images . . . . . . . . . . . . . . . . . . . . . . . . .
4.3 Instrument linearity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.4 Instrument Point Spread Function . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5 RSRF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.6 Flux calibration for point sources . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.6.1 Observed standards and data processing . . . . . . . . . . . . . . . . . . .
4.6.2 Estimation of the in-band flux . . . . . . . . . . . . . . . . . . . . . . . .
4.6.3 Absolute calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.6.4 Overall accuracy of the flux calibration . . . . . . . . . . . . . . . . . . .
4.7 Flux calibration for extended sources . . . . . . . . . . . . . . . . . . . . . . . . .
4.8 Color correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.9 Distortion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.10 Memory eﬀects caused by bright source observations . . . . . . . . . . . . . . . .
4.11 Astrometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.12 Arrays anomalies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.12.1 NIR array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.12.2 MIR arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.13 Ghosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.13.1 Arcmin-scale ghosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.13.2 Degree-scale ghosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.14 The earthshine light (EL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.15 Relative shift values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.16 Diﬀerence between MIR-S and -L shift values . . . . . . . . . . . . . . . . . . . .
4.17 General concerns on slit-less spectroscopy data . . . . . . . . . . . . . . . . . . .

20
20
20
22
22
22
22
24
27
27
30
32
32
34
35
35
35
36
44
45
46
46
46
46
47
47
47
48
49
52
54

5 Imaging toolkit cookbook
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 General overview of the toolkit processing . . . . . . . . . . . . . . . . . . . . . .
5.3 Expected Data Processing Rate (minimum expectation) . . . . . . . . . . . . . .
5.4 How to install the IRC imaging Toolkit . . . . . . . . . . . . . . . . . . . . . . .
5.4.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4.2 Install IRAF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4.3 Download IRC imaging data reduction software package . . . . . . . . . .
5.4.4 Unpack irc.tgz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4.5 Make irc binaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4.6 Run ”setpath.pl” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4.7 Perl path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4.8 Add IRC entry to IRAF . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.5 How to UPGRADE the version of IRC imaging toolkit . . . . . . . . . . . . . . .
5.6 Setting up your toolkit environment and running the pipeline . . . . . . . . . . .
5.6.1 Creating the directory structure . . . . . . . . . . . . . . . . . . . . . . .

57
57
57
58
58
58
59
59
59
59
59
59
60
61
61
61

iv

IRC Data User Manual
5.6.2 Launch IRAF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.6.3 Load the IRC package . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.7 The pre-pipeline processor (Red-Box) . . . . . . . . . . . . . . . . . . . . . . . .
5.7.1 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.7.2 Running the prepipeline processor . . . . . . . . . . . . . . . . . . . . . .
5.8 Before running the pipeline processor . . . . . . . . . . . . . . . . . . . . . . . . .
5.9 The pipeline1 processor (Green-Box) . . . . . . . . . . . . . . . . . . . . . . . . .
5.9.1 Parameter configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.9.2 Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.10 The pipeline2 processor (Green-Box & Blue-Box) . . . . . . . . . . . . . . . . . .
5.10.1 Parameter configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.10.2 Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.11 The coadding processor (Blue-Box) . . . . . . . . . . . . . . . . . . . . . . . . . .
5.11.1 The Blue-Box Co-Add Wrapper . . . . . . . . . . . . . . . . . . . . . . . .
5.12 Log files produced from the toolkit . . . . . . . . . . . . . . . . . . . . . . . . . .
5.12.1 prepipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.12.2 pipeline1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.12.3 pipeline2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.13 The IRC TOOL (irc tool) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.14 Limitations of the functionalities in the current version of the imaging toolkit . .
5.15 Error messages when running the pipeline and Troubleshooting . . . . . . . . . .
5.16 Toolkit structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61
63
64
64
64
68
69
69
70
75
75
78
81
81
86
86
86
86
88
91
93
95

6 Spectroscopy pipeline cookbook
97
6.1 General overview of the pipeline processing . . . . . . . . . . . . . . . . . . . . . 97
6.1.1 Dark subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
6.1.2 Linearity correction/Saturation Masking . . . . . . . . . . . . . . . . . . . 98
6.1.3 (monochromatic) Flat-fielding . . . . . . . . . . . . . . . . . . . . . . . . . 98
6.1.4 Background subtraction (from individual sub-frames) . . . . . . . . . . . 99
6.1.5 Image screening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
6.1.6 Image registration (among sub-frames) . . . . . . . . . . . . . . . . . . . . 99
6.1.7 Imaging stacking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
6.1.8 Target detection/position measurement . . . . . . . . . . . . . . . . . . . 100
6.1.9 Background subtraction (from stacked image) . . . . . . . . . . . . . . . . 100
6.1.10 Extracting 2D spectra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
6.1.11 Wavelength calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
6.1.12 Flat color-term correction . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
6.1.13 (local) Background subtraction (from extracted 2D spectra) . . . . . . . . 102
6.1.14 Spectral tilt correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
6.1.15 Spectral response calibration . . . . . . . . . . . . . . . . . . . . . . . . . 103
6.1.16 Notes on slit spectroscopy . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
6.2 How to install and to set-up the IRC spectroscopy pipeline . . . . . . . . . . . . 104
6.2.1 Data preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
6.3 Calibration data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
6.3.1 Calibration files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
6.4 Running the pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
6.4.1 Data reduction order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
6.4.2 Running the pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

Version 2.2 (July 6, 2016)

6.5

6.6

6.7

6.8

v

6.4.3 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
6.4.4 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
6.4.5 Summary of interactive operations within the pipeline . . . . . . . . . . . 112
6.4.6 Warning messages of the pipeline . . . . . . . . . . . . . . . . . . . . . . . 113
Working on the pipeline output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
6.5.1 Displaying the whole images on ds9 . . . . . . . . . . . . . . . . . . . . . 114
6.5.2 Displaying the extracted images on ATV . . . . . . . . . . . . . . . . . . 115
6.5.3 Checking for wavelength zero reference point with the zero-th order lightimage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
6.5.4 Spectral plotting tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
6.5.5 Working on saved data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119(Hopefully) Useful Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
6.6.1 Getting best S/N spectra in slit (Ns, Nh) or Np spectroscopy data . . . . . 119
6.6.2 Tackling narrow spikes seen in NIR spectra (especially in slit spectra) . . . 119
6.6.3 Examining strange/fake features in NP spectra, especially around 2.4-3.5µm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
6.6.4 Examining flux level (in)consistency among diﬀerent disperser data . . . . 120
Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
6.7.1 Variable name conventions . . . . . . . . . . . . . . . . . . . . . . . . . . 121
6.7.2 Summary of Commands and their Options . . . . . . . . . . . . . . . . . 121
Error messages when running the pipeline and Troubleshooting . . . . . . . . . . 124

Chapter 1

Introduction
1.1

Purpose of this document

This document is intended to provide a comprehensive guide to data from the Infrared Camera (IRC) onboard AKARI. It includes a brief summary of the instrumentation, a summaryof the data products, and the pipeline software overview together with the calibration of the
instrument. Please note that most of this document focuses on data from pointed
observations carried out during the period (so-called Phases 1 & 2, see §1.2) when
the instruments were cooled with liquid Helium.
Part of the data and information
given here will be updated as the data reduction and calibration will get improved. The latest
information may be posted on the web untill the revised version will be prepared. A comprehensive overview of the instrumentation and operation is described in the ASTRO-F Observers
Manual (available from the AKARI observer’s webpage, see §1.3) and in the AKARI first
result volume (PASJ, Volume 60, Issue sp2, 2008).

1.2

Operational phases
February 22, 2006

May 7, 2006
November 11, 2006
August 26, 2007
June 1, 2008
February 15, 2020
November 24, 2011

LaunchLid open?
Performance Verification (PV) 1
Phase 1 start
Phase 2 startliquid He boil oﬀ
PV 2Phase 3 startscience observations end
satellite operations terminated

1

2

1.3

IRC Data User Manual

Relevant information

AKARI Observer’s Web
The ISAS Web page contains the most up to date information:
URL: http://www.ir.isas.jaxa.jp/AKARI/Observation/
The ESAC page also includes up to date information:
URL: http://akari.esac.esa.int/observers/
Helpdesk
Any questions and comments on AKARI observations and user support are addressed to
the AKARI Helpdesks:
iris help@ir.isas.jaxa.jp
http://akari.esac.esa.int/esupport/Chapter 2

Instrument overview
The Infrared Camera (IRC) onboard AKARI was originally designed to make wide-field deep
imaging and low-resolution spectroscopic observations in the pointing mode of the AKARI satellite. Its unique wide field coverage of 100 ×100 is ideal for survey-type observations or multi-object
spectroscopic programs.
The capability for the use in the survey mode has later been explored and now is also being
used to carry out mid-infrared all-sky survey observations.
Each channel has a filter wheel, on which medium band filters, dispersive elements, and ablank window as a shutter are installed. Table 2.0.1 summarizes the parameters of the IRC
filters and dispersion elements. The NIR camera covers three independent wavelength bands
that very roughly correspond to the well known K, L, and M bands. Each of the two MIR
cameras have two narrow filters which cover the shorter and longer half of the wavelength rangeof the cameras, and a wide filter that overlaps the two narrow filters. The S9W and L18W bands
are used for the all-sky survey observations.
The pixel scale and the imaging area of the focal plane arrays are summarized in Table 2.0.2.
The imaging area is the rectangular area excluding the slit region.
The dispersion elements of the IRC are set into the filter wheel so that all the light in the
FoV is dispersed. A spectrum is obtained in the direction parallel to the scan path (in-scandirection). Slits are provided for each camera (Figure 2.0.2) in order to avoid contamination
by nearby sources / diﬀuse radiation. The two dispersion elements of the NIR camera provide
diﬀerent spectral resolutions over a similar wavelength range. In the MIR-S and MIR-L, eachdispersion element covers about half of the camera’s wavelength range. However, unfortunately
one of the elements of MIR-L, LG1, was degraded during the ground tests. Thus only LG2 will
be used for observations, resulting in a gap in the wavelength range corresponding to the LG1
element.
The slits are primarily designed for extended sources and it should not be assumed thatthey can be used to guide a point source into the slit, except for the NIR camera which has an
aperture for point sources. The current design is the following:• The slit for the NIR camera consists of three parts of diﬀerent widths. The left most(closest to the imaging area) has a 5 arcsec width and will be mainly used for simultaneous
observations of diﬀuse light with the MIR-S camera. This slit position is labeled as ‘Ns’ for
IRC04 AOT observation parameter. Both the NP (low-resolution prism) and NG (highresolution grism) will be used with this slit. The middle 10 × 10 square part, referred to as‘Np’ is for spectroscopy of point sources. The aperture is large compared to the absolute
pointing accuracy of the satellite (designed to be better than 30 arcsec) to ensure that the3

4

IRC Data User Manual

MIR-L
50mm

NIR

folding mirror
unit (NIR)

filter unit
(MIR-S)
MIR-S

detector unit
(MIR-S)
Figure 2.0.1: Bird’s-eye view of the IRC camera.

target can be accurately guided into the area. Note that for observations of faint sources,
confusion due to galaxies may be a serious problem. The NG (grism) is assumed to be
used with this aperture. The rightmost (outer) part (‘Nh’) has a 3 arcsec width and isused for the highest resolution spectroscopy of diﬀuse radiation with the NG (grism).
• The MIR-S has a slit of 5 arcsec width for diﬀuse light. As this slit overlaps with theinnermost slit of the NIR camera, it is also referred to as ‘Ns’. We assume that the point
source density in the mid-infrared range is low enough to avoid serious confusion, suchthat spectroscopy of point sources can be made in the imaging field.
• The MIR-L has a 7 arcsec slit for diﬀuse light similar to that of the MIR-S camera. This
position is referred to as ‘Ls’.

Version 2.2 (July 6, 2016)

5

Scan Direction

Slit (MIR-L): 7"x0.4'
10.7'

Telescope Axis
5.0'

MIR-L
4.9'

10.2'

0.9'

NIR
& MIR-S

5.0'

10.0'
Slit (NIR): 3"x1'

0.4'

Slit (NIR): 1'x1'9.1'-9.5'*
25.0'

Slit (NIR/MIR-S): 5"x0.8'
0.5'** 9.3' (0.7') for N2, 9.5'(0.5') for N3 & N4
9.1' for MIR-S (all bands)

Figure 2.0.2: Field of view location of the three channels of the IRC. The vertical arrow indicatesthe scan direction in the survey mode. The NIR and MIR-S share the same field of view bymeans of a beam splitter. See text for the usage of the slits.

2.1

Focal plane arrays

The IRC comprises three channels (Figure 2.0.1). The near-infrared (NIR) channel operates
in 2–5 µm, the mid-infrared short (MIR-S) channel covers 5–12 µm, and the mid-infrared long
(MIR-L) channel works in 12–26 µm. The NIR uses 512 × 412 format InSb array and MIRS and MIR-L both employ 256 × 256 format Si:As impurity band conduction arrays. The
three channels have a field of view of about 100 × 100 and the NIR and MIR-S share the same
field of view by the beam splitter, whereas the MIR-L observes a sky about 250 away from the
NIR/MIR-S sky (Figure 2.0.2).

2.1.1

Near-InfraRed Camera: NIR

Figure 2.1.3 shows the side view of the NIR channel. The light from the telescope is split by agermanium beam splitter (see Figure 2.1.4) and the near-infrared radiation is introduced to the
NIR channel. The NIR consists of silicon and germanium lenses. There are color aberrations
among N2, N3, and N4 and the telescope focus is adjusted in between them. Faint ghosts ofbright sources are also present, which come from internal reflections in the beam splitter. The
brightness is about 0.7% of the true source and the position is well determined and in a good
agreement with the ray-tracing simulation. There are also ghosts that seem to come from theinternal scattering in the NIR optics. Details are under investigation.

6

IRC Data User Manual

Table 2.0.1: IRC Filters and Dispersion Elements(1)
Channel

(2)
Name

(3)

(4)
λref
(µm)
2.4
3.2
4.1

(5)
Wavelength(µm)
1.9–2.8
2.7–3.8
3.6–5.3
1.8–5.2
2.5–5.0
5.9–8.4
6.7–11.6
8.5–13.1
5.4–8.4
7.5–12.9
12.6–19.4
13.9–25.6
20.3–26.5
17.5–25.7

(6)
λc
(µm)
2.34
3.19
4.33
—
—
7.12
8.61
10.45
—
—
15.58
18.39
22.89
—

(7)
∆λ
(µm/pix)
0.71
0.87
1.53
—
—
1.75
4.10
4.12
—
—
5.98
9.97
5.34
—

(8)
Dispersion(µm/pix)———
0.06 @3.5 µm
0.0097
—
—
—
0.057
0.099
—
—
—
0.175

N2
filterN3
filterNIR
N4filter
NP
prism
NG
grism
S7
filter
7.0
S9W
filter
9.0
MIR-S
S11
filter
11.0
SG1
grism
SG2
grism
L15
filter15.0
L18W1 filter
18.0
MIR-L
L24
filter
24.0
LG2
grism
(4) Reference wavelength.
(5) Defined as where the responsivity for a given energy is larger than 1/e of the peak.
(6) Isophotal wavelength of the filter band.
(7) Eﬀective bandwidth.
(8) Dispersion power of NP depends on wavelength.
The quoted value corresponds to 3.5µm
1 Renamed from L20W. No change of the wavelength profile itself.

Table 2.0.2: General characteristics of the IRC focal plane arrays
Channel
NIR
Detector
InSb (SBRC-189)
Format
512 × 512
Pixel scale (00 ×00 )1.446 × 1.458
2Imaging area (pixel ) 391 × 412
Readout noise (e− )30.6aDark current (e− /s)
0.2
Operability(%)c99.9
a Estimated by Fowler 1 samplingb Estimated by Fowler 4 samplingc Pre-launch performance

2.1.2

MIR-S
Si:As (CRC-744)
256 × 2562.340 × 2.340
233 × 256
14.2b
26
100

MIR-L
Si:As (CRC-744)
256 × 256
2.516 × 2.384
246 × 239
same as MIR-S
same as MIR-S
100

Short wavelength Mid-InfraRed Camera: MIR-S

The light reflected by the beam splitter is lead to the MIR-S. It consists of two aspherical
germanium lenses. Figure 2.1.4 shows the side-view of the MIR-S channel. Part of the narrow

Version 2.2 (July 6, 2016)

7

Folding mirror Detector module
Si
Si
Si
Ge

Telescope axis

50mm

Figure 2.1.3: Side-view of the NIR channel.

Detector module
Filter wheel
Ge
Beam splitter Ge

Telescope axis

50mm

Figure 2.1.4: Side-view of the MIR-S channel. The beam splitter that splits the light into NIR
and MIR-S channels acts as a folding mirror for the MIR-S.

slit used for the NIR channel (Figure 2.0.2) will also be shared by MIR-S for spectroscopy
for diﬀuse emission. The MIR-S also has ghost images of bright sources due to the internalreflections in the beam splitter. The brightness of the ghost is about 0.8% of the true source forS7 and S9W and 3.8% for S11 band.

8

2.1.3

IRC Data User ManualLong wavelength Mid-InfraRed Camera: MIR-L

The MIR-L channel consists of 5 lenses of CsI and KRS-5 (Figure 2.1.5). It also has a small
slit for spectroscopy of diﬀuse emission (Figure 2.0.2). Unfocused ghost images are known toexist for very bright sources, whose location depends on the position of the true source in thefield-of-view. The origin of the ghost is not yet clearly identified, but it is most likely to comefrom the scattering by the optical elements of the MIR-L channel (internal scattering).

Filter wheel

CsI

CsI
KRS-5
CsI

KRS-5
DetectormoduleCylindrical mirror
Telescope axis
Figure 2.1.5: Side-view of the MIR-L. The folding mirror is cylindrical to correct the astigmatism.
Thus the pixel scale of the MIR-L channel is not the same for the X and Y directions.

2.1.4

Arrays operation

The focal plane arrays are operated in a synchronized manner. The MIR-S and MIR-L arrays
are operated in the same clock pattern. The array operation is made in a unit frame, which
consists of short and long exposures. The short exposure is intended to increase the dynamic
range by about 8 to 10 times. The clock pattern of one frame is the same for all AOTs except
for IRC05, whose frame is twice the period of other AOTs (see next section). Except for IRC05,
one frame is about 63 sec, in which NIR has one short and one long exposures, and MIR-S andMIR-L have one short and three long exposures. The short exposure is made with the Fowler 1
sampling scheme and the long exposure is made with the Fowler 4 sampling. For the IRC05, theclock of the MIR-S and MIR-L is the same as for other AOTs, but repeated twice in a frame.
The short exposure of the NIR in IRC05 is taken once and the exposure scheme is the samefor other AOTs. The long exposure of the NIR in IRC05 is made with the Fowler 16 sampling
scheme and is taken once in a frame.

Version 2.2 (July 6, 2016)

2.2

9

Instrument AOTs

In a pointed observation, the filter and dithering combinations for IRC have been fixed to a few
patterns, which are called Astronomical Observation Template (AOT). The duration of a pointed
observation and the frame time are well determined. Each AOT consists of a combination offrames of the IRC operation with dithering and filter wheel rotation operations, which is well
fixed in a pointed observation. Figure 2.2.6 shows an illustration of the pre-fixed sequences ineach AOT. In all the AOTs, except for AOT11, a dark frame is carried out before and after theobservation (pre-dark and post-dark observations).
In a pointed staring observation, the IRC observation is started once it receives the notification of the stabilization of the attitude from the attitude and orbital controlling system. The
IRC observation continues till the angle between the telescope axis and the earth rim becomesless than a certain value. Thus the last image in a pointed observation may be taken during the
maneuver and cannot be used for astronomical observations. This will be correctly treated in
the pipeline software.
Manuever

AOT00

Exposure cycle

Exposure cycle

AOT02

Exposure cycle

W

AOT03

Exposure cycle

W

AOT04

Exposure cycle

Exposure cycle

AOT05

Exposure cycle

Exposure cycle

Exposure cycle

Exposure cycle

M

Exposure cycle

Exposure cycle

Exposure cycle

W

Exposure cycle

W

Exposure cycle

Exposure cycle

Exposure cycle

Exposure cycle

Exposure cycle

M

W

Exposure cycle

W

Exposure cycle

Exposure cycle

W

Exposure cycle

Exposure cycle

M

Exposure cycle

Exposure cycle

W

Exposure cycle

W

Exposure cycle

Exposure cycle

Exposure cycle

Exposure cycle

Exposure cycle

M

Exposure cycle

Exposure cycle

M

Exposure cycle

Exposure cycle

Exposure cycle

W

Exposure cycle

Exposure cycle

Exposure cycle

Figure 2.2.6: Observation sequences of the AOT IRC00, 02, 03, 04 and 05. Yellow boxes labeled
as “Exposure cycle” indicate exposure frames. Orange boxes with “M” are Micro-Scan (i.e.
dithering) operations including stabilization, and light-blue boxes with “W” are Filter Wheel
rotations. Dead time for a Filter Wheel change depends on the relative position of the elements.
The Green area on the right side is the extra observation time which is not guaranteed.

2.2.1

IRC00

The IRC00 mode was designed for deep imaging observations. After performance investigationin orbit, it has been replaced by IRC05 and is not in use.

10

2.2.2

IRC Data User Manual

IRC02

The IRC02 mode was designed for general purpose imaging observations that take images with
two fixed filters in a pointed observation. It provides at least three images for a filter with
dithering operations.

2.2.3

IRC03

The IRC03 mode was designed for general purpose imaging observations that take images withthree filters in a pointed observation. For each filter two imaging observations are made with
dithering operations.

2.2.4

IRC04

The IRC04 mode was designed for general purpose spectroscopic observations. This mode
does not have dithering operations. It has an imaging observation sandwiched by spectroscopic
observations (observations with the dispersive elements) of 4 frames. The imaging observation
will be used to determine the wavelength reference point for slit-less spectroscopy.
The parameters for this AOT are [a-c];[N/L][s/h/p/c]. The first character stands forthe filter element; a for NP, b for NG, and c for both, while the latter two indicate the target
position; [N/L]s for wider slit, Nh for narrower slit, Np for 10 × 10 short slit area, and [N/L]c for
center of the detector array for slitless observations.

2.2.5

IRC05

The IRC05 mode was designed for deep imaging observations with a filter in a pointed observation. This mode has neither dithering operation nor filter change. Thus observers are requested
to make a number of pointed observations for a give target for the redundancy. This mode
replaces IRC00 after confirming its high performance for faint source observations for the NIR
channel. The exposure times for the MIR-S and MIR-L are the same as for other AOTs for both
short and long exposures, whereas that for the long exposure of NIR is longer than others andis made with the Fowler 16 sampling scheme instead of the Fowler 4 sampling.

2.2.6

IRC11

The IRC11 was designed for wide area observations or slow-scan observations with the IRC.
Only the MIR-S and MIR-L channels can be used in the IRC11. The arrays are operated in
the same manner as in the all-sky survey mode, making binning of 4 pixels in the cross-scandirection. On the orbit, the data downlink capacity was found to be suﬃcient to transmit thefull resolution data in the IRC slow scan. The unbinning mode is now designated as IRC51 andall the IRC slow scan observations from 2007 January are executed with the IRC51 mode.

2.2.7

IRC51

This is the same slow-scan mode as the IRC11 except that the IRC51 provides the full spatial
resolution (without binning) in the cross-scan direction. All the IRC slow-scan observations
after 2007 January are executed with IRC51.

Version 2.2 (July 6, 2016)11

Table 2.3.3: IRC sensitivity and image quality
N2

2.2.8

N3

N4

S7

S9W

S11

L15

L18W

L24

5-σ sensitivity (µJy)
AOT02
16 16 16 74
76
132
AOT03
20 19 19 91
93
162
AOT05
5a 5a 9a 43
44
76
The values for N2, N3, and N4 of IRC05 are tentative.

279
341
161

273
335
158

584
716
337

AOT parameters for imaging observations

The parameters for imaging AOTs are [a-c];[N/L]. As for the parameters for IRC04
explained in §2.2.4, the last character N/L indicates where the target source is.
Namely, the target is in the NIR and MIR-S field in the case of N and in the MIR-L
field in the case of L. On the other hand, the first character a/b/c represents thefilter or combination of filters used in the observations.

2.3

In-orbit sensitivity

Optical throughputs of all IRC channels are confirmed to be as expected by observations ofstandard stars
The sensitivity values for the imaging AOTs are collected in Table 2.3.3. The IRC05 numbers
are preliminary.
In the case of IRC04, Figures 2.3.7 and 2.3.8 show the sensitivity (1σ noise with 2×2 binning)
and the throughput of the system, respectively, as a function of λ.

12

IRC Data User Manual

IRC SPECTROSCOPY LIMITTING FLUX LEVEL

1-σ Noise Equivalent Flux (mJy)

1

0.1

NP
NG
SG1
SG2
LG2

0.01

2

3

4

5

6
7
8 9 10
Wavelength (µm)

1214

16 18 20 22 24 26

Figure 2.3.7: IRC spectroscopy sensitivity as a function of λ.

IRC SPECTROSCOPY SYSTEM THROUGHPUT
0.5

System Throughput

NP
NG
SG1
SG2
LG2

0.1

0.05

0.01
2

3

4

5
6
7
8
Wavelength (µm)

9 10

12

14 16 18 20 22 24 26

Figure 2.3.8: IRC spectroscopy throughput as a function of λ.

Chapter 3

Distributed Data Products
Two levels of data products are delivered to the users: raw data and processed data. The
raw data are intended to be used to run the pipelines described in Chapters 5 and 6 to getinteractively the best science out of them. The processed data are outputs from thelatest toolkit with standard options. Users are recommended to check parameters
used for their production in log files and may run pipelines with better parameters
depending on science goals.

3.1

IRC FITS file naming rule

Pointed observation data are distributed to the users as a tar+gz package format (hereafter’data package’) per observation. A data package contains FITS format observation data and a
Readme file describing the contents etc.
One data package is provided for one ObsID, which is a combination of 7-digit
TargetID and 3-digit SubID (e.g. 1234567 123). While the TargetID defines observational setups such as target positions and AOTs, the SubID represents thenumber of observations. However, note that the center and position angle of fieldof views of diﬀerent SubIDs may not coincide due to the pointing accuracy and observational timing. Calibration templates such as dark and flat can also be diﬀerent.
Therefore, data from diﬀerent SubIDs should be treated separately.

3.1.1

Raw data package

The naming convention for the IRC rawdata package is: AKARI IRC TargetID SubID.tar.gz.
When extracting an IRC data package a directory named AKARI IRC TargetID SubID/
is created. Two subdirectories, rawdata/ and irc ql/ contain the raw FITS data files and theprocessed result files, respectively.

3.1.2

Processed data package

The name of the processed package released in Mar. 2015 is
AKARI IRC TargetID SubID 201503.tar.gz.
Two subdirectories, dark/ and stacked IM/ contain templates for dark current of
MIR-S and -L and calibrated and stacked images for individual bands, respectively.
Stacked images are named asTargetID SubID filtername long.fits,
13

14

IRC Data User Manual

where ‘long’ indicates long exposure. A process log (‘ircpipeline.log’) and readme
file (‘README’) are also included in the package.

3.2

Raw data description

3.2.1

Raw data naming convention

The naming convention for the IRC raw data files is common for all the IRC AOTs as is thefollowing:
FVVxxxxxx [N—M].fits
where:• F is a fixed character• VVVxxxxxx: Extended frame counter (decimal digits). This is a unique identifier of the
exposure.
• xxxxxx: frame conter in the telemetry file.
• VVV: maintained by the FITS creation program. Incremented when xxxxxx is reset to 0.
N—M : NIR / MIR (Scan mode data may have extra characters to this).
NIR data is in a separate file, while MIR-S and MIR-L are stored in the same FITS file.
The README file describes:• file list in the data package• observation summary extracted from the FITS file
• comments specific for the observation

3.2.2

AKARI FITS Primary HDU (common information) rawdata header

The contents of the AKARI FITS Primary HDU of all raw data, both IRC and FIS, is as follows:
SIMPLEBITPIXNAXISNAXIS1NAXIS2NAXIS3
EXTENDFMTTYPEFTYPEVER
CNTTYPEDATECREATORCRTRVERPIPELINEDATASTATORIGIN

=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=

T
16
3
412
512
2
T
’ASTRO-F IMAGE IRC ’
4’IRC NIR ’’2006-09-25T09:45:24’’TBD’’1.0 ’’ircpl ver. 1.0’
’GOOD ’’ISAS/JAXA’

/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/

Standard FITS format
number of bits per data pixel
Number of axes
Image dimension
Image dimension
Image frame
Extension may be present
Type of File Format in FITS file
Version of FMTTYPE
Type of data content
File Creation Date
Data generator program nameVersion of CREATOR
Data Processing Pipeline name
Data status
Organization creating FITS fileVersion 2.2 (July 6, 2016)
TELESCOP
INSTRUME
DETECTOROBSERVERPROPOSALOBS-CATPNTNG-ID
TARGETIDSUBIDOBJECT
OBJ-RA
OBJ-DECAOTAOTPARAMINSTMODETIMESYS
DATE-OBS
DATE-END
DATE-REF
AFTM-OBS
AFTM-END
AFTM-REF
PIMTIOBSPIMTIENDPIMTIREF
EQUINOXRADEC
ROLL
AA-SOLAA-EAR
AA-LUN
TM-SAA
SAT-POSX
SAT-POSY
SAT-POSZDAYNIGHT
STTA-NUM
STTB-NUM
STTA-MODSTTB-MODCOMMENTHISTORY
END

=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=

’AKARI ’’IRC ’’NIR ’’PI Name ’’PRPID ’’OT ’
123456712345671’target ’320.5533-23.3325’IRC03 ’’8;0.5;70’
TBD’UTC ’
YYYY-MM-DDTHH:MM:SSYYYY-MM-DDTHH:MM:SSYYYY-MM-DDTHH:MM:SS[double][double][double]’0xXXXXX ’’0xXXXXX ’’0xXXXXX ’
2000.0000
320.5533-23.3325-30.553
90.0021180.2083
210.6821
1829.
2903.5528
1704.3092
1968.4286’DAY ’
4
4’TRK ’’TRK ’The header keywords are sorted as follows:• FITS basic information, data size information

15
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/

AKARI mission
Identifier of the instrument
Detector name
PI Name (Observer’s ID)
Proposal ID
Observation Category
Pointing ID
Target ID
Sub ID
Object name[degree] Target position[degree] Target position
Observation AOT
AOT Parameter
Instrument operation mode
Explicit time scale specification
Observation start date+time
Observation end date+time
Reference time in the Observation
DATE-OBS in ASTRO-F Time
DATE-END in ASTRO-F Time
DATE-REF in ASTRO-F Time
DATE-OBS in PIM-TI (36 bits DHUTI)DATE-END in PIM-TI (36 bits DHUTI)DATE-REF in PIM-TI (36 bits DHUTI)
Epoch of Coordinate[degree] Target position at DATE-REF[degree] Target position at DATE-REF[degree] Roll Angle at DATE-REF[degree] Solar avoidance Angle at DATE-REF[degree] Earth avoidance Angle at DATE-REF[degree] Lunar avoidance Angle at DATE-REF[sec] Duration since last SAA at DATE-REF[km] Satellite position at DATE-REF[km] Satellite position at DATE-REF[km] Satellite position at DATE-REF
Day/night status at DATE-REF
number of tracked stars in STT-A at DATE-REF
number of tracked stars in STT-B at DATE-REF
STT-A Mode status at DATE-REF
STT-B Mode status at DATE-REF
Any strings
Any strings

16

IRC Data User Manual– SIMPLE refers to the standard FITS format– BITPIX is the number of bits per data pixel, and equal to 16 in the case of IRC– NAXIS is the number of axes, equal to 3 for IRC– NAXIS1 and NAXIS2 are the image dimensions– NAXIS3 is the number of image frames– EXTEND refers to the presence of extensions in the FITS file
• Data type, creation and processing information– FMTTYPE is the type of File Format in FITS file. It can be ’ASTRO-F IMAGE
IRC’ or ’ASTRO-F SCAN IRC’
– FTYPEVER is the version of the file format described in FMTTYPE– CNTTYPE is the type of data content. It can be ’IRC NIR’ or ’IRC MIR’
– DATE is the file Creation Date
– CREATOR is the data generator program name.
– CRTRVER is the version of CREATOR. Contents TBD– PIPELINE is the Data Processing Pipeline name and version– DATASTAT is the Data status. It describes data status mainly from completeness of telemetry data. This does not tell detailed scientific quality of the data All
appropriate error status are listed, otherwise GOOD is given GOOD: No problem
INCOMPLETE: (Scientific data) incomplete due to telemetry loss etc. NOHK: HK
Status not available NOADS: Attitude information not available STTINI: STT did
not work properly. More status may be added as analysis progresses. Data otherthan GOOD may not be in the archive at the first stage.
• instrument information– ORIGIN is the organization creating FITS file
– TELESCOP is the AKARI mission [Satellite Name]– INSTRUME is the Identifier of the instrument– DETECTOR is the detector name, either ’NIR’ or ’MIR’• observation details– OBSERVER is the PI Name (Observer’s ID)– PROPOSAL is the Proposal ID– OBS-CAT is Observation Category, either ’LS’, ’MP’, ’OT’, ’DT’, ’CAL’ or ’ENG’– PNTNG-ID is the Pointing ID. Usually it is identical with the Target ID, but is
diﬀerent for ’parallel mode’ observations.
– TARGETID is the Target ID– SUBID is the Target Sub ID– OBJECT is the Object name
– OBJ-RA is the RA Target position in degrees recorded in the database (double precision)

Version 2.2 (July 6, 2016)17– OBJ-DEC is the DEC Target position in degrees recorded in the database (double
precision)– AOT is the Observation AOT– AOTPARAM is the AOT Parameters set– INSTMODE is the Instrument operation mode. Contents TBD– TIMESYS is the Time system used in this file
– DATE-OBS is the Observation start date+time, with format
YYYY-MM-DDTHH:MM:SS– DATE-END is the Observation end date+time. Same format than above– DATE-REF is the Reference time in the Observation. Same format than above– AFTM-OBS is the DATE-OBS in ASTRO-F Time
– AFTM-END is the DATE-END in ASTRO-F Time
– AFTM-REF is the DATE-REF in ASTRO-F Time
– PIMTIOBS is the DATE-OBS in PIM-TI (36 bits DHUTI) , format ’0xXXXXX ’– PIMTIEND is the DATE-END in PIM-TI (36 bits DHUTI), same format than above– PIMTIREF is the DATE-REF in PIM-TI (36 bits DHUTI) , same format than above???? OBS and ???? END are identical with ???? REF for convenience. ???? REF is
Reference time from TI sampled during each exposure cycle. This is due to the factthat IRC only sample time information once per exposure cycle. Note: PIMTI is theprimary information directly from telemetry. AFTI- and DATE- are from the timing
correction based on PIMTI.
• attitude information– EQUINOX is the Epoch of Coordinate– RA is the Target position at DATE-REF in degrees– DEC is the Target position at DATE-REF in degrees– ROLL is the Roll Angle at DATE-OBS– AA-SOL is the Solar avoidance Angle at DATE-REF in degrees– AA-EAR is the Earth avoidance Angle at DATE-REF in degrees– AA-LUN is the Lunar avoidance Angle at DATE-REF in degrees– TM-SAA is the duration in seconds since last SAA at DATE-REF. Definition of
SAA is diﬀerent for diﬀerent detectors. SAA region is defined by the glitch rate
map observed by the Star Tracker with arbitrary threshold level. IRC follows thisthreshold. Shifts of 30 and 60 seconds are applied to FIS SW and LW, respectively.
– SAT-POSX is the Satellite position at DATE-REF in km– SAT-POSY is the Satellite position at DATE-REF in km– SAT-POSZ is the Satellite position at DATE-REF in km– DAYNIGHT is the / Day/night status at DATE-REF These fields are updated as
pointing analysis goes on from On-board AOCS to G-ADS ( Pointing reconstruction
for Survey mode)– STTA-NUM is the number of tracked stars in STT-A at DATE-REF

18

IRC Data User Manual– STTB-NUM is the number of tracked stars in STT-B at DATE-REF– STTA-MOD is the STT-A Mode status at DATE-REF, either ’TRK’, ’ACQ’, ’STB’,’INI R’ or ’INI N’– STTB-MOD is the STT-B Mode status at DATE-REF, same as above– COMMENT: Any strings– HISTORY: Any strings

3.2.3

Raw data dimensions

FITS dimension of the NIR frames is 412 (x) × 512 (y) × 2 (short+long exposure sub-frames).
FITS dimension of the MIR-S and MIR-L frames is 256 (x) × 256 (y)× 4 (1 short+ 3 longexposure sub-frames). Note that, for convenience of data handling in the electronics onboard
the satellite, MIR-S and MIR-L frames are attached to each other along Y axis, and form asingle FITS of 256×512×4 dimensions. The lower half portion of the 256×512 pixel images isfor MIR-S, and the upper half portion is for MIR-L.
With the AOT04, one will obtain 11 or 12 sets (NIR and MIR-S/MIR-L) of frames:• 1 set of pre-dark frame• 8 or 9 sets of spectroscopy exposure frames• 1 set of reference imaging exposure frame• 1 set of post-dark frame
The dark frames will be taken, during pre- and post-satellite maneuvering period, with the
shutter closed (the filter wheel at so-called ”CAL” position).
The spectroscopy frames are taken with dispersers inserted along the optical path, by rotating
the filter wheel.
The direct imaging frame is taken with the same ways as for the normal imaging observations(with AOT00, 02, and 03). The image taken during the spectroscopy mode (AOT04) is called asthe ”reference image”. The N3, S9W, and L18W wide-band filters will be used as the reference
images of NIR, MIR-S and MIR-L spectroscopy, respectively. Other combinations of the broadband filters and dispersers are not available.
The satellite starts to maneuver back to the survey mode according to the timer, irrespectiveof the IRC operation. The last exposure should be discarded since part of the exposure could
be made during the maneuver. The present FITS header does not record the status of thesatellite attitude control. In the imaging data pipeline the removal of the last exposure is madeautomatically by checking the source intensity. Such an automatic procedure is not included in
the current spectroscopy data reduction software: users need to do it by themselves (see Chapter
6). Note, however, that the automatic removal is not always perfect and users may have to do
it manually in some cases even for the imaging data.

3.3

Quick look data

The raw data package for both imaging and spectroscopic observations contains
processed data for quick look. These files are not produced by the latest toolkit nor
intended for scientific analysis. We thus strongly recommend to check the processed
images in the latest public release and to run the latest toolkit if necessary.

Version 2.2 (July 6, 2016)

3.3.1

19

IRC imaging: IRC00, IRC02, IRC03, and IRC05

As explained in the README file distributed with the data in the archive, the irc ql subdirectory
contains, together with a set of log files, a main quick look fits image per detector, with thefollowing naming convention. Its name is fdmslnDwaFVVVxxxxxx [NSL]yyy.fits. The firstprefixes refer to the performed steps during the processing: DARK correction (D), linearity(ln), distortion correction (d) and flatfiedling (f). [NSL] refer to each detector.
The irclog file contains a brief description of each file from the data reduction pipeline.

3.3.2

IRC spectroscopy: IRC04

The quick look products distributed in the case of spectroscopy observations (IRC04) are thefollowing:• TARGETID.SUBID.FILTER DISPERSER.refimage bg.fits: dark, linearity and flatfiled
corrected reference image.
• TARGETID.SUBID.FILTER DISPERSER.specimage bg.fits: dark, linearity and flatfieldcorrected spectroscopy image. This quick look image is usable only for slit-less spectroscopy. For slit spectroscopy further processing with the spectroscopy pipeline is needed.
Auxiliary files are described in the README file distributed in the archive.

3.4

IRC04 image orientation and dispersion direction

Since raw NIR images are rotated for technical reasons of data handling in the IRC electronics
onboard the satellite, NIR images (NP, NG and N3) will be rotated by 90 deg counterclockwise
at the very first stage of the data reduction for convenience in the spectroscopy pipeline.
This is the original orientation in raw images (without rotation for NIR):• NP: longer wavelength comes at right side (toward positive X).
• NG: longer wavelength comes at left side (toward negative X).
• SG1/2: longer wavelength comes at higher (toward positive Y).
• LG2: longer wavelength comes at lower (toward positive Y).
The IRC04 data reduction pipeline makes the rotation of the NIR images at the first step. After the NIR rotation, the dispersion directions are the same for all the dispersers in spectroscopy
images. Note, however, that NP, SG1 and SG2 show positive dispersions (longer wavelength
comes at higher Y), and NG and LG2 show negative dispersions (longer wavelength comes atlower Y). At the same stage, the orientation of all NIR, MIR-S and MIR-L images is also set
right, i.e., the image is neither flipped nor mirrored. Thus one can match the IRC images withother WCS-correct images, such as 2MASS images, only by shifting and/or rotating the images.
Since the satellite is designed to scan the sky along the ecliptic latitude on the sky, and the X
axis of the IRC array is aligned perpendicular to the scan direction, the Y axis is aligned closelywith the ecliptic latitude while the X axis is aligned with the ecliptic longitude.

Chapter 4

IRC Calibration and Accuracy
This chapter oﬀers an overview of the main issues related to the IRC calibration and in-orbit
performance. The instrument calibration is addressed in a standard way: dark level, flat-fields,
linearity, point spread function, absolute flux calibration and distortion correction. Spectroscopy
and imaging are addressed at the same time. Specific topics for each of them are explicitly
indicated. Caveats and general concerns are also discussed.

4.1

Dark image

This section describes temporal variations of dark current images, which were usually taken before (pre-dark) and after (post-dark) target observations during eachpointing. See §5.9.2 step 5 for how the toolkit calibrates them.

4.1.1

Long-term variation

Superdark is made from the pre-dark measurements of LMC observations, which have extensively been done at the beginning of Phase 1 . It was used by default during theautomatic processing, both for imaging and spectroscopic data, after shifting its level by checking the slit area in each image. Since the number of hot pixels is increasing along the mission
as shown in Figure 4.1.1, the superdark does not correct for them. Coadding (median filter)
diﬀerent images (IRC03/05 diﬀerent observations or IRC02 diﬀerent images) will filter out noncorrected hot pixels.
As an alternative, selfdark created by pre-dark images can provide better results, since itcorrects for hot pixels. Its S/N is lower than the superdark, especially in NIR, since eachobservation has only one pre-dark frame.
In order to overcome the disadvantages of superdark and selfdark, new darkframes called “neighbor dark” are now available and set as a default in the toolkit(since pver=140001). For each pointed observation, neighbor dark frames are created by combining pre-dark frames taken within ±5 pointed observations. Typicalnumber of frames to be combined is 33 for MIR long exposure, which is larger than
selfdark to increase the S/N and small enough to calibrate the temporal variation.
Note that neighbor dark frames are available only for MIR-S and -L long exposure,since for NIR long exposure a model by Tsumura and Wada (2011) is available. For
short exposure, super dark is applied.
20

Version 2.2 (July 6, 2016)

21

Figure 4.1.1: Dark images taken in April 2006 (top) and in August 2006 (bottom) of NIR, MIRS, and MIR-L (from left to right), respectively. Clearly, the number of hot pixels is increasing.

22

4.1.2

IRC Data User Manual

Intermediate-term variation

It has been known that dark current levels increase after the passage of SAA.
Tsumura and Wada (2011) provided a model for this variation of NIR long exposureand their model is used in the toolkit by default.

4.1.3

Short-term variation

Another problem related to the dark current arises from the IRC array operation. It is notstationary since the scan-mode clock is running for most of the time during the survey mode,and the imaging clock is running just around pointing observations. Therefore, the temperature
conditions of the array could be a function of both time and pixel positions, since only a partof the entire array is used in the survey mode. The eﬀect can be clearly seen in the pre-dark
image where series of columns of higher dark current are found around the center of the Y axis
in MIR-S/L, and the excess of the dark current decreases with time, and is essentially invisible
in post-dark images (taken after ∼ 20 min from the start of the imaging mode clock operation).
In the case of spectroscopy observations, the post-dark image is taken just after finishingimaging exposures, and the image shows a memory pattern of the bright background within theslit-less area. Therefore it cannot be used as the dark image to subtract from other images.

4.2

Flatfield

4.2.1

Flatfileds for imaging data

The IRC flat frames have been made in a diﬀerent way for each channel.
For MIR-S, a noticeable pattern (so-called “soramame”) in the bottom rightcorner was present until January 7th, 2007. Also for NIR, a similar pattern was
found in the bottom left corner. Murata et al. (2013) carefully investigated its
pattern in MIR-S frames and found that its shape changes during its presence.
According to their study, we have defined four periods with “soramame” and madeone template for each of MIR-S filters and for each period. The starting date ofeach period is listed in Table 4.2.1. When creating the templates, frames takenin the summer season has been excluded since the background was often severely
aﬀected by the earthshine light (§4.14). For the first period (p1), the numberof frames especially for S7 is not enough to make a good flat frame, so that wehave determined to provide flat frames only for the remaining three periods. Thissituation can be improved by further investigaion. For NIR, the number of frames
is not enough to make one template for each period, so that one template for theentire “soramame” period has been made for each filter. For flat frames afterJanuary 7th, 2007, one template for one filter has been created using data from theNorth Ecliptic Pole survey and from observations toward ecliptic plane, where thebackground is bright due to the zodiacal light, for NIR and MIR-S, respectively.
Flat frames for NIR and MIR-S in the toolkit (flatver=140728, pipever=140002
and later) are shown in Figures 4.2.2 and 4.2.3, respectively.
In addition, the periphery of the MIR-S images is aﬀected by scattered light. The
portion aﬀected is about 5 pixels from the left edge and 40 pixels from the bottom
and right edges and no scattered light is appreciated in the top edge (Figure 4.2.4).
This can be explained by the fabrication of the aperture mask. Templates of theVersion 2.2 (July 6, 2016)

0.95

0.96

0.97

0.98

23

0.99

1

1.01

1.02

1.03

1.04

1.05

Figure 4.2.2: Flat frames for NIR bands (N2, N3, N4 from top to bottom). Left andright panels are for periods with and without soramame, respectively.

24

IRC Data User Manual

0.95

0.96

0.97

0.98

0.99

1

1.01

1.02

1.03

1.04

1.05

0.95

0.96

0.97

0.98

0.99

1

1.01

1.02

1.03

1.04

1.05

0.95

0.96

0.97

0.98

0.99

1

1.01

1.02

1.03

1.04

1.05

Figure 4.2.3: Flat frames for MIR-S bands (S7, S9W, S11 from top to bottom). Threecolumns from the left are for three periods with soramame (p23, p4, p5), and thelast column is for the period without soramame (p6).
scattered light for all the MIR-S filters are now included in the toolkit and used forpipeline processing (See §5.9.2 step 6).
For MIR-L, the flat pattern in orbit is diﬀerent from that in the laboratory.
The cause of this pattern is now thought to be the scattering in the detector arrays
and Arimatsu et al. (2011) investigated it carefully to separate this artificial patternfrom a “true” flat field. The true flat field provided by Arimatsu et al. (2011) for L15
and L24 and subsequently by Murata et al. (2013) for L18W are now included in the
toolkit (Figure 4.2.5). The artificial diﬀuse pattern can be subtracted successfully
during the flat-fielding procedure.

4.2.2

Flats for spectroscopy images

The spectroscopy flatfields are images made by a large number of blank sky spectroscopy images
combined and normalized so that any faint object spectra are removed by clipping averaging
techniques. There are five super-flats corresponding to NP, NG, SG1, SG2 and LG2. As will beVersion 2.2 (July 6, 2016)25

Table 4.2.1: Starting date of each period for “soramame”
Name
p1
p23
p4
p5
p6

0.00000.00300.00600.0090Date (YYYY-MM-DD)
2006-04-22
2006-04-29
2006-12-09
2006-12-15
2007-01-07

0.01200.01500.01800.02100.02400.02700.0300Figure 4.2.4: The modeled scattered light pattern images, from left to right, for the S7, S9W,
and S11 bands.

26

0.95

IRC Data User Manual

0.96

0.97

0.98

0.99

1

1.01

1.02

1.03

1.04

1.05

Figure 4.2.5: Flat frames for MIR-L bands (L15, L18W, L24 from top to bottom). Leftand right panels are with and without the scattered light component, respectively.

Version 2.2 (July 6, 2016)27

described at the end of this chapter, these flats show spectral features, which are not due to thesensitivity variation. Therefore object spectra should not follow the ’flat’ pattern. However, this’super-flat’ with spectral features is used in the data reduction because the color-term correction
actually cancel out the spectral feature correction.
For flat fielding slit spectra, including NG with the point source aperture (Np), the superflats are typical for conventional slit spectroscopy. These flats are also made by combining alarge number of blank sky spectra. At present there are only two slit flats for NG at Np and Np
at Ns. The others (NG at Nh, SG1/2 at Ns and LG2 at Ls) are in preparation.

4.3

Instrument linearity

Detector linearity was measured in the laboratory before launch and later in-flight. Measurements were made with a calibration lamp that illuminates the detector and an increasing range
of integration times. At first it was assumed that the detecter behaves linearly below 5000ADU,
and was fitted with a linear curve by a least squares method. Figure 4.3.6 shows the raw signal in ADU versus the fit in ADU (signal expected if the detectors were to behave linearly) .
The deviation of the raw signal from the linear expectation was then calculated and correction
equations by fitting polynomials (up to 7th order) were applied. The red lines in Figure 4.3.6
represent the calculated correction equations.
Figure 4.3.7 shows how the calculated correction equations work. After the correction, theerror from the ideal linear curve is better than 5% at 12000, 20000, and 20000 ADU (after
ircnorm) for NIR, MIR-S, and MIR-L, respectively. Note that from Figure 4.3.6, the physicaldetector saturation occurs around 12500, 33000, and 33000 ADU (after ircnorm) for NIR, MIRS, and MIR-L, respectively. No reports have been given against its reliability. Observations ofvery bright standard stars seem to be compatible with those of medium brightness.

4.4

Instrument Point Spread Function

Table 4.4.2 shows the FWHM of the in-flight PSF in the imaging mode, based on observations ofstandard stars, performed in May and September 2006. They are partly aﬀected by the attitudecontrol stability and indicate the worst cases.
Table 4.4.2: In orbit PSF (in pixels).
N2
2.9

N3
2.9

N4
2.9

S7
2.2

S9W
2.4

S11
2.4

L15
2.3

L18W
2.3

L24
2.8

The PSFs are not spherical (See Arimatsu et al. (2011) who extensively investigatedtheir pattern for MIR). Therefore users are recommended to average individual images in
the coadding process, if photometric accuracy is concerned. In some cases, mainly in deep
survey, the median filtered image will lose some signal if the images are rotated with respect toeach other. To avoid this problem users should use “average” instead of “median filter” whencombining individual images.
The PSF in the spectroscopic mode is worse by one or two pixels compared to imaging data.
No significant wavelength dependence is seen along dispersers.

28

IRC Data User Manual

Figure 4.3.6: Raw signal versus fit (signal expected if detectors were to behave linearly). The
white line shows Raw signals equals to fit, and the red line shows the calculated correction
equations. Note that the physical detector saturation occurs around 12500, 33000, and 33000
ADU (after ircnorm) for NIR, MIR-S, and MIR-L, respectively.

Version 2.2 (July 6, 2016)29

NIR linearity
before correction
after correction

5

Deviation [%]

0

-5

-10

-15

-20
0

2000

4000

6000
RAW ADU

8000

10000

12000

MIRS linearity
20
before correction
after correction

Deviation [%]

0

-20

-40

-60

-80
0

5000

10000

15000
20000
RAW ADU

25000

30000

35000

MIRL linearity
20
before correction
after correction

Deviation [%]

0

-20

-40

-60

-80
0

5000

10000

15000
20000
RAW ADU

25000

30000

35000

Figure 4.3.7: Raw signal versus deviation [%] from linear curve. A negative deviation means
the raw signals in ADU is lower than that expected if the detector were linear. Red marks
show before applying linearity correction, and the green marks represents after applying thecorrection.

30

IRC Data User Manual

4.5

RSRF

Figures 4.5.8 to 4.5.13 show the Relative Spectral Response functions (RSRF) for the diﬀerent
filters and dispersion elements.
1

N4
N3

0.8

Relative Response

Relative Response

1

N2
0.6
0.4
0.2

NP
NG

0.6
0.4
0.2
0

0
1

2

3

4

5

6

1

Wavelength (µm)

2

3

4

5

6

Wavelength (µm)

Figure 4.5.8: The Relative Spectral Response Function of the IRC/NIR Camera
for Fλ .

Figure 4.5.9: The Relative Spectral Response Function of the IRC/NIR dispersion
elements per photon.

1

0.8

S9W

S7

0.6

Relative Response

1

Relative Response

0.8

S11

0.4
0.2
0

SG1

SG2

0.8
0.6
0.4
0.2
0

4

8

12

16

20

Wavelength (µm)
Figure 4.5.10: The Relative Spectral Response Function for Fλ of the IRC/MIR-S
Camera.

4

8

12

Wavelength (µm)
Figure 4.5.11: The Relative Spectral Response Function of the IRC/MIR-S dispersion elements per photon.

Version 2.2 (July 6, 2016)

Relative Response

Relative Response

1

L18W

1
0.8

31

L24

L15

0.6
0.4
0.2

LG2

0.6
0.4
0.2
0

0
10

0.8

15

20

25

30

Wavelength (µm)
Figure 4.5.12: The Relative Spectral Response Function of the IRC/MIR-L Camera for Fλ .

16

20

24

28

Wavelength (µm)
Figure 4.5.13: The Relative Spectral Response Function of the IRC/MIR-L dispersion elements per photon. LG1 will not be
used for astronomical observations due todegradation. Data shown here is 2nd order
light subtracted.

32

IRC Data User Manual

4.6

Flux calibration for point sources

4.6.1

Observed standards and data processing

The standard stars for the absolute flux calibration were selected in the North and South Ecliptic
Pole (NEP and SEP) regions, which were established by M. Cohen originally for the calibrationof the IRAC onboard Spitzer. We list the observed NEP and SEP standards in Table 4.6.3.
The observations of these standards were carried out with IRC AOT03, which performs either
imagings of all the NIR and MIR-S bands or all the MIR-L bands. In addition to these standards,
we have included standard stars in the Large Magellanic Cloud. A fairly large area in the
LMC have been surveyed by one of the AKARI’s Large-Area Survey programs (LSLMC). The
standard stars in the LMC, the so-called SAGE standards, were also established by M. Cohenfor the Spizter SAGE program. We list observed SAGE standards in Table 4.6.4. This survey
was done with IRC AOT02 and only N3, S7, S11, L15, and L24 images are available.
Table 4.6.3: Observed NEP and SEP standard stars.
Star
HD42525
NPM1p60 0581
1757132
KF03T1
KF03T2
KF06T1
KF06T2
KF06T3
KF06T3 2
KF03T3
KF03T4
KF09T1
KF09T1 2
KF06T4
KF01T4
KF01T4 2
KF01T4 3
KF01T5
KF01T5 2
KF01T5 3HD42525
NPM1p65 0451
HD158485
Bp66 1060
NPM1p67 0536
HD165459
Bp66 1073
KF01T42MASS IDSp.
for NIR, MIR-S
06060937−6602227 A0V
17245227+6025508 A1V
17571324+6703409 A3V
17574394+6626553 K0III
17575147+6631034 K1.5III
17575849+6652293 K1.5III
17583798+6646522 K1.5III
17585021+6649406 K1III

K

Obs. Date

5.751
9.645
11.1559.923
8.963
10.872
11.14910.34817590114+6633262
17590395+6630593
17592304+6602561

K1.5III
K1III
K0III

10.92510.091
8.114

17592606+6654581
18040314+6654459

K0III
K1.5III

11.2408.067

18040388+6655437

K1III

11.072

2006-04-22 04:08:28
2007-02-13 23:48:41
2006-04-26 22:49:47
2006-08-03 19:30:00
2006-08-03 19:30:00
2006-04-26 19:31:48
2006-04-26 19:31:48
2006-04-26 19:31:48
2006-07-06 19:15:10
2006-08-11 19:08:13
2006-08-11 19:08:13
2007-04-15 02:03:34
2007-06-02 01:28:46
2006-07-06 19:15:10
2006-06-24 19:55:00
2007-04-15 00:24:01
2007-06-01 00:37:25
2006-06-24 19:55:00
2007-04-15 00:24:01
2007-06-01 00:37:25

for MIR-L
06060937−6602227 A0V
16533704+6538175 K2III
17260484+5839069 A3V
17560018+6655430 K2III
17585466+6747368 K2III
18023073+5837381 A1V
18030959+6628119 K1III
18040314+6654459 K1.5III

5.751
6.524
6.145
6.720
6.409
6.584
7.544
8.067

2006-04-22 02:03:59
2006-12-20 01:36:45
2006-08-22 17:47:59
2006-11-07 16:16:54
2006-04-24 14:43:03
2007-03-22 01:44:58
2006-06-28 19:41:30
2006-06-24 23:13:10

Version 2.2 (July 6, 2016)
HD166780

33
18083882+5758468

K4III

3.963

2006-09-29 19:43:33

Table 4.6.4: SAGE standard stars
Star
HD34461
HD34555
HD34943
HD35094
HD35094 2
HD35183
HD35323
HD35461
HD35461 2
HD35665
HD35905
HD36207
HD37122
HD269704
HD269704 2
HD269757
HD37722
HD37762
HD269788
HD269820
HD269820 2
HD38861
HD38993
HD39980
HD270186
HD34461
HD34461 2
HD34489
HD34943
HD35323
HD35323 2
HD269352
HD35461
HD35665
HD35905
HD36207
HD37122
HD269704

2MASS IDSp.
K
for N3, S7, S1105121801-6705415 K1III
6.927
05125331-6744362 A3V
9.288
05153759-6804070 M0III
3.970
05164382-6811142 A3V
8.554
05172303-6828190
05183268-6732320
05194979-6626353

A3V
M0III
K1III

8.754
5.524
5.683

05205607-6759034
05223623-6721285
05244398-6753507
05300077-6958319
05315890-6909392

K1.5III
K1III
K1III
K2III
K2III

5.887
6.800
6.451
5.128
6.760

05335125-6946468
05344387-6928187
05344709-7010197
05345367-6846395
05355068-6929178

K1III
A4V
K0III
K4III
K1III

8.187
8.640
5.565
6.331
7.185

05423256-7022555 K0III
05431866-7027254 K1.5III
05495921-6941060 K2III
05501123-6934296 K0III
for L15, L24
05121801-6705415 K1III

6.780
5.478
5.409
7.774

05122388-6756520
05153759-6804070
05183268-6732320

K2III
M0III
M0III

6.169
3.970
5.524

05193283-6752441
05194979-6626353
05205607-6759034
05223623-6721285
05244398-6753507
05300077-6958319
05315890-6909392

K5III
K1III
K1.5III
K1III
K1III
K2III
K2III

6.014
5.683
5.887
6.800
6.451
5.128
6.760

6.927

Obs. Date
2006-06-08 18:21:09
2006-05-31 05:38:19
2006-05-26 06:46:47
2006-05-23 07:47:52
2006-05-25 06:01:07
2006-05-20 23:40:20
2006-11-29 13:25:55
2006-12-20 04:04:52
2006-12-18 23:57:17
2006-11-24 15:59:18
2006-12-01 05:07:47
2006-11-23 05:15:04
2007-04-25 09:40:22
2006-11-03 18:51:36
2006-11-03 22:10:04
2007-04-22 07:07:59
2007-04-25 03:03:00
2007-04-18 07:03:34
2007-05-02 05:40:40
2006-10-29 19:47:54
2006-10-30 18:56:54
2007-04-08 06:53:36
2007-04-06 05:12:23
2006-10-09 18:39:20
2006-10-09 18:39:20
2006-06-03 06:16:38
2006-06-04 05:23:26
2006-05-24 06:54:23
2006-05-21 06:16:33
2006-12-04 17:29:51
2006-12-07 11:40:07
2006-11-29 13:25:55
2006-12-31 13:05:43
2006-11-28 15:55:38
2006-12-06 15:48:56
2006-11-27 18:25:19
2007-04-21 07:56:30
2006-11-07 20:25:50

34

IRC Data User Manual
HD37722
HD37722 2
HD37762
HD269788
HD269820
HD38861
HD38993
HD39980
HD27018605344387-6928187

A4V

8.640

05344709-7010197
05345367-6846395
05355068-6929178
05423256-7022555
05431866-7027254
05495921-6941060
05501123-6934296

K0III
K4III
K1III
K0III
K1.5III
K2III
K0III

5.565
6.331
7.185
6.780
5.478
5.409
7.774

2006-11-02 19:42:32
2006-11-03 05:37:54
2007-04-12 06:57:26
2006-11-08 22:53:20
2006-11-02 19:42:32
2007-04-02 06:48:19
2007-04-02 05:08:54
2006-10-16 22:35:50
2006-10-18 19:14:15

The raw data were reduced with the IRC imaging pipeline. The pipeline produces one
coadded image for each band/exposure configuration, using ”median” as the combine mode.
Each configuration image corresponds to the exposure unit, listed in Table 4.6.5.The actual
exposure time is the unit number × the unit exposure time, tunit , which is approximately 0.5844
s.
Table 4.6.5: Exposure time of each band/exposure configuration.
unit number∗
876
112(IRC05)
MIR
short
1
MIR
long
28
∗ One unit time corresponds to about 0.5844 s.
Band
NIR
NIR

Exposure
short
long

An aperture photometry (IRAF/phot) was performed for each standard star. The radiusof the aperture adopted is 10 pixels for NIR band and 7.5 pixels for MIR-S and MIR-L band,
respectively. We determined the sky value in an annulus outside the aperture with a width of 5
pixels.A simple mean of the measured ADU values is used if the star was observed more than
once.

4.6.2

Estimation of the in-band flux

The in-band flux density of each band at the nominal wavelength, fλquoted (λi ), was calculatedby the following equation:∫ νie

Ri (ν)fν (ν) dνhννisquotedfν(νi ) = ∫ νie ( )νi Ri (ν)
dν
ν
hν
νis
or,

(4.6.1)Version 2.2 (July 6, 2016)

35

∫ λie
Ri (λ) λ fλ (λ) dλλfλquoted (λi ) = ∫ λis (
ie
λi s

λi
λ

)

(4.6.2)Ri (λ) λ dλwhere fλ (λ) is the flux density of a standard star (Cohen template) and Ri (λ) is the spectral response (the transmission of the optics and the response of the detector, unit: electron photon−1 )of the band i. Here fν ∝ ν −1 or fλ ∝ λ−1 is assumed. The adopted normal wavelengths of eachband, λi , are listed in Table 4.6.6 along with the range of the integration (λis , λie ).
Table 4.6.6: The normal wavelength λi and the range of integration, λis and λie .
band
N2
N3
N4
S7
S9W
S11
L15
L18W
L24

4.6.3

λi
2.40
3.20
4.10
7.00
9.00
11.00
15.00
18.00
24.00

λis
1.60
1.60
1.60
2.50
2.50
2.50
2.50
2.50
2.50

λie
5.770
5.770
5.770
23.86023.51024.00023.76028.72028.720Absolute calibration

The observed ADUs are converted to ADU t−1
unit according to the unit number (Table 4.6.5). We
assumed that the error of the estimated flux density of the standard star is 5 %. Observational
errors ranging from 5 % to 100 % were assigned according to their ADU values. A straight line
was fitted to the estimated flux density vs. the normalized ADU (ADU t−1
unit ). The slope of the−1
fitted lines provides the conversion factors, f0 (ADU tunit → Jy), which are tabulated in Table
4.6.7. Using these factors, we calculated conversion factors, fs (ADU to Jy for short exposuredata) and fl (ADU to Jy for long exposure data) which are tabulated in Table 4.6.8.

4.6.4

Overall accuracy of the flux calibration

The absolute accuracy for point sources based on observations of standard stars is less than 5%
for all the bands.
The stability of the instruments are being monitored by observations of the same stars.
Observations show no indications of any change in the reponsivity within 5 % for all the threechannels over more than a year.

4.7

Flux calibration for extended sources

A correction factor should be applied to convert the point sources flux calibration into extended
sources flux.

36

IRC Data User Manual

Table 4.6.7: Conversion factor (ADU t−1
unit to Jy).
Band
f0
error (%)
N2 3.300 × 10−52.84
−5
N3 2.580 × 10
2.54
N4 1.964 × 10−5
3.35
−5
S7 2.86 × 10
2.30
S9W 1.596 × 10−5
5.97
S11 2.165 × 10−5
2.36
−5
L15 4.735 × 10
2.82
L18W 3.210 × 10−5
4.56
−4
L24 1.370 × 10
4.72
∗ Number of standard stars used.

Nstar∗
19
16
17
31
11
25
33
13
20

Table 4.6.8: Conversion factor (ADU exposure−1 to Jy) calculated from f0 .
Bandshort exposure long exposurefsflN2 4.125 × 10−6
4.342 × 10−7
N3 3.225 × 10−6
3.394 × 10−7
−6
N4 2.455 × 10
2.584 × 10−7−5
S7 2.861 × 10
1.022 × 10−6
S9W 1.596 × 10−55.700 × 10−7
−5
S11 2.165 × 10
7.732 × 10−7
L15 4.735 × 10−5
1.691 × 10−6
−5
L18W 3.210 × 10
1.146 × 10−6
−4
L24 1.370 × 10
4.892 × 10−6
∗ Long exposure for IRC05

long exposure IRC05∗fl2.946 × 10−7
2.303 × 10−7
1.753 × 10−7

error (%)
2.84
2.54
3.35
2.30
5.97
2.36
2.82
4.56
4.72

This calibration will be done using the all sky-survey data and the MSX data (10µm).
The 20µm bands calibration will be more diﬃcult because of no good reference data at thesewavelengths. The absolute calibration is still being in progress with new observations and will
be updated.

4.8

Color correction

As mentioned in previous section, the quoted values of the IRC flux calibration assume fλ ∝ λ−1 .
For cases of other incident spetra, the color correction is required.
The quoted value at a reference frequency is given by∫

Ri (ν)fν (ν)dνhν∫fνquoted=( ν ) R (ν) ,
i
i
i
dν
ν
hν

Version 2.2 (July 6, 2016)37

where R is the response in units of electron per photon. The correction factor K is calculatedas∫fνquoted=i∫∫
Ri (ν) fν (ν)
Ri (ν) fν (ν)
Ri (ν)dνdν(ν)fν (ν)dν
actualhν fνihν fν (νi )hνactual∫ ( )= ∫ ( )fνi
= ∫ ( )fνactual≡ K(λi )fνactualii
νi Ri (ν)νi Ri (ν)νi Ri (ν)
dν
dν
dν
ν
hν
ν
hν
ν
hν

Thus, K is given by∫

Ri (ν) fν (ν)
dνν fν (νi )K(λi ) ≡ ∫ ( )νi Ri (ν)
dνννWe calculate the correction factors for the following incident spetrum cases:(fν (λ) = τ0

λ
λ0

)α (

2hc
λ3

)
exp

1
( hc )
λkT−1(4.8.3)

with α = 0, −1, −2.
The results are shown in the following tables. The reference wavelengths are fixed as: λ1 =2.4µm, λ2 = 3.2µm, λ3 = 4.1µm, λ4 = 7.0µm, λ5 = 9.0µm, λ6 = 11.0µm, λ7 = 15.0µm,
λ8 = 18.0µm, λ9 = 24.0µm.

38

IRC Data User Manual

Table 4.8.9: Color Correction factors for NIR channela – Black Body (α = 0)
Intrinsic
NIR/N2
NIR/N3
NIR/N4Temperature (K) K(2.4µm) K(3.2µm) K(4.1µm)
40
–
–
–
50
–
–
–
60
–
–
–
70
–
–
–
80
–
–
–
90
–
–
396.131100––
164.506110––
81.786120–873.058
46.429130–297.140
29.139140–
121.81419.760150–
58.29714.242160–
31.767
10.776170–
19.2918.482
180–
12.811
6.895
190
–
9.149
5.756
200
–
6.928
4.914
210
–
5.496
4.275
220
582.603
4.526
3.778
230
316.052
3.839
3.385
240
181.324
3.336
3.069
250
109.374
2.955
2.810
300
16.057
1.952
2.024
350
5.065
1.543
1.643
400
2.631
1.333
1.428
450
1.818
1.212
1.294
500
1.463
1.136
1.204
600
1.167
1.052
1.095
700
1.051
1.012
1.033
800
0.997
0.992
0.994
900
0.970
0.982
0.969
1000
0.957
0.977
0.951
1500
0.963
0.981
0.910
2000
0.990
0.992
0.896
2500
1.013
1.001
0.890
3000
1.031
1.008
0.886
3500
1.045
1.013
0.884
4000
1.056
1.017
0.883
4500
1.064
1.020
0.882
5000
1.071
1.022
0.881
6000
1.081
1.026
0.880
7000
1.088
1.029
0.880
8000
1.094
1.031
0.879
9000
1.098
1.032
0.879
10000
1.101
1.034
0.879
20000
1.116
1.039
0.878
30000
1.121
1.041
0.877
40000
1.123
1.042
0.877
50000
1.125
1.043
0.877
60000
1.126
1.043
0.877
a

Values are calculated for λ1 = 2.4µm, λ2 = 3.2µm, λ3 = 4.1µm.

Version 2.2 (July 6, 2016)

Table 4.8.10: Color Correction factors for NIR channela – Gray Body (α = −1)
Intrinsic
NIR/N2
NIR/N3
NIR/N4Temperature (K) K(2.4µm) K(3.2µm) K(4.1µm)
40
–
–
–
50
–
–
–
60
–
–
–
70
–
–
–
80
–
–
938.23390––
305.576100––
127.958110––
64.122120–541.92036.679130–187.774
23.187140–78.79615.834150–
38.79411.488160–
21.8228.749
170–
13.696
6.929
180
–
9.390
5.665
190
–
6.906
4.757
200
–
5.367
4.083
210
546.949
4.356
3.571
220
280.566
3.657
3.172
230
153.521
3.154
2.856
240
89.003
2.779
2.601
250
54.374
2.492
2.393
300
8.881
1.715
1.757
350
3.276
1.390
1.449
400
1.952
1.223
1.276
450
1.477
1.127
1.168
500
1.257
1.069
1.097
600
1.064
1.007
1.011
700
0.989
0.981
0.963
800
0.957
0.971
0.934
900
0.945
0.968
0.915
1000
0.943
0.970
0.902
1500
0.982
0.992
0.875
2000
1.027
1.012
0.868
2500
1.061
1.027
0.866
3000
1.087
1.037
0.865
3500
1.106
1.045
0.865
4000
1.121
1.051
0.865
4500
1.132
1.056
0.865
5000
1.142
1.059
0.865
6000
1.156
1.065
0.866
7000
1.166
1.069
0.866
8000
1.173
1.072
0.866
9000
1.179
1.074
0.866
10000
1.183
1.076
0.867
20000
1.203
1.084
0.868
30000
1.210
1.087
0.868
40000
1.213
1.089
0.868
50000
1.215
1.089
0.868
60000
1.216
1.090
0.868
a

Values are calculated for λ1 = 2.4µm, λ2 = 3.2µm, λ3 = 4.1µm.

39

40

IRC Data User Manual

Table 4.8.11: Color Correction factors for NIR channela – Gray Body (α = −2)
Intrinsic
NIR/N2
NIR/N3
NIR/N4Temperature (K) K(2.4µm) K(3.2µm) K(4.1µm)
40
–
–
–
50
–
–
–
60
–
–
–
70
–
–
–
80
–
–
719.02090––
236.320100––
99.825110––50.445120–339.050
29.088130–120.115
18.531140–
51.86412.748150–
26.4079.316
160–
15.3977.143
170–
10.012
5.694
180
–
7.092
4.686
190
–
5.367
3.959
200
549.483
4.275
3.418
210
264.183
3.541
3.006
220
136.893
3.025
2.685
230
75.855
2.647
2.430
240
44.673
2.361
2.224
250
27.825
2.140
2.055
300
5.291
1.528
1.541
350
2.329
1.268
1.293
400
1.566
1.135
1.154
450
1.270
1.061
1.068
500
1.125
1.017
1.012
600
0.996
0.976
0.946
700
0.949
0.963
0.910
800
0.935
0.962
0.889
900
0.936
0.968
0.876
1000
0.945
0.975
0.868
1500
1.019
1.016
0.855
2000
1.084
1.047
0.855
2500
1.132
1.068
0.857
3000
1.166
1.084
0.860
3500
1.192
1.095
0.862
4000
1.212
1.103
0.864
4500
1.227
1.110
0.866
5000
1.239
1.115
0.867
6000
1.258
1.123
0.869
7000
1.271
1.129
0.871
8000
1.281
1.133
0.873
9000
1.288
1.137
0.874
10000
1.294
1.139
0.874
20000
1.320
1.151
0.879
30000
1.329
1.155
0.880
40000
1.333
1.157
0.881
50000
1.335
1.158
0.881
60000
1.337
1.159
0.881
a

Values are calculated for λ1 = 2.4µm, λ2 = 3.2µm, λ3 = 4.1µm.

Version 2.2 (July 6, 2016)41

Table 4.8.12: Color Correction factors for MIR channela – Black Body (α = 0)
Intrinsic
Temperature (K)
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
300
350
400
450
500
600
700
800
900
1000
1500
2000
2500
3000
3500
4000
4500
5000
6000
7000
8000
9000
10000
20000
30000
40000
50000
60000

MIR-S/S7K(7.0µm)––––619.872
110.31329.73011.350
5.796
3.691
2.731
2.221
1.917
1.717
1.577
1.474
1.395
1.332
1.282
1.240
1.206
1.176
1.081
1.032
1.004
0.987
0.977
0.967
0.963
0.961
0.961
0.962
0.966
0.969
0.971
0.972
0.973
0.974
0.975
0.975
0.976
0.977
0.977
0.977
0.978
0.979
0.979
0.979
0.979
0.980

MIR-S/S9W
K(9.0µm)–
373.308
31.533
9.722
5.209
3.493
2.629
2.124
1.803
1.585
1.430
1.318
1.233
1.168
1.118
1.078
1.047
1.022
1.002
0.986
0.974
0.964
0.939
0.938
0.946
0.958
0.972
0.998
1.021
1.040
1.057
1.070
1.113
1.136
1.149
1.158
1.165
1.169
1.173
1.176
1.180
1.184
1.186
1.188
1.189
1.196
1.198
1.199
1.199
1.200

MIR-S/S11
K(11.0µm)
204.598
21.615
6.632
3.371
2.217
1.685
1.399
1.230
1.123
1.053
1.006
0.973
0.952
0.937
0.927
0.921
0.918
0.917
0.918
0.919
0.922
0.925
0.947
0.970
0.992
1.011
1.028
1.056
1.076
1.092
1.105
1.115
1.146
1.162
1.171
1.177
1.181
1.184
1.186
1.188
1.191
1.193
1.195
1.196
1.197
1.201
1.202
1.203
1.204
1.204

MIR-L/L15
K(15.0µm)
14.514
5.989
3.516
2.492
1.971
1.670
1.480
1.352
1.262
1.196
1.147
1.109
1.079
1.055
1.035
1.019
1.006
0.995
0.986
0.978
0.972
0.966
0.947
0.937
0.931
0.928
0.925
0.923
0.922
0.922
0.921
0.921
0.922
0.922
0.923
0.923
0.923
0.923
0.924
0.924
0.924
0.924
0.924
0.924
0.924
0.924
0.924
0.924
0.925
0.925

MIR-L/L20W
K(18.0µm)
14.825
5.661
3.178
2.198
1.720
1.454
1.292
1.187
1.116
1.066
1.031
1.005
0.986
0.972
0.961
0.953
0.947
0.942
0.939
0.937
0.935
0.934
0.933
0.936
0.940
0.944
0.947
0.954
0.959
0.963
0.966
0.969
0.977
0.981
0.984
0.985
0.987
0.987
0.988
0.989
0.990
0.990
0.991
0.991
0.991
0.993
0.993
0.993
0.994
0.994

MIR-L/L24
K(24.0µm)
0.942
0.882
0.870
0.875
0.887
0.902
0.917
0.931
0.945
0.958
0.969
0.980
0.990
0.999
1.007
1.015
1.022
1.029
1.035
1.040
1.046
1.050
1.070
1.085
1.096
1.104
1.111
1.122
1.130
1.135
1.140
1.144
1.155
1.161
1.165
1.167
1.169
1.170
1.172
1.172
1.174
1.175
1.175
1.176
1.176
1.178
1.179
1.179
1.180
1.180

a
Values are calculated for λ4 = 7.0µm, λ5 = 9.0µm, λ6 = 11.0µm, λ7 = 15.0µm, λ8 = 18.0µm,
λ9 = 24.0µm.

42

IRC Data User Manual

Table 4.8.13: Color Correction factors for MIR channela – Gray Body (α = −1)
Intrinsic
Temperature (K)
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
300
350
400
450
500
600
700
800
900
1000
1500
2000
2500
3000
3500
4000
4500
5000
6000
7000
8000
9000
10000
20000
30000
40000
50000
60000

MIR-S/S7K(7.0µm)––––
239.889
44.87413.402
5.953
3.563
2.580
2.088
1.801
1.615
1.485
1.389
1.316
1.258
1.212
1.174
1.143
1.116
1.094
1.023
0.988
0.969
0.960
0.955
0.953
0.955
0.958
0.961
0.964
0.975
0.982
0.986
0.988
0.990
0.992
0.993
0.994
0.995
0.996
0.997
0.997
0.998
1.000
1.001
1.001
1.001
1.001

MIR-S/S9W
K(9.0µm)–
175.833
19.630
7.299
4.200
2.906
2.228
1.826
1.568
1.393
1.270
1.181
1.115
1.065
1.027
0.999
0.977
0.960
0.948
0.939
0.933
0.928
0.927
0.944
0.967
0.992
1.016
1.059
1.094
1.124
1.148
1.168
1.232
1.264
1.284
1.297
1.306
1.313
1.318
1.322
1.328
1.333
1.336
1.339
1.341
1.350
1.353
1.355
1.356
1.356

MIR-S/S11
K(11.0µm)
126.883
15.078
5.044
2.712
1.855
1.452
1.235
1.107
1.029
0.979
0.947
0.928
0.916
0.910
0.908
0.909
0.912
0.916
0.922
0.928
0.935
0.942
0.979
1.014
1.045
1.072
1.095
1.132
1.160
1.181
1.198
1.212
1.253
1.273
1.285
1.293
1.298
1.303
1.306
1.308
1.312
1.315
1.317
1.318
1.320
1.325
1.327
1.328
1.329
1.329

MIR-L/L15
K(15.0µm)
11.699
4.943
2.961
2.135
1.715
1.472
1.320
1.218
1.147
1.096
1.057
1.028
1.006
0.988
0.974
0.963
0.954
0.946
0.940
0.935
0.931
0.927
0.917
0.913
0.911
0.911
0.912
0.913
0.915
0.917
0.919
0.920
0.924
0.927
0.929
0.930
0.931
0.931
0.932
0.932
0.933
0.933
0.933
0.934
0.934
0.935
0.935
0.935
0.935
0.935

MIR-L/L20W
K(18.0µm)
11.085
4.371
2.528
1.798
1.443
1.247
1.130
1.056
1.008
0.976
0.954
0.940
0.930
0.924
0.920
0.918
0.917
0.917
0.918
0.919
0.921
0.923
0.934
0.946
0.956
0.965
0.973
0.985
0.995
1.002
1.008
1.013
1.027
1.035
1.040
1.043
1.046
1.047
1.049
1.050
1.051
1.053
1.053
1.054
1.055
1.057
1.058
1.058
1.059
1.059

MIR-L/L24
K(24.0µm)
0.913
0.870
0.869
0.883
0.902
0.922
0.942
0.960
0.977
0.993
1.007
1.021
1.033
1.044
1.054
1.063
1.072
1.080
1.088
1.094
1.101
1.107
1.131
1.150
1.164
1.176
1.185
1.200
1.211
1.220
1.227
1.233
1.254
1.267
1.275
1.281
1.285
1.288
1.291
1.293
1.297
1.299
1.301
1.302
1.303
1.309
1.311
1.312
1.312
1.313

a
Values are calculated for λ4 = 7.0µm, λ5 = 9.0µm, λ6 = 11.0µm, λ7 = 15.0µm, λ8 = 18.0µm,
λ9 = 24.0µm.

Version 2.2 (July 6, 2016)43

Table 4.8.14: Color Correction factors for MIR channela – Gray Body (α = −2)
Intrinsic
Temperature (K)
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
300
350
400
450
500
600
700
800
900
1000
1500
2000
2500
3000
3500
4000
4500
5000
6000
7000
8000
9000
10000
20000
30000
40000
50000
60000

MIR-S/S7K(7.0µm)–––
866.347
95.14919.552
6.900
3.696
2.559
2.034
1.740
1.553
1.424
1.330
1.258
1.202
1.158
1.122
1.093
1.068
1.048
1.032
0.980
0.957
0.948
0.946
0.947
0.953
0.960
0.967
0.974
0.980
0.999
1.009
1.015
1.019
1.022
1.025
1.026
1.028
1.030
1.031
1.032
1.033
1.034
1.037
1.038
1.038
1.039
1.039

MIR-S/S9W
K(9.0µm)–
88.71413.417
5.731
3.460
2.451
1.909
1.586
1.379
1.240
1.142
1.073
1.023
0.987
0.961
0.942
0.929
0.921
0.915
0.913
0.913
0.914
0.939
0.976
1.016
1.055
1.092
1.156
1.209
1.251
1.286
1.315
1.404
1.450
1.478
1.496
1.509
1.519
1.526
1.532
1.541
1.548
1.552
1.556
1.559
1.572
1.576
1.578
1.580
1.581

MIR-S/S11
K(11.0µm)
80.57810.821
3.932
2.228
1.582
1.275
1.110
1.016
0.961
0.928
0.910
0.901
0.899
0.901
0.907
0.914
0.923
0.933
0.943
0.954
0.965
0.976
1.031
1.079
1.121
1.157
1.187
1.235
1.272
1.300
1.322
1.340
1.394
1.421
1.436
1.447
1.454
1.460
1.464
1.468
1.473
1.476
1.479
1.481
1.483
1.490
1.493
1.494
1.495
1.495

MIR-L/L15
K(15.0µm)
9.482
4.108
2.513
1.847
1.508
1.313
1.192
1.112
1.057
1.017
0.989
0.968
0.952
0.939
0.930
0.923
0.917
0.913
0.910
0.907
0.905
0.904
0.902
0.904
0.907
0.910
0.914
0.920
0.926
0.930
0.934
0.937
0.948
0.953
0.957
0.959
0.961
0.963
0.964
0.964
0.966
0.967
0.967
0.968
0.968
0.970
0.971
0.971
0.971
0.972

MIR-L/L20W
K(18.0µm)
8.362
3.417
2.044
1.500
1.238
1.097
1.015
0.966
0.936
0.919
0.909
0.904
0.903
0.903
0.906
0.909
0.913
0.918
0.923
0.928
0.933
0.938
0.962
0.983
1.000
1.015
1.028
1.048
1.063
1.076
1.086
1.094
1.120
1.135
1.144
1.151
1.155
1.159
1.162
1.164
1.167
1.170
1.172
1.173
1.174
1.180
1.182
1.183
1.183
1.183

MIR-L/L24
K(24.0µm)
0.890
0.864
0.875
0.897
0.923
0.949
0.974
0.996
1.017
1.037
1.054
1.070
1.085
1.099
1.111
1.123
1.133
1.143
1.152
1.161
1.169
1.177
1.208
1.233
1.253
1.269
1.284
1.309
1.329
1.348
1.364
1.379
1.439
1.483
1.514
1.538
1.557
1.571
1.583
1.593
1.608
1.620
1.628
1.635
1.641
1.667
1.676
1.681
1.683
1.685

a
Values are calculated for λ4 = 7.0µm, λ5 = 9.0µm, λ6 = 11.0µm, λ7 = 15.0µm, λ8 = 18.0µm,
λ9 = 24.0µm.

44

4.9

IRC Data User Manual

Distortion

Because of geometric distortion in the IRC images, the original detector pixel solid angle varies
over the field of view. We observed globular clusters and Galactic center with the IRC, where
many stars are expected to be detected. Then we matched their 2MASS coordinates with thedetector xy coordinates by fitting polynomials. In the fitting, we fixed the pixel field of view tobe 1.46, 2.38, and 2.40 arcsec/pix for the NIR, MIR-S, and MIR-L, respectively. The deviationfrom an ideal grid square are up to 2, 0.6 and 16 pixels at the edge for NIR, MIR-S and MIR-L,
respectively. There is little diﬀerence with filters. Figure 4.9.14 shows the distortion vector for
N2, S7, and L24, respectively.

Figure 4.9.14: Distortion from ideal grid square for N2, S7, and L24 (from left to right), respectively. For clarity, the length of distortion vectors are multiplied by 20.
Table 4.9.15 shows the accuracy of the distortion correction. In summary, except for L24,
the accuracy is about 0.1 pixel (N4 may be slightly worse). The bad value of L24 comes mostly
from scarcity of good bright sources and the matter of statistics. With the accumulation of thedata, it could be improved.

Table 4.9.15: Accuracy of the distortion correction in units of pixels.
xrms yrms
N2 distortion database.dat:
0.090 0.111
N3 distortion database.dat:
0.103 0.128
N4 distortion database.dat:
0.093 0.153
S7 distortion database.dat:
0.091 0.069
S9W distortion database.dat:
0.050 0.059
S11 distortion database.dat:
0.072 0.067
L15 distortion database.dat:
0.056 0.052
L18W distortion database.dat: 0.063 0.054
L24 distortion database.dat:
0.520 0.340

As described in §5.10.2 step 2, only linear terms of calculated distortion factors
are adopted in the toolkit and non-linear terms are neglected.

Version 2.2 (July 6, 2016)

4.10

45

Memory eﬀects caused by bright source observations

MIR-S and MIR-L channels show an anomalous sign after they observe bright sources. Examples are shown in Figures 4.10.15 and 4.10.16. The former is the case when a brightsource was observed in a pointed observation, while the latter is the case when sucha source was in the field of view during all-sky and slow-scan observations.

-1e+02

-80

-60

-40

-20

0.098

20

40

60

80

1e+02

Figure 4.10.15: Memory eﬀects seen in MIR-S S11 frames after observing a brightsource (CRL618 in the left panel) during a pointed observation. Time since observing the bright source are ∼ 1, 2, 4 hours from left to right, respectively. Frames after
flat fielding are shown in all the panels and note that the color scale is diﬀerent for
the left panel. The red contours indicate a plausible threshold level for the memory
eﬀect.

-1e+02

-80

-60

-40

-20

0.098

20

40

60

80

1e+02

Figure 4.10.16: Example of memory eﬀect after observing a bright source in all-sky
survey and in slow-scan observation. The former appears as the dark stripes, which
increase toward right. A causing source of these stripes is most likely * P Dor. The
latter appears as the arc- or bow-like shape, delineating the slow-scan pattern. The
time interval between the frames are 100 [min], 100 [min], 160 [min], from left toright. S11 frames after flat calibration are presented.
This eﬀect appears as a decrease of the sensitivity. Although the amount is a few %at most, it could severely aﬀect the detection of faint sources because of the highbackground level at MIR. For long-exposure frames taken in pointed observations,
we have estimated the threshold brightness of the causing source and duration

46

IRC Data User Manualof this eﬀect to be ∼ 105 [ADU] and ∼ 400 [min], respectively, for MIR-S. For
MIR-L, the threshold is estimated to be ∼ 106 [ADU]. Since the number of data
is not enough, the duration is not clear but perhaps is shorter than the MIR-S
case. Furthermore, the duration and strength of this eﬀect can be dependent on
the source brightness, but again the data sample was not enough to determine thedependency.
At this moment, a technique to fully recover this eﬀect has not been established.
Instead, we oﬀer a scheme to mask the aﬀected pixels using the mask informationof the bright source. We have confirmed that this scheme works at least for several
cases.

4.11

Astrometry

A corrected and final astrometry can be achieved at the end of the pipeline by cross-correlatingwith the 2MASS or WISE catalogue. This option is turned oﬀ by default. This is because
the software to retrieve the catalog may be platform-dependent. To enable this option, “curl”
has to be installed in the system. The instructions for it are beyond this manual. Ask yourcomputer administrator for the installation.
The current pipeline has a capability to first include the pointing information from the attitude and orbital control system (AOCS) directly in the WCS format. If matching with the catalog is successful, then the pointing information will be replaced by the matching data. The parameter “WCSROOT” in the FITS header indicates which information (AOCS/2MASS/WISE)
is used to determine the coordinates. The parameters “WCSNSTAR” and “WCSERROR” indicate the number of stars used for matching and the error in the coordinate fitting.

4.12

Arrays anomalies

4.12.1

NIR array

NIR anomalies (Muxbleed, Muxstripes, Column pulldown, Banding) are shown in Figures
4.12.17 and 4.12.18. Most of them also aﬀects the Spitzer IRAC instrument. When thetelescope passed through the auroral area, i.e. around the North and South poles,
trapped positrons and electrons hit the detectors. This temporary increases thenumber of hot pixels and its eﬀect is most notable in the NIR.
A robust way to calibrate all of these anomalies is not yet established,

4.12.2

MIR arrays

There is a problem in the short-exposure frame data taken with IRC00, IRC04 and IRC05.
The phenomenon is only seen in the short frames immediately following the frames without any
operations (such as filter wheel operation and dithering). Therefore the very first short frame inall modes and the short frame after the image frame in IRC04 should be fine since they follow
the filter operation. These short exposure frames can be used for checking the saturation, butshould not be used for scientific purpose.

Version 2.2 (July 6, 2016)

47

Figure 4.12.18: NIR array anomalies:
Muxbleed, Muxstripes and column pulldown
Figure 4.12.17: Banding in NIR array

4.13

GhostsGhosts appear in all three channels. NIR and MIR-S ghosts originate from thebeam splitter, while those in the MIR-L arise from the lenses.

4.13.1

Arcmin-scale ghosts

For MIR-S and -L ghosts, Arimatsu et al. (2011) examined their locations andbrightness relative to the parent source in detail. For MIR-S, point-like ghosts
appear at interval of ∼ 24 pixels (∼ 10 ) in the scan (or Y-axis) direction from a realsource. This interval may also be dependent on the source position. For MIR-L,
at least three (one compact and two extended) ghosts are known. The extended
ghosts are thought to be the cause of the artificial pattern seen in the MIR-L flat(§4.2.1). Meanwhile, Murata et al. (2013) identified three diﬀerent ghosts for NIR.
The intensity of the ghosts is estimated to be a few % of the parent source for
NIR, . 4% for S11 and . 1% for the other MIR-S filters, and ∼ 10% for MIR-L.
Their relative brightness may also depend on the source color.

4.13.2Degree-scale ghosts

An arc-like pattern is found when a bright source is at ∼ 1.5◦ away from the FoV. A
similar pattern is also recognized in the all-sky survey data. Although the positionand shape have not been characterized yet, there is an indication that shapes in
NIR and MIR-S diﬀer. An example of this arc-like ghosts in an N3 frame is shownin Figure 4.13.19.

48

-25

IRC Data User Manual

-15

-5.1

5

15

25

35

45

55

65

75

Figure 4.13.19: Arc-like artifacts seen in an N3 frame (left) and a causing bright source fromthe DSS IR image (right). The magenta box indicates the N3 FoV and the dashed green circle
is centered on the bright source (* psi Peg, Kmag = −0.06 in 2MASS PSC) with radius of 1.2◦ .

4.14

The earthshine light (EL)The background level changes during some pointed observations. As it is due to the
Earth shine reflection, it depends on the angle between satellite and Earth and theepoch of the observation. The eﬀect from the Earthshine Light (EL) is the worst
around the north ecliptic pole during June, July & August. The background levelis diﬀerent at the beginning and at the end of the observation (see Figure 4.14.20),
at diﬀerent pointings (see Figure 4.14.21) and in diﬀerent seasons (strongest in
solstices).

Figure 4.14.20: Change in the background level in a pointed observation.

Figure 4.14.21: Variation of background levels
from May to October 2006.

Version 2.2 (July 6, 2016)

49

Figure 4.14.22: EL templates for L15 (left) and L24 (right) created from images taken in
PID=1402624.1 (obsdate: 2007-06-13) and 1800706.1 (obsdate: 2007-06-15). AOTPARAM=a;N
0 the target
70
140 not in210
280 field) 350
560
630
700
(i.e.
sourcethe MIR-L
for both 420
pointings.490
A template of EL for a pointed observation can be made by combining images
from neighbor pointed observations in which observing dates and target positions
are close to those of interest (e.g., Egusa et al., 2013; Murata et al., 2013). Example
templates for L15 and L24 are shown in Figure 4.14.22.

4.15

Relative shift values

Shift in x- and y-axis direction and rotation angle relative to the first frame arecalculated by bluebox.calcshift (§5.11) for each filter and each pointed observation.
For observations with dithering (i.e. AOT = IRC02 or IRC03), mean, median, andstandard deviation of shift values are calculated for each exposure cycle (or ndither)and no significant diﬀerence has been found between the AOTs. For observations
with AOT of IRC00 or IRC05, these values are calculated from all the frames sinceno dithering was performed. Histograms of shift in x- and y-axis direction in thecase of MIR-S frames are presented in Figures 4.15.23 (for IRC02 and IRC03) and4.15.24 (for IRC00 and IRC05). Since these values are calculated for double-sizedimages, 2.0 pixels correspond to the original 1.0 pixel. Distribution of rotation angle
is investigated without taking account into the exposure cycle, since a rotation offield of view was not performed explicitly for each pointed observation. Histogramsof rotation angle are presented in Figure 4.15.25. A gaussian profile is fitted to eachhistogram.
We find that the deviation from the gaussian profile is larger for the shift in
x-direction. In other words, the histograms show wings in the left panels of Figures
4.15.23 and 4.15.24. A miss-matching of sources in the shift calculation is one
cause, but it does not explain the diﬀerence between x- and y-directions. Anotherpossibility is slewing or drifting of the telescope. The telescope FoV is controlled

50

IRC Data User Manual

IRC02/03

IRC02/03

1000

1000

100

100

10

10

1

1

1000

1000

100

100

10

10

1

1

1000

1000

100

100

10

10

1

1

1000

1000

100

100

10

10

1

1
−10

0

10

x [pixel]

20

30

−30

−20

−10

0

10

y [pixel]

Figure 4.15.23: Histogram of shift in x- (left) and y-axis (right) for AOT of IRC02 and IRC03.
ndither = 1 to 4 from top to bottom. Note that pixel values are for double-sized images. Black
curves are fitted gaussian profiles to the histogram.

Version 2.2 (July 6, 2016)51

IRC00/05

IRC00/05

10000

10000

1000

1000

100

100

10

10

1
−20

1
−10

0
x [pixel]

10

20

−20

−10

0
y [pixel]

1020

Figure 4.15.24: Same as Figure 4.15.23 but for AOT of IRC00 and IRC05.

IRC02/03

IRC00/05

10000

10000

1000

1000

100

100

10

10

1

1

−1.0

−0.5

0.0
angle [degree]

0.5

1.0

−1.0

−0.5

0.0
angle [degree]

0.5

1.0

Figure 4.15.25: Histogram of rotation angle [degree] for AOT of IRC02 and IRC03 (left) and of
IRC00 and IRC05 (right). Black curves are fitted gaussian profiles to the histogram.

52-1e+02

IRC Data User Manual

-80

-60

-40

-20

0.098

20

40

60

80

1e+02

Figure 4.15.26: N3 frames after flat calibration from ObsID=1320235 001 (left) and 003 (right).
The field of views coincide but the right frame suﬀers from drifting.
by the two optical star trackers and the relative positions of their FoVs should be
fixed during observations. However, due to a setting of heaters of the star trackers,
they were not completely fixed and thus the telescope FoV sometimes drifted awayfrom where it should be. Not only the shift values but also the PSFs, especially in
NIR long-exposure frames, are aﬀected by this drifting. The x-direction of MIR-S
corresponds to the y-direction of NIR. In the worst cases, NIR PSFs became very
elongated as shown in Figure 4.15.26.

4.16

Diﬀerence between MIR-S and -L shift values

Since MIR-S and -L frames were obtained simultaneously, their shift values should in principle
be consistent. In Figure 4.16.27, the diﬀerence of shift values for MIR-S and -L frames (RSVL−S )is presented for each AOT. These values are from the data sets released on 31 March 2015, which
are produced by the toolkit ver.150331. Pixel numbers are after sub-pixel sampling (i.e. twice
the original pixel numbers).
From these histograms, it is clear that large diﬀerence (∼ 10 pixels) appears in IRC02 andIRC03 cases, i.e. observations with dithering. The absence of large diﬀerence for IRC00 and
IRC05 is at least partly due to the limit values (blue dashed lines in Figure 4.15.24). The large
diﬀerence is likely due to incorrect calculations of shift values either or both of MIR-S and -L
frames. However, it is hard to identify which calculation is incorrect. Thus a warning ‘Wusv’ forVersion 2.2 (July 6, 2016)

53

Figure 4.16.27: The diﬀerence of the shift values between simultaneously observed frames of
MIR-S and MIR-L.

MIR stacked images with ‘uncertain shift values’ is introduced. This warning is applied when
any one of frames has the diﬀerence that exceeds half of the geometrically averaged FWHM of
the PSFs (500 .8, 600 .2, and 600 .9 for L15, L18W, and L24, respectively).
In the data sets released on 30 March 2015 (produced by the toolkit ver. 150331), thiswarning is applied to 8 %, 3 %, and 30 % of L15, L18W, and L24 stacked images, respectively.
The large diﬀerence in shift values and thus this warning percentage may be improved by afuture version of the toolkit.

54

IRC Data User Manual

4.17

General concerns on slit-less spectroscopy data

This section is dealing mainly with problems related to the slit-less spectroscopy data.
• Wavelength reference point: In the slit-less spectroscopy mode, the wavelength reference
point depends on the location of objects within the FOV. Therefore, the determinationof the source positions on the reference image is very important. Errors in the source
positions leads to errors in the assigned wavelengths and, hence the flux calibration.
• Contamination by nearby sources: Spectra of more than two objects aligned along with
the Y axis could overlap on the same pixels with diﬀerent wavelengths. It is impossible
to separate the spectral overlap on the observed image, without knowing the spectrum ofeach object.
• Contamination by zero-th/2nd order light: For the grisms, images of the zero-th and the
2nd order light can be seen as well as the 1st order image (our prime target for data
reduction), although the eﬃciency for the zero-th and the 2nd order light is very low. All
these images contaminate other spectra aligned along with the columns of pixels where
the objects exit. These contaminations can be ignored in most cases, and cautions areneeded actually only around very bright sources. For the NG spectroscopy with point
source aperture (Np), there is little chance for this kind of contamination to occur since
the aperture size is much smaller than the size of the dispersed spectroscopy image along
the Y or the dispersion direction.
• Spectral smearing for extended sources: In the slit-less spectroscopy mode, the spectral
resolution is determined by the size of the sources (or the PSF structure plus satellite
attitude drift). Thus the spectral resolution is lower for extended objects. If an extended
object shows resolved structures, the interpretation of the 2D spectra becomes very diﬃcult
because of the convolution of the spectrum over the object spatial structure.
• Background spectral features: Although the background sky is essentially ”flat” in theimaging mode, it is not true for spectroscopy images.
Note that these features would not be observed with the point source aperture (Np) andother narrow slits, since the aperture size is much smaller than the size of the dispersed
spectroscopy image along the Y or the dispersion direction.
• Faint background areas near the Y=0 or Y=Ymax edge of FOV: For the slit area, thebackground is dominated by the zodiacal light. The spectral-response curve shows a simple
pattern with the decreasing sensitivity at the highest and lowest wavelength ends of thedisperser’s spectral coverage. Thus one will see a background pattern which becomes
faint at the top and bottom of the image in units of ADU. For the slit-less area, both
the wavelength and the spatial axis Y go along with the same direction (Y), and thus
the observed background image is a spatially convolved background spectrum. Since thelength of the spectrum along Y (50-70 pix) is much smaller than the aperture size (256or 412 pix), the resultant background spectrum is almost constant across Y after being
convolved spatially by the large aperture. The regions around Y=0 and Y=Ymax are
exceptions, where the edge of the aperture prevents full convolution of the background
spectrum along the Y direction and, hence, the background signal becomes faint near
Y=0 and Y=Ymax is seen. Note that this kind of pattern at the very Y edge of the FOV
does occur only for the background light, but not for object spectra.

Version 2.2 (July 6, 2016)55• Jump of the background (ridge) near the center of FOV: Another background feature isa ridge seen near the Y center, stretching along the X axis, seen in grism spectroscopy
images. This is caused by the zero-th order light of the grisms. Since the zero-th order
light image forms at an oﬀset position from the reference image, only about a half of the
FOV suﬀers from its contamination. This jump of the background flux level (in ADU) is
about 2–3% of the total background for SG1, SG2 and LG2.
• Satellite attitude stability/instability: Position shifts among sub-frames are frequently
observed due to the satellite attitude drift in the pointing attitude control mode. The
drift is as large as several pixels in the worst cases. To correct the drift, one needs toregister images among spectroscopy sub-frames and between spectroscopy and reference
images. The second correction is very important to determine the wavelength reference
point. Note that it takes about 30 sec to switch the spectroscopy mode to/from the imaging
mode for the filter wheel rotation. Thus the time interval between the last spectroscopy
sub-frame and the first imaging sub-frame is longer by this period than the interval between
taking spectroscopy sub-frames. To measure the image drift among spectroscopy images,
we use cross-correlation image matching technique. To measure the image drift between
spectroscopy and reference images, we could use the same cross-correlation technique.
In this cross-correlation we use a template spectrum that was extracted from the datawith negligible drifts. Then by comparing the template with spectra extracted from thespectroscopy data in question, we estimate the relative drift.
Since all the channels operate simultaneously, any image drifts along the X and Y directions
found in NIR or MIR-S should be seen in MIR-L with the diﬀerent pixel scale.
For spectra of diﬀuse sources at the narrow slits (Nh, Ns, and Ls), we do not have to takeaccount of the satellite attitude stability, if the size of the drift is much smaller than thatof the objects.
• Ghosts in Np observations: Ghosts relating the Np slit have also been recognized. Leftpanel of Figure 4.17.28 shows an example of the imaging data. There are sources seen on
the slit mask region, which must be ghosts from the sources in the Np slit. Right panelof Fig 4.17.28 shows the corresponding spectral data, in which ghost spectra overlap withthe source spectrum.
A similar ghost is also reported for SG2, in which the eﬀect of the ghost should not besignificant, since the ghost spectrum appears at much shorter wavelengths (lower part ofthe image) and does not overlap the source spectrum. No definite origin for these ghosts
have been elucidated and thus no clear recipe has been prepared to correct for them.

56

IRC Data User Manual

Figure 4.17.28: Ghosts generated in Np observations. Left panel: Imaging data. Right panel:
spectroscopic dataChapter 5

Imaging toolkit cookbook
5.1

Introduction

The IRC imaging data reduction toolkit is developed to address and correct any IRC instrument
features, such as linearity, flat fielding, distortion etc., and converts the raw ADU signal tophysically meaningful units (i.e. flux). The WCS information can be added by matchingsources in 2MASS or WISE catalogs.
The toolkit (including the entire source code) will be released, and be progressively updated
reflecting the user’s feedback. The raw data, calibrated and stacked images, and intermediate files created by the toolkit will be archived. The user may customize thetoolkit at his/her own risk.
The goal for the toolkit is to achieve an absolute flux accuracy of better than 30%, 25% and
25% at the 5 sigma detection limit for NIR, MIR-S and MIR-L channels, respectively. However,these goals are at present the optimal values, and we do not guarantee the numbers.
In this chapter, §5.4 and 5.5 describe procedures to install and update the toolkit,§5.7–5.11 explain each of pipeline processes, and §5.14 lists limitations and caveatsof the toolkit.

5.2

General overview of the toolkit processing

The toolkit runs on IRAF and consists of three main steps, prepipeline, pipeline1, and pipeline2.
While prepipeline corresponds to Red Box, pipeline1 and 2 do not correspond to Green and Blue
Boxes each other.
• Pre-pipeline Processor (Red Box) : Produces Basic Data
– redbox.ircslice: header formatting, slice IRC 3D images into usual 2D ones
– redbox.mkirclog: making the observing log file “irclog”• Pipeline (Green Box) : Produces Basic Science Data
– greenbox.wraparound: wrap around correction– greenbox.ircnorm: normalize sampling and compression bit shift– greenbox.linearity: correct linearity of the detector response– greenbox.dark: subtract dark current
57

58

IRC Data User Manual– greenbox.scatt light: subtract the MIR-S scattered light pattern– greenbox.cosmic ray: remove cosmic rays
– greenbox.flat: flat pattern correction– greenbox.maskall: mask bad/dead/hot pixels, saturated pixels, and the slit area on
the detector– greenbox.aspect ratio: distortion correction (aspect ratio resampling)• Post-Pipeline Processor (Blue Box):– bluebox.coadd: to form a co-added image (called from pipeline2 processor by default)∗ source extract, source extract2: perform source extraction∗ calcshift: calculate shift & rotation between images∗ adjust sky: adjust sky level before stacking∗ irc stack: stack individual frames to form a co-added image– blubox.putwcs: update WCS information

The pipeline can be run automatically or interactively step by step.
Additional modules to help improving the resultant images by the above processes are stored in IRC TOOL and described in §5.13.

5.3

Expected Data Processing Rate (minimum expectation)• NIR = 412*512[pixels] * 16[bit/pixel] / 8[bit/byte] = 412 Kbyte/frame– 1 NIR fits = 412 Kbyte/frame * 2 frame/fits = 824 Kbyte/fits file
• MIR = 256*512[pixels] * 16[bit/pixel] / 8[bit/byte] = 256 Kbyte/frame– 1 MIR fits = 256 Kbyte/frame * 4 frame/fits = 1024 Kbyte/fits file
• AOT02: 6 exposure cycles/pointing * (1 NIR fits + 1 MIR fits)/exposure cycle ∼ 10.8
Mbyte/pointing• AOT03: 6 exposure cycles/pointing * (1 NIR fits + 1 MIR fits)/exposure cycle ∼ 10.8
Mbyte/pointing• AOT05: 9 exposure cycles/pointing * (1 NIR fits + 1 MIR fits)/exposure cycle ∼ 16.2
Mbyte/pointing
The toolkit requires 3 or 4 times of disk space compared to the raw data.

5.4

How to install the IRC imaging Toolkit

5.4.1

Requirements

The toolkit is developed in a Linux PC environment and has also been successfully run in the
Mac OSX Unix environment. The toolkit requires the following environment for its full function:• unix (Solaris, MacOS X, Linux, BSD)

Version 2.2 (July 6, 2016)59• IRAF 2.12.2 or later• gcc 3.2 or later• perl• curl (for WCS calculation on Solaris machines)

5.4.2

Install IRAF

• see http://iraf.noao.edu/ or http://iraf.net/

5.4.3

Download IRC imaging data reduction software package

The latest version of the toolkit with installation and operating instructions can be obtained
from the AKARI Observer’s web site (see section 1.3).

5.4.4

Unpack irc.tgz• mv ircYYMMDD.tgz /where/you/want/to/install• cd /where/you/want/to/install• tar xvzf ircYYMMDD.tgz

5.4.5

Make irc binaries• cd /where/you/want/to/install/irc/src• makeThis will create binary files in /where/you/want/to/install/irc/bin/

5.4.6

Run ”setpath.pl”• cd /where/you/want/to/install/irc/lib• perl setpath.pl
This will rewrite the ”setpath.dat”. Please check the following line in ”setpath.dat” is thefollowing format
set irchome = ”/where/you/want/to/install/irc/”
This line should indicate the location where you installed the irc package.

5.4.7

Perl path

Typing which perl in the unix environment indicates where the perl is installed in your system.
The toolkit assumes that the perl is installed in/usr/local/bin/perl
Therefore, those who have the perl binary elsewhere, should do as follows:• If you know the root password, please create a symbolic link in /usr/local/bin by typing:– cd /usr/local/bin

60

IRC Data User Manual– ln -s ‘which perl‘ perl
It will create a symbolic link perl in /usr/local/bin.
• If you don’t know the root password, please modify the first line of every perl script filein /where/you/want/to/install/irc/perl. For example, if you have perl in /usr/bin/perl,
please modify it as;– #!/usr/local/bin/perl → #!/usr/bin/perl
As long as you have perl in /usr/bin/perl, you can also achieve the same result by runninga script– cd /where/you/want/to/install/irc/perl– perlpath.shwhich will create a directory temp containing perl files whose first lines are modified asabove. Then you can overwrite these new perl files by typing;– mv ./temp/*.pl .
Those who do not have perl in /usr/bin/perl, please modify perlpath.sh and indicate thelocation of your perl.

5.4.8

Add IRC entry to IRAF

• If you use IRAF v2.15 or later and installed the IRC toolkit ver.20131202
or later under “iraf$extern” directory, the toolkit should be automaticallyrecognized by IRAF without following steps.
• If you know root password and you installed IRAF package into for example /iraf,– cd /iraf/iraf/unix/hlib/– edit the file extern.pkg
Please add the following 2 lines to A /iraf/iraf/unix/hlib/extern.pkg,
reset irc = /where/you/want/to/install/irc/
task $irc.pkg = irc$irc.cl
DO NOT FORGET THE ”$” BEFORE THE IRC.PKG!! DO NOT FORGET THE LASTSLASH!!
• If you don’t know root password then you should launch iraf from your home directory
everytime you want to use irc package– cd (change directory to your home directory)– mkiraf (only when using IRAF for the very first time)
This will create the ”login.cl” file in your home directory. Then edit ”login.cl” and add 2lines:
reset irc = /where/you/want/to/install/irc/
task $irc.pkg = irc$irc.cl
DO NOT FORGET THE ”$” BEFORE THE IRC.PKG!! DO NOT FORGET THE LASTSLASH!!
The toolkit is now installed and is ready to be run !!

Version 2.2 (July 6, 2016)

5.5

61

How to UPGRADE the version of IRC imaging toolkit

Upgrades to the IRC imaging toolkit is a progressive and ongoing process and new versions of
the toolkit will be available to users throughout the course of the mission. On receiving a newversion of toolkit package (e.g., ircYYMMDD.tgz), the following commands are required to be
input;• mv ircYYMMDD.tgz /where/you/installed/previous/version/• cd /where/you/installed/previous/version/• tar xvzf ircYYMMDD.tgz
These commands will OVERWRITE any old files/directories. Then, follow the original procedure described in §5.4.5 and 5.4.7. Finally, please type following commands when you use a newversion of the toolkit for the first time.
• launch IRAF
• load the ircpackage by typing “irc”• type “unlearn all”
• load the irc tool package by typing “irc tool”• type “unlearn coaddLusingS” (and other tasks if previously used)

5.6

Setting up your toolkit environment and running the pipeline

The steps to reduce the raw data are outlined below.

5.6.1

Creating the directory structure

The toolkit assumes the following directory structure (see Figure 5.6.1);∼/anyname +——–rawdata (must be this name)——–anyname (your working directory)e.g.
∼/data/rawdata/∼/data/working/
The toolkit should be run in the working directory. Thus you may create sets of these
directory structures for diﬀerent sets of IRC data.

5.6.2

Launch IRAF

Launch IRAF in your home directory and check that you have an entry for the irc package inthe list of IRAF packages (see Figure 5.6.2).
Then you can move to your working directory before starting to run the diﬀerent tools by
typing:• cd to your working directory
where to your working directory should follow the rules explained in Section 5.6.1.

62

IRC Data User Manual

Figure 5.6.1: Example directory structure for IRC toolkit.

Figure 5.6.2: Start up screen for IRAF showing the IRC package visible in the list of IRAF
packages.

Version 2.2 (July 6, 2016)

5.6.3

63

Load the IRC package

The irc package can be loaded by typing “irc”. You should then see the IRC pipeline splash
screen (welcome message) and a list of the available IRC packages (see Figure 5.6.3). The screen
shows the version of toolkit, super-flat, super-dark, linearity, and distortion. Please let us know
these numbers if you send any email to the help desk iris help@ir.isas.jaxa.jp to inquire any
trouble with the toolkit.

Figure 5.6.3: Start up screen for the IRC package showing the available modules and tools. The
start up splash screen gives the current version of the toolkit, and current versions of flat, dark,
linearity, distortion files etc.

64

IRC Data User Manual

5.7

The pre-pipeline processor (Red-Box)

Note that prepipeline processor is a one-time-only process. If the script finds the file “irclog”(output of prepipeline), it recognizes that prepipeline has already been run andstops. In addition, if there are no valid rawdata, prepipeline stops as well.

5.7.1

Configuration

Before running prepipeline, you can configure the parameters for prepipeline by typing “eparprepipeline”. This displays the parameter edit screen as shown in Figure 5.7.4.

Figure 5.7.4: Parameter edit screen for prepipeline showing the available parameters.
The parameters of prepipeline are listed below.
• ircconst (string, default=“ircconstants.database”):
NEVER CHANGE THIS. This is the irc constant file name.
• verbose (boolean, default=no):
Activate if you want to print vrebose progress messages.
• pllog (string, default=“ircpipeline.log”):
A log file for pipeline processes. Recommended to leave as default.

5.7.2

Running the prepipeline processor

The prepipeline processor consists of the following two functions.
• redbox.ircslice: slice IRC 3D images into usual 2D ones
• redbox.mkirclog: make the observing log file “irclog”

Version 2.2 (July 6, 2016)65

The prepipeline processor is run by entering “prepipeline” at the IRAF command prompt.
Alternatively, the individual Red-Box modules can be run by entering “redbox” at the IRAF
command prompt. The present configuration of the pre-pipeline modules is shown in Figure
5.7.5:

Figure 5.7.5: Present configuration of the Red-Box prepipeline modules.

1. redbox.ircslice
The number of FITS files produced for any given single pointed observation depends on
the AOT. Each AOT comprises a combination of Exposure Cycles (EC), Filter Wheelchanges (W), and Dither Maneuvers (M) (see Figure 2.2.6). The IRC FITS data are not ausual 2D one. A raw data FITS file is created for each Exposure Cycle during a pointing
for the NIR and combined MIR-S/MIR-L channels (i.e. 1 NIR FITS file and 1 MIR FITS
file = 2 FITS files per Exposure Cycle). The filename format is given as F***** N.fits orF***** M.fits, where ***** is a distinct incremental reference number. A NIR raw FITS
data file is a data cube containing 2 frames within it, corresponding to one short and one
long exposure. Each MIR raw FITS file contains 4 frames within it (one short and threelong exposures) for both the MIR-S and MIR-L channels respectively making a total of 8frames per MIR FITS file per Exposure Cycle (see Figure 5.7.6).
In addition to the Exposure Cycles, dark frames were taken at the beginning and theend of the operation for both the NIR and MIR channels (i.e. extra 2 raw FITS files forboth NIR and MIR). Therefore, as shown in Figure 2.2.6 for AOT IRC02, the maximum
number of raw FITS data files is (1 NIR + 1 MIR FITS)/EC × 7(EC) + 4(Dark) = 18
for one pointed observation. Meanwhile, for AOT IRC03, the raw data files comprise of (1NIR + 1 MIR FITS)/EC × 8(EC) + 4(Dark) = 20 FITS files for one pointed observation.
In addition to the raw FITS files, a text file is also included giving details of the original
target list for the observation.
The “redbox.ircslice” module slices each raw FITS file into the individual frames (separates all individual IRC frames for one Exposure Cycle). Thus for every NIR raw FITS
file (including the Dark), redbox.ircslice creates 2 FITS files (corresponding to the shortand long exposure). For every MIR raw FITS file (including the Dark), redbox.ircslice
creates 8 FITS files (corresponding to single short and three long exposures for both the
MIR-S and MIR-L channels). Therefore after running “redbox.ircslice” on a single pointed
observation with AOT IRC03, you expect to see as many as 100 individual FITS files. The
filename format takes the original format with an extension defining the channel (N,S,L)and frame number (001-004). For example, an original raw FITS file for the MIR channel F23340 M.fits is sliced into 8 separate FITS files F23340 L001.fits, F23340 L002.fits,
F23340 L003.fits, F23340 L004.fits, F23340 S001.fits, F23340 S002.fits, F23340 S003.fits,
F23340 S004.fits.

66

IRC Data User Manual
Figure 5.7.7 shows the images of IRC raw data for the NIR and MIR bands. The orientationof the images are such that the NIR is rotated by 90 degrees relative to MIR-S/L. The
dark area in each image is masked for the slit spectroscopic observations and thus should
not receive any light during imaging observations, so that we are able to monitor darkcurrent level variation during a pointed observation. Hereafter, we refer to this dark area
as the “slit area” and the other as the “imaging area”.

Figure 5.7.6: IRC raw FITS file data structure for NIR and MIR images.

Figure 5.7.7: Image of IRC raw data NIR and MIR bands. The NIR raw FITS file (left) is 2
frames deep (corresponding to 1 short and 1 long exposure). The MIR raw FITS file (right) is 2
frames wide and 4 frames deep (corresponding to 1 short and 3 long exposures each for MIR-S
and MIR-L).
2. redbox.mkirclog
The “redbox.mkirclog” creates the observing log file “irclog”. This is a text file with
contents shown in Table 5.7.1. The contents of the irclog file summarize the nature of theprocessed files in the working directory. The table entries correspond to;Version 2.2 (July 6, 2016)

67• FRAME: The filename corresponding to the “sliced frame” (e.g. following the format
such as F23340 L001.fits as described above) without “.fits” extension• OBJECT: Target name taken from the original target list (space is replaced by )• NAXIS: Number of pixels in the cross-scan direction (256 for MIR and 412 for NIR)
• FILTER: Filter name (i.e. N2, N3, N4, S7, ..., L24 or DARK)• RA-SET: Right ascension coordinates• DEC-SET: Declination coordinates• AOT: AOT type (e.g. IRC02, IRC03 etc.)• EXPID: Sequential frame number during an exposure cycle (e.g. 1 or 2 for NIR and1, 2, 3 or 4 for MIR-S and MIR-L images)• IDNUM: Pointing ID• SUBID: Sub-Pointing ID (greater than 1 for multi-pointing observations)

Table 5.7.1: Sample of the “irclog” file
FRAME
#F004160544 L001
#F004160544 L002
#F004160544 L003
#F004160544 L004
#F004160544 S001
#F004160544 S002
#F004160544 S003
#F004160544 S004
#F004160545 N001
#F004160545 N002
F004160546 L001
F004160546 L002
F004160546 L003
F004160546 L004
F004160546 S001
F004160546 S002
F004160546 S003
F004160546 S004
#F004160547 N001
#F004160547 N002...................
...................
F004160558 L001
F004160558 L002
F004160558 L003
F004160558 L004
F004160558 S001
F004160558 S002
F004160558 S003
F004160558 S004
F004160559 N001
F004160559 N002
#F004160560 L001
#F004160560 L002
#F004160560 L003
#F004160560 L004
#F004160560 S001
#F004160560 S002
#F004160560 S003
#F004160560 S004
#F004160561 N001
#F004160561 N002
#F004160562 L001
#F004160562 L002
#F004160562 L003
#F004160562 L004
#F004160562 S001
#F004160562 S002
#F004160562 S003
#F004160562 S004
#F004160563 N001
#F004160563 N002

OBJECT”LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218”................
................
”LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218””LMC-FIELD218”

NAXIS1
256
256
256
256
256
256
256
256
412
412
256
256
256
256
256
256
256
256
412
412
.....
.....
256
256
256
256
256
256
256
256
412
412
256
256
256
256
256
256
256
256
412
412
256
256
256
256
256
256
256
256
412
412

FILTER
DARK
DARK
DARK
DARK
DARK
DARK
DARK
DARK
DARK
DARK
L15
L15
L15
L15
S7
S7
S7
S7
NP
NP
.....
.....
L24
L24
L24
L24
S11
S11
S11
S11
N3
N3
UNDEF
UNDEF
UNDEF
UNDEF
UNDEF
UNDEF
UNDEF
UNDEF
UNDEF
UNDEF
DARK
DARK
DARK
DARK
DARK
DARK
DARK
DARK
DARK
DARK

RA-SET80.54688
80.54688
80.54688
80.54688
80.54688
80.54688
80.54688
80.54688
80.54688
80.54688
80.54688
80.54688
80.54688
80.54688
80.54688
80.54688
80.54688
80.54688
80.54688
80.54688..........
..........
80.53135
80.53135
80.53135
80.53135
80.53135
80.53135
80.53135
80.53135
80.53135
80.53135
80.53135
80.53135
80.53135
80.53135
80.53135
80.53135
80.53135
80.53135
80.53135
80.53135
359.7475
359.7475
359.7475
359.7475
359.7475
359.7475
359.7475
359.7475
359.7475
359.7475

DEC-SET-68.17107-68.17107-68.17107-68.17107-68.17107-68.17107-68.17107-68.17107-68.17107-68.17107-68.17107-68.17107-68.17107-68.17107-68.17107-68.17107-68.17107-68.17107-68.17107-68.17107...........
...........
-68.17282-68.17282-68.17282-68.17282-68.17282-68.17282-68.17282-68.17282-68.17282-68.17282-68.17282-68.17282-68.17282-68.17282-68.17282-68.17282-68.17282-68.17282-68.17282-68.17282-59.3225-59.3225-59.3225-59.3225-59.3225-59.3225-59.3225-59.3225-59.3225-59.3225

AOT
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
.......
.......
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02
IRC02

EXPID
1
2
3
4
1
2
3
4
1
2
1
2
3
4
1
2
3
4
1
2
...
...
1
2
3
4
1
2
3
4
1
2
1
2
3
4
1
2
3
4
1
2
1
2
3
4
1
2
3
4
1
2

IDNUM
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218.........
.........
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218
2210218

SUBID
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
..
..
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1

68

IRC Data User Manual

5.8

Before running the pipeline processor

After running “prepipeline”, the following three text files should be created in theworking directory.
• irclog
The irclog file is used to select the data to be reduced by the following pipelines. If you
find the pipeline crashes due to bad frames, removing (or commenting out by #) suchframes may solve the problem.
Note that dark frames and any grism/prism images are automatically commented out by
the prepipeline. The data frame taken during the maneuver should also be automaticallydiscarded.
• darklist.before
In a pointed observation, dark frames are taken at the beginning and the end of theoperation for both the NIR and MIR channels. This file “darklist.before” contains thename of dark frames taken at the beginning of the operation. Dark frames taken at theend of the operation may be aﬀected by latent, so they are excluded from the list. Those
who want to use these “pre-dark” images should set darktype="se" (see §5.9.2 for detail),then the pipeline processor will read the darklist.before file and will make a dark image
by averaging over 3 images of MIR-S and MIR-L long exposure dark frames. However,super-dark will be used for all short frames even if darktype="se", since only one pre-darkframe is available for short exposure.
• ircpipeline.log
A log file for pipeline processing. By default, logs from pipeline1 and pipeline2
will be appended to this file as well.

Version 2.2 (July 6, 2016)

5.9

The pipeline1 processor (Green-Box)

5.9.1

Parameter configuration

69

Before running the pipeline1, you can configure the parameters for the pipeline1 by typing “eparpipeline1”.

Figure 5.9.8: Screen for parameter configuration for pipeline1.
The parameters of pipeline1 are listed below. For details, see §5.9.2.
• ircconst (string, default=“constants.database”):
NEVER CHANGE THIS. This is the irc constant file name.
• obslog (string, default=“irclog”):
NEVER CHANGE THIS. Output filename of redbox.mkirclog.
• cosmicray (boolean, yes or no, default=no):Detect and replace cosmic rays in MIR images. Cosmic ray events in each image aredetected and replaced by the average of the four nearest neighbors. Type “help cosmicrays”
inside IRAF’s shell for details. The IRAF task “cosmicrays” may not work properlywith IRAF v2.15 or v2.16. This problem can be solved by updating “x crutil.e”
in “noao$bin.*”. See README file of toolkit ver.20131202 for more detailed
instruction. Or, updating IRAF to v2.16.1 should also fix the problem.
• interactive (boolean, yes or no, default=no):
With this option selected, the pipeline can be run step by step, e.g. asGreenbox.anomalous pix
Greenbox.dark, etc
or alternatively by typing Greenbox then running from inside the Green-Box asanomalous pix
dark, etc.

70

IRC Data User Manual• deltemp (boolean, yes or no, default=yes):
Set to no if you do not want to delete any temporary created file.
• verbose (boolean, yes or no, default=no):
Activate if you want to print verbose progress messages• blankvalue (real, ≤ −1000., default=−9999.9):
Specify a value for blank/masked pixels.
• darktype (string,“ne”/“su”/“se”/“us”, default=“ne”):
Select dark type for reduction. Four options are available; “ne” for neighbor
dark, “su” for super dark; “se” for self dark; “us” for user dark.
• darkfile (string, default=“usedark.dat”):
Specify a file containing list of dark files, if you want to use your own dark with darktype=“us” option.
• smdark (boolean, yes/no, default=yes):
Set yes if you want to apply the “self-made” dark to NIR long exposure frames.
• delsmd (boolean, yes/no, default=yes):
Set yes if you want to delete processed self-made dark frames.
• subsky (boolean, yes/no, default=yes):
Set yes if you want to subtract a constant as a sky background from each frame.
• subLscat (boolean, yes/no, default=yes):
Set yes if you want to subtract a scattered light pattern seen in MIR-L frames.
• pllog (string, default=“ircpipeline.log”):
A log file for pipeline processes. Recommended to leave as default.

5.9.2

Execution

Type pipeline1 at the IRAF command prompt to start pipeline1 processing.
Alternatively, the individual modules can be run interactively by 3 possible methods;• By setting the interac parameter in the parameter list
• By running the pipeline1 with the command pipeline1 interactive=yes• By running the pipeline1 with the command pipeline1 interactive+
When running the pipeline1 interactively, individual steps may be entered asGreenbox.wraparound
Greenbox.dark, etc.
or alternatively by typing Greenbox then running from inside the Green-Box as
wraparounddark, etc.
When running interactively, there are options to perform/skip/stop for each process. The present
configuration of the pipeline1 modules are shown in Figure 5.9.9.
Each module is described below in the order of processing in the pipeline1 script. After eachstep of processes, a prefix is added to the original filename. The prefixes and corresponding
modules are listed in Table 5.9.2.

Version 2.2 (July 6, 2016)

71

Figure 5.9.9: Present configuration of the Green Box. The white boxes connectedwith dotted lines indicate output files created by each module. Note that the last
two modules (i.e., maskall and aspect ratio) are called by pipeline2, while the others
are called by pipeline1.

Table 5.9.2: Prefixes added during Pipeline1 processing
prefix
w
n
l
D
c
C
f

modulegreenbox.wraparoundgreenbox.ircnorm
greenbox.linearity
greenbox.dark
greenbox.scat lightgreenbox.cosmic ray
greenbox.flat

actionWraparound Correction
Normalization
Linearity Correction
Dark Subtraction
Subtract Scattered Light Pattern
Detect and Replace Cosmic Rays
Flat Fielding

72

IRC Data User Manual
1. Make Lists: (greenbox.makelist)
Relevant options: none.
This module creates a list for each band and each exposure. For example, the list for L15
long exposure frames is “L15l.list”.
2. Wraparound Correction: (greenbox.wraparound)
Relevant options: none. This should be applied to all the frames.
Due to data volume constraints the IRC compresses the data when it is transmitted to
the ground by discarding the data sign bit. This will cause obvious ambiguities in thecorresponding flux values. Since the IRC data structure uses the 2’s complement method
to represent negative numbers, discarding the sign bit (most significant bit) will result
in apparently extremely large positive numbers for negative values. Thus pixels suﬀeringfrom this eﬀect may appear as hot or dead in the image plane. However, these values aredesigned to be smaller than the saturation limit of the detectors, such that values higher
than the maximum saturation levels must in fact be (wrapped) negative numbers. This
correction is made by
Acorrected = Auncorrected + 216(5.9.1)for any pixels that have a pixel value smaller than −11953.
After the wraparound processing is completed, a prefix w is added to the processed filename
such that F23342 S004.fits becomes wF23342 S004.fits
3. Normalization: (greenbox.ircnorm)
Relevant options: none. This should be applied to all the frames.
To reduce the readout noise of the detectors the IRC data are read with the Fowler sampling
method; non-destructively reading and summing the array multiple times (determined by
the Fowler number) then dividing this resulting sum by the Fowler number. However,when the data are transmitted to the ground, for the purpose of data compression, theleast significant bit is dropped. This normalization process accounts for this bit loss bycorrecting the data value by
Acorrected =Auncorrected × 2bitshift,
Fowler number(5.9.2)where “bitshift” represents the number of bit shifts employed.
The normalization factor (i.e. 2bitshift /Fowler number) is• 4.0 for NIR short exposure frames with IRC05,• 0.25 for NIR long exposure frames and MIR short exposure frames,• 1.0 for the remaining (i.e. NIR short with AOT other than IRC05 and MIR long
frames).
After the normalization process a prefix n is added such that wF23342 S004.fits becomes
nwF23342 S004.fits
4. Linearity Correction: (greenbox.linearity)
Relevant options: none. This should be applied to all the frames.
The linearity correction is made as explained in §4.3. After the linearity correction, aprefix l is added such that nwF23342 S004.fits becomes lnwF23342 S004.fits.

Version 2.2 (July 6, 2016)73

5. Dark Subtraction: (greenbox.dark)
Relevant options: darktype, darkfile, smdark, delsmd
Choice of dark types are:• neighbor dark: Neighbor dark frames for MIR-S and -L are stored in dark/
directory in the distributed data package for each pointed observation. As
described in §4.1.1, neighbor dark frames for each pointed observation are
created by combining pre-dark frames of neighboring observations. Thisis the default for pipeline processing.
• super dark: Super dark frames are stored in /where/you/installed/irc/lib/dark.
There are at least two known flaws in the current super dark.
(a) It does not correct for the increased dark signal due to the IRC all-sky survey
observations in MIR-S/L. This eﬀect corresponds to the belt-like pattern in thehorizontal direction.
(b) It does not accommodate the increasing number of hot pixels.
• self dark:
In a pointed observation, dark frames are taken at the beginning (pre-dark) and theend of the operation for both the NIR and MIR channels. Those who want to use thesepre-dark images in preference to the super-dark images should set darktype="se".
Then the pipeline processor will make dark images by averaging over the 3 imagesof MIR-S and MIR-L long exposure dark frames. Hereafter, we refer to these dark
images as the selfdark image. However, the super-dark is still used for all short
exposure frames and also the NIR long exposure frames even if darktype="se".
• user dark:
If you have a dark frame more appropriate to your data set, you can use it by setting darktype="us". In that case, dark frames should be in the working directoryand listed in a file specified by the option darkfile in the same format as the “ircconst.database” file.
• smdark:
For NIR long exposures, the dark level variation due to the passage of SAA
region is well modeled by Tsumura and Wada (2011). Set smdark=yes toapply this model. This option supersedes the above selection of darktype,i.e. when smdark=yes, the model dark is always used for NIR long frames.
If you want to inspect each created dark frame for each object frame, setdelsmd=no to keep all the temporary files.
Since wraparound, normalization, and linearity corrections were already performed toobject frames, the same processes are applied to dark frames before subtraction.
Due to various reasons (the 1st frame eﬀect, and so on), the dark level may vary during apointed observation. We monitor the slit-area as a reference of the dark level, and adjust
dark levels by adding/subtracting a constant to dark frames. The adjusted dark frame isthen subtracted from each object frame to account for the changes in the dark level.
After the dark subtraction, a prefix D will be added such that lnwF23342 S004.fits
becomes DlnwF23342 S004.fits. The FITS parameter “DRKTYPE” indicates
which of above dark frames is used for dark subtraction and ”DRKSHIFT”
indicates the amount of adjustment in dark level described above.

74

IRC Data User Manual
6. Scattered Light Pattern Subtraction: (greenbox.scatt light)
Relevant options: none. This should be applied to all the frames.
Due to the scattering of light from the edges of the detectors, lattice-shaped sky patterns
are present in the imaging area. The patterns are especially prominent in the MIRS images, and the intensity of the pattern is proportional to the sky background level.
Therefore, the scattered light pattern has been modeled and template images for the three
MIR-S filters are stored in /where/you/installed/irc/lib/scatt. Figure 4.2.4 in §4.2 shows
the modeled scattered light template images. These template images are multiplied by themode of the sky background level, which is then subtracted from each image to eliminate
the pattern.
After the scatt light process a prefix c will be added such that DlnwF23342 S004.fits
becomes cDlnwF23342 S004.fits.
7. Cosmic Ray Rejection: (greenbox.cosmic ray)
Relevant options: cosmicray.
This module is to detect and replace cosmic rays in the MIR images, by using the IRAF task
cosmicrays, which may not work properly with IRAF v2.15 and 2.16. Updating“x crutil.e” in “noao$bin.*” may solve the problem. See README file of the
IRC toolkit ver.20131202 for more detailed instruction.
After the comic ray rejection, a prefix C will be added such that cDlnwF23342 S004.fits
becomes CcDlnwF23342 S004.fits.
8. Flat Fielding: (greenbox.flat)
Relevant options: subsky, subLscat.
The flat fielding is made using the imaging super flats, described in §4.2. A sensitivity
variation within the detector array (i.e. true flat) and scatter pattern due to internalreflection in MIR-L are well separated by Arimatsu et al. (2011). If subLscat=yes, thisartificial pattern is removed before flat fielding for MIR-L frames. Since this procedureincludes the background sky subtraction, the sky level after this process should be around
0. If you do not prefer having negative values in the data sets, set subsky=no. Then an
average sky level is calculated and added back to the processed frames. On the other hand,
if you want to subtract sky backgrounds from NIR and MIR-S frames, set subsky=yes.
In any case, the variation of sky levels is calculated during this process. If this variation islarge, an additional procedure (most probably the earth shine light correction) might beneeded. In such a case, a message is shown in the terminal and frames before flat fielding
are not deleted even if deltemp=yes.
Note that there was a noticeable pattern in the lower right corner of MIR-S flat images.
A similar pattern also appeared in NIR flat images. However, these patterns suddenly
disappeared on January 7th, 2007. In addition, the shape of the pattern has beenfound to change depending on the date (Murata et al., 2013). Thus, thepipeline now incorporates two sets of flat frames for each NIR filter and fourfor MIR-S (Figures 4.2.2 and 4.2.3).
After the flat fielding process, a prefix f will be added such that CcDlnwF23342 S004.fits
becomes fCcDlnwF23342 S004.fits.

At the end of pipeline1, fully calibrated frame files should have a prefix fCcDlnw to theoriginal file name.

Version 2.2 (July 6, 2016)

5.10

The pipeline2 processor (Green-Box & Blue-Box)

5.10.1

Parameter configuration

75

Before running the pipeline2, you can configure the parameters for the pipeline2 by typing “eparpipeline2”.

Figure 5.10.10: Screen for parameter configuration for pipeline2.
The parameters of pipeline2 are listed below. For more details, see §5.10.2.
• ircconst (string, default=“constants.database”):
NEVER CHANGE THIS. This is the irc constant file name.
• com mod (string, average/median, default=“median”):
Method of combining of frame images.
• com area (int, 1 or 2, default=2):
Coadded image area of stacked frames used for extraction (see Figure 5.10.11).
– THIS PARAMETER IS NOT SUPPORTED YET, AND YOU WILL

76

IRC Data User Manual
GET THE WHOLE AREA IMAGE EVEN IF YOU CHOOSE 1 TO GETTHE COMMON AREA.
– 1: Only the common area (red region) is extracted.
– 2: The whole area (areas within green dashed line) is extracted.
• sky area (int, 1 or 2, default=2):
Area of sky to be used for statistics to adjust sky level before coadding frames.
– 1: Only the common area is used.
– 2: The whole area is used.
• det sig (real, min=1.0, max=1000.0, default=4.0):
Source detection threshold in sigmas.
• sig rej (real, min=0.0, max=100.0, default=3.0):
Rejection unit in sigmas.
• max itr (int, min=1, max=10, default=10):
Maximum number of iterations in statistical process.
• obslog (string, default=“irclog”):
NEVER CHANGE THIS. Output filename of redbox.mkirclog.
• wcs (boolean, yes or no, default=no):Try to match the 2MASS or WISE sources to calculate wcs? To use this function, you
should have internet connection to automatically download the catalog. This process will
not be executed as default. Note; although the toolkit was checked on Solaris machines
also, Solaris does not have curl in the original applications. You need to install
it to run putwcs.
• coaddshort (boolean, yes or no, default=no):
Coadd short exposure frames as well as long ones?
• interactive (boolean, yes or no, default=no):
Option to run the pipeline interactively• deltemp (boolean, yes or no, default=yes):
Set to no if you do not want to delete any temporary created file.
• rejection (string, nonekminmaxkccdclipkcrrejectksigclipkavsigclipkpclip, default=sigclip):Type of rejection operation performed in coadding.
– none : No rejection– minmax : Reject the nlow and nhigh pixels– ccdclip : Reject pixels using CCD noise parameters– crreject : Reject only positive pixels using CCD noise parameters– sigclip : Reject pixels using a sigma clipping algorithm– avsigclip : Reject pixels using an averaged sigma clipping algorithm– pclip : Reject pixels using sigma based on percentiles

Version 2.2 (July 6, 2016)77• rej sky (boolean, yes or no, default=yes):
Activate if you want to reject any images which have outlier sky level from the coaddition
process. Some frames may be taken during maneuver, and the pipeline will detect suchframes by watchig their sky level.
• skip L (boolean, yes or no, default=no):
Activate if you want to skip the process of coadding MIR-L images. It will save you greattime and you can use a tool to coadd the MIR-L images after the pipeline2 has finished.
• submedsky (boolean, yes or no, default=no):
Activate if you want to make a median filtered sky image and subtract it from each image
before coadding. This option is useful if you are interested in unresolved sources such asstars.
• coadd (boolean, yes or no, default=yes):
De-activate if you do not want to try to coadd images. This option is useful for users who
have their own coaddition strategy and software.
• verbose (boolean, yes or no, default=no):
Activate if you want to print verbose progress messages.
• prefixs (string, default=“fCcDlnw”):
Prefix after pipeline1.
• blankvalue (real, ≤ −1000., default=−9999.9):
Specify a value for blank/masked pixels.
• double (boolean, default=yes):
Set to no for skipping subsampling. If yes, a single pixel is divided to 2 × 2
pixels.
• ndmask (boolean, default=yes):
Set to no for skipping mask hot pixels defined by neighbor dark frames.
• ndhot (real, default=500.):
Definition of “hot pixels” in neighbor dark frames.
• pllog (string, default=“ircpipeline.log”):
A log file for pipeline processes. Recommended to leave as default.
• tolerance (real, default=1.5):
Tolerance for the WCS fitting in the unit of arcsec.
• wipestar (real, default=0.0):
The searching radius in pixels for pre-selection of sources in putwcs.
• fluxcal (boolean, default=yes):
Set to no if you do not want to apply the flux calibration factor.

78

IRC Data User Manual

Figure 5.10.11: Area utilized for the Co-added images depends upon the parameter com area.
The 2 options are common area (red region) and whole area (within green dashed region).
Table 5.10.3: Prefixes added during Pipeline2 processing
prefixme
SRA

5.10.2

modulegreenbox.maskall
greenbox.aspect ratio
bluebox.source extract
blubox.calcshift
bluebox.adjust sky

actionMask
Aspect Ratio Resampling
Pad blank around
Shift & rotate
Adjust sky levels

Execution

Type pipeline2 at the IRAF command prompt to start pipeline2 processing.
Each module is described below in the order of processing in the pipeline2 script. After eachstep of processes, a prefix is added to the original filename. The prefixes and corresponding
modules are listed in Table 5.10.3.
1. Mask: (greenbox.maskall)
Relevant options: blankvalue, ndmask, ndhot
This module apply mask for:• anomalous pixels:
Bad or dead pixels were identified by using pre-flight laboratory data. Mask files are
stored in ircroot/lib/anomalous pix and shown in Figure 5.10.12.
• hot pixels:
If ndmask=yes, pixels above the level of ndhot in neighbor dark frames aredefined as “hot pixels” and masked in the corresponding object frames.
This is performed only for MIR-S and -L long exposure frames.
• saturated pixels:
Physical detector saturation occurs around 12500, 33000, and 33000 ADU (after
ircnorm) for NIR, MIR-S, and MIR-L, respectively (§4.3). Therefore, any pixels with

Version 2.2 (July 6, 2016)

79

values greater than the “scaled values” in the short exposure frame are picked out
and the corresponding pixels in the long exposure frames will be masked. The “scaled
values” in the exposure frames are calculated by
Sshort exposure in ADU = Sphysical saturation in ADU ×

Exposure Timeshort frame. (5.10.3)
Exposure Timelong frameThis is done because the IRC uses Correlated Double Sampling and with the current
IRC operating clock, we cannot determine which pixels are saturated by long exposure
frames alone.
• slit area:
The area defined as “slit area” is masked. The definition files are stored in ircroot/lib/slit mask.
For these pixels, the value is replaced by blankvalue.
After the masking, a prefix m will be added such that fCcDlnwF23342 S004.fits becomes
mfCcDlnwF23342 S004.fits.

Figure 5.10.12: Mask files for NIR, MIR-S, and MIR-L (from left to right). Outlier pixels to bemasked have a value of 0 (white) and others 1 (black).
2. Aspect Ratio Resampling: (greenbox.aspect ratio)
Relevant options: double. This should be applied to all the frames.
This is a distortion correction. The module corrects aspect ratios of pixels to be square, i.e.
the aspect ratio is corrected to 1 to 1 by resampling the image. Thus the toolkit corrects
the linear distortion only. Non-linear distortion is not corrected for at present since it isassumed to be negligible (§4.9).
If double=yes, a single pixel is divided into 2 × 2 pixels. This sub-pixel samplingis expected to increase the accuracy of relative shift calculation and WCS
matching during the coadd process and to be suitable for applying the PSF
correction described in Arimatsu et al. (2011).
After the resampling, a prefix e will be added such that mfCcDlnwF23342 S004.fits
becomes emfCcDlnwF23342 S004.fits.
3. Coadd: (bluebox.coadd)
Relevant options: many.

80

IRC Data User ManualThis is a wrapper module for coadding individual frames. Procedures in this module aredescribed in §5.11 in detail.
4. Flux Calibration: (bluebox.calflux)
Relevant options: fluxcal
This applies the flux calibration factors derived by Tanabé et al. (2008) tocoadded images created by the coadd module. The unit of output images
is µJy/pix1 . Note that these factors are based on aperture photometry ofpoint sources with radius of 10 and 7.5 pixels for NIR and MIR, respectively.
For other aperture sizes, the aperture correction may be necessary. Separate
calibration factors for extended sources are not currently available.
After the flux calibration, the file name will be changed such that from NGC2403 S7 long.fits
to NGC2403 S7 long.f.fits.

1

Conversion factors to MJy/sr (F/[MJy/sr] = a×F/[µJy/pix]) are a = 8.1e-2, 3.1e-2, and 3.0e-2, for NIR,
MIR-S, and MIR-L, respectively in the case of double=yes.

Version 2.2 (July 6, 2016)

5.11

The coadding processor (Blue-Box)

5.11.1The Blue-Box Co-Add Wrapper81

The green box produces the basic processed data for individual frames. Before stacking theseframes, a relative shift and rotation due to
1. jitter – a slight positional movement resulted by pointing uncertainty
2. dither – an intentional positional oﬀset in order to eliminate pixel oriented artifacts
need to be corrected. This positional matching and successive stacking are called coadding andcarried out by the modules in the Blue-Box. Note that this process is performed automaticallyat the end of pipeline2 if coadd=yes.
In order to coadd frames, bright sources (stars) are extracted from each frame. The list of
extracted sources is then used to calculate the shift and rotation for each frame looking at aparticular field of view on the sky using the first frame as a reference.
The present configuration of the Blue-Box modules is shown in Figure 5.11.13.
The starting point for the Blue-Box Co-Add wrapper are the files created from the final
step in the Green-Box Processor, i.e. emfCcDlnwF23342 S004.fits. The Co-Add wrapper (i.e.
bluebox.coadd) then performs the following tasks:
1. Extract bright reference sources: (bluebox.source extract)
Relevant options: det sig, sig rej
This module extracts individual bright sources from each frame. Before extraction, original
images are pasted to larger images to prepare for the shift and rotation. Note thatthe size of larger images has changed since ver. 140000. Previous sizes were1024 × 1024 and 512 × 512 for NIR and MIR, respectively, while new images
are created by adding 128 pixels to the all four sides. These larger images are
identified by an additional prefix S.
Then, bright sources (stars) are extracted from each frame. The parameter det sig defines the lower detection limit in sigma, while sig rej is the rejection thresholdin sigma when calculating image statistics. A text file with the extension of.coo.1 containing the list of extracted sources is created for each frame.
2. Calculate Shift & Rotation to match frames: (bluebox.calcshift)
Relevant options: sig rej, max itr
Lists of the bright reference star (*.coo.1) are used to calculate the relative shift androtation values between individual image frames, by looking at a particular field of view on
the sky using the first frame as a reference. The parameters sig rej and max itr areused for this calculation. The file name, shift in x and y, rotation values, andthe number of stars finally used for shift calculation are recorded in a log file(*.shift) for each band. After this shift and rotation process, the original frame filenames will receive an additional R prefix such that SemfCcDlnwF23342 S004.fits becomes
RSemfCcDlnwF23342 S004.fits.
If there are not enough stars for matching two frames, a warning messages isgiven and the corresponding file name will be added to a log file coadd.failure.
Another log file calcshift.log is also produced listing the number of matched stars
and the fitting rms for x and y direction. Note that especially for the long wavelength

82

IRC Data User Manual

Figure 5.11.13: Present configuration of the Blue Box. The white boxes connectedwith dotted lines indicate output files created by each module.

Version 2.2 (July 6, 2016)

83

channels (MIR-L) there may be occasions when there are not enough guide stars formatching. Alternative procedures which utilizes the MIR-S shift & rotation for the MIR-L
channel (coaddLusingS) or cross correlation between frames (coadd2) are also provided
in IRC TOOL (See §5.13 for detail).
In addition, results from statistics of shift and rotation values (§4.15) are used
to exclude frames with wrong or doubtful shift values. When shift and rotation
values derived by this module do not fall between pre-defined lower and upper
limits, that frame will be excluded and will also be put into coadd.failure.
Parameters needed for this procedure are stored in lib/constants.database.
3. Adjust Sky Level: (bluebox.adjust sky)Relevant options: submedsky
The bluebox.adjust sky module collects all frames looking at a given area on the sky
and calculates the median sky from each image. Each calculated median value is thensubtracted from each corresponding frame. From these median values an average skybrightness is calculated that is then re-added to all the frames. A log file is produced
during this process with a name skypair0002 N2.list long or similar. This file lists theframes looking at a given area on the sky with the corresponding mean, median and modesky brightness and 1σ standard deviation. Those who want to subtract median box car
filtered image instead of adjusting sky level should configure the following parameters bytyping “epar adjust sky” before running pipeline2.
• submedsky (boolean, yes or no, default=no):
Subtract median filtered sky?
• rmmedsk (boolean, yes or no, default=yes):
Remove median filtered image? Those who want to check box car median filteredimage, set this parameter no.
• x box: (integer, min=1, max=100, default=21):
x box car size
• y box: (integer, min=1, max=100, default=21):
y box car size
The parameters x box and y box change the size of the median kernel.
After adjusting the sky level, the R prefix is replaced by A, such that RSemfCcDlnwF23342 S004.fits
becomes ASemfCcDlnwF23342 S004.fits.
4. Image Stacking (Co-adding): (bluebox.irc stack)Relevant options: coadd
Once object frames have been correctly matched and the sky brightness adjusted, they
are stacked to produce the final co-added image. The FITS images and files created fromthe stacking process can be found in a new directory stacked IM. The stacking processcreates 3 files for any given filter position on the sky;
• A co-added image file (e.g. 1757132 N2 long.fits).
• A noise map (e.g. sigma1757132 N2 long.fits)• Summary File (e.g. pl1757132 N2 long.fits.pl)

84

IRC Data User Manual
5. Update WCS: (bluebox.putwcs)
Relevant options: wcs, tolerance, wipestars
After the Co-add wrapper has been completed, this module updates WCS information to
the stacked FITS images by matching with 2MASS or WISE catalog coordinates using
the following procedures;(a) download 2MASS or WISE (depending on the filter) catalog for the observed
area(b) convert the catalog RA DEC to the x’y’ image coordinates(c) source extraction of stars from the IRC image (source extract2)(d) wipe stars if requested (i.e., if wipestars > 0)(e) match the catalog x’y’ coordinates with image xy coordinates
At this point there will be a list for extracted IRC stars corresponding tostar1 x1’ y2’ ra1 dec1 x1 y2
star2 x2’ y3’ ra2 dec2 x2 y2.... .... .... ....
starN xN’ yN’ raN decN xN yN
for the matched stars. The module then calculates a transformation matrix (Nthorder polynomial) that will convert xy to RA and DEC. The module attempts to findthe best fitting solution by increasing the order of polynomial from 2 to 4. Usually,
the best result should be 2nd order, as long as the image has been corrected for
distortion.
The fitting results (arcsec/pix and position angle) are compared with expected values, and those significantly diﬀerent from expectations are rejected. In addition, the results are rejected if the fitting rms is larger
than the parameter tolerance. In such cases, the fitting will be performed
again with fewer stars.
(f) (if matched) update the following keywords in the header• WCSROOT: AOCS/2MASS/WISE• WCSNSTAR: the number of stars used for WCS fitting• WCSORDER: the order of WCS fitting• WCSERROR: the rms of WCS fitting [arcsec]• WIPERAD: the radius for wipestars [pixel]
The final result is the basic science grade images (see Figure 5.11.14).

Version 2.2 (July 6, 2016)

85

Figure 5.11.14: Example of final science grade data produced by the Green-Box and Blue-Box
Co-Add Wrapper. Filters are N2, S9W, and L18W from left to right. Coordinates are in (R.A.,
Dec.) [J2000]. Pixel units are [µJy/pix].

86

IRC Data User Manual

5.12

Log files produced from the toolkit

Here we summarize various log files produced by the standard pipeline processing, i.e. prepipeline,
pipeline1, and pipeline2, in the toolkit. Some of these log files are save in a directory logs.

5.12.1prepipeline

During the process of prepipeline, following files are created. Detailed descriptions are in §5.8.
• irclog: list of all the sliced frames• darklist.before: list of pre-dark frames• ircpipeline.log: log for pipeline processes. will be used for pipeline1 & 2 as
well.

5.12.2

pipeline1• bandname[l or s].list: list of frames for each band and exposure• bandname[l or s].vsky:
This file is created by flat if the background levels vary significantly.

5.12.3

pipeline2• .coo:The .coo files (e.g. SemfCcDlnwF23343 N002.fits.coo.1) are the results for robust source
extraction that extracts x and y coordinates & robust photometry. One .coo file is createdfor each individual exposure frame. These files can then be used to calculate the shift androtation of frames that are being co-added by matching bright stars in the extracted source
lists.
• Pair FilesThe pair files collect together and list all (long and short) frames that point the same areaof sky.
Taking the N3 band as an example the following files may be seen,
pair0001 N3.list
pair0001 N3.list short
pair0001 N3.list long
pair0001 N3.list long.shift
pair0001 N3.list long.shift.0
pair0001 N3.list long.combine
The pair0001 N3.list file lists all (long and short) frames that point at the same area ofsky. The contents of the file are the original frame names (e.g. F23343 N001), IRC channel
and the coordinates. The files pair0001 N3.list short & pair0001 N3.list long are
extracted and segregated from F23343 N001 on the basis of the exposure time (long or
short exposure frames). The file pair0001 N3.list long.shift lists the result of thecoordinate matching before coadding. Each line entry in the file consists of a filename,x-shift (pix), y-shift (pix), rotation (deg) and the number of stars used for the shift &rotation angle calculation. For example;

Version 2.2 (July 6, 2016)

87

SemfCcDlnwF003182658 N002.fits.coo.1 0.0 0.0 0.0 126
SemfCcDlnwF003182664 N002.fits.coo.1 -5.506 -4.934 -0.00017 51
The values are calculated relative to the first frame listed in the file, such that the firstentry is always filename 0.0 0.0 0.0 *. If the last column (i.e. the number ofstars) is negative, it means that this frame is rejected by bluebox.calcshift
because the number of stars is not enough or shift and/or rotation values arefar from their mean. Such frames should also be listed in coadd.failure.
• exp.input files
These files contain a list of all the pair files for all filters pointing at one position on thesky. There may be files for both the long long exp.input and short short exp.input
exposure frames.
• Skypair Files
These log file can be found inside the separate directory logs. This log file is produced
during the adjustment of the sky level between frames (bluebox.adjust sky) with a nameskypair0002 N2.list long or similar. This file lists the frames looking at a given area on
the sky with the corresponding mean, median and mode sky brightness and 1σ standard
deviation.
• calcshift.log:
This log file can be found inside the separate directory logs. The calcshift.log file is thelog file for the calculation of shift and rotation in the bluebox.calshift process. Relative
to the first frame in the pair file described above the log file gives the number of stars
matched between 2 .coo files and the corresponding x & y oﬀset for these frames. The
calcshift.log file will also record any matching failures.
• coadd.failure:If the coadd wrapper fails to coadd one or more frames, this file is created containing thename of such frames.

88

IRC Data User Manual

5.13

The IRC TOOL (irc tool)

Additional tools which may improve the pipeline results are stored here.
present configuration of the IRC TOOL is shown in Figure 5.13.15.

The

Figure 5.13.15: Present configuration of IRC TOOL.
• Make a template for EL pattern: (irc tool.mk el)Using this module, a template for the EL pattern can be created. The input
should be– filelist (string, no default): list of files before flat fielding
and the output EL template is “filelist”.EL.fits. The input frames should be
for the same filter and exposure, and should not contain extended sources. In
addition, the observing dates and coordinates should be close to the target observations. For other parameters and outputs, see irc/pkg/irc tool/mk el.cl.
• Subtract the EL pattern: (irc tool.sub el)This module fits and subtracts the EL pattern from object frames. The input
parameters are– filelist (string, no default): list of files before flat fielding– ELfits (string, no default): EL pattern created by mk el– maskfits (string, no default): mask file created by mk el
The EL pattern is fit and subtracted from files listed in “filelist” and then theflux calibration is applied. The prefix f is added to the output files so thatthey are consistent with other frames without EL subtraction and ready forpipeline2. For other parameters and outputs, see irc/pkg/irc tool/sub el.cl.
• Coadd L frames using S shifts: (irc tool.coaddLusingS)
An alternative procedure which utilizes the MIR-S shift & rotation for the MIR-L channel.
This function is especially useful when bluebox.calcshift fails to calculate the xy shift androtation angle for the MIR-L channel, because there are few reference stars detected. The
coaddLusingS has several parameters, but they are identical to those in pipeline2, except
the s list.

Version 2.2 (July 6, 2016)89– s list (string, default=pair0005 S9W.list long):
The name of MIR-S pair list, for which the calcshift has successfully matched frames.
Other parameters should basically be set to the same values as was in pipeline2.
Given these parameters properly set, this procedure calls bluebox.adjust sky
and bluebox.irc stack in order to coadd corresponding MIR-L images and movethe stacked image to the stacked IM directory. The header parameter SHIFTTYP is set to be “LusingS” in order to indicate that the image is created bythis module.
Note: One needs to make sure that the correct corresponding MIR-S file is used with thedesired MIR-L file. As an example:
In the irclog, the appropriate corresponding filter pair can be selected using the the same
file number F40813. As raw data, all these files are packed into a single fits file. Prepipeline slices the MIR fits file into the 8 (4 MIR-S + 4 MIR-L) files.
F40813 L001 "NGC104" 256 L18W 5.293348 -72.44307 IRC03 1 5020012 1
F40813 L002 "NGC104" 256 L18W 5.293348 -72.44307 IRC03 2 5020012 1
F40813 L003 "NGC104" 256 L18W 5.293348 -72.44307 IRC03 3 5020012 1
F40813 L004 "NGC104" 256 L18W 5.293348 -72.44307 IRC03 4 5020012 1
F40813 S001 "NGC104" 256 S7 5.293348 -72.44307 IRC03 1 5020012 1
F40813 S002 "NGC104" 256 S7 5.293348 -72.44307 IRC03 2 5020012 1
F40813 S003 "NGC104" 256 S7 5.293348 -72.44307 IRC03 3 5020012 1
F40813 S004 "NGC104" 256 S7 5.293348 -72.44307 IRC03 4 5020012 1
In this case, using “pair0002 S7.list long” for the reference, the coaddLusingS function will
make the L18W long image.
Please note that running this function will overwrite relevant files previously createdby coadd (e.g. [R/A]*L*.fits, coadd.failure, stacked IM/*L.fits). If you wantto keep the previous results, rename these files or copy the current working directory. In addition to these files, this module creates several list files with thenames of * forL*. In the case of above example, “pair0002 S7.list long forL”,“pair0002 S7.list long forL.shift” “pair0002 S7.list long forL.combine”. They
are basically the same as the usual coadd results except that the contents arefor the MIR-L (L18W in this case) frames.
Also note that this function does not apply the flux calibration factor to the
output image. If needed, bluebox.calflux should be applied separately. See§5.10.2 step 4 for detail and consult ircpipeline.log for parameters used inpipeline2.
• Coadd using xregister: (irc tool.coadd2)
This module calculates the cross correlation between two frames by shifting inx and y directions and find the best-fit values where the cross correlation is
the largest. As a consequence, a rotation between the frames is not supported.
The input parameters are– inputlist (string, no default): list of files to be coadded– prefixs (string, default=“emfCcDlnw”):

90

IRC Data User Manual– adj sky (boolean, default=yes): adjust sky before stacking?
– double (boolean, default=no): set yes for double-sized frames
Note that the prefixs will be added to filename listed in inputlist.
A stacked image is moved to stacked IM and the naming rule is the same as
standard coadd. The header parameter SHIFTTYP is “xregister” after thisprocess, since it uses the IRAF task xregister.
• Copy mask of MIR-S or -L frames: (irc tool.copy MIRmask)
This module copies the masked area of MIR-S or -L frames to MIR[S/L]mask.fits.
The input parameter is– channel (string, no default): specify ‘S’ or ‘L’
As is obvious, prepipeline, pipeline1, and maskall in pipeline2 should be run
before running this module.
• Add mask to MIR-S or -L frames: (irc tool.add MIRmask)
This module adds the mask created by copy MIRmask to MIR-S or -L frames,
which suﬀer from the memory eﬀect. Since the masked area is mostly fromthe saturated pixels and the saturation level is lower than the memory effect threshold, this module may “over-mask” the aﬀected pixels. The input
parameter is– channel (string, no default): specify ‘S’ or ‘L’
Note that this module is designed to add the mask to the output of maskall inpipeline2 (i.e. m*F*.fits). In addition, the mask file MIR[S/L]mask.fits should
be in the current working directory. While running this module, the original
files are renamed to mm*F*.fits and new m*F*.fits files with the additionalmask are created so that they can be used in pipeline2.
After running this module, run pipeline2 in the interactive mode to skipmaskall with specifying the prefix after maskall. For example,
irc_tool> prepipeline
irc_tool> pipeline1
irc_tool> maskall (leave all the parameters as default)
irc_tool> ! cp somewhere/MIRSmask.fits ./irc_tool> add_MIRmask S
irc_tool> pipeline2 deltemp- interac+ prefix=’mfCcDlnw’ (skip maskall)Version 2.2 (July 6, 2016)

5.14

91

Limitations of the functionalities in the current version of
the imaging toolkit• First frame eﬀect: The first frame of the dark current prior to the pointing observationshows larger values than others, particularly for MIR-S and MIR-L detectors. This eﬀect
could be related to the detector temperature.
• Dark current variation: As described in §4.1, the increase of hot pixels, thevariation of NIR dark current due to the SAA passage, and level shift during
a pointing should be calibrated well by the latest toolkit.
• Memory eﬀects: A decrease in the sensitivity has been found in MIR images,
if a bright source is in the field of view of a previous pointing. More detailed information is given in §4.10. To mask the aﬀected pixels, use [copy/add] MIRmask
modules in IRC TOOL (§5.13). A list of ObsIDs which may cause the memory
eﬀect is in the README file for each pointed observation.
• Eﬀects of high energy particle hits: The toolkit does not perform any deglitching.
Glitches should disappear when coadding individual images (median filter). Even so, theireﬀect on the responsivity are not yet well investigated. Future versions of the toolkit will
involve a more careful treatment of cosmic ray hits.
• Ghosts: See §4.13 for a detailed description of the ghosts.
The maskall called by pipeline2 prints a warning message if pixel(s) exceedinga limit (currently 10000 ADU) are found in MIR-S long exposure frames.
• Earthshine in imaging observations: Data taken in May, June and July may suﬀer
from the Earthshine problem as described in §4.14. The following recipe can be used:– If the number of frames is large enough,∗ Check the drift of the background level during a pointing listed in *.vsky andcomment out any high background MIR-L frames from “irclog” and run thepipeline again. If the CoaddLusingS tool is used, the frames with the same frame
number must be also commented out, i.e., if F0000001 L002 is commented out,
F0000001 S002 must be also commented out.
∗ Use rej sky=yes option in order to ignore the bad frames:
irc,> pipeline2 rej sky=yes– If the target is a point source,∗ Use submedsky option to remove the diﬀuse background:irc,> pipeline2 submedsky=yes∗ Adjust the median kernel size in the submedsky option:
bluebox> epar adjust sky(x box = 20) If submedsky=yes, x box car size
(y box = 20) If submedsky=yes, y box car size
– Else,1. Make a template of EL using make el and data from adjacent pointings
2. Subtract the template from object frames using sub el

92

IRC Data User Manual
These modules are in IRC TOOL (§5.13).
• Problem with short exposure frames with IRC: A problem exists with the contiguous short-exposure frames of the MIR-S and MIR-L data taken in IRC00, IRC04, andIRC05. At present the cause is uncertain, however, it is advised not to use short-exposure
frame data for scientific purpose. They may be used to check the saturation in longexposure frame data. Specifically, the IRC MIR pointing is composed of several exposure
cycles, filter changes and dithers. Each exposure cycle is made up of 1 short and 3 long
frames. For AOT IRC02, IRC03, exposures are always separated by dithers etc., and the
problem does not arise, however, for IRC05, IRC00, IRC04 they are not necessarily separated. The problem is occurring on contiguous exposure cycles (i.e. nothing in between).
For example;(short1,long1,long1,long1)(short2,long2,long2,long2)
The bad frames are the short2 frames, i.e. those following a previous contiguous exposure
cycle. This eﬀect extends to the short frame of the final dark even. This problem may be
critical for spectroscopy of bright sources with IRC04, however, for IRC00 & IRC05 users,
the eﬀect may not prove critical since users may disregard the short frame since these AOTs
are intended for deep imaging. The processing of short frames can be disabled bycommenting out in “irclog” or by pipeline2 coaddshort=no (default).
• PSF: As described in §4.4, the extended shape of PSF, which depends on thefilter, makes the comparison of images with diﬀerent filters diﬃcult.
• Temporal variation of NIR and MIR-S flat: As already described in §4.2, theflat for NIR and MIR-S changed on January 7th, 2007. A noticeable pattern(so-called “soramame”) in the bottom right corner of the MIR-S field disappeared on this date. Recently, Murata et al. (2013) found that the “soramame”
pattern was not stable, i.e., its shape and position changed with time.
However, the current toolkit cannot provide flatfield frames for each pointed
observation due to lack of S/N. Instead, it includes one and four “soramame”
patterns for each of NIR and MIR-S filters, respectively.
• Coadd frames from multiple pointed observations: In principle, the IRC toolkit
will attempt to process all the frames in the working directory. However, please
note that under certain circumstances dark and flat calibrations should be donefor each pointed observation due to their variation. (If using superdark, dark
subtraction is not a problem. If observation dates are after January 7th, 2007,
the flat variation should be negligible.)
As a consequence, we recommend to run prepipeline and pipeline1 for eachpointed observation and then to run pipeline2 for coadding frames from multiple pointed observations. However, coaddLusingS may not work properly forsuch data sets.

Version 2.2 (July 6, 2016)

5.15

93

Error messages when running the pipeline and Troubleshooting

Please note that the error massages shown in this section may be obsolete and will
not appear with the latest (ver. 140003 or later) toolkit.
1. The pre-pipeline stage sometimes give an error message such as ls: ../rawdata: Nosuch file or directory or cat: slice tmp0: No such file or directory, etc, although the pre-pipeline seems to run correctly. Typing unlearn all should clear theseerror messages.
2. The distortion processing (green box processing) can give the following error message,
causing the pipeline crash:### DISTORTION ###Making the input file list...
Correcting distortion...
#This may take a while...
ERROR on line 56: Cannot open file(∼/iraf/irc/lib/distortion/DARK distortion database.dat)
distortion (ircconst=constants.database, logfile=irclog, prefixs=mslnDwa,
verbose=no)pipeline ()This is because the DARK entries should be removed from the irc log file.
3. The coadd stage can result in the following error:### COADD ###Making the input file list...
Extracting sources...
Calculating XY shift...
Adjusting sky level...
Coadding images...
ERROR on line 148: parameter ‘direction’ not foundThis problem may be caused when using versions of IRAF earlier than IRAF 2.12.2. The
problem is with geoxytran task. epar images.immatch.geoxytran can be typed in the
IRAF shell to see if the parameter exists. Even after installing the newer version of IRAF
it is necessary to type unlearn geoxytran before the toolkit runs correctly.
4. The pre-pipeline run can apparently miss some perl scripts and end with an empty or non
existing irclog file.
### MKIRCLOG ###Making the file list...
Reading header...
#This may take a while...
tcsh: ∼/iraf/irc/perl/formatlog.pl: Command not found.
tcsh: ∼/iraf/irc/perl/checkname.pl: Command not found.
### MKIRCLOG finished!! ###Primarily, it has to be checked that the toolkit is being run from the working directoryand not, for example in ∼ /iraf /. If the problem persists then it may be because perl
is in the wrong place! P erl should be in usr/local/bin/perl, therefore a symbolic linkshould be set up from the perl library to usr/local/bin/perl (type which perl to findout where perl is currently hiding).

94

IRC Data User Manual
5. If a new version of the toolkit crashes, as a first fix, unlearn all should be typed within
irc.
6. The IRC toolkit does not run on the new Intel Mac machines, due to diﬀerences in the
IRAF build in the intel binaries. Replacing the intel binaries with the original binaries
causes iraf to run under emulation but solves the problem. IRAF 2.13 has been successfully
running on the intel machines.
7. The coaddition process or the coaddLusingS function, can cause the crash of the toolkit
with the error:
ERROR on line 128: Attempt to access undefined local variable ‘filter’.
This error will occur if the pre-pipeline is attempted to run twice on a given data set. Asa check the files (and their counterpart corresponding MIR-L images) listed in the pairfile (e.g. pair0001 S7.list long) should be examined to see if they have the appropriate”FILTER” keywords in their header.
8. The “Matching failed” error message that could appear in the putwcs process is not an
intrinsic pipeline error. It is due to the fact that the 2MASS data format changes fromtime to time. Appropriate updates or patches are made to the pipeline. The updates will
be recorded in the Observer’s page.

Version 2.2 (July 6, 2016)

5.16

95

Toolkit structure

The structure of the IRC imaging toolkit for Phase 1&2 (ver. 140003 or later) is
shown in Figure 5.16.16.

Figure 5.16.16: The configuration of the IRC imaging toolkit for Phase 1&2 (ver. 140003 orlater).

Bibliography
K. Arimatsu, T. Onaka, I. Sakon, S. Oyabu, Y. Ita, T. Tanabé, D. Kato, F. Egusa, T. Wada,and H. Matsuhara. Characterization and Improvement of the Image Quality of the Data
Taken with the Infrared Camera (IRC) Mid-Infrared Channels on Board AKARI. PASP, 123:
981–995, August 2011. doi: 10.1086/661201.
F. Egusa, T. Wada, I. Sakon, T. Onaka, K. Arimatsu, and H. Matsuhara. Interstellar Dust
Properties of M51 from AKARI Mid-infrared Images. ApJ, 778:1, November 2013. doi:
10.1088/0004-637X/778/1/1.
K. Murata, H. Matsuhara, T. Wada, K. Arimatsu, N. Oi, T. Takagi, S. Oyabu, T. Goto,
Y. Ohyama, M. Malkan, C. Pearson, K. Malek, and A. Solarz. AKARI North Ecliptic Pole
Deep Survey. Revision of the catalogue via a new image analysis. A&A, 559:A132, November
2013. doi: 10.1051/0004-6361/201321505.
T. Tanabé, I. Sakon, M. Cohen, T. Wada, Y. Ita, Y. Ohyama, S. Oyabu, K. Uemizu, T. Takagi,
D. Ishihara, W. Kim, M. Ueno, H. Matsuhara, and T. Onaka. Absolute Photometric Calibration of the Infrared Camera (IRC) aboard AKARI. PASJ, 60:375–388, December 2008.
K. Tsumura and T. Wada. A New Method of Dark-Current Estimation for Diﬀuse Sky Measurements with the AKARI Infrared Camera. PASJ, 63:755–762, August 2011.

96

Chapter 6

Spectroscopy pipeline cookbook
The spectroscopy pipeline is being developed and maintained by the IRC spectroscopy data
reduction team. It is mostly written in IDL, and uses the IDL ASTRO library (maintained at
the GSFC) among others. Although it is developed under Linux environment, it may be portableto other platforms after some modifications (though we have no plan to increase the exportable
platforms by ourselves). The toolkit also uses the ds9 FITS viewer, and the xpa package forcommunication between the ds9 and the IDL main program.
The spectroscopy data reduction requires a calibration database (FITS images and ascii
tables) distributed and updated by the IRC spectroscopy data reduction team. The databaseis based on observations of calibration objects and calibration frames taken during PV/DT
phase observations, as well as pre-launch calibration experiments in our laboratory. Therefore
observers do not have to make their own calibration observations.

6.1

General overview of the pipeline processing

The main pipeline processing consists of several well defined steps, which are explained in thefollowing sections.
In general terms, the IRC slitless spectroscopy diﬀers from more standard slit spectroscopy
in that in the latter case, the pixel position and the wavelength are closely correlated. The IRC
spectroscopy does not follow this relation and needs to be applied in three steps:• Many spectroscopic flats have been combined to form a ”super-flat” which can be used toremove the pixel to pixel variation of the monochromatic response of the detector.
• After subtracting the background, extracting the sources and performing the wavelength
calibration, the wavelength flat can be used. The wavelength dependency of the flats
is due to the same mechanism to that of imaging mode, and is corrected by interpolating/extrapolating the imaging super-flat taken with two diﬀerent filters for every pixel andthe wavelength (colour correction).
• Finally, the spectral response specific to the spectroscopic mode observation is correctedby the spectral response function obtained from the observations of standard stars. Moredetailed explanations can be found in following subsections.
97

98

6.1.1

IRC Data User Manual

Dark subtraction

Scaled super-dark images are subtracted from the raw data. For the scaling, dark count oﬀset
is calculated within the pipeline, by comparing average counts at the slit-mask-covered portionof the pre-dark image, and the corresponding area on the super-dark image.
Additionally the average dark counts of the mask-covered portion of each observed sub-frame
is measured, except for LG2 for which there is no good dark area on the spectroscopy images formeasuring the dark level. The averaged oﬀset is added to (or subtracted from) the super-dark
to make the scaled super-dark.

6.1.2

Linearity correction/Saturation Masking

Linearity correction is made following the method adopted for imaging data reduction.
The saturation masking is also performed as in the imaging pipeline: the toolkit first checks
the short-exposure images, and find regions where expected counts in longer-exposure frame
exceeds the saturation limit based on the exposure time ratio of short-/long-exposure frames(see table 4.6.5). Then, the regions are masked in the longer-exposure frames. The user should
check the masking in the edges of the saturated regions, due to the drift between short and longexposures pointing.

6.1.3(monochromatic) Flat-fielding

In the case of the slit-less spectroscopy, the entire FOV is the aperture for the backgroundsky, but the object image itself is the aperture for the object. This aperture size diﬀerence
makes diﬃculties in flat-fielding the slit-less spectroscopy images since, unlike a conventional
long-slit spectrograph, a given pixel can be illuminated by background photons with a rangeof wavelengths within the disperser’s passband, and the mixing fraction of photons of diﬀerent
wavelengths depending on the spatial distributions and spectra of sources. We need 3D flat
information (X, Y along space, plus Z along the wavelength) for full flat calibration. However it
is impossible to obtain such a detailed flat since there are no good monochromatic flat light nor aseries of narrow-band filters covering the passband of the disperser. Because of these diﬃculties,
we will make a flat calibration in two steps, starting with the monochromatic correction.
To correct for the pixel-to-pixel variation of the monochromatic response (response or flatthat does not depend on wavelength), the whole image is divided by the ’super-flat’ . The
super-flats are made by combining a larger number of background spectroscopy images. Notethat the background sky image is not flat along Y or the wavelength axis, i.e., there are several
spectral features on the ’super-flats’ due to, e.g., contributions of zero-th or higher-order lightin cases of grism spectroscopy images. Although the features should be removed to correct forthe pixel-to-pixel variation of the response, we first divide the dark-subtracted images by thesuper-flat with the spectral features. As shown below in equation 6.1.1, this process makes the
background flat, facilitating the sky subtraction.
Assume that the dark-subtracted images are represented by the following equation:
obs = sky × F1 (x, y) × spectral f eature(x, y) + obj(λ) × F2 (x, y, λ) × R(λ)(6.1.1)

where F1 (x, y) is the flat in which the background spectral features are not present, F1 (x, y) ×
spectral f eature(x, y) is the ’super-flat’, F2 (x, y, λ) is the wavelength-sensitive flat (see below
for color-term correction), and R(λ) is the spectral response. Since the super-flat is only afunction of the position in the detector, this step is called monochromatic flat-fielding. If we
divide the observation by the ’super-flat’, we obtain:

Version 2.2 (July 6, 2016)

obs0 = sky + obj(λ) × F2 (x, y, λ) × R(λ)/[F1 (x, y) × spectral f eature(x, y)]

6.1.4

99

(6.1.2)

Background subtraction (from individual sub-frames)

After monochromatic flat-fielding, the background should be flat over the aperture. However,in real data, this is not occurring in most of the cases. For NP, NG, and SG1 , outlier-tolerant
low-order polynomial surface fitting is performed for each sub-frame, and is subtracted oﬀ fromthe flat-fielded images. For SG2 and LG2, background suﬀers from straylight (from the Earthshine) contamination, and the flat-fielded images are much more structured. To make good sky
subtraction, a median running-box filter is applied to estimate the local sky, and is subtracted
oﬀ from the ’stray light-covered’ background. Such background should be removed from individual sub-frames, since the contribution of the Earthshine depends on the telescope pointing
angle from the earth direction, and the amount of straylight changes within a single pointing
maneuver (or within a single AOT operation).
In the first pass of the processing within the pipeline, source masking will not be applied indetermining the background, because no source position information is available at the stage. In
the second pass, after processing through section 6.1.9 once, the background is measured again
while considering the source masks.
The image obtained after background subtraction has the following expression:
obs00 = obj(λ) × F2 (x, y, λ) × R(λ)/[F1 (x, y) × spectral f eature(x, y)]

6.1.5(6.1.3)

Image screening

Some sub-frames may be severely damaged by cosmic-ray shower, a satellite passing in front of
the telescope, etc. If this is the case, one can interactively set the flag, by using ds9, for any
sub-frames to be discarded in the following processes.

6.1.6

Image registration (among sub-frames)

Relative image shift due to satellite attitude drift among spectroscopy sub-frames is measured
by means of cross-correlation technique. This can be made only with NP and NG due to thenumber of spectra present in NIR images. For SG1, SG2, and LG2, pixel oﬀsets measured with
NP/NG are used for matching, rather than measuring their own shifts, since all cameras takeimages simultaneously.
Similar shift-and-add technique is also needed for the reference sub-frames, except for N3,
where there is only a single reference sub-frame. To find the shift values for L18W, we first detect
point sources in S9W , measure their positions, and calculate the shift by using the list of target
coordinates, and shift both S9W and L18W images.

6.1.7

Imaging stacking

After registering all the sub-frames, all the selected (screened) sub-frames are combined to makehigher S/N stacked images. For spectroscopy images, a three-sigma clipping averaging method
is used. For reference images, a simple median averaging is used due to the small number ofsub-frames.
Some sub-frames are removed due to satellite maneuver. When the toolkit recognizes that thelast exposure frame (cycle) was taken during this maneuvering period, the frame is automatically100

IRC Data User Manual

removed from the stacking list. Note that, although the observing manual says that 8 sub-frames
will be taken for spectroscopy in AOT04 operation, it turned out that one additional frame (9thframe) can often be taken without suﬀering from satellite maneuvering. You may add the frame
for stacking.

6.1.8

Target detection/position measurement

Target positions can be provided by the user in the form of a source table (see below), or
automatically computed within the toolkit, using the daofind method for target detection. Even
if the target positions are set by users, the toolkit performs re-centering of the source positions
by means of Gaussian peak search. (This functionality can be disabled with the command line
option.) This process is coupled with the following step (background subtraction).

6.1.9

Background subtraction (from stacked image)

Although background subtraction has been already applied before stacking images, any remaining background is removed at this step.
The background subtraction and target detection/position measurement (explained in theprevious section) are made iteratively in the following way. First, the target is tentatively detected by the automatic source detection program (not based on the user-supplied source table),and source masks will be created for all detectable sources. Then the background is measured
while considering the source masks, and is subtracted oﬀ from the original stacked image. The
background-subtracted image is used for better source detection/position measurement, andbetter source masks will be created for better background subtraction.
When sources are detected, source masks are created for better background subtraction fromindividual sub-frames (section 6.1.4) in the second pass of the pipeline processing.

6.1.10Extracting 2D spectra

By using the reference image positions and pre-defined coordinates oﬀsets in the calibration
database, rectangle areas around the source spectra are extracted on the spectroscopy images.
For NP, spectral distortion (see below) is taken into account along the dispersion direction tofind best Y oﬀset when extracting 2D spectra.
X-oﬀset adjustment in spectroscopy image extraction
In real data, one need to further adjust the oﬀset of the source extraction boxes. One may sometimes find 2D spectra slightly away from the expected position (at the center of the extractionbox) along X axis. This kind of shift cannot be corrected in the previous image registration
processes, and the correction is made at this stage. The center position of the 2D spectra ismeasured for each extracted 2D spectra, and the mean X oﬀset from the center of the extraction
box is calculated. If the pipeline successfully finds the shift value, the shift will be applied in
extracting the 2D spectra. However, for some cases where only very faint objects were detected,
calculating this additional shift may fail (and no further shift is applied).
Measuring the X oﬀset and making good source masks (as explained in the previous section)
are closely related to each other during the pipeline processing. In the first pass of the source
detection, the automatic source detection sub-program works even if the target table is suppliedin the pipeline command line. The X oﬀset is measured with the tentatively detected sourcesat this stage. In the second pass, measured X oﬀset (as well as Y oﬀset found in adjustingVersion 2.2 (July 6, 2016)101

the wavelength zero reference point; see the next section) between spectroscopy and reference
images is taken into account in extracting the 2D spectra. Only the sources specified in thesource table, or sources detected with the sub-program, will be processed (extracted) in thesecond pass. This two-stage process ensures good source masking for better sky subtraction andgood oﬀset measurement with brighter and larger number of sources, even for the cases in which
the observer is only interested in small number of faint sources.
Measurement of the center position of the 2D spectra can be made easily for NP, NG, and SG1
spectra for which larger number of brighter sources can be detected even in blank sky regions.
Therefore, the toolkit measures the X oﬀset at NP and NG for correcting both NP and NG, andat SG1 for correcting SG1, SG2, and LG2. Therefore, the user must start pipeline processing for
NP/NG first, then SG1, and finally SG2 and LG2. See section 6.4.1 for more explanations.

6.1.11

Wavelength calibration

In the case of grism spectra, the dispersion equation is almost linear theoretically and a linear
equation for expressing the wavelength is assumed. Therefore, once the 2D spectra extraction
is made with suﬃcient accuracy, it is straightforward to make a wavelength calibration.
For prism (NP) spectra, since the dispersion equation is highly non-linear one especially atshorter wavelength end, it is better not to transform images to avoid introducing extra uncertainties in the image interpolating/extrapolating processes. Rather, a separate array (whose lengthis equal to the Y length of the extracted 2D spectra) will be created to store the wavelength
values for each Y pixel. One wavelength array is applicable for all the extracted spectra within
the FOV. This kind of wavelength array is also used for grism spectra (NG/SG1/SG2/LG2).
Finding wavelength zero reference point
Some problems arise for accurate wavelength determination. One is the satellite attitude stability
problem. If the satellite pointing moves between reference and spectroscopy images, the reference
image does not provide good wavelength zero reference point any more.
The NP spectrum (before flux calibration) shows a notable peak around 2.4 µm, and there arelots of fairly bright stars with almost identical spectra, regardless of the type of stars within asingle FOV. Therefore it is possible to find the best oﬀset of the wavelength zero reference point,
by measuring the NP peak positions with respect to the spectral template that was taken when
the satellite attitude stability was good enough, by averaging the oﬀsets measured for manystars. Once the oﬀset is measured, extraction of the 2D spectra is made again, after considering
the Y oﬀset (as well as X oﬀset as explained earlier).
The zero reference point is much diﬃcult to be found in NG spectra, due to lack of notable spectral features before applying the flux calibration. Therefore, although the toolkit
can estimate the reference point by examining the observed spectroscopy images, it is strongly
recommended to check the zero-th order light images for more accurate wavelength calibration.
The chance of detecting zero-th order light image at significant level for SG1, SG2, and LG2
is not so large. Therefore the drift of the wavelength zero reference point is calculated by using
the drift measured in NP or NG for MIR-S/L grisms, after correcting the pixel scale diﬀerence.
Another issue related to measuring the wavelength zero reference point is the finite pixel
resolution. Although the source positions can be measured with an accuracy of less than one
pixel size unit on the reference image, the extraction of 2D spectroscopy images can only bemade on integer pixel number to avoid erroneous image interpolation. This means that a pixel
error as large as ±0.5 could be introduced in the wavelength calibration process if not corrected,
and is not so small comparing with the full length of the dispersed spectroscopy images (∼ 50

102

IRC Data User Manual

pixel). As a first-order correction, we shift both the wavelength array and spectral response
curve, both of which should show rather smooth change along Y (or wavelength) axis, and not
perform sub-pixel shifting of the images. As a result, since object positions change slightly
among diﬀerent pointing observations, the wavelength at the same Y pixel of the extracted 2D
spectra (or the wavelength array) also changes with diﬀerent pointing observations.

6.1.12

Flat color-term correction

The presence of significant color variation in the flat images can be found in the ratio images ofthe broad-band flats (e.g., S7 flat / S15 flat). Therefore, although monochromatic flat-fielding
can flat the background, the object spectrum is aﬀected by the color term of the sensitivity. The
correction for this could be done after extracting the 2D spectra for each target and applying the
wavelength calibration. However, since we have only two broad-band filters for MIR-S/MIR-L(S7 and S15 for MIR-S, and L15 and L24 for MIR-L) and three for NIR (N2, N3, and N4), we
can derive only global trends of wavelength-dependence of the flats. (Note that the wide-band
filters, S9W and L18W, are not suitable for deriving the color dependence of the flat within the
spectral coverage of the channel). Two broad-band flat images are interpolated to estimate theflats for a given wavelength in the following way:F2 (x, y, λ) = [F (x, y, λ2 ) − F (x, y, λ1 )]/(λ2 − λ1 ) × (λ − λ1 ) + F (x, y, λ1 )(6.1.4)

where λ2 and λ1 are eﬀective wavelength for broad-band filters.
Therefore the color term in equation 6.1.3 is expressed as:[
F2 (x, y, λ)=spectral f eature(x, y) × F1 (x, y)]

F (x,y,λ2 )−F (x,y,λ1 )× (λ − λ1 ) + F (x, y, λ1 )λ2 −λ1spectral f eature(x, y) × F1 (x, y)(6.1.5)

Therefore the color-term correction is calculated by two broad-band super-flats and one spectroscopy super-flat. Note that the product F1 (x, y) × spectral f eature(x, y) always appears
together, i.e., we do not have to separate spectral f eature term from the ’super-flat’.
After the color-term correction the image is as follows:
obs000 = obj(λ) × R(λ)(6.1.6)

For the NG spectra with the point source aperture (Np), flat-fielding will be made in a similar
way to the slit spectroscopy of diﬀuse sources, since the aperture size is much smaller than thesize of dispersed spectroscopy images. For spectroscopy with NG at Np and other slit spectroscopy
data calibration, the super-flat is normalized to be unity at each wavelength (or Y) pixel, andthere are no spectral features in the flats. On the other hand, NG spectra at Nc will be reducedin the same way as for other slit-less spectroscopy.

6.1.13(local) Background subtraction (from extracted 2D spectra)

Although the background has been subtracted and it should be close to zero at this stage, any
remaining background on the extracted 2D spectroscopy images is subtracted at this stage. Herewe consider source masks for better determination of the local background. The background ismeasured and subtracted oﬀ, assuming a constant value across the images for all dispersers.

Version 2.2 (July 6, 2016)

6.1.14103

Spectral tilt correction

Although we do not reform the image ’shape’ along the wavelength direction during the courseof wavelength calibration because of simple linear grism dispersion, we do reform along X (orspace) direction to correct spectral tilt. The tilt occurs due to misalignment of grism insertion
direction with respect to chip orientation. The tilt is notably seen in NG images in which a pixel
shift as large as ∆X' 2 is observed over the longer dispersed image length (∆Y' 250 pixel).
Similar tilt is also observed for other prism/grisms (NP, SG1, SG2, and LG2), although the tilt
looks very small due to short dispersed image length. However, a tilt correction will be madefor spectra of all types of dispersers.

6.1.15Spectral response calibration

The spectral response calibration R(λ) depends exclusively on the wavelength. Therefore theresponse calibration table is a 1D vector (lambda vs. ADU/s/mJy). This means that response
variations of individual pixels have been removed beforehand by flat-fielding processes. Being
diﬀerent from the spatial flat correction, the spectral response varies significantly with wavelength due to change in quantum eﬃciency of chip and change in optical transmission along thecamera optical trains, including the disperser.
The observed wavelength-calibrated 1D spectrum in ADU is just divided by the spectral
response table. Since the wavelength for a given pixel in the observed spectrum is slightly
diﬀerent from that in the response table, simple interpolation will be performed to match thewavelength of the observed wavelength-calibrated spectrum with that in the response table.
The spectral response function used in the pipeline was defined at the centre of the field ofview and checked at the periphery of the field for consistency.

6.1.16

Notes on slit spectroscopy

The same pipeline can be used for both slit-less and slit spectroscopy data reduction. Although
the reduction of the slit spectroscopy data can be made in a similar way as for the slit-less
spectroscopy data, there are some diﬀerences in some processing steps between the two. Here
we summarize these diﬀerences.
• The slit spectroscopy flat-fielding consists of a normalized feature-less flat image. Therefore
no color-term correction is necessary.
• Background subtraction is made on extracted 2D spectra in the case of point sources slit
spectroscopy (Np), after stacking sub-frames. If dealing with slit spectroscopy for diﬀuse
sources, the background subtraction is not performed since entire slit is expected to be
filled with the object that is diﬀuse and there is no pure background area in the image.
• Shift-and-add feature of sub-frames will be disabled. Therefore any spectral change along
the slit could not be related to a real change in the spatial dimensions of the extended
source in case of large telescope jitter motion is observed. To measure such motion, run thepipeline for slit-less mode (without any slit-processing option in the pipeline command).
• In the wavelength calibration, measurement of the reference image positions will not be
made, and pre-defined slit positions will be used as a wavelength zero reference point.

104

IRC Data User Manual

6.2

How to install and to set-up the IRC spectroscopy pipeline

The package has been tested in a Linux environment. It seems to run on the MAC OS-X
environment, though it is not oﬃcially supported.
• Ask you local computer administrator for the IDL installation. There are no special requests in the IDL installation.
• Ask you local computer administrator for the ds9/xpa installation. There are no special
requests in the ds9/xpa installation.
• Get the irc specred package from the AKARI Observer’s web site (see section 1.3).
Extract and store it under your favorite directory.
• Set the following environment variables in your command-line shell. Below is an example
for csh:setenv IRC SPECRED ROOT <somewhere>
setenv IRC SPECRED LIB ${IRC SPECRED ROOT}/LIB/
setenv IRC SPECRED HOME ${IRC SPECRED ROOT}/ASTRO-F/
setenv IRC SPECRED CALIBDIR ${IRC SPECRED HOME}/IRC SPECRED/CALIBDIR/
setenv IRC SPECRED DATADIR <anotherwhere>
setenv IDL PATH +<IDL system path>:+${IRC SPECRED HOME}:+${IRC SPECRED LIB}IRC SPECRED ROOT, IRC SPECRED DATADIR, and IDL PATH, have to be modified by substituting <somewhere>, <anotherwhere>, and <IDL system path>, according to your local
system settings 1 .

6.2.1

Data preparation

As explained in Chapter 3, when de-packing the data from the archive under IRC SPECRED DATADIR,the raw data will be stored in IRC SPECRED DATADIR/<targetid>.<targetsubid>/rawdata.
IRC SPECRED DATADIR, <targetid>, and <targetsubid> will be used in the command line ofthe pipeline command.
All the reduced data and related information will be stored in a separate directory called<root dir>/<targetid>.<targetsubid>/irc specred out. When the directory is missing,
the toolkit will create it.

6.3

Calibration data

When de-packing the toolkit, the following calibration directories are created:

6.3.1

Calibration files• ${IRC SPECRED CALIBDIR}/DARK contains dark images with high S/N, combined with precompiled dark images, which can be applied for all the observations, after performing asmall correction in the count oﬀset. There are several ’super-darks’ for NIR/MIR-S/MIR-L(as specified in the following list files).
1

In the following, contents within the parentheses <something> should be changed according to user’s interests.

Version 2.2 (July 6, 2016)105– DARK/DARK NIR long.lst, DARK/DARK NIR short.lst– DARK/DARK MIRS long.lst, DARK/DARK MIRS short.lst– DARK/DARK MIRL long.lst, DARK/DARK MIRL short.lst• ${IRC SPECRED CALIBDIR}/FLAT contains two types of flats: super-flats for spectroscopy
and reference images. These super-flats are made by combining a large number of blanksky images:
For slit-less spectroscopy:– FLAT/SPEC2DFLAT NP.lst– FLAT/SPEC2DFLAT NG.lst– FLAT/SPEC2DFLAT SG1.lst– FLAT/SPEC2DFLAT SG2.lst– FLAT/SPEC2DFLAT LG2.lst
For slit spectroscopy:– FLAT/SPEC2DFLAT NP slit.lst
For reference images and color-term correction of the flats:– FLAT/IMAG2DFLAT N3.lst– FLAT/IMAG2DFLAT N4.lst– FLAT/IMAG2DFLAT S7.lst– FLAT/IMAG2DFLAT S9W.lst– FLAT/IMAG2DFLAT S11.lst– FLAT/IMAG2DFLAT L15.lst– FLAT/IMAG2DFLAT L18W.lst– FLAT/IMAG2DFLAT L24.lst• ${IRC SPECRED CALIBDIR}/MASK contains images of known bad pixels (hot pixels, cold
pixels, etc.). Masked area are marked by NaN (Not a Number) in the mask images.
– MASK/SLITMASK NIR.lst– MASK/SLITMASK MIRS.lst– MASK/SLITMASK MIRL.lst– MASK/OUTLIERMASK NIR.lst– MASK/OUTLIERMASK MIRS.lst– MASK/OUTLIERMASK MIRL.lst• ${IRC SPECRED CALIBDIR}/COORDOFFSET contains a table of coordinate oﬀsets in pixels(dX, dY) used to extract spectroscopy images for each object based on target positions
on the reference image for all dispersers. The table also includes sizes of source extraction
boxes (∆X, ∆Y) on reference and spectroscopy images, and oﬀsets (dX, dY) for zero-thorder light image position.

106

IRC Data User Manual– COORDOFFSET/IRCCOORDOFFSETPAR.dat• ${IRC SPECRED CALIBDIR}/WAVEPAR contains the wavelength calibration tables.
For grisms (NG/SG1/SG2/LG2), the wavelength (µm) is expressed by a 1st order polynomial(linear) equation, and parameters are (1) dispersion (dλ/dY), (2) wavelength at origin (λ0 ),and (3) position of the origin (Y0 ). In the toolkit, the position of the origin is fixed at thecenter of the extracted spectroscopy image. Therefore, only dispersion and wavelength atthe origin are set in the calibration database files. The parameters can be applied for all
the spectra within the FOV (i.e., the parameters are constant across the FOV). Eﬀective
wavelength ranges for each disperser are also set in the table (there are two kinds of range
definitions: ’sensitive’ and ’reliable’ ranges).
For NP, the pixel position for a given λ is expressed in a 2nd-order polynomial equation,
defined through three parameters (0th, 1st, and 2nd-order coeﬃcients). Note that, for data
analysis convenience, the equation is in pixel=function(λ) form, being in inverse form forthe grisms. Eﬀective wavelength ranges are also set in the table.
Only for NP, significant spectroscopy distortion exists, i.e., reference positions on the spectroscopy images cannot be represented by a constant pixel shift (dX, dY) from reference
image positions. The deviation of pixel shift along wavelength axis (or Y axis) from thecase of constant pixel shift is expressed in 3rd-order polynomial equation of reference position (dYdistortion =function(Xref , Yref )). Polynomial coeﬃcients are tabulated in a separate
ascii table, and are stored under the same directory. Note that spectroscopy distortion
along X (dXdistortion ) is not so significant, and constant pixel shift works rather well for
NP, as in the same way for NG/SG1/SG2/LG2.
– WAVEPAR/IRCWAVEPAR COMMON.dat– WAVEPAR/IRCWAVEPAR NP.dat– WAVEPAR/IRCWAVEPAR NG.dat– WAVEPAR/IRCWAVEPAR SG1.dat– WAVEPAR/IRCWAVEPAR SG2.dat– WAVEPAR/IRCWAVEPAR LG2.dat– IRCSPECBOXDYPAR NP.dat• ${IRC SPECRED CALIBDIR}/RESPONSE contains ascii files tabulating λ vs. ADU/long exposure time in seconds/mJy for each disperser. There are five such tables (NP/NG/SG1/SG2/LG2).
The spectral response is measured by observing flux standard stars with known flux energy
distribution. This directory also contains a NP template spectrum (wavelength-calibrated
spectrum, before calibrating spectral response) that will be used to find relative image
shift along dispersion direction (or Y) between spectroscopy and reference images.
– RESPONSE/RESPONSE NP.lst– RESPONSE/RESPONSE NG.lst– RESPONSE/RESPONSE SG1.lst– RESPONSE/RESPONSE SG2.lst– RESPONSE/RESPONSE LG2.lst

Version 2.2 (July 6, 2016)

107• ${IRC SPECRED CALIBDIR}/DISTPAR contains ascii tables containing spectral tilt information of the grism insertion angle.
– DISTPAR/IRCDISTPAR NP.dat– DISTPAR/IRCDISTPAR NG.dat– DISTPAR/IRCDISTPAR SG1.dat– DISTPAR/IRCDISTPAR SG2.dat– DISTPAR/IRCDISTPAR LG2.dat• ${IRC SPECRED CALIBDIR}/APCOR contains the spectral aperture correction tables.
– APCOR/APCOR NP.dat– APCOR/APCOR NG.dat– APCOR/APCOR SG1.dat– APCOR/APCOR SG2.dat– APCOR/APCOR LG2.dat

6.4

Running the pipeline

6.4.1

Data reduction order

The pipeline has to be run more than once, for NP (AOT0a) or NG (AOT0b) first, then SG1 andSG2, and finally LG2. We need to start processing the shorter wavelength cameras (NIR and
MIR-S), where larger number of brighter sources are expected to be observed within the FOV as
position reference sources. The information derived there will be used for registering the longer
wavelength cameras (MIR-S and MIR-L).
• to measure relative X and Y shift among spectroscopy sub-frames of NP/NG for registering
spectroscopy sub-frames of NP/NG/SG1/SG2/LG2.
• to measure relative X and Y shift among reference sub-frames of S9W (with larger numberof brighter sources) for registering imaging sub-frames of S9W and L18W.
• to measure relative X and Y shift of the spectroscopy image with respect to the reference
image of NP or NG for registering reference and spectroscopy images of NP/NG/SG1/SG2/LG2.
Therefore the data reduction order should be as follows:• First run: run the pipeline for NP (AOT04a) or NG (AOT04b), without a target table forenabling automatic target detection sub-program.
For NG data with point source aperture (Np), one needs to run the pipeline first without/Np spec option. For other types of slit spectroscopy, one may skip this run because
shift-and-add feature is disabled for this observing mode.
• Second run: run the pipeline for your desired targets. Make target tables for N3, S9W, andL18W on the raw images (at this stage only N3 image has been processed). Run the pipeline
again for NP/NG/SG1/SG2/LG2 with target lists. Image shift database created previouslywith NP/NG will be used for the 2nd run. If your target is compact and bright enough to
be detected by the source detection sub-program, you do not have to perform this 2nd
run. For the 2nd run, begin processing for NP/NG first, then SG1, and finally LG2.

108

IRC Data User Manual• Third run: run the pipeline again if you want to revise the target table. This is optional.
Now you got processed reference images for revising the target tables. Run the pipeline
again with the updated target tables to see final results.

6.4.2

Running the pipeline

Type the following in the IDL command line (a command in a single line):
irc specred, <targetid>, <targetsubid>, <ext source table>, <refimage list>,<specimage list>, <filter spec>
Mandatory arguments:• targetid: ID of the pointing observation. The information will be provided with the data
distribution.
Example: 1331048• targetsubid: Sub-ID of the pointing observation. The information will be provided withthe data distribution.
Example: 1• ext source table: An ascii list describing source position (X, Y) in pixel, or the target
table.
Example: myobjects.tbl
cat myobjects.tbl
100.0 100.0
200.5 200.5
150.0 150.5
This will extract spectra of sources located at (100.0, 100.0), (200.5, 200.5), and (300.0,
300.5) in pixel on the reference image.
If ext source table is set to ”” (null string), then the pipeline activates its sub-programfor automatic source detection.
There are some important tips in preparing the source table:– Coordinates counts from 1, not 0, i.e., coordinates of the lower left corner of the imageis (1, 1), not (0, 0).
– For NIR the toolkit interprets by default the pixel coordinates as measured in the
raw image (before the image rotation). When one measures the source positions in
the processed images (after the image rotation), set the /rotated NIR source tableoption at the pipeline command line.
– For MIR-L, one can use Y range of either 257-512 (for images before detaching
MIR-S/L) or 1-256 (for images after detaching MIR-S/L) to set Y position of thetargets. The pipeline subtracts 256 from the Y input if Y>256.
• refimage list: An ascii file listing FITS file names of reference image.
Example: N3.lst
cat N3.lst
F000001 N.fits
A default list is provided with the data distribution, and is found in /rawdata directory.

Version 2.2 (July 6, 2016)109• specimage list: an ascii file listing FITS file names of spectroscopy images.
Example: NP.lst
cat NP.lst
F000002 N.fits
F000004 N.fits
F000006 N.fits
A default list is provided with the data distribution, and is found in /rawdata directory.
Even if you find some images being damaged severely and you do not want them to be
included in the pipeline processing, you must list all the images in the input list. Then you
should specify the sub-frames to be removed on ds9 within the pipeline. This is because
the file names and their order in the list are used to relate FITS files to the exposure
timing along the AOT operation sequence.
• filter spec: a string specifying a disperser for the processing. Set one of the following:
N3 NP, N3 NG, S9W SG1, S9W SG2, L18W LG2

6.4.3

Options• root dir: a string specifying a directory in which a set of data is located. If set, thisoverrides the setting found in the environment variable IRC SPECRED DATADIR.
Example: root dir=’/DATA/ASTRO-F/IRC/SPEC/’• /Nh spec, /Ns spec, /Ls spec: flags for slit spectroscopy data reduction.
• /Np spec: a flag for Np spectroscopy data reduction.
See section 6.1.16 for more information of slit spectroscopy data reduction.
• /no tune sourcepos: a flag for disabling source position tuning subprogram within thepipeline. By default, irc specred tries to measure accurate source positions by searching
Gaussian peak around the coordinates set in the target table. This flag disables thisfunctionality.
• /use short refimage: use a short exposure image to measure source positions. By default, irc specred uses the long exposure frame for measuring source positions in thereference image. With this flag set, the toolkit uses the short exposure frame for measuring the source positions. Note that the data reduction will be made for both short andlong exposure frames even with this flag set. This flag could be useful for measuring source
positions of bright and saturated objects in the long exposure frame.
• savefile: set this option to a named variable that will contain the file name of the
IDL save file (section 6.5.5). The simplest way to restore the IDL save file is to run
irc specred with the savefile=savefile option, and issue restore,savefile command
after irc specred finished and before, e.g., plotting the spectra.
• /no slit flat: a flag for disabling flat fielding process for slit spectroscopy at NIR. By default, irc specred performs spectroscopy flat fielding with the super-flat image. However,as the natural background is faint in the NIR, the quality of the flat can not be improved
so much. As a result, unfortunately, the quality of the processed spectra is limited by

110

IRC Data User Manualthe quality of the flat, not by the dark current nor photon noise. With this option set,
irc specred skips performing the flat fielding. Users are recommended to compare thespectra processed with and without the flat fielding process. We expect no big diﬀerencesamong the two spectra, except for random pixel-to-pixel variation of the flux, or some narrow (as narrow as one-pixel size) spike features, meanwhile spectra processed without theflat fielding could look better in terms of S/N. However, it seems a good idea to compare
the results processed with and without the flat fielding. If you find that this is also thecase for your data, you may adopt the data processed with the option /no slit flat.

• /nir column pulldown correction: a flag for enabling masking column pulled-down regions in NIR images. With this option set, irc specred searches for any pulled-downcolumns in each sub-frame, by examining dark area pattern at Nh slit area where background is minimum, and the pipeline masks out the columns. Furthermore, the pipeline
also masks the same region in the next sub-frames in which damage by the column pulldown is still visible for deepest pulled-down columns.

6.4.4

Outputs• Whole image products:– Processed and stacked reference image (and corresponding mask and residual (reference image × mask) images). Dark subtraction, flat-fielding, and background subtraction are made:<targetid>.<targetsubid>.<filter spec>.refimage bg.fits<targetid>.<targetsubid>.<filter spec>.refimage mask.fits<targetid>.<targetsubid>.<filter spec>.residual refimage bg.fits– Processed and stacked spectroscopy image (and corresponding mask and residual(spectroscopy × mask) images). Dark subtraction, flat-fielding, and background subtraction are made:<targetid>.<targetsubid>.<filter spec>.specimage bg.fits<targetid>.<targetsubid>.<filter spec>.specimage mask.fits<targetid>.<targetsubid>.<filter spec>.residual specimage bg.fits

These images are in 3D, being the third (Z) dimension for the short (Z=0) and long (Z=1)
exposure frames.
NaN (Not a Number) represents masked pixel/area.
• Extracted image products:– Extracted reference images for individual targets:<targetid>.<targetsubid>.<filter spec>.refimage bg indiv.fits– Extracted spectroscopy images for individual targets (and corresponding mask images). There are two kinds of images. One is wavelength calibrated ( WC) image forwhich flat color-term correction and wavelength calibration were applied. The otherare flux calibrated ( FC) images for which flux calibration was applied as well as flatcolor-term correction and wavelength calibration:

Version 2.2 (July 6, 2016)

111<targetid>.<targetsubid>.<filter spec>.specimage wc indiv.fits<targetid>.<targetsubid>.<filter spec>.specimage mask indiv.fits<targetid>.<targetsubid>.<filter spec>.specimage fc indiv.fits<targetid>.<targetsubid>.<filter spec>.specimage noisemap indiv.fits
Note that our spectral plotting tool (see below) uses WC image as an input, not the
FC image, since the tool does on-the-fly flux calibration after considering various
plotting conditions/options. Since the default FC images does not care these, westrongly recommend to use our plotting tool to review the spectra.
In wc indiv.fits and fc indiv.fits files, wavelength information is set in the
FITS headers with header keywords: CRVAL, CDELT, CRPIX, and CD matrix. Users canplot the spectra with, e.g., the standard spectral plotting tool SPLOT on IRAF.
Note, however, that there are no such FITS header information for prism NP spectra
because of their non-linear wavelength solution.
Here is an example to plot the SG1 spectra with IRAF/ SPLOT task.
splot xxxxxxx.1.S9W SG1.specimage fc indiv.fits
Image line/aperture to plot (0:) (1): 10
Image band to plot (1:) (1): 2
In this example, the plot shows flux-calibrated spectrum of the 2nd object along X(space) =10 pixel. Note that 2nd object means source ID 1 on the IRC SPECRED
since IDL counts from zero while IRAF does from one. Note also that no aperture
correction can be applied for the spectral plot with the SPLOT task.
These images are in 3D, being the third (Z) dimension for source id. NaN (Not a
Number) represents the masked pixel/area.
• Others:– Target information table: a table of target information, such as positions (after source
position tuning), flux, and size (Gaussian FWHM).
<targetid>.<targetsubid>.<filter spec>.target table.tbl
Its format is the following:ID, image x, image y, image mask dx, image mask dy, spec x, spec y, spec mask dx,
spec mask dy, flux, image FWHM, spec bgnoise ADU, spec x pos,spec x FWHM,
bad sourcepos flag
– Target table: If the source detection sub-program is used within the pipeline, a target
table will be written. The file format is similar to the input target table. When source
position tuning option is on, this file contains the updated source coordinates.
<targetid>.<targetsubid>.<filter spec>.source table.tbl– IDL save file: The output of the pipeline will also be stored in the IDL save file, which
is basically a dump file of the IDL memory image at the end of the pipeline processing.
See also 6.5.5 to see how to work on the save file.
<targetid>.<targetsubid>.<filter spec>.IRC SPECRED OUT.sav

112

IRC Data User Manual– Log of the toolkit processing: a copy of the irc specred logger is saved as an ascii
file.
<targetid>.<targetsubid>.<filter spec>.log– DS9 region files: DS9 region files that have been used to locate targets on reference
and spectroscopy images on ds9.
<targetid>.<targetsubid>.<filter spec>.refimage.reg<targetid>.<targetsubid>.<filter spec>.specimage.reg
The region files and saved FITS images of the whole image products can be used toreview the targets on ds9 manually.

• Pipeline work files: The following files will be created by the pipeline. The files will beoverwritten without notice. User are asked not to delete any of these files.
– NP SHIFT XY.dat: for registering NP/SG1/SG2/LG2 sub-frames in AOT04a– NG SHIFT XY.dat: for registering NP/SG1/SG2/LG2 sub-frames in AOT04b– S9W SHIFT XY.dat: for registering S9W and L18W sub-frames– NP SPECBOX SHIFT X.dat: for shifting SG2/LG2 along X in AOT04a– NP SPECBOX SHIFT Y.dat: for shifting the wavelength zero-reference point for NP/SG1/SG2/LG2 in AOT04a– NG SPECBOX SHIFT X.dat: for shifting SG2/LG2 along X in AOT04b– NG SPECBOX SHIFT Y.dat: for shifting the wavelength zero-reference points of NG/SG1/SG2/LG2 in AOT04b

6.4.5

Summary of interactive operations within the pipeline

Although the pipeline program works as a ’pipeline’ (i.e., without interactive operation by users),
some operations in the irc specred do require interactive operation.
• Removing one or more sub-frames before combining the sub-frames: In some sub-frames,
one may find severe damage by cosmic-ray shower, nearby satellite passing in front of thetelescope, etc. To check the sub-frames and remove from the sub-frame combination list,
all the dark-subtracted/flat-fielded/sky-subtracted sub-frames will be shown on a ds9 forreviewing. To remove some sub-frames, use the Frame -> show/hide frames pull-downmenu of ds9 to hide the frame(s) you need to remove. The toolkit checks the hidden
sub-frames and remove them from the internal sub-frame combination list.
• Retrying automatic source detection with modified detection parameters: If you use automatic source detection sub-program within the pipeline, you can retry source detection
after tweaking the detection parameters. You will see the reference image on the ds9 with
detected sources marked, and you are asked to answer if the detection is satisfactory ornot. If the answer is no, then another dialog with several detection parameter entries pops
up. You can edit the parameters, and press OK to re-find the sources. You can repeat
this detection process as many times as you like until you get satisfactory source list. The
sub-program uses daofind algorithm, with the following parameters:

Version 2.2 (July 6, 2016)113– threshold: Threshold intensity for a point source - should generally be 3 or 4 sigma
above background.
– fwhm: FWHM to be used in the convolve filter.
– sharplim: 2 element vector giving low and high cutoﬀ for the sharpness statistic(Default: [0.2,1.0] ). Change this default only if the stars have significantly larger orsmaller concentration than a Gaussian.
– roundlim: 2 element vector giving low and high cutoﬀ for the roundness statistic(Default: [-1.0,1.0] ). Change this default only if the stars are significantly elongated.
By default, threshold is three times the measured background noise. When too muchor too less sources are found, threshold change would give better results, and it is notnecessary to take care of sharpness/roundness parameters in most of the cases.

6.4.6

Warning messages of the pipeline

Some common and frequently appearing warning messages are listed below.
• Warning (irc specred):
guments, and try again.

Wrong number of arguments! Check the command line ar-• Warning: No <..> was found/set...Stop! Some files that should be provided forthe pipeline seem missing. Check if list files are properly set in the command line. Thiswarning will also appear if you run SG1/SG2/LG2 data reduction before performing NP or
NG data processing, and some mandatory database files, e.g., describing relative image
shifts, are missing.
• Warning: Offset search box is too small!: When the telescope drifts too much,the image matching sub-program fails to find the best shift values among sub-frames.
Normally the sub-program resumes searching the shift with larger search box. Normally,
this message is not so serious.
• Warning: No data are available for measurement... Returning 0! or Warning:
Data seems too noisy (sigma=<sigma>)... Returning 0!: These messages will appear if, e.g., detected sources are too faint and their positions could not be measured withgood enough accuracy. Check the source detection parameters for better source detections.
This message is not so serious in most of the cases.
• Warning: sigma of specbox Y shift measurement seems too large!: This warning appears when the toolkit fails to measure the relative Y shift of NP spectra withrespect to N3 reference image. Check the reference image on ds9 to know if source detection could be made successfully. Sometimes the program might detect only cosmic-ray
hits, not stars, if the parameters are not optimized.
• Warning: sky level is larger than 1.5 times sky sigma!: After extracting spectroscopy images, remaining sky will be subtracted oﬀ locally around the source. If everything works fine, the average of the remaining sky should be very small, and is typicallyless than 1.5 times sky rms fluctuation. This warning message will appear if sky level islarger than the typical value. When this warning appears, check the ds9 image to see if
there remains large scale sky level variation. Presence of such sky often indicates failure inmonochromatic flat-fielding and/or global sky subtraction, or any big unexpected debris.
Note that this warning will not appear for slit spectroscopy (including NG at Np).

114

IRC Data User Manual• Warning: Available sky area is too small!: Due to clouded source masking, theremaining sky area is too small for measuring sky. Check the source detection parameters
for fewer source detection. Usually, this message is not so serious.
• Warning: Cross-correlation peak is weak: The cross-correlation function will becalculated while registering sub-frames and/or short and long exposure frames. The peakvalue of the cross-correlation function is a good measure of the frame registration. The
value is 1 for ideal image matching, and is typically 0.6 or larger for real data with noise,but peak of 0.3 is still good. When this warning appears, check the quality of the registeredand stacked images. So far registration of the short exposure frame can not be made withgood enough accuracy, and one should ignore this warning for short exposure frames. Thismessage is not so serious in most of the cases.
• Warning: ROB MAPFIT: Too few points!: This message comes from the fitting routine
ROB MAPFIT called from some of the toolkit programs. The routine tries to fit the image
region robustly (e.g., excluding outliers, iteratively, etc.), but it sometimes fails when thefitting area is heavily masked out for some reason. However, it somehow return the result(even if the results are not reliable in terms of statistics). Users may ignore the messages.
• Warning: strange spec file list... Stop!: The irc specred reads list of FITS
files to be processed (NP.lst/NG.lst/SG1.lst/SG2.lst/LG2.lst). When something wrong
happens during data acquisition (i.g., too much time before stabilizing the telescope pointing), telemetry downlink (e.g., loss of telemetry), and/or data handling at ground (e.g.,
disk storage failure), the listed available FITS files are not in a proper order. Observers
may notice that the list misses one or more FITS files due to some of these reasons. The
toolkit analyze the file list before actually processing the data, and warns the uses if it
detects something strange. Upon this warning messages, users are requested to checkthe input file lists or contents of distributed FITS files, and report any problems to the
AKARI/IRC Helpdesk for more support. Although the irc specred skips this list checking routine if a flag /no database check is set to the toolkit, use of this option without
noting problems is dangerous, and usually is not recommended.

6.5

Working on the pipeline output

6.5.1

Displaying the whole images on ds9

Here we explain the region marks on the ds9 that are shown in the processed whole image
products, e.g., spectroscopy and reference images before source extraction.
In the spectroscopy image side (left),• The blue rectangle shows spectroscopy image extraction area.
• The green rectangle shows area reserved for the object (or masked area for other objects).
• The red rectangle shows plotting area as defined by the spectral plotting tool.
• The yellow circle shows the expected positions of the zero-th order light.
In the reference image side (right), marked circles correspond to source positions (withdiameter of the source FWHM).
• Green circles show sources with good position measurements.

Version 2.2 (July 6, 2016)115• Red circles show sources with less accurate position measurements.
Source identification numbers are also indicated by the region marks.
For clear view of the image under complicated region marks, check out the region -> show
regions check box in the ds9 pull-down menu.
To display these images manually, issue
show aperture on ds9, <image>, source table (,/imag) 2
where <image> could be refimage ff[*,*,1] or specimage bg, etc. on the IDL commandline. When /imag option is set, the image is shown on the right side of the ds9, with region
marks for reference image. The default (no option) is for spectroscopy image. See appendix for
more on array name conventions.

6.5.2

Displaying the extracted images on ATV

ATV is a general-purpose interactive array image-displaying tool. The array should be in 2D.
See ATV web page (http://www.physics.uci.edu/ barth/atv/) for more information on the
program 3 .
Command line syntax:
atv,array(,/block)
Here are some ATV tips:• To display whole images, issue
atv,<array>[*,*,1]
1 means long exposure frame (and 0 for short). Here, <array> should be something like
refimage bg or specimage bg.
• To display extracted images of your desired source id, use
atv,<array>[*,*,source id]
Here, <array> should be something like specimage n bg. To check mask area, use
atv,<array>[*,*,source id]*mask[*,*,source id]• When color table looks abnormal, type set color at the IDL prompt before launching the
atv.

6.5.3

Checking for wavelength zero reference point with the zero-th order
light image

The toolkit calculates the wavelength zero reference point based primary on positions of theobjects on the reference image. It also takes into account a wavelength zero-point drift due
to satellite attitude drift, as well as coordinate rounding eﬀect when extracting 2D spectra.
In most cases, these methods work well to estimate the wavelength zero reference point withaccuracy of 0.5 pixel or less. Since positions of the zero-th order light image are also calculated
in the same way as for the wavelength zero reference point, one may check the wavelength2

Items in parentheses () are optional.
In some systems, /block option may be required for interactive operation on the ATV. The conditions forwhich /block requirement seems to depend on local Linux or X11 system settings. The author does not have any
good ideas on the correct usage of this option.
3

116

IRC Data User Manual

zero reference point accuracy by comparing positions of expected zero-th order light image andactually observed ones. Unfortunately, this check can be made only when bright sources withmeasurable zero-th order light images are observed at some part of the FOV by chance.
When a shift is found, the change wave offset command can correct for the estimatedwavelength shift in pixel. The shift is calculated from the current position. This commandchanges the internal variable that records the wavelength oﬀset, updates an oﬀset database on
disk, and re-draws the images on ds9 with updated zero-th order light marks. This command canbe used as many times as needed until getting satisfactory result. Then one can use the spectral
plot tool for reviewing spectra with updated wavelength and spectral-response calibration. See
below for the plotting tools.
Command line syntax (a command in a single line):change wave offset,<wave offset>,source table,
space profile,spec profile,wave array,specimage fc 1d,
refimage bg,specimage bg,
refimage n bg,refimage n bg short,specimage n sff,specimage n sff short,specimage n wc,specimage n wc short,specimage n fc,specimage n fc short,
res refimage bg,res specimage bg,
mask refimage,mask specimage,mask specimage n,
imagheader,specheader,imagheader extract,specheader extract,noisemap,noisemap n,noisemap short n,noise mask,
dir=!IRC SPECRED DIR.workdir,savefile=savefile,/write indiv spec
where <wave offset> is a pixel number (e.g., 1.0, 0.5, -0.5) to be shifted. 4

6.5.4

Spectral plotting tool

The toolkit’s spectral plotting tool can handle many IRC-spectroscopy-specific features, and werecommend to use it for creating spectral plots. These are some of the functionalities of thetool:• source masks can be considered. (see also /no mask option)• error bars (statistical plus systematical ones) can be plotted.
• simple image filters for removing isolated ’spike’ pixels can be applied.
• aperture stacking along spatial direction and smoothing along wavelength direction canbe applied for higher S/N spectra.
• shifting aperture positions along spatial direction (X axis) can be made.
• aperture correction.
Command line syntax (a command in a single line):
4

Since this is a very long command, it seems better to copy the command that is written in the${IRC SPECRED HOME}/IRC SPECRED/irc specred.pro program.

Version 2.2 (July 6, 2016)

117

plot spec with image,wave array,specimage n wc,mask specimage n,source table,<source id>
and for short exposures:plot spec with image,wave array,specimage n wc short,mask specimage n,source table,<source id>,/shortwith the following options:• nsum: Number of pixels along X axis combined for plotting. Default is 3. For slitless
spectroscopy, larger nsum (wider aperture) collects more photons from the object, but thisalso collects more background noise. Therefore, the best nsum for highest S/N is typically
2 or 3 for point sources (corresponding typical full-width of image PSF). In the case of slit
spectroscopy, the range to plot the spectrum is:– NP/NG: up to the edge of the extracted region– SG1: nsum≤ 10– SG2: nsum≤ 8– LG2: nsum≤ 8
If space shift6= 0 (see below) then the range should be smaller in order to prevent fromextracting the spectrum out of the slit area.
• smooth: Boxcar smoothing width (in pixel) along wavelength direction. Default is smooth=0(no smoothing). For spectra with higher S/N without loosing spectral resolution, smoothshould be 3 (corresponding typical full-width of image PSF). Larger boxcar smoothing window will loose the spectral resolution. Note that when even number is set in the smooth(e.g., smooth=2), the actual smoothing box size would be smooth+1 (e.g., smooth=3).
• /sigma filter: This option enables sigma filter operation (at 3 sigma significance level)
over 2D spectra to remove spatially isolated high or low count pixels. Default is oﬀ. If
you find too narrow emitting/absorbing features in your plots, try this option to see if
this is a real feature or not. Note that, if there is a cosmic ray hit at the position in
one of the sub-frames, such count should be removed as an outlier while combining subframes with sigma-clipping averaging method. However, if there are temporal hot pixels
or weaker hot/cold pixels that are not shown in the hot pixel mask database, you will findoutliers (hot or cold pixels) even after sub-frame combination. Users should take care notto remove real narrow features.
• space shift: shift of the plot extracting box along X (spatial) axis in pixel. Default
is zero. Although the pipeline adjusts the X coordinates of spectrum extraction box bymeasuring positions of spectra, one may find remaining X oﬀset in some cases. Change
this oﬀset to find peak position of the flux. If one changes nsum and space shift, issue
the display command to see the modified spectrum extraction boxes graphically on the
spectroscopy images over the ds9.
show aperture on ds9,specimage bg,source table,
space shift=<space shift>,nsum=<nsum>(a command in a single line)• /no mask: by default, plots are shown after applying spectral overlapping masks by nearby
sources. The /no mask option disables this masking functionality and plot spectra regardless of the possible source overlapping. Since masks are created without examining the

118

IRC Data User Manual
source brightness and/or spectral shape (e.g., line emitters, continuum emitters with break,etc.), one may often find the situation where no significant change in plots is found whencomparing plots with and without the masking. If this is the case, you can just disable
the masking by setting /no mask option.
This option is especially relevant when the source of interest is much brighter that theoverlapping ones.

• ps, png, ascii: Plots will be recorded on the files, not on the IDL plot window.
– ps=<filename> creates a postscript file (filename.ps) of the plot in the working
output directory (under /irc specred out).
– png=<filename> creates a png image (filename.png) of the plot in the working
output directory.
– ascii=<filename> creates an ascii file (λ vs flux and flux errors) (filename.spc) of
the plot in the working output directory. This file can be used for further analysis,for example using gnuplot program, with the command of plot ’filename.spc’
with yerrorbar.
• /with image, tvbottom=<tvbottom>, tvtop=<tvtop>: The 2D image will be shown
on TV (an IDL graphic window) below the spectrum plot. Extraction box for plotting
1D spectrum is overlaid. The default is with image=0 (i.e., no TV display). The top
and bottom ADU counts for displaying image can be specified with tvtop and tvbottom.
These options are active only when /with image is set.
• /diffuse: For slit spectroscopy data, spectra will be shown in units of MJy/str, rather
than mJy with this option. The diﬀuse flux calibration is not yet fully established. Before
this flux scale conversion, both nsum and space shift parameters are taken into accountto specify the spectral extraction aperture to create the spectrum for plotting.
• /no aperture correction: Aperture correction for point-like sources will be applied automatically within the plotting tool. The aperture size, set by nsum, is taken into accountto find the correction factor. When the /no aperture correction option is set, the correction will be disabled. To perform good aperture correction, the aperture is centeredon the source, and nsum should be 3 or more. Note that the aperture can be shifted by
space shift parameter.
• Other generic plot options useful in the plotting tool: The plotting tool accepts any kindof IDL-generic plot options for spectral plotting. See plot manual in the IDL documents
for full information.
Following are some frequently used options.
– xrange: plot range along the X (wavelength) axis. By default, plots are shownwithin the wavelength range set in the wavelength calibration database file along the
X axis. If set explicitly in the plotting tool command line, the default settings will
be overridden.
– yrange: plot range along the Y (flux) axis. By default, plots are shown in auto-scalemode along Y. One can limit/fix the plot range by setting yrange.
– /xlog, /ylog: plotting in log scale along x or y.

Version 2.2 (July 6, 2016)

6.5.5

119

Working on saved data

All the processed data are saved as an IDL save file, as well as FITS output files. The IDL
save file is actually a dump record of the IDL memory image at the end of the data processing. Therefore, one can recall the pipeline results by simply issuing the following command:
restore,<savefile>. Here the <savefile> is a string of the save file name. To recall othersave file image, issue .reset session first to clear the current IDL memory contents, and thenissue another restore command with another save file name. See IDL manual to know more on
the IDL save file, restore, and .reset session commands.
After restoring the IDL memory, one can use, for example, the following irc specred commands to review the results.
• show aperture on ds9, specimage bg,source table• show aperture on ds9, refimage bg,source table,/imag• plot spec with image,wave array,specimage n wc,mask specimage n,source table,<source id>

6.6(Hopefully) Useful Tips

6.6.1

Getting best S/N spectra in slit (Ns, Nh) or Np spectroscopy data

Due to the higher dispersion of NG spectra, through narrower slit area (Np, Ns, Nh), at nearinfrared where the natural background light is faintest, the S/N of the NG slit flat image is ratherpoor, and this often limits the quality of the processed spectra. There is an option to disable
the slit flat correction (/no slit flat option of irc specred). We recommend processing thesame data, with (default) and without (with the option) flat correction, for comparison. If one
finds little noticeable diﬀerences in spectral features, (except for quality of the spectra), as we
expect, one may accept the spectra processed without flat correction as a final calibrated data.
See also section 6.4.3.

6.6.2

Tackling narrow spikes seen in NIR spectra (especially in slit spectra)

Even if one is interested in the slit area, any anonymous bright stars that happened to be within
the big aperture may cause the column pull-down eﬀect of the array, damaging even the slit
spectroscopy data. To check this possibility, examine not only the 1D-extracted spectra but also
the entire 2D-images, even outside of the slit area, so as to locate damaged columns (or raws,
since NIR images are rotated during the toolkit processing).
With the toolkit version 2, new option /nir column pulldown correction was introduced,
and the pulled-down columns will be masked out. See also section 6.4.3.

6.6.3

Examining strange/fake features in NP spectra, especially around 2.43.5 µm

Sometimes an error in wavelength calibration leads to errors in the spectral response calibration,
creating funny/fake spectral features in NP. In this case, the features resemble the response curve(or more exactly, its change per pixel along wavelength). Because of lowest spectral resolution
and rather structured response-curve shape, this eﬀect is most clearly seen in NP spectra. Notethat even small wavelength oﬀset (say, a mere 0.5 pixel) would produce noticeable pseudo spectral

120

IRC Data User Manualfeatures, especially around 2.4-3.5 µm. We recommend to check the spectra of nearby field stars
as well as your object to see if the funny features are common to all objects. If they look similar,
the features are likely to be fake.
To see how the features change with wavelength oﬀset, try the procedure described in section 6.5.3. Although there are no zero-th order light images available for NP, the commandchange wave offset works even for NP for testing how the spectral features change with theoﬀset. Note that, for NP, there are no guidelines, such as zero-th order light, to find the best
wavelength zero point in general. Therefore the user should justify the amount of oﬀset enteredwith this command. Remember that nominal error of the wavelength zero-point calculation is
1.0 pixel or less.

6.6.4

Examining flux level (in)consistency among diﬀerent disperser data

Sometimes one may find jumps in flux level between SG1 and SG2 spectra (or other pairs ofadjacent wavelength) for a single source. There are possible reasons for the jump, and tips tosolve the problem.
• Source contamination: Degree of contamination changes with wavelength and, hence, withdispersers, causing flux change across the dispersers. User needs to check the reference
image as well as spectroscopy images to find possible contaminating sources. There are nogood recipes to remove the contamination.
• Aperture centering: Check the aperture position (along X or space) to see if the aperture isreally at the peak of the dispersed images. The toolkit tries to put it at the right position
by tracking the telescope jittering motion, but it is not always perfect. Use space shiftoption of the plotting tool along with /with image option to find the best position. See
section 6.5.4 for actual operation.
• Aperture correction uncertainties: Aperture correction is not always perfect because oneneeds to adopt rather narrow aperture (nsum=3 or so) for achieving the best S/N. If thisis the case, even a small shift of the aperture position on sky (even at a scale of subpixel, although space shift should be given in an integer pixel unit) gives rather large
uncertainties in the flux aperture correction. Note that spectroscopy data relies on 1D
spatial PSF of the source, and the pixel scale is not high enough to sample the PSF atgood enough accuracy. So, with these limitations in mind, one needs to check the flux
level, by changing the nsum and/or space shift parameters, for your own source and its
brighter neighbours, to find the accuracy of the absolute flux calibration. See section 6.5.4
for actual operation.
• Wavelength oﬀset error: Because of the very low spectral resolution, the spectral response
curves show rather sharp change near the band edge. If the wavelength oﬀset is notproperly set, a systematic error in the flux level is expected near the band edge due towrong wavelength assignment in the spectral flux calibration process. If this happens, thespectrum looks brighter and fainter (or fainter and brighter) at the shortest and longest
wavelength coverage of the disperser in a systematic manner. The way the shape change
depends on the sign of error in wavelength oﬀset (plus or minus). See section 6.5.3 forchecking the wavelength oﬀset error.

Version 2.2 (July 6, 2016)

6.7

Appendix

6.7.1

Variable name conventions

121

As a general rule, the extension of the IDL variables ( ff, bg, wc, fc) indicates the finallyprocessed calibration status. Examples:• ff means that the data is processed all the way to flat-fielding.
• bg means that the data is processed all the way to background subtraction, i.e., flat-fieldedand background subtracted.
• wc means that the data is processed all the way to wavelength calibration, i.e., flat-fielded,
background subtracted, and wavelength calibrated.
• fc means that the data is processed all the way to flux calibration, i.e., flat-fielded,
background subtracted, color-term corrected, wavelength calibrated, and flux calibrated.
Whole image products: ff and bg are in 3D format (X, Y, short/long ID). Short exposure
frame is in Z=0, and long exposure frame is in Z=1.
Extracted image products: n images are in 3D. The third dimension is for indicating thesource id. The following extensions refer to diﬀerent processing stages:• n bg: background subtracted on extracted images.
• n wc: wavelength calibrated, after color-term corrected, residual background subtracted.
• n fc: flux calibrated, after color-term corrected, residual background subtracted, andwavelength calibrated.
Finally, these are the most frequently referred arrays:• refimage bg: Flat-fielded, background-subtracted whole reference image in 3D (X, Y,
short/long ID)• specimage bg: Flat-field, background-subtracted whole spectroscopy image in 3D (X, Y,
short/long ID)• specimage n wc: Wavelength calibrated extracted 2D spectra in 3D (X, Y, source id)• specimage n fc: flux calibrated extracted 2D spectra in 3D (X, Y, source id)

6.7.2

Summary of Commands and their Options

This is a broad outline of the main commands related to the pipeline together with their generalsyntax. For arguments encompassed by <> and <>, you need to specify your own processing
parameters. Options starting with / are flags or switches to enable some functionality of theroutine. For other options, you can set your parameters in numerals or ascii characters (thatshould be encompassed with single quotations).
• Running the pipeline
Usage:
irc specred, <targetid>, <targetsubid>, <ext source table>, <refimage list>,<specimage list>, <filter spec>
Options

122

IRC Data User Manual– <targetid>: pointing id of your observation. Typically, ’1234567’. Check your data
distribution.
– <targetsubid>: pointing sub-id of your observation. Typically, ’1’. Check yourdata distribution.
– <ext source table>: an ascii file that specifies the source coordinates in X and Y
in units of pixels. If this is set to be ” (null), then automatic source detection program
will be enabled within the pipeline.
– <refimage list>: an ascii file that specifies the FITS file names of the reference
images to be processed. Typically, either ’N3.lst’, ’S9W.lst’, or ’L18W.lst’– <specimage list>: an ascii file that specifies the FITS file names of the spectroscopy images to be processed. Typically, either ’NP.lst’, ’NG.lst’, ’SG1.lst’,’SG2.lst’, or ’LG2.lst’– <filter spec>: an code to specify the data processing mode, or a pair of filter anddisperser names for the processing. This should be one of the following: N3 NP, N3 NG,
S9W SG1, S9W SG2, or L18W LG2.
– /Nh spec, /Ns spec, /Np spec, /Ls spec: flags to specify the slit spectroscopy
data reduction.
– /no tune sourcepos: a flag to disable source centering functionality (fine tuning ofsource positions with local Gaussian fitting around the user-specified source locations)when the toolkit is run with user-specified source table.
– /use short refimage: a flag to use short reference image, rather than long reference
image, for source detection. This is good for bright, saturated sources.
– /no slit flat: a flag to disable flat-field correction for slit spectroscopy data (forNp spec, Ns spec, Nh spec, Lc spec). Use of this switch is recommended for slit
spectroscopy with the current version of the toolkit/calibration database.
– /nir columnpulldown correction: a switch to enable correction for column pulldown eﬀect for Np spectra.
– savefile: an ascii variable that store the file name of the IDL save file that records
the irc specred output.

• Displaying whole image products
Usage:
show aperture on ds9,specimage bg,source tableorshow aperture on ds9,refimage bg,source table,/imag
options– nsum: width of source extraction apertures in units of pixel, corresponding to thewidth of red rectangles shown on ds9.
– space shift: number of pixels by which to shift the source extraction apertures
along spatial direction.
– /imag: a flag to display reference images. Without this flag, the procedure assumes
that the data to be displayed are spectroscopy images.

Version 2.2 (July 6, 2016)123• Plot spectra
Usage:
plot spec with image,wave array,specimage n wc,mask specimage n,source table,<source id>
options– <source id>: a number that specify the source to be plotted. You can find thenumber by looking at the ds9 window that displays whole image products.
– /short: a flag to display short-exposure spectra. One needs to set specimage wc short,instead of specimagen n wc in the plot spec with image command.
– nsum: number of pixels along X axis combined for plotting. This nsum parameter also
works for /diffuse option.
– smooth: boxcar smoothing width (in pixel) along wavelength direction.
– /sigma filter: a flag to enable sigma filter operation (at 3 sigma significance level)
over 2D spectra to remove spatially isolated high or low count pixels.
– space shift: shift of the plot extracting box along X (spatial) axis in pixel.
– /no mask: a flag to disable masking functionality, i.e., plotting spectra regardless ofthe possible source overlapping.
– ps: root filename of the PS graphical output (<ps>.ps) of the spectral plot.
– png: root filename of the PNG graphical output (<png>.png) of the spectral plot.
– ascii: root filename of the ASCII numerical output (<ascii>.spc) of the spectra.
– /with image: a flag to display 2D image below the spectral plot.
– /diffuse: a flag to convert flux scale to MJy/str for slit spectra.
– /no aperture correction: a flag to disable aperture correction factor in plotting
the spectra.
– xrange, yrange: parameters to specify plot ranges in X and Y axes, respectively.
– /xlog, /ylog: a flag to plot spectra in logarithmic scale along X and Y axes, respectively.
• Tweak wavelength zero-point manually
Usage:
change wave offset,<wave offset>,source table,
space profile,spec profile,wave array,specimage fc 1d,
refimage bg,specimage bg,
refimage n bg,refimage n bg short,specimage n sff,specimage n sff short,specimage n wc,specimage n wc short,specimage n fc,specimage n fc short,
res refimage bg,res specimage bg,
mask refimage,mask specimage,mask specimage n,
imagheader,specheader,imagheader extract,specheader extract,noisemap,noisemap n,noisemap short n,noise mask,
dir=!IRC SPECRED DIR.workdir,savefile=savefile,/write indiv spec
– <wave oﬀset>: oﬀset along wavelength direction in pixel units.

124

IRC Data User Manual

6.8

Error messages when running the pipeline and Troubleshooting• In general double quotation mark (“) can cause problems when calling the toolkit
in IDL. For example:
restore,"12345678 some more information.sav"
orirc specred,"12345678 some more information.tbl",’SG1.lst’,’SG2.lst’,S9W SG1give IDL syntax error, We suggest to use ’ (single quotation mark), rather than ” (double
quotation mark) anytime when you work with the IRC SPECRED toolkit. For more, checkthe IDL manual (search ’quotation’).
• When one of the input parameters of the toolkit is a null string, no space between
single quotation marks should be given. For example:
irc specred,’ ’,’SG1.lst’,’SG2.lst’,’S9W SG1’
will give an error message, because the toolkit tries to find the source table whose nameis ’ ’ (blank space), and it fails. The correct syntax is:
irc specred,’’,’SG1.lst’,’SG2.lst’,’S9W SG1’
• If IDL complains about some undefined procedures/functions, probably something is wrong in the setting:– Check .cshrc carefully, and/or.
– After launching the IDL, issue print,!path on the IDL command line. This command shows all the paths for the IDL to search the libraries. See if all the TOOLKIT
directories are included in !path.
• If after running the pipeline several times successfully, it fails with some unknown reasons,
try resetting the IDL session, by issuing .reset command at the IDL command line. This
resets everything stored in the IDL memory, including IDL common and environmental
variables that are referred/updated during the toolkit session. Some old settings mightcause the trouble. We recommend to reset every time the toolkit is restarted after apipeline processing failure to avoid any confusion regarding old IDL variables. Remember,
however, that the .reset command will destroy even the main IDL memory contents that
contain information for, e.g., plotting the spectra. Of course, users can restore the IDL
save file contents back to the main IDL memory to resume the data analysis.
• The filename where the toolkit saves the information is always<targetid>.<targetsubid>.<filter spec>.IRC SPECRED OUT.sav.
Therefore the savefile is a string variable output that records the save file name, not an
input to specify the save file name. If the pipeline is run more than once with diﬀerent
options, the savefile should be renamed before the second run in order to be able to recover
the previous results. You can recall the record even if you rename the save file name, by
issuing:
restore,<renamed save file>.

Version 2.2 (July 6, 2016)125• If you want to see the results of previous toolkit run, recalling the save file, and you
do not remember the ID of your source, issue:
show aperture on ds9, <image>, source table, (/imag) as instructed at section 6.5.1.
This launches a ds9 and displays image and region marks on it. Do not forget to include
source table after <image>.
• There are no good ways to run more than two pipeline processes at a same time
on a single computer as a single user, because more than two toolkit processes share somesame dS9 windows. Please use other computers or other user account.
• There are no good tools to coadd data taken over multiple pointings. This is beyond the purpose of the toolkit right now. The simplest way is to average/combine extracted 1D spectra after dumping the results on ASCII files, with the ASCII option of theplot spec with image command and coadd them with any available tool. Note that the
wavelength for a given pixel is diﬀerent from pointing to pointing for slit-less spectroscopy
data, even if the same target was observed with the same pointing coordinates. One mayneed to rebin the spectra for a common grid for proper stacking.
• There are no good tools for plotting spectra for a given source taken with diﬀerent
dispersers at once. One needs to dump the spectra with the ASCII option when plotting
the individual spectra, and then use your favorite plotting software for plotting multiple
spectra once.
• If the spacecraft attitude shifts after the reference frames have been taken, theeﬀect will be apparent in the wavelength calibration. A shift of more than 1-2 pixels canhappen. For NP only, the signal at the peak of the RSF is used to correct the wavelengthreference by default. The result will be inserted into the log file which will be further used
to correct the drift in SG1/2 and LG2. Therefore the NIR data should be processed first.
Similarly, for NG in the point source aperture (Np), the NG slitless spectroscopy field should
be processed first. The actual correction is made by shifting the wavelength array rather
than the image array.
• Strange features found in the NG spectra taken at Np aperture can be due either
to flat-field problem or column pull-down. See section 6.6.1 or 6.6.2.
• Strange features in the NP spectra taken with the big aperture (for Nc pointing)will be due to wrong calibration only if the features are seen not only in your target object
but also in nearby field stars. See section 6.6.3 for more information.
• There are several kinds of diﬃculties in matching the flux level of the same source
across the dispersers, especially in slit-less spectroscopy mode, and jumps in flux levelcan be found between spectra from diﬀerent dispersers in the same source. See section 6.6.4
for more details.
• If unexpected narrow emission-line objects are found, it could be due to zero-thorder light images of nearby brighter stars. See the ds9 window carefully since it showsthe expected location of such features with yellow circles.