California-Planet-Search / grandsol

Grand Solution - Doppler forward modeling
MIT License
0 stars 0 forks source link

Compare CPS wavelength solution to grand wavelength solution #18

Closed bjfultn closed 8 years ago

bjfultn commented 8 years ago

Compare CPS wavelength solution to grand wavelength solution

bjfultn commented 8 years ago

I'm noticing some pretty weird behavior with the wavelength solutions. Here is a comparison of the input solution vs. the output "wav_obs" column in the .mod file.

screen shot 2016-04-22 at 9 38 42 am

bjfultn commented 8 years ago

Here is a comparison of the "wav_obs" column in the .mod file with the wavelength solution stored in the CPS "vd" file corresponding to the same observation.

screen shot 2016-04-22 at 9 41 13 am

bjfultn commented 8 years ago

The standard CPS wavelength solution (used as an initial guess) is also quite different then the hires.wave file that we have packaged with grand.

screen shot 2016-04-22 at 9 50 48 am

JeffValenti commented 8 years ago

The output wavelength solutions in .mod files are 4th-order polynomials. This is true for both the observatory and stellar frames. I verified this for an hd4628 .mod file BJ created with iGrand. The fractional deviation from 4th order was less than 1e-10 for all pixels and all 100 Keck HIRES observations.

JeffValenti commented 8 years ago

grand.F begins with an initial loop (15 iterations) that iteratively improves: the wavelength solution, a Gaussian LSF, and the template. The subroutine tweak_wls( ) adjusts the wavelength solution and then the subroutine polyfit_w( ) replaces the wavelength scale in wav_imn with a 4th order polynomial fit. I verified that polyfit_w( ) correctly fits a 4th order polynomial by implementing the algorithm in IDL and comparing with the intrinsic poly_fit( ) function in IDL.

After this initial loop, grand.F enters the main loop, where the wavelength is fixed to the 4th order polynomial determined above and the LSF is described by spline nodes instead of a Gaussian.

bjfultn commented 8 years ago

Look at grand residuals for HD4628 to look for discontinuities at the same places.

bjfultn commented 8 years ago

Here are the residuals for this order for HD4628. I don't see anything strange going on. The noise actually looks very white.

igrand_4628_08_residuals

JeffValenti commented 8 years ago

The wavelength solution in hires.wave is a 4th-order polynomial in the pixel range [20:4000]. There is a wavelength discontinuity between this central region and the edges at [0:19] and [4001:4020]. This is the origin of the artifacts in the comparison plots above. The simulated data replaces wavelengths in these edge regions with values obtained by extrapolating the 4th-order polynomial in the central region. Thus, the simulated wavelength scale can be exactly modeled by grand.F, which uses a 4th-order polynomial.