skysub.py

#This program reads in target and sky (fits) files, calculate the average flux at specific wavelengths from both files and compute the ratio.
#Then the program divides the input sky spectrum to this ratio to make it equal to the target spectrum. Finally, this program will subtract sky off the target.
#Use when the target file contains no pure sky
#INPUT: 1.(FITTED) SKY SPECTRUM 2.TARGET SPECTRUM
#OUTPUT: 1.SKY-SUBTRACTED TARGET SPECTRUM