Home | Trees | Indices | Help |
---|
|
Compute Least-Square-Deconvolutions of spectra.
Generate some spectra of a single star:
>>> velos,V,S,masks = __generate_test_spectra(1,binary=False,noise=0.01)
Compute the LSD profiles in certain radial velocity range:
>>> rvs = np.linspace(-10,10,100) >>> Z,cc = lsd(velos,V,S,rvs,masks)
Plot both the input spectrum and the LSD and CCF profiles:
>>> p = pl.figure() >>> p = pl.subplot(121) >>> p = pl.plot(velos,V[:,0],'k-',label='Observation') >>> p = pl.vlines(masks[0][0],1,1-np.array(masks[0][1]),color='r',label='Mask') >>> p = pl.legend(loc='best') >>> p = pl.subplot(122) >>> p = pl.plot(rvs,Z[0][0],'k-',label='LSD') >>> p = pl.plot(rvs,cc[0][0],'r-',label='CCF') >>> p = pl.legend(loc='best')
]]include figure]]ivs_spectra_lsd01.png]
Do the same as above, but for more noise and different Tikhonov regularizations.
>>> velos,V,S,masks = __generate_test_spectra(1,binary=False,noise=0.1)
>>> rvs = np.linspace(-10,10,100) >>> lambdas = [0.,0.1,0.5,1.0] >>> output = [lsd(velos,V,S,rvs,masks,Lambda=lam) for lam in lambdas]
We plot both the input spectrum and the LSD and CCF profiles:
>>> p = pl.figure() >>> p = pl.subplot(121) >>> p = pl.plot(velos,V[:,0],'k-',label='Observation') >>> p = pl.vlines(masks[0][0],1,1-np.array(masks[0][1]),color='r',label='Mask') >>> p = pl.legend(loc='best') >>> p = pl.subplot(122) >>> for lam,(Z,cc) in zip(lambdas,output): ... p = pl.plot(rvs,Z[0][0],'-',label='$\Lambda$=%.1f'%(lam),lw=2) >>> p = pl.legend(loc='best')
]]include figure]]ivs_spectra_lsd02.png]
Generate some spectra of a binary star:
>>> velos,V,S,masks = __generate_test_spectra(1,binary=True,noise=0.01)
Compute the LSD profiles in certain radial velocity range, first using only one line mask, then both:
>>> rvs = np.linspace(-10,10,100) >>> Z1,cc1 = lsd(velos,V,S,rvs,masks[:1]) >>> Z2,cc2 = lsd(velos,V,S,rvs,masks)
Plot both the spectrum and the LSD and CCF profiles. Note that the CCF in the binary case is exactly the same as in the single star case (see implementation). First, we plot the LSD profile under the assumption of a single star. Second, we plot the LSD profile when taking binarity into account.
>>> p = pl.figure() >>> p = pl.subplot(121) >>> p = pl.plot(velos,V[:,0],'k-',label='Observation') >>> p = pl.vlines(masks[0][0],1,1-np.array(masks[0][1]),color='r',label='Mask 1',lw=2) >>> p = pl.legend(loc='lower right') >>> p = pl.subplot(122) >>> p = pl.plot(rvs,Z1[0][0],'k-',label='LSD 1') >>> p = pl.plot(rvs,cc1[0][0],'r-',label='CCF 1') >>> p = pl.legend(loc='best')
]]include figure]]ivs_spectra_lsd03.png]
>>> p = pl.figure() >>> p = pl.subplot(121) >>> p = pl.plot(velos,V[:,0],'k-',label='Observation') >>> p = pl.vlines(masks[0][0],1,1-np.array(masks[0][1]),color='r',label='Mask 1',lw=2) >>> p = pl.vlines(masks[1][0],1,1-np.array(masks[1][1]),color='b',label='Mask 2',lw=2) >>> p = pl.legend(loc='lower right') >>> p = pl.subplot(122) >>> p = pl.plot(rvs,Z2[0][0],'r-',label='LSD 1',lw=2) >>> p = pl.plot(rvs,Z2[0][1],'b-',label='LSD 2',lw=2) >>> p = pl.legend(loc='best')
]]include figure]]ivs_spectra_lsd04.png]
|
|||
2D array, 2D array |
|
||
|
|
Compute LSD profiles and cross correlation functions. Possibility to include Tikhonov regularization to clean up the
profiles, when setting Possibility to include multiprofile LSD. Parameter See Donati, 1997 for the original paper and Kochukhov, 2010 for extensions.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Mar 30 10:45:19 2018 | http://epydoc.sourceforge.net |