ING Banner
Home > Astronomy > LIRIS >

LIRIS Long-Slit Spectroscopy

Grisms and Slits summary
Observing Commands
Spectroscopy scripts
Quick-look spectra
Standard Stars
Aborting Scripts
Autoguiding considerations
Wavelength coverage

See also:

LIRIS Detector page
Data storage types and readout modes

Calibrations page for biases, darks, spectroscopic flats and arcs.

General Information

Please read all the linked pages above before observing, to ensure that you fully understand the instrument and observing techniques.

Flat-fielding and Sky subtraction

Spectroscopy is much more sensitive to sky background variations than imaging, since the various IR night sky emission lines can change rapidly and independently from each other, on time scales of a few minutes, making proper calibration of the data non-trivial. The best flat fielding and sky subtraction is usually obtained by on-target and off-target imaging. For spectroscopy, you can apply the nodding technique, i.e. moving the object along the slit to one or two other positions in the slit and take another spectrum, then move back (slit parallelity) and so calculate flat fields and sky subtraction models from the data itself by proper median combination. That way you don't have to spend time on off-target imaging. If your spectroscopic target is as extended as the slit, however, then you can't avoid taking off-target spectra of a blank sky position. The nodding technique is available as a script, and the object should stay well within the slit during several nods. However, you might want to check the object position with respect to the slit after a number of nods, e.g. every hour, or more frequently if you notice a drop in signal.

Integration times

Only for the very faintest targets should you expose for 600s. We recommend keeping exposure times down to 300s or less, due to the variability of the IR night sky lines on short timescales.


LIRIS supports long-slit spectroscopy, using a series of slits with different widths with low and medium resolution grisms. See also the possible predefined observing modes for spectroscopy.

LIRIS Grisms
Grism Resolution Spectral Range Scale
lr_zj 700 0.887-1.531 μm 6.1 Å/pix
lr_hk 700 1.388-2.419 μm 9.7 Å/pix
mr_k 2500 K low efficiency
hr_j 2500 1.170-1.356 μm 1.8 Å/pix
hr_h 2500 1.520-1.783 μm 2.6 Å/pix
hr_k 2500 2.053-2.416 μm 3.5 Å/pix

Slit Width Comments
l0p65 0.65"
l0p75 0.75"
l1 1.0"

l5 5"
l10 10"
lext6 0.75" 6 slits with increasing offsets (max 450 pix)
in dispersion direction, for much
greater spectral coverage.
various various Multi-Object Slit Masks

Note that these slit names begin with the letter "l"

Observing Commands

See also the complete list of all available LIRIS user commands
and the complete list of the UltraDAS commands
Parameters in square brackets [ ] are optional.

Note:  It is possible to control LIRIS mechanisms in two basic ways: either selecting predefined observing modes, whereby using just one command all the wheels are moved into the correct position for the chosen mode, or moving just one wheel at a time.

To change to a predefined imaging mode, e.g. for acquisition:

SYS> limage <filter-name>

To change to a predefined spectroscopy mode, moving both the grism and slit wheels to the desired configuration:

SYS> lspec <grism-name[<slit-name>]    (moving the slit wheel is optional)

To insert just a particular grism, leaving everything else unchanged:

SYS> lgrism <grism>

To insert just a particular slit, leaving everything else unchanged (e.g. for taking a through slit image to check acquisition):

SYS> lslit <slit>

To take an exposure:

SYS> run liris <int time> ["title"]

To take N exposures:

SYS> multrun liris <N> <int time> ["title"]

To take temporary data (generating a file called which is overwritten the next time the same command is invoked (useful for checking and finetuning acquisition):

SYS> glance liris <int time>

or to take N exposures (which can de displayed in real-time using the RTD):

SYS> multglance liris <N> <int time>


Before starting the acquisition, decide where on the slit you would like to put your target(s). The default and recommended position for a single target is centered in the slit about 25" below the middle of the detector, at y=400, but you can put it wherever you like. Communicate with the telescope operator (OSA) about what position you will use.

The use of the autoguider is strongly recommended throughout the acquisition process, even for objects that require only very short exposure times (such as standard stars). The reason is that the acquisition process usually takes 3-5 minutes, including switching from imaging to spectroscopy mode, during which time the source can wander slightly off the slit, and then re-acquisition may be necessary, which is already slower than just using the autoguider right from the start. If you do not require guiding (e.g. to reduce the overheads in short exposures), use it for the acquisition but ask the OSA to switch it off immediately before you launch your spectroscopy script.

In order to acquire an object in one of the long slits:
  • Ask the OSA to point the telescope to your target (including the SkyPA). If you are acquiring to the default slit position at y=400, autoguiding will begin automatically as soon as the telescope and rotator are in position. Guiding right from the start of the acquisition will make the target position more stable and should reduce the number of iterations needed.
  • Take an image of your object, preferably in the filter where it appears brightest. In case of a faint target, if necessary, subtract a dithered exposure from it to remove the sky background. Take one image, ask OSA to make an offset of, for example 10 arcseconds, and take a new image. The subtraction and display can be done using the LIRIS Realtime Display (RTD). Put the first image as REF and the second as OBS, then click OBS-REF.
  • Overplot the desired slit from the LIRIS Slits button in the DS9 display. The object should already be found within 5-10" of the slit in x and near y=400 if you are acquiring to the default slit y-position. If you want to use a different y-position, move the object to within about 10" of where you want it by asking the OSA to move the telescope if needed and then begin autoguiding.
  • Do a Star profile on your object using the (RTD) or the IRAF-imexamine task. If you use the RTD in the  Star Parameters field, the x- and y-centroids of the object will be displayed. If you use IRAF-imexamine task press "r" key to fit a radial profile and extract the target centroid position from the first two quantities below the window plot.
  • Use the following command:

    SYS> lobject_inslit <slit> <x-centroid> <y-centroid> [-noyoff]
    This will calculate the required offset to move the object at image position x-centroid- y-centroid onto the specified slit and move the telescope if you answer 'yes' when queried. If the  -noyoff option is used, the object will be driven only along the x-axis onto the slit, and no y-offset will be made. If you are using this, you should already have told the OSA that you are not using the default position.

    : The lobject_inslit command will NOT work for zenith distances larger than 75 degrees (airmass ~4). The flexures of LIRIS have not been measured for such angles. If you really want to observe at this airmass, ask the OSA to bring the object onto the slit.
  • Wait for the guider to stabilise after the offset (ask the OSA when) then take another image to verify that the object is centred in the overplotted slit. If it is not centred, take another exposure to make sure that the seeing is not fooling you. If it is still not centred, repeat the lobject_inslit command with the new object position as an argument, or calculate the required offset in arcseconds (the pixel scale of LIRIS is 0.25"/pixel) and ask the OSA to move the required amount.
  • When the object appears centred on the overplotted slit, it can in general be considered as being acquired, since the overlaid polygon which is drawn on top of the exposure has been obtained directly from a through-slit exposure. Although, to make absolutely sure that the object is actually in the slit it is recommended to take a through-slit exposure, using the command

    SYS> lslit <slit>

    to move in the desired slit, then take the exposure. Note that very faint objects will hardly be visible in this image due to the lack of exposed pixels in its surroundings (lowered contrast).
  • Switch to spectroscopy mode, using

    SYS> lspec <grism> <slit>

    then start your observing script. Do not forget to ask the OSA to turn off the autoguider if you prefer not to use it.


Blind offsets from a known, bright source to a (very faint) invisible source are in principle possible. However, you will have no guarantee that your object actually ended up on the slit. If you can not make your object visible with LIRIS in a 2- or 3-minute exposure, then you should ask yourself why you have not applied for spectroscopic time at a larger telescope. An exception is multi-object spectroscopy, where you have three reference stars in an individually tailored slit mask, and thus can be sure that the target, even though very faint, is in the slitlet.

Since the sky background saturates quickly, you can achieve effectively long integration times using a co-averaging of subsequent exposures. For example,
SYS> coave liris 10
SYS> run liris 15

gives you an average of ten 15 second exposures, i.e. an integration time of 2.5 minutes. This helps in the acquisition of very faint targets. Do not forget to switch the co-averaging off once you start taking spectra. Otherwise, you will stay for a very long time on the same dither point, and a proper sky background subtraction will become impossible.

Re-acquisition: Once an object is acquired and the guider running, the object will stay well-centred on the slit for longer than an hour. It is usually not necessary to re-check the acquisition unless you notice a drop in flux that is not due to clouds. If you observe very faint targets which do not show a recognisable signal in one exposure, check the acquisition after two hours (or as frequently as necessary).

For very faint targets that do not leave a clearly traceable signal after one exposure, it is a good idea to orient the position angle of LIRIS such that a bright source falls elsewhere on the slit. This source can then be used as a reference when the spectra are combined, taking into account the offsets. Very good astrometry is needed for this method.

Aligning the slit along the parallactic angle is usually not necessary (but possible if desired).

Spectroscopy scripts

The scripts for spectroscopic observations are very similar to the imaging scripts.

Spectroscopy without blank sky fields

To obtain dithered (nodded) spectra using the autoguider, do

[ag_]spec_nod <int time> ["title"] [-ncyc=int] [-nruns=int] [-offset=float] [-mndr=int] [-clean=int] [-jitter=float] [-start_center] [-coave=int] [-nonsidereal]

This nods the telescope in an AB-BA-AB-BA pattern up and down by the offset amount, with A and B being the two nodding positions. The nodding step size is given by offset in arcsec, defaulted to 12". The -start_center option can be used, so that the telescope will consider the starting position as the middle point between A and B and will therefore offset half the offset value down before starting the script. For the guided version of the script, use ag_spec_nod.  If the autoguider is not desired, use the spec_nod script (not recommended, unless you are observing the target for only a very few minutes). The -nonsidereal option is for differential tracking with guiding.

Assuming the object is centred on the first position A = (0,0) , the first exposure is taken there and the second one at B = (0, offset). Alternatively, if start_center is specified, position A will be (0, -offset/2) and position B will be (0, +offset/2).
At each nodding position nruns images are taken with the specified integration time.

Every subsequent coave (default 1) exposures are coaveraged (please note that this overrides the value you might have previously set).

The AB pattern is repeated ncyc times.

When the script has finished, the telescope returns to the starting point.

The jitter parameter can be anything between 0 and any value less than 30% of the offset parameter. (e.g. if the offset size is 12 arcsec, the jitter must be less than 3.6 arcsec). Each nodding point will then be offset from its nominal position by a random vector of the specified length. Using the jitter parameter means that the A and B positions are randomly generated to lie within a segment that is centred at each position (for ncyc>1). The dimension of the segment is given by the jitter argument.

For the autoguided script (beginning ag_) the number of multiple non-destructive reads is automatically set to  mndr=4, if the mndr parameter is not set and back to 1 (mndr = 1) once the script has finished. Like that the exposures get read out 4 times and averaged, in order to suppress the read-noise. You can change this parameter by explicitly setting the -mndr option to a different value.

The clean option sets the number (default 3) of clearing reads before the first exposure in each position.

If you require three nodding positions, then instead use:
[ag_]spec_nod3 <int time> ["title"] [-ncyc=int] [-nruns=int] [-offset=float] [-mndr=int] [-jitter=float] [-clean=int] [-coave=int]

One cycle consists of an ABC pattern. The first exposure will be taken at position A=(0, 0), the second one at B=(0, +offset), and the third one at C=(0, -offset). The offset should not be larger than about 1/3 of the length of your slitlets, otherwise the star will be driven outside the slitlet.

Spectroscopy with blank sky fields

If your target is extended, then you need to chop to a blank sky field frequently (every few minutes) so that you can calculate a sky background model from it. For this purpose you can use:

[ag_]spec_ext <int time> <sky_offset> ["title"] [-ncyc=int] [-nruns=int] [-mndr=int] [-clean=int] [-jitter=float] [-invert]

This moves the telescope in an Obj-Sky Obj-Sky ... fashion, where the sequence Obj-Sky forms one cycle. Sky refers to a blank sky position. The sky positions are randomly generated to lie on a 15" long segment perpendicular to the slit, centred at (sky_offset, 0). No autoguiding is performed at the sky position field. Use the invert option to reverse the sky offset. If the pattern is to be repeated (ncyc > 1), the SKY positions are randomly generated to lie on a 15 arcsec segment perpendicular to the slit centred at (sky_offset, 0). At each position nruns images are taken.  If -jitter is set, the OBJECT positions will be randomly generated to lie within a segment of "jitter" value size along the direction of the slit. The jitter size must be equal or less than 30% of the offset specified.

to make a spectroscopic map of an extended target use:

SYS> ag_spec_map <int time> <npts> <step> <sky offset> ["title"] [-cycle] [-nruns=int] [-mndr=int] [-clean] [-invert]

First a spectrum of the object is obtained at position (0,0), then from the sky at (sky_offset, 0). Then the telescope moves back to the object and along the slit, to position (0, step). Again, one pair of object and sky spectra is obtained. This is repeated npts times. If the -cycle option is set, then each object-sky pair is taken twice. For e.g. npts=4,  the acquisition pattern is as follows:
Obj1 Sky1   Obj2 Sky2  Obj3 Sky3   Obj4 Sky4

Quick-look Spectra

An IRAF package is available to help you get a quick look at your LIRIS data while you are observing at the telescope. To use it, follow these steps:

Open a terminal from the observing system computer (whticsdisplay1), and do:
 > iraf
This will open a DS9 and iraf session. Now change to the directory where the data is, for example:
ecl> cd /obsdata/whta/20140123

Load the following packages::
 ecl> twodspec
 ecl> longslit
 ecl> liris_ql

The prompt will now be  liris_ql>

At present, there is only  lspec_ql, a task to quicklook (combine, sky subtract and extract) a pair of nodded spectra (a dithered image quicklook task is currently under way). To get information about the use of  lspec_ql:

liris_ql> help lspec_ql

And to use it:

liris_ql> lspec_ql imageA imageB positionA

Where  imageA is the rootname of the spectrum in position A of the nodding pattern, imageB is the rootname of the spectrum in position B, and  positionA is the approximate row coordinate in which the spectrum of the object is, in position A. For example:
liris_ql> lspec_ql r1235560 r1235561 745

This quicklook task is suitable both for longslit spectroscopy and multiobject spectroscopy.

Standard stars

IR spectrophotometric standard stars have to be chosen reasonably close to the observed target and at a very similar airmass (i.e. similar telluric absorption bands optical depth) in order to be effective for flux and sensitivity calibration as well as for correcting telluric (atmospheric) features in the spectra. Most observational programs require a spectrophotometric standard to be observed about every 2 hours, but the frequency depends upon each individual case. The more accurate the flux/sensitivity corrections need to be, the more often (and closer in time) you should observe a standard, and the closer in airmass it should be to your target (up to a difference as small as 0.05 in airmass).

In general, the fewer emission/absorption features your standard star has, the easier its spectrum is to be modelled, and the better suited it is for calibrations. Frequently used stars include late B and early A stars of luminossity class V, but solar-like stars (i.e. G2V) are also useful.

You can use an online search utility to find stars suitable for your observing programme, e.g.:

Aborting Scripts

NEVER abort a script by pressing ctrl+C. Even doing it as shown below, aborting scripts can cause problems, so if the script is nearly finished then it is better to wait until it finishes itself rather than aborting it. It is a good idea to test a script with a short number of cycles before setting it running for a long time, to avoid having to abort it.

If you really need to abort an ongoing observing script  (e.g. [ag_]spec_nod etc.) do:

SYS> control+Z   carries the exposure command to the background  (if you haven't already done that by adding ``&'' to the command)
SYS> bg
SYS> labort    and answer yes to the question it asks.


The WHT tracks very well, with a typical drift of about 0.3" in 3 minutes without autoguiding. For imaging, guiding is recommended for exposures longer than 40s in the infrared.For spectroscopy, when deciding if guiding is necessary, you should take into account the total time on target rather than individual exposure times, to ensure no loss of S/N if the target wanders out of the slit. The initial acquisition of the guide star takes less than a minute and the overhead for guiding is typically 5 seconds for each change of nodding position, so for exposure times over 60s the guiding overhead is negligible anyway. For shorter exposure times, you may still require guiding to ensure that the target stays well centred in the slit throughout.

It is recommended that guiding always be used throughout acquisition, and stopped just before exposing if you do not require a guide star for your exposures. See Acquisition. The telescope operator (OSA) will select a suitable guide star and control the guiding, including the choice of autoguider filter. Communicate with the OSA about your needs and also about the size of the nodding and jitter offsets you will make if you are using guiding, so that an appropriately sized guiding window can be used to avoid the loss of the guide star as the telescope offsets. The field of view of the autoguider is 60" so it can accomodate a two nodding pattern with a step size of 20" and a jitter of up to 5".

NB: The telescope must be guiding (Telescope shows "A/GUIDE" in the TCS window) before starting the exposure if you are using a script with “ag_”.

Wavelength coverage

With LIRIS, spectra in the range 0.9-2.5µm can be taken. See the available grisms above. The low resolution grisms have sufficient overlap, i.e. the zJ-grism covers the onset of H, whereas the HK-grism still shows the red end of J. Thus, the spectra can be tied together. The blue end of the spectrum is left, the red end on the right side in the exposures.

If extended (actually, shifted) wavelength coverage is desired, the lext6 slit mask can be used. This long slit is vertically divided into 6 slits, with the upper half containing 3 slits shifted to the right, and the lower half containing another 3 to the left. Thus, if an object is positioned in one of these slits, the wavelength coverage is shifted to the right (red), and vice versa. As compared to the normal long slits, the wavelength range covered is shifted by about 10, 20 and 30% (about 150, 300 and 450 pixel offsets) of its normal extent in the corresponding direction, depending on which slit you use. To position an object in a given slit of this slit mask with shifted coverage to the red, do

SYS> lobject_inslit l0p75ext6r1 <x> <y> [-noyoff]

SYS> lobject_inslit l0p75ext6r2 <x> <y> [-noyoff]

or, the most extreme case,

SYS> lobject_inslit l0p75ext6r3 <x> <y> [-noyoff]

To do the same with shifted coverage to the blue, do

SYS> lobject_inslit l0p75ext6b1 <x> <y> [-noyoff]

SYS> lobject_inslit l0p75ext6b2 <x> <y> [-noyoff]


SYS> lobject_inslit l0p75ext6b3 <x> <y> [-noyoff]

Top | Back

Contact:  (LIRIS Instrument Specialist)
Last modified: 01 December 2017