ASTR 3070: Data Reduction Assignment
Due Date:
1 Part 1: Data Reduction Pipline
This section covers stacking and image calibration - read the entire document before getting started
1.1 Pipeline Setup
1.1.1 Import Libraries
This assignment can be completed without the use of additional libraries
[ ]: # given libraries
import numpy as np
import [Link] as plt
from [Link] import LogNorm
from [Link] import fits
# HELPER FUNCTIONS - See provided API document
from helper_functions import *
1.1.2 Load References to Files
This should include: Darks, Bias, Lights, Flats
Take note of how many lights were imported from each filter for later
[ ]: # define the paths here
# fetch filenames for each directory -> list of files
1.2 Create Calibration Frames
Create master stacks for Darks, Bias, and Flats
[ ]: # Create master bias, dark, and flat images
1
1.2.1 Apply Corrections and Normalize
Create normalized and bias corrected flat frames for each set of lights
[ ]: # normalized flat frames
1.3 Obtain HDU for Reference Frame
Select an image from the set of frames to use as a reference frame
[ ]: # open files
1.4 Forming the Image
1.4.1 Create HDUs
This step may take a moment to run
[ ]: # create lists of headers
1.4.2 Align Images and Stack
This step may take a few minutes to run
[ ]: # create master images
1.4.3 Adjust Header With Correct Exposure Time
Calculate the total integration time and update the image header
[ ]: # time for each subexposure
# update reference frame header
# view updated header
1.4.4 Save the Aligned Images in HDU Format and Write to File
Use the master stack and update the header
[ ]: # create a new HDU
# write to file
2
1.5 Plot Final Images
Plot a preview of the master stack
[ ]: # plot image (repeat for each filter in a new cell)