Determining the properties of stars is a very important part of astronomical research. These properties include temperature, metallicity, and luminosity. Once these data are obtained, one can use them to create theoretical H-R diagrams (luminosity vs temperature) of structures such as clusters, or to separate stars in different classes to study their distributions. The most precise way of obtaining stellar parameters involves measuring the spectrum of a given star at high resolution. However, measuring spectra is a time-consuming task. In a given night, an observer might only be able to measure ~5 spectra. Since studies of large stellar populations involve thousands or more stars, many studies rely on photometry instead. Photometry is the measurement of stellar fluxes at various wavelength regions through various filters. Thus, while specific features in the spectrum cannot be directly observed using photometry, there is still a wealth of information that can be determined.
Obtaining stellar information from photometry is traditionally done by combining two magnitudes into colors. For example, in the UBVRI photometric system, the color B-V is a measure of surface temperature. The temperature is obtained by comparing the observed B-V color to previously determined relations between B-V and temperature. In this project, I will take advantage of the large number of fluxes available for the stars in the field centered at l=28.5, b=0.0 (galactic coordinates). There are fluxes at the B, V, R, 2MASS J, H, K, GLIMPSE 3.6, 4.5, 5.8, and 8.0 micron bands. Instead of obtaining stellar parameters through colors, I will use a spectral fitter developed by Robitaille et al. (submitted to ApJ, 2006). The fitter uses stellar spectral models from PHOENIX codes (e.g. Hauschildt, Allard, and Baron 1999), as well as infrared spectral models developed by Robitaille et al. The spectral fitter will compare the collection of observed fluxes to those in each model, and obtain best-fit models using a chi-squared analysis.
The infrared data is being obtained from the GLIMPSE point-source catalog. Therefore, only the optical data needs to be reduced. Images of the field previously mentioned are available in the U,B,V,R and H alpha bands. The preliminary reduction steps had already been done before the summer using ccdproc in IRAF. These included:
All the program images were aligned, so that the logical coordinates of a star will match in every frame. This simplifies any cross-matching that needs to be done, and is also needed in order to combine the images to make pretty high S/N pictures (see below!). The standard field images were also aligned together. To align, first select a reference frame. Find the logical coordinates of ~5 well-defined stars in this frame. Then modify the following parameters in the par file (epar imalign):
IRAF aligned the images really well. To check whether the alignment is accurate, open various different images in ds9. This last step can be done with imexam. Type imexam when ds9 is open, center the mouse pointer on a star, and press ','. This will display the x and y coordinates of the star. By comparing the coordinates in two different images, one can get a good idea of how accurate the aligning was.
This step is only necessary to produce publishable 3-color images. All the frames in a given filter (U,B,V,R) were combined using the following parameters:
Since all the images have been aligned, we can obtain the WCS for one image, and apply it to all the others. The first step is to obtain 3-4 stars with published equatorial (or ecliptic or galactic) coordinates. Then, identify these stars in the reference frame, and note their logical coordinates (x and y). Write this information into a text file, using the following format: RA, Dec, x, y, one star per line. Generally one can pick the format in which to express RA and Dec, but the format must be specified in the parameter files of the packages being used.
Open the ccmap parameter file and alter the following lines if necessary:
Now the reference frame has a WCS.
Although the images now have a WCS, I did a second pass using more reference stars. This should give a slightly better WCS. The website containing this information is here. In this page, specify the observation region. Then change the output coordinate file format to hh/dd:mm:ss. In order to get a reasonable number of stars, I specified an upper magnitude limit of ~18. Playing around with this value may be necessary. As mentioned before, bright stars are better. The output file must have RA and Dec for a list of sources, one source per row. All the header rows should be eliminated.
In the parameter file for ccfind, change the following parameters:
The output file should have a list of x,y,RA and Dec for the matched stars.
The procedure here is similar to that used to obtain the preliminary WCS. The parameters to be changed in ccmap are:
When running ccmap, a new screen will appear. It shows a bunch of points, and the y axis is some rms value. The key idea here is to eliminate those stars with high rms. This should be clear from the screen. There are, however, more than one screen from which stars need to be deleted. In order to access all of these, go here . Once everything seems great, exit the program and this will create a new WCS.
This step is really simple. In the parameter file for ccsetwcs, modify only the following:
Check to see if the WCS is adequate by opening various images and seeing if a) the coordinates for the reference stars are correct and b) stars have the same coordinates in different frames.
This section will provide a record of the reduction and calibration steps done. So far, reduction has been completed for the data from Night 2. Night 3 has been partly done but, for reasons that will become clear later, has not been calibrated to the standard system. It is worth noting that most of the reduction steps have been done in IRAF, and the most detailed information about the IRAF packages can be found at their website, provided in the links page.
ds9 must be open, and the individual frame to be examined must be displayed. There are two ways of displaying images in ds9: a) using the "display [image]" command in IRAF, and b) using ds9 itselt. The second is definitely better, as the image resolution will be good, as opposed to terrible. imexam will change the cursor in ds9. Point the cursor at a few (5-7) well-defined stars (not too bright though... those may be saturated). Press 'a' while the cursor is pointed at each star. From the DIRECT column in the output, find the median. This is the fwhm (full-width at half-max) of the point-spread function. Then point the cursor at a few "blank" spots pressing 'm' each time. This will give a set of values for the sky counts, as well as the standard deviation. Obtain the median of the average sky counts, as well as the median of the standard deviations. With these parameters, the data reduction can proceed
The following parameter files need to be modified. To access them, type the parameter file name as shown below:
This program picks a number of stars (I used 50) as candidates for creating the point-spread function. I gave this file the *.pst extension.
The inputs are the image, the photometry (*.phot) file, and the list of candidate psf stars (*.pst). The outputs are temporary files: a.psf for the psf image, a.pst for the list of psf stars, and a.psg for the photometry of the psf stars, as well as all the stars that belonged to the same group (no need to know about groups for now). Inside the parameter file, interac=yes, plottyp=contour are recommended. Before executing this program, ds9 must be open, and displaying any image. Another window will open up, and a plot of the first candidate psf star will appear. While having this window active, accept or reject this star by looking at its contours. If they look roughly symmetrical, and there are no indications of a secondary star in the psf field of view, accept with 'a'. Otherwise reject it with 'd'. The next star will appear. Do the same. When there are no more stars, activate the ds9 window, and press 'w' once. The psf information will be saved. Now click 'q'. Finally, activate the xgterm window and press 'q' again. This finishes the process. To see the psf image, the program seepsf can be run, and the output image displayed in ds9.
To recap, the psf has been computed twice, the second time around with a 'nicer' image, so presumably it is better than the first one. For the frames in night2, doing the psf twice did not make much of a difference, but it can in other cases where one is forced to accept psf stars that look ugly, for lack of any better stars. The magnitudes given by allstar are the final instrumental magnitudes.
The reduction process for standard stars is much shorter than for program stars. First, parameters such as the fwhm, sky background, and standard deviation need to be obtained with imexam. The parameters must also be modified in datapars,fitskypars,and photpars (again, as for the program star reduction). However, when modifying photpars, the aperture is set to a list of numbers, e.g. 10,12,14,16,18.
For the standard field, photometry only needs to be done on standard stars. Therefore, instead of using daofind to obtain coordinates for candidate stars, the coordinate file is written manually. The file is simply a list of x and y logical coordinates of the standard stars in the "reference frame" (any frame will do, since the frames are already aligned).
This is the final reduction step for standards. Open the phot parameter file, and modify the following:
Now run phot. The output file shows a list of magnitudes for each star. Notice that the magnitudes almost always steadily become smaller (brighter) for larger apertures. Identify the aperture at which the magnitudes no longer change, or the changes are very small (~.001 mag). I picked 12. Now do this for each image, each time obtaining a new photometry file (mine had the extension *.phot)
When IRAF outputs magnitudes for the stars in the field, the reduction process is only partially done. There are two additional steps:
IRAF requires a text file listing the names of the images containing the standard field. My standard field was Landolt SA-110. The format of this file is as follows:
sa110_1 : B1 V1 R1
sa110_2 : B2 V2 R2
sa110_3 : B3 V3 R3
The names here are only examples. Basically, the file groups all the observations of the standard field into groups, each group containing one image per filter. The image names do not require the *.fits extension. I gave this file the extension *.imset. The other file required is a record of magnitudes for the standard stars. These magnitudes were located in *.phot files in my case. To create this file, type epar mknobsfile. The parameters to be modified are the following:
mknobsfile produced two output files: the *.std.pam file and a *.std.pam.dat file. Certain changes need to be made to both files:
When mkconfig is run, a text file with various sections appears. Simply delete those lines irrelevant to the reduction. In my case, all the lines containing the U and I filters were deleted. The last section is under the heading "transformation". I left BFIT,VFIT,and RFIT. The other equations were also deleted. I also left the b/v/r 4 coefficients constant, only fitting to the "1","2",and "3" coefficients. Once the editing is finished, exit the file like in vi: :wq! This should create the configuration file.
When fitparams is run, a new screen will appear. The information in this screen can be manipulated as detailed here . The main idea objective in this step was to eliminate those stars that were producing a bad fit. This can be seen when looking at plots of the rms errors. Most points lie in the x-axis, but there are outliers. These stars can be deleted by pressing 'd' when the cursor is right over the point. After all the fits (there are various graphs) are reasonable, quit with 'q', and the program will now display the graphs for the next band, and so on till all the bands, in my case 3, are fit.
The output file *.std.ans contains all the transformation information necessary for use on the program field. For each band, the coefficients and their errors are presented. Although it is possible to do the transformation of program stars in IRAF, I wrote separate programs in Fortran 90 because I believe this method would give more accurate magnitudes.
The photometry files *.als.1 have magnitudes for a list of stars numbered 1,2,etc.Unfortunately, the stars in the first frame are not matched by number with the stars in any other frame. In order to match the stars in ALL frames from a given band, say B, I used mknobsfile. This required some tweaking of the image header files. All the B filters had a filter value of 502. I modified this so that the various B frames had 5021,5022,5023,etc as their values. The process is identical with the other bands. The parameters in mknobsfile to be modified are:
There are now 3 main files: B, V, and R. Each of these is now read into a structure using the following function: [rd_wiynlist]. The new IDL structures are then written into
There are three necessary files, one for each band: B,V,and R. Since the structures are already created in IDL, to write into a file type:
n is the number of sources in a particular band, and filename are n2B.txt,n2V.txt,n2R.txt.
We need the information from the *.std.ans file. This was the output from running fitparams.
The first program is Vinstrumental.f90. The index i must go from 1 to the number of V band sources in n2V.txt. kv is the second coefficient in the V solution in *.std.ans. This is the airmass correction term. dkv is the quoted uncertainty in this coefficient. Now run Vinstrumental.f90, and the output file will be n2Vinstrumental.txt.
The second program is BVmatch.f90. This program links a particular V band source to its respective B band data. The index i loops from 1 to the number of V sources. The index j loops from 1 to the number of B sources. The declaration statements might need to be slightly modified. In particular, when arrays are declared, infov,idv,xv,and yv should read real,dimension(x), where x is the number of V sources. Now the program is ready for running. The coordinate matching tolerance in this program is 1 pixel in x and 1 pixel in y.
The third program is BVstandard.f90. The only required change here are the various coefficient values found in *.std.ans. These are all in the declaration section of the program. This program will compute a standard V and B value for each matched source.
The fourth program, matchBVR.f90, matches the B and V sources with the R sources. The index i loops from 1 to the number of matched B and V sources (this is the number of sources that the third program outputs. The index j loops from 1 to the number of sources in n2R.txt, i.e. the number of R sources.
The fifth program,BVRstandard.f90 completes the transformation procedure. Index i goes from 1 to the number of B,V,R matched sources. This number can be obtained from the output of the fourth program. Finally, it is necessary to change the coefficient values, as was done before in BVstandard.f90. This time, the R coefficients must be input. The output from this program was, in my case, n2BVRstandard.txt. It lists every matched source, as well as its standard B,V,R and (B-V) values. In all the previous programs, the user is free to name the output files but always keeping in mind that if one changes an output file name, one must also modify the input file name in the next program.The only parameters modified here were:
RA and Dec for each source will be appended as the rightmost columns in the output file
Simply open the magtoflux.f90 file and make the index i loop from 1 to the number of sources in n2BVRstandard.txt. The program will take the standard B,V,R magnitudes and convert them to fluxes in mJy (milliJanskys). Although in practice this step is really simple, the determination of flux densities depends on the shape of the stellar spectrum, not only the magnitude. Thus making this conversion introduces an additional set of uncertainties into the data. However, this step is currently necessary because the spectral fitter works with flux densities and not magnitudes.
Open the rdUBVRI.pro file. Modify only NLINES, which is the number of final matched sources. fn is the name of the the file with the fluxes, fn2 is the name of the file with all the standard magnitudes and RA and Dec.
This ends the work with the optical data. After I finished these steps, I matched the optical sources with the infrared and X-ray data, and provided the spectral fitter with various lists of sources with optical/IR/etc fluxes. A discussion of these steps will come later. The latter steps of the transformation process can be undoubtedly made cleaner and more straightforward. I plan to merge the 5 FORTRAN programs into a single IDL program whenever I have additional time.