Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
Daichi Hiramatsu committed Aug 28, 2017
1 parent 976992e commit c190e13
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lcogtgemini/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,13 +599,16 @@ def mktelluric(filename):
w = np.logical_and(waves > 3420, waves < 3600)
bluefit = np.poly1d(np.polyfit(waves[w], spec[w], 1))
bluewaves = waves < 3420
smoothedspec[bluewaves] = bluefit(waves[bluewaves])
if len(bluewaves) > 0:
smoothedspec[bluewaves] = bluefit(waves[bluewaves])

# Red side
w = np.logical_and(waves > 8410, waves < 8800)
redfit = np.poly1d(np.polyfit(waves[w], spec[w], 1))
redwaves = waves > 8800
smoothedspec[redwaves] = redfit(waves[redwaves])
if len(redwaves) >0:
smoothedspec[redwaves] = redfit(waves[redwaves])

smoothedspec[not_telluric] = spec[not_telluric]
# Divide the original and the telluric corrected spectra to
# get the correction factor
Expand Down

0 comments on commit c190e13

Please sign in to comment.