An update on how the binary model is generated:
The binary model is now generated using martins rv tables and shifting the stars in the modeled binary by the primary and secondary rv values. I also use martins mass ratios in order to adjust the how much the secondary component of the binary is involved.
This gives an accurate (initial) representation of the binary in the rest frame.
To test this, I generated the following plot. The the unshifted spectrum is the resulting spectrum from apStar without any shift. The shifted spectrum is the observed spectrum from apStar but shifted by the visits VHELIO value in the apStars header.
As can be seen, the shifted spectrum is aligned with the model spectrum instead. Showing that to put the observed spectrum into the rest frame we need to shift the observed spectrum by VHELIO to bring it back to the rest frame.