In [1]:
In [28]:
filename = '/Users/Benjamin/AstroData/HST/IUE/HD38666/lp19996'
Odat = genfromtxt(filename, skip_header=19)
Owave = arange(12250)*0.1+1900.
Oflux = Odat[:,0]
iOwave = (where(logical_and(logical_and(Oflux>1E-11, Owave>2200.), Owave<2900.)))[0]
x = Owave[iOwave]
y = Oflux[iOwave]
z = np.polyfit(x, y, 3)
p = np.poly1d(z)
ycont = p(x)
yy = y/ycont
In [29]:
fig = figure(figsize=(20,8))
ax = fig.add_subplot(111)
ax.plot(x, smooth(yy, 50))
ax.set_ylim(0.2, 1.5)
Out[29]:
In [9]:
from cookb_signalsmooth import smooth
In [15]:
ycont.shape
Out[15]:
In [ ]: