M101 Data Reduction

In this project, we will take raw(ish) data from the Burrell Schmidt telescope, reduce it, and then analyse it to build a surface brightness profile and color map of the nearby spiral galaxy M101.

After the data reduction and analysis is complete, you will write an ApJ-style paper writing up not just the analysis, but giving the scientific context and interpreting your results in light of other studies of M101 and of galaxies in general. Here are the details of the writeup assignment.

Things you type in a terminal window are written in bold font.
Menu options in ds9 are written in italic font.
When you get to a HOLD, stop and wait for class discussion.

Step 0: Setting up
  1. Open up a terminal window (right click on desktop, choose "Open in Terminal").
  2. In that window, move to the M101 directory: cd ~/Desktop/M101
  3. Then start a jupyter notebook session: jupyter notebook
  4. Open another terminal window (right click on desktop, choose "Open in Terminal") 

Step 1: Zero/Bias subtraction and Flat Fielding
  1. In your second terminal window, move into the B2009 directory (cd ~/Desktop/M101/Bdata) and do a file listing to see what's there: ls
  2. Start ds9 and load all the raw images: ds9 pobj*.fits
  3. Set ds9 to show only one frame at a time: Frame --> Single Frame
  4. Lock all the frames to the same X,Y image coordinate system: Frame --> Lock --> Frame --> Image
  5. HOLD
  6. Close ds9 (Click the red X in the upper left corner of the window)
  7. Restart ds9 to open the individual zeros (ds9 pzero*.fits) and again set ds9 to show on frame at a time (Frame --> Single Frame)
  8. Work out the read noise (in ADU) by doing statistics in a region. Move the region around to check for consistency. Then do this for a few other images to check for consistency.
  9. Close ds9, then restart it and open the flat field image (ds9 SkyFlat2009B.fits). Inspect the image.
  10. HOLD
  11. In your jupyter notebook browser, open the notebook ReduceImages.ipynb. Make sure the directory (first line of block 3) is set to point to your Bdata directory, then run the notebook.
  12. Open the master zero (ds9 Zero.fits) and inspect it. Work out the read noise. Did it scale down properly?
  13. Quit ds9, then restart it and load all the reduced images: (ds9 rpobj*.fits)
  14. Do they all look good?
  15. HOLD
  16. Now edit the directory in the notebook to point to your Vdata directory, and rerun the notebook to reduce the V band data.
  17. Move to your Vdata directory (cd ~/Desktop/M101/Vdata), open the reduced V images (ds9 rpobj*.fits) and make sure they look right.

Step 2: Sky Subtraction and Photometric Calibration
  1. Go into your V band data directory (cd ~/Desktop/M101/Vdata) and open all the reduced V band images (ds9 rpobj*.fits).
  2. Set ds9 to show only one frame at a time: Frame --> Single Frame
  3. Lock all the frames to the same RA, dec coordinate system: Frame --> Lock --> Frame --> WCS
  4. HOLD
  5. Close ds9, move to your B band data directory (cd ~/Desktop/M101/Bdata).
  6. Use ds9 to open the reduced image rpobj0419029 (ds9 rpobj0419029.fits)
  7. Estimate the sky level in ADU
  8. Now "block average" the image in blocks of 4x4 pixels (Analysis --> Block --> Block 4). Can you see the gradient in the sky intensity level?
  9. In your jupyter notebook browser, open the notebook CalibrateOne.ipynb. Make sure the directory (in block 2) points to your Bdata directory, and that calband is set to 'B'
  10. Run the notebook.
  11. HOLD
  12. Open ds9 and load the sky subtracted versions of the image it made: (ds9 crpobj0419029.fits)
  13. HOLD
  14. In your jupyter notebook browser, open the notebook CalibrateImages.ipynb. In block 3, make sure that calband is set to 'B'. Then run it to work on the B dataset.
  15. Change calband to be 'V', and re-run the notebook to work on the V dataset.

Step 3: Image Registration, Photometric Scaling, and Combining
  1. In your jupyter notebook browser, open CombineImages.ipynb.
  2. Set the directory (in block 4) to point at your Bdata directory and run.
  3. HOLD
  4. Set the directory to point at your Vdata directory and re-run.

Step 4: Examine the B image stack
  1. Quit ds9, then restart it to open the stacked image: ds9 c*.fits stack_med.fits
  2. Set ds9 to show only one frame at a time: Frame --> Single Frame
  3. Lock all the frames to the same ra,dec coordinate system (Frame --> Lock --> Frame --> WCS)
  4. Set the intensity scale to show a range of light levels (Scale --> Scale Parameters, and then set it to scale -5 to 3000)
  5. Set the intensity scaling to be logarithmic (Scale --> Scale Parameters --> Scale, and set it to log)
  6. Lock the scalebar (Frame --> Lock --> Scale)
  7. Lock the colorbar (Frame --> Lock --> Colorbar)
  8. Play around with the images, zoom in, zoom out, and keep toggling back and forth between the different images using the tab key.
  9. Notice differences between the stacked image amd the individual ones (artifacts gone, noise levels down, etc)

Step 5: Move your final stacks to the main M101 directory

  1. mv ~/Desktop/M101/Bdata/stack_med.fits ~/Desktop/M101/M101_B.fits
  2. mv ~/Desktop/M101/Vdata/stack_med.fits ~/Desktop/M101/M101_V.fits
  3. cd ~/Desktop/M101/
  4. ds9 M101*.fits

Step 6: Do ds9 region photometry and the Photometry.ipynb notebook to check the data and calibration:
  1. There is a star at a (RA, Dec) coordinate of (14:04:02.8, +54:10:09). It has an apparent magnitude V=15.51 and B−V color = 0.65. In each of the B and V images, put a circular region around that star, find the sum of the counts (using the region statistics function), and then put those into the Photometry jupyter notebook to get out magnitudes. What values do you get?
  2. Work out an estimate for the total V magnitude and B-V color of the galaxy NGC 5477. Compare your values to those reported for the galaxy on NED. Think about the major sources of uncertainty your estimate, and how you might refine your estimate.
  3. How far from the center of M101 (in arcmin and in kiloparsecs) is NGC 5477? Try using a ds9 Ruler region (Region --> Shape --> Ruler) to measure this.
  4. What is the average B surface brightness and B-V color of the inner kpc of M101? Compare your numbers to those shown in the plot by Mihos et al 2013.

Final Reduced Images for download: