Determination of Stellar Properties using a Spectral Fitting Technique

Introduction

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.

Data reduction and analysis

Pre-processing

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:

Astrometry

Aligning the images: images/immatch/imalign

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.

Combining the images: images/immatch/imcombine

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:

Preparing the input astrometry file

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.

Establishing a WCS (World Coordinate System) for an image: images/imcoords/ccmap

Open the ccmap parameter file and alter the following lines if necessary:

Now the reference frame has a WCS.

Obtaining a list of stars with published coordinates from USNO

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.

Matching the USNO list with stars in the reference frame: images/imcoords/ccfind

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.

Perfecting the WCS: images/imcoords/ccmap

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.

Setting the WCS for ALL the images: images/imcoords/ccsetwcs

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.

Reduction

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.

Reduction of program field

Obtaining input parameters for reduction: imexam

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

Preparing the reduction run: noao/digi/dao

The following parameter files need to be modified. To access them, type the parameter file name as shown below:

Finding preliminary sources: noao/digi/dao/daofind

As the title implies, this list may contain spurious sources. That is ok. I gave the output files the name: [image].coo.

Calculating aperture photometry: noao/digi/dao/phot

Aperture photometry means adding all the photon counts inside the aperture, subtracting out the sky, and converting this flux to a magnitude. Many of the dim and or spurious sources detected by daofind will be given INDEF magnitudes by phot. The output files had the extension *.phot.

Selecting psf stars: noao/digi/dao/pstselect

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.

Computing the psf: noao/digi/dao/psf

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.

Getting psf photometry for the group stars in a.psg: /noao/digi/dao/nstar

Obtaining an image with only the group stars: /noao/digi/dao/substar

Computing the psf for a second time, using the image a.sub: /noao/digi/dao/psf

Obtaining psf photometry for all stars in the frame! /noao/digi/dao/allstar

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.

Reduction of standard field

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.

Obtaining a coordinate file

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).

Aperture photometry of standard stars: noao/digi/dao/phot

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)

Transformation to standard system

When IRAF outputs magnitudes for the stars in the field, the reduction process is only partially done. There are two additional steps:

Making the necessary files required by IRAF

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:

Altering the output photometry file

mknobsfile produced two output files: the *.std.pam file and a *.std.pam.dat file. Certain changes need to be made to both files:

Selecting the proper transformation equations: noao/digi/dao/photcal/mkconfig

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.

Determining the transformation coefficients: noao/digi/photcal/fitparams

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.

Matching program stars from different frames

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:

From here on the main programs to use will be IDL and Fortran

Making IDL structures of B,V,and R photometry files

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