## Unwrapping and calibrating (closure) phases

If we plot TriplePhaseC (since we haven't calibrated the phases yet, TriplePhaseC is identical to the uncalibrated TriplePhase) of the calibrator vs Time, we notice large jumps which are phase wraps rather than bad data. Therefore, we have to unwrap the calibrator phase data first. Use the "All in 1" option to replot this data into one graph, and then use Calibrate|Visibility|Triple|ManualUnwrap to define a window around the group of data points which you want wrapped to the other side. Enter "+1" when asked to provide the direction of the wrap, if you have, like in the following figure, chosen to move the negative phase data into the positive half. The plot below shows the situation after unwrapping. Now add back our program star to the star plot selection, and change the data variable in the calibration widget to "TriplePhase". Click on "Calibrate", and the log should read like the following. Notice that the first three channels do not contain any data since one or more baselines are bad for this triple. Also, channel 11 has the metrology laser straylight in it, so it was flagged too by the script.

Warning(CALCOEFFS): no valid data points found! OB= 1, Bl= 1, Ch= 1
Warning(CALCOEFFS): no valid data points found! OB= 1, Bl= 1, Ch= 2
Warning(CALCOEFFS): no valid data points found! OB= 1, Bl= 1, Ch= 3
Solution calculated for TR= 1, Ch= 4. (RMS [d] = 3.413)
Solution calculated for TR= 1, Ch= 5. (RMS [d] = 3.812)
Solution calculated for TR= 1, Ch= 6. (RMS [d] = 4.045)
Solution calculated for TR= 1, Ch= 7. (RMS [d] = 3.811)
Solution calculated for TR= 1, Ch= 8. (RMS [d] = 3.962)
Solution calculated for TR= 1, Ch= 9. (RMS [d] = 3.886)
Solution calculated for TR= 1, Ch= 10. (RMS [d] = 4.087)
Warning(CALCOEFFS): no valid data points found! OB= 1, Bl= 1, Ch=11
Solution calculated for TR= 1, Ch= 12. (RMS [d] = 5.089)
Solution calculated for TR= 1, Ch= 13. (RMS [d] = 5.771)
Solution calculated for TR= 1, Ch= 14. (RMS [d] = 4.164)
Solution calculated for TR= 1, Ch= 15. (RMS [d] = 4.166)
Solution calculated for TR= 1, Ch= 16. (RMS [d] = 5.787)
Solution calculated for TR= 1, Ch= 17. (RMS [d] = 4.489)
Solution calculated for TR= 1, Ch= 18. (RMS [d] = 4.885)
Solution calculated for TR= 1, Ch= 19. (RMS [d] = 6.110)
Solution calculated for TR= 1, Ch= 20. (RMS [d] = 5.349)
Calibration applied for stars FKV0497 FKV0509 .
These are the data after calibration (and un-selecting the "All in 1" option for plotting). Of course, the binary phases are all over the place, but the calibrator is close to where it should be. Next section