Flux calibration |
|
program names, file names
variable names
prompts, commands, program code
If everything went well at the telescope, the observation of the object whose data you are reducing was immediately preceded and/or followed by the observation at the same wavelengths of a standard star. Lists of these standard stars exist in the group's Orange Book. There are CVF standards for observations made with the narrowband filters, and there are faint standards ("Elias standards", from Elias et al. 1982, Astronomical Journal vol. 87, pp. 1029-1034) for broadband observations. These lists give coordinates and infrared magnitudes for these stars. Using this information, you can interpolate to get the brightness in magnitudes at the wavelengths of your observations (see the section about fitmags below).
You'll also need to know the airmasses of the object and of the standard star(s) at the times of their observations. We'll discuss this in detail later, so you may need to skip ahead to that chapter. Or, if you're lucky, someone wrote down the airmasses in the log books in which we make notes during the observations.
After having determined the airmasses of the observations and the brightness in magnitudes of the standard stars, you need to perform photometry on images of the standard star. Basically, we need to determine how bright the camera thinks the standard star is. Then, knowing how bright the standard star actually is, we can apply that information to the images of the object, which was observed at about the same time, and so we'll know how bright the object is in physical units. We'll initially be expressing the data in Janskys, where the Jansky is a unit of flux density.
The images of the standard star will need to be reduced just like images of the object. However, you can probably get away with skipping a couple of steps, like eliminating bad pixels and background normalization. But the images of the standard stars must be linearized, flatfielded, and background-subtracted. If it's MLOF data, it's a toss-up as to whether or not to distortion-correct the images: it shouldn't be necessary, as that process conserves flux. You might try doing photometry on a test image before and after a distortion correction, and then compare the two results. They should agree within 1-2%.
The fitmags procedure can be used to fit curves
to magnitude v. wavelength data. Rather than command-line input, fitmags takes most of its input from a file called
~/idlpro/fitmags.txt, which looks something like
the following:
ALTER ONLY THE NUMBERS IN THIS FILE, NOT THE FORMAT!!!!! Number of wavelengths for which you have magnitudes: 5 Enter the wavelengths in microns in the left-hand column below, and the magnitudes in the right-hand column. Wavelengths of the standard filters are 1250 nm (J), 1650 nm (H), 2230 nm (K), 3500 nm (L), and 4800 nm (M). 1.250 3.870 1.650 3.825 2.230 3.795 3.500 3.710 4.800 3.680 Number of wavelengths for which magnitudes are to be determined: 4 Enter these wavelents, one per line, in microns: 3.150 3.290 3.400 3.600
IDLprompt> fitmags |
IDLprompt> fitmags, 3.65, 3.9 |
order LSval linestyle 3.150 3.290 3.400 3.600 1 3.87e-04 solid 3.751 3.744 3.738 3.727 2 7.20e-05 dotted 3.730 3.723 3.718 3.710 3 1.52e-04 dashed 3.727 3.720 3.714 3.705This table indicates that of the three fits, the second-order fit has the best least-squares value with fit magnitudes of 3.730, 3.723, 3.718, and 3.710 magnitudes for 3.150, 3.290, 3.400, and 3.600 microns, respectively.
The output plot of fitmags sent to the
display window will look like this:
Now that we know the intrinsic brightness of the calibration star for the wavelengths at which we have made our observations, we can move on to doing the photometry.
The cuts procecure is quite useful when dealing with images of point sources (stars). cuts takes profiles (in two directions) through the point source and plots them on the display. cuts can also give high-precision coordinates for the position of the point source and fit a Gaussian function to the profile. Many of cuts's arguments are like that of v. Here's an example:
IDLprompt> cuts, impackname, sig=5, /help |
After cuts plots profiles in both directions
through the star, it will print (to the command window) the star's
coordinates, as calculated by a centroiding algorithm. We'll use these
coordinates in the photometry program. Before we go on to that, however,
let's look at one more feature of cuts, the gauss keyword:
IDLprompt> cuts, impackname, sig=5, /gauss, /help |
At this point we have x- and y-coordinates for the star in the image of the calibration star, we have the stellar magnitude of the calibration star at the wavelength in question, and (by looking at the image header) we know the integration time in milliseconds. We're now ready to find the counts for zeroeth magnitude (CFZMs) for the star at the airmass of the calibration star's observation. CFZMs are the counts (in ADU) we would get from a zeroeth magnitude star at the airmass of the calibration star's observation. The CFZM of the calibration star in the image may be computed with the phot function:
IDLprompt> result = phot( impackname , [ x_coord , y_coord ] , $ IDLprompt> starmag , itime = itime , /usewt ) |
IDLprompt> result = phot( impackname , [ 69.3 , 172.7 ] , $ IDLprompt> 6.899 , itime = 200 , /usewt ) |
The way phot does its photometry is to basically draw larger and larger circular apertures around the star and to calculate the total flux (in ADU) through those apertures. It then makes a plot of flux v. radius and finds the radius at which the flux increases by less than 2%. This radius is the optimum radius for the photometry aperture. phot then computes the average value in an annulus around the star (the annulus is bigger than the photometry aperture), subtracts this average from the image (much like the way bkgnorm works), and then computes the flux through a photometry aperture with the optimum radius. This number is used, along with the integration time and stellar magnitude, to find the CFZM.
The radii of the above-described annulus may be set with the r2 and r3 keywords to phot---they default to 25 and 35 pixels. The detector gain may also be set with the gain keyword---this defaults to 20, the gain of the Rochester 3rd Generation Infrared Camera. Finally, the interval of radii in which phot looks for the optimum photometry radius may also be specified to differ from the default---see the documentation of phot and fluxvrad for details.
During runtime, phot will present a plot
which will look something like this:
When we take images of calibration stars, we tend to "nod on chip", meaning that when we nod the telescope to take the background image, we move the `scope by an angle which is small enough that the star is still on the detector array. This means that we get two measurements of the star for a single background-subtracted image pair. As a result, the background-subtracted image will have one image of the star in the foreground (positive pixels) and one image in the background (negative pixels). Just set the neg keyword in cuts and in phot to find the coordinates and CFZM of the background star.
When dealing with calibration star images which were nodded on chip, a significant shortcut in this process is found in the docfzms procedure. docfzms runs cuts (to find the coordinates) and phot on one or both images (foreground and/or background). The positions of the stars and there CFZMs are printed to the screen. See the documentation for docfzms to see how to run it.
At this point it's important to remember that we have now found the CFZMs at the airmass of the calibration star. During the observation of the object, we were observing at a different airmass, and thus through a different amount of atmosphere. We need to make a geometric correction for this as we apply the CFZMs to calibrate the images of the object. For the next step we'll need to know the airmass of the object at the time of its observation, and we'll need to know the value of a parameter with the catchy name magnitudes per airmass. Let's abbreviate that to MPA. We'll also need to know the integration time of the images of the object.
For wavelengths less than 3 microns, use MPA=0.1   . For the longer wavelengths, it's a bit more complicated. Before the summer 1998, we usually just used 0.15 for wavelengths longer than 3 microns. Matthew Barczys, a graduate of this lab, undertook a study of MPA as a function for wavelength. He found the following results:
wavelength (microns) |
measured MPA |
adopted MPA |
2.23 | 0.27 | 0.10 |
3.00 | 0.71 | 0.40 |
3.08 | 0.86 | 0.50 |
3.15 | 0.14 | 0.14 |
3.29 | 0.21 | 0.21 |
3.40 | 0.28 | 0.28 |
3.60 | -0.12 | 0.00 |
Now it's time to determine the calibration factor to convert from ADUs to flux density units. This is done by editing the file ~/idlpro/jyperadu.txt. This file will look something like the following:
airmass difference (airmass of standard star - airmass of object): -0.06 magnitude per airmass: 0.1 number of wavelengths: 3 wavelength (microns) cfzm (not airmass-corrected) object itime (msec): 1.556 2006 50000 1.644 2015 50000 1.780 1623 50000When editing this file, make sure you don't delete any of the lines of text---only edit the numerical values in the file. In the example above, the airmass difference is -0.06, MPA=0.1, and images at three wavelengths are being calibrated: 1.556, 1.644, and 1.780 microns. The images of the object at these wavelengths were all taken with integration times of 50000 milliseconds, and the CFZMs, as determined by phot and/or docfzms, are given in the middle column. The above file is read by the program jyperadu, which uses the CFZMs, etc., to find the calibration factors. The program is run with no arguments:
IDLprompt> jyperadu |