chime-experiment / ch_util

CHIME utilities
https://chime-experiment.github.io/ch_util
MIT License
3 stars 3 forks source link

feat(timing): compatability with corrections generated in real-time #17

Open ssiegelx opened 3 years ago

ssiegelx commented 3 years ago
ssiegelx commented 3 years ago

@danielemichilli This PR should enable you to load timing correction files generated by both the offline and real-time pipeline.

It also adds a predict_x_error method to the TimingCorrection class that you should use instead of the version in the baseband-analysis.localization module. It is called as:

dx = tcorr.predict_x_error(timestamp, input_map=input_map)

where input_map is the output of ch_util.tools.get_correlator_inputs. Note that if you do not provide the input_map argument, then the code will query the layout database for this information. This query is the slowest part of the routine, so if you are calling it many times you may want to pass it as an argument.

danielemichilli commented 3 years ago

@ssiegelx I was finally able to test this, sorry about the huge delay.

The new function formally works but the correction I get is different from the previous version. For example, I am testing TOA = 1553730069.4198346138, are you able to doublecheck the correct value I should be getting for that timestamp?