Chopping with NIRC

The f/25 chopping secondary can be triggered by a signal from NIRC, synchronizing the chop to the frame pulses, and allowing the two chop positions to be gathered into two slices of a "data cube." This allows the removal of rapidly varying atmospheric and instrumental effects that otherwise would drive the noise of some types of observation to unacceptably high levels. In particular, 3-5 micron observing with its high and variable backgrounds can benefit from chopping.

Note that the max12ur timing pattern does not work well with chopping.
If you need to use max12ur instead of pat4xa you will be better off using stare mode.

In general, the OA will only be responsible for initializing the chopper at the start of the night. Control of the chopper during observing is up to the observer.

Quick Reference

A typical observing scenario:

chop Set NIRC software to chop mode. Also set the chopper's trigger mode to "level."
pat4xa ; subc 128 ; coadd 5 ; nchop 20 Set observing parameters (timing pattern, subarray, coadds, number of chop sets, etc.)
chpamp 10 Chop amplitude 10 arcsec.
chpang 0 Chop angle 0.
chprelto rotator Define the coordinate system to be the detector frame.
chpfreq 0 Set the chop frequency automatically.
chpon Begin chopping.
goi 10 Take 10 images.
chpang 15 ; chpang 90 ; chpon Change chop parameters, reload.
goi 10 Take more data.
...and so on.

The general outline of chopping is as follows:

  • Set up NIRC to generate the chopping trigger.
  • Set various observing parameters, including integration time, number of coadds per dwell position, number of dwell positions (slices) per file, chopper throw and direction. (Note that the chop frequency is calculated from other parameters.)
  • Turn chopper on.
  • Begin taking data.
  • Change observing and/or chop parameters, and load chopper parameters (details on the "loading" later).
  • Take more data.
  • Turn chopper off.
  • Acquire next target, and set observing parameters for that target.

Some details on each step:

Set up NIRC to use chopping trigger

The command "chop" will set five NIRC keywords to appropriate values, to tell NIRC to generate the chopper signal, save two slices, etc. The five parameters are CHPCOADD.P, SECMODE.P, CHPMODE.P, CHOPBEAMS.A, and FRMSETTL.P. They are all set to one except CHOPBEAMS, which is set to 2. Although observers will generally operate at a higher level, we describe below the operation of each keyword:

  • CHPCOADD is the number of sets of chops to add together in a single image.
  • SECMODE selects a mode of operation for the chopper; for NIRC it should always be 1 while chopping, 0 otherwise.
  • CHPMODE tells NIRC to generate a trigger signal (1) or not (0).
  • CHOPBEAMS tells NIRC how many slices will be needed in each image. It should generally be 2 while chopping, 1 otherwise. These correspond to the two ends (dwell positions) of the chop.
  • FRMSETTL is the number of NIRC frames to discard while waiting for the chopper to settle. It should almost always be 1 for NIRC chopping. Very short frame times may require this to be set to a higher value.

The chopper will be told to use the NIRC trigger signal, and to trigger off changes in the level of the signal by the chop script. This is the type of trigger NIRC outputs. This command can also be accomplished with the command "chptrig level".

Set NIRC parameters

The observing parameters fall into two categories: NIRC parameters and chopper parameters. To set the NIRC parameters is for the most part like normal observing. Data taking will proceed as follows: (1) the chopper will start its move to its first dwell position, triggered by the change in level of the NIRC trigger, (2) FRMSETTL NIRC frames will be discarded while the chopper is allowed to settle, (3) FRMCOADD (set using "coadd") frames will be coadded into the first slice of the final file, (4) the chopper will start its move to its second dwell position, (5) FRMSETTL frames will again be discarded while the chopper settles, (6) FRMCOADD frames will be coadded into the second slice, (7) steps 1-6 will be repeated "CHPCOADD-1" more times.

Note that to set CHPCOADD, use the command "nchop n".

In general you will want to choose NIRC parameters using the following rules of thumb:

  1. Choose tint small enough that you do not saturate the array, yet large enough that you beat the read-noise. For patslow and pat4xa the photon noise is equal to the read-noise around 1000 DN above bias, so 2000 DN above bias should be fine. A single frame will be thrown away (FRMSETTL = 1 is the standard value) after FRMCOADD coadds of TINT seconds, and that frame will be TINT long. Hence you should try to decrease TINT and increase the number of frame coadds to minimize overhead.
  2. Choose the number of coadds so that you get a reasonable chop frequency. Once you selecte a number of coadds you can type "chpfreq 0" to see what chopper frequency will be used. Values between 1 and 5 Hz are reasonable, with longer wavelengths requiring the fastest chopping.
  3. Choose the number of chop cycles (using nchop n) you want to coadd in each file. The only display command available for chopped data is cdiff, which will display the difference between the two beams in a single file. For detecting faint targets, then, you may require a high number of chop cycles in each file. The only overhead which is affected by setting nchop is the FITS read/write overhead, roughly 9 sec/file.

Set chopper parameters

To set up the chopper itself you need to define a chop throw (amplitude), a chop direction, a "fiducial" for that direction, and a chop frequency. The relevant NIRC scripts are chpamp, chpang, chprelto, and chpfreq. All four parameters can be set with the chopmaster command (in the order discussed; the command will prompt for input if no arguments are given). The chop throw and direction are fairly self-explanatory. chprelto can take as an argument either "posang", which defines North as the angle zero-point (East being 90°), "vertical", which defines the elevation axis as the angle zero-point, or "rotator", which defines up on the detector as the zero-point. There are other options, but these three should suffice for all observations.

The chop frequency, when the chopper is used in trigger mode, is determined by the integration time, number of coadds, etc. The act of turning on chopping with the "chpon" command will automatically calculate the necessary frequency. To preview the value which will be loaded, use chpfreq 0. (One can also type in a different frequency, but there is generally no reason to override the automatically calculated value.) chpfreq with no arguments will display the current value. Note that chopmaster automatically does a chpfreq 0.

The Keck chopping secondaries operate in a somewhat different manner than many other choppers. One manifestation of this is that one cannot change chop parameters it is necessary to turn off chopping and then turn it back on once the new parameters are loaded. Simply reissuing a chpon command (even though the chopper is already running) will update the parameters. (Type in new values using chpamp, chpang, chprelto, etc., then type chpon.)

Turn chopper on

As mentioned above, chpon will turn chopping on.

Begin taking data

Once NIRC has been configured for chopping, the normal goi command will take two-slice chopped images. A new display command, cdiff n, will display the difference between the two slices of image n.. If cdiff is not followed by a frame number, it will display the difference from the last image taken.

Note that some scripts, such as "bxy5", are set to automatically display the difference between two images. With chopped data this may not behave as you might expect; it will subtract the same chop beam from the last two images. You might want to use "quiet" versions of the scripts, such as "bxy5q", and display cdiff's of each chopped frame from the "Auxiliary" window.

Change observing parameters

Also mentioned above, changes to the chopping parameters, such as changes in the throw, chop direction, or direction "fiducial," will not be applied unless and until chopping is turned off. One can accomplish this by setting the new parameters, then reissuing the chpon command.

Turn chopper off

chpoff will turn chopping off. You probably will want to do this every time you move to a new object, so that the field can be more easily identified, and guiding initiated. You also will want to do this, of course, when you reconfigure NIRC for normal images; as a safety, the unchop command which reconfigures NIRC for normal imaging also turns the chopper off.

Chopping and Nodding (Offsetting)

One specific type of chopping is called "chop/nod." Generally a chopped pair is not sufficient to completely remove the background in an image. The reason is that the thermal background is different in the two dwell positions; as the chopper moves, it sees the telescope structure in a different manner. This so-called "radiative offset" can be removed by combining one chopped pair with another chopped pair, but with the telescope offset in the meantime so that the target is placed on a different part of the detector. The radiative offset under the target in the first chopped pair can be removed by subtracting the second pair, which will have the same radiative offset background since it uses the same chopping parameters.

Two techniques are commonly used to take the second chopped pair. In the first, called "chop/nod", the telescope is offset the distance of the chopper throw, so that the "sky" end of the chopper "dogbone" now becomes the "object" end, and vice versa. When the appropriate math is done, the target will be coadded onto the same pixels in the image, while the radiative offset is subtracted and hence cancels out.

The second technique nods (offsets) the telescope in a different direction, usually perpendicular to the chop direction. For small, "on-chip" chopping, where the object is actually on the detector in both chop beams, one can nod perpendicular to the chop throw by the same amount, hence capturing all four images of the object on the detector. Hence the term "quad chopping" for this technique.

Although at first glance quad chopping might appear to lead to higher signal-to-noise than the chop/nod technique, a careful calculation in the background-limited case shows that the two produce similar S/N values. The basic reason is that in the chop/nod calculation there are two background images underneath the object's PSF, whereas in quad chopping there are three background images underneath each of the four object PSFs. Quad chopping does, however, have the advantage that there are four "dither" positions, and hence detector blemishes can be removed more readily. The choice of technique often depends on whether the target is expected to be significantly extended or not.

Chop/Nod

The chop/nod technique requires that the target be accurately placed on the same pixels in both chop pairs. Because of various inaccuracies in the telescope and chopper control software, this unfortunately may require a small extra offset during the second, "nodded" chopped pair. In order to check and set this extra offset, use chopnod to take a set of data on a star which is bright enough to yield a good centroid in a single chopped pair, and reasonably close to your target. Use cdiff to display each chopped pair, and calculate the star's centroid on both sets of data. Input the two coordinate pairs, (x1,y1) and (x2,y2) into the script "nodoff x1 y1 x2 y2" and new offset values will be calculated and saved. The next time chopnod is run, the images from both sets of chopped pairs should overlap.

Note, however, that the offset may be a function of guide star brightness, chop frequency, etc., and may need to be recalculated at each field. This requires some investigation, and the observer should be wary in the meantime.

Quad Chopping

In quad chopping the nod position can be anywhere relative to the chop positions. In this case you can interleave goi commands with whatever telescope move commands you wish. To simplify the common case in which the nod is perpendicular to the chop (and the same distance), use "quad [n]". This script automatically calculates the appropriate commands to send to get to and from the nod position. The optional argument n is the number of quad chop sets to take.

More help

An "index" of commands in the chopping subdirectory can be seen by typing "help chopping" or "help chp". Below is a table and description of the current state of the scripts:

Command

Description

ampang x1 y1 x2 y2 Converts two (x,y) pairs into a distance and angle. The (x,y) coordinates are assumed to come from NIRC, hence a scale of 0.15 arcsec/pixel is used.
chop Configures NIRC for using the chopper and sets the chopper's trigger mode to "level."
chpamp [a] Sets the chopper throw to a arcsec. If a is omitted, the current value is reported.
chpang [d] Sets the chopper throw angle to d degrees. If d is omitted, the current value is reported.
chpfreq [f] Sets the chopper frequency to f Hz. If f=0, the frequency is calculated from the currently set tint, coadd, etc. If f is omitted, the current frequency is reported.
chpinit Sets the chopper to its default values, using chpinit = 1.
chopmaster [amp ang relto nchop] Initializes several chopping parameters: the chop amplitude and direction, the fiducial direction, and the number of chop pairs to coadd into a single image. If no arguments are specified, the script will prompt the user for each value.
chopnod Used for "chop/nod" observations, in which the telescope is nod is the same as the chopper throw. Incomplete.
chpoff Turns chopping off.
chpoffset x Sets the chopper offset to x arcsec. This is the distance from the "rest" position to one of the ends of the chop "dogbone."
chpon Calculates the correct chop frequency and turns chopping on. This command also loads in new parameters.
chprelto str Selects a coordinate system definition for the chopper throw and amplitude (e.g. "posang," "vertical," and "rotator").
chpreset Resets the chopper and restores base offsets, using the command ~nirc/bin/reset_chopper.
chpsim str Selects the chopper simulation mode ("none" or "full").
chopstat Shows the status of various chopper keywords (using xshow).
chptrig str Sets the chopper trigger mode on the DCS side to str (normally "level").
nchop n Sets the number of chop coadds to n.
quad [n] Performs "quad" chopping and offsetting, in which the nod position of the telescope is perpendicular to the chop direction (and the same distance. n sets of images are taken.
unchop Returns NIRC to normal data taking mode. Does not turn chopping off.

Popular Links


Send questions or comments to: