ipta / pulsar-clock-corrections

Distribution point and tools for observatory clock corrections for pulsar timing.
BSD 3-Clause "New" or "Revised" License
6 stars 5 forks source link

BIPM only goes up to 2021, and may not be fully correct #10

Closed dlakaplan closed 9 months ago

dlakaplan commented 9 months ago

@vhaasteren noted:

When running the update_clock_corrections.py script, I got a warning that tai2tt_bipm2022.clk was missing. Looking into it, it seems that tai2tt_bipm2021.clk andtai2tt_bipm2020.clk are actually copies of tai2tt_bipm2019.clk. I don't think that's supposed to happen? Or is it?

This may need a little deeper dive, since there is some confusion about those files. But I think this can be fixed within this repo.

dlakaplan commented 9 months ago

@jorisverbiest

vhaasteren commented 9 months ago

The workaround I used in the Dockerfile that I was building at the time consisted of just copying tai2tt_bipm2019.clk to upcoming years, and letting pulsar-clock-corrections update it properly. It seems to work.

WORKDIR $SOFTWARE_DIR/pulsar-clock-corrections
RUN mkdir -p gh-pages/.this_is_gh_pages && \
    for year in $(seq 2022 $(( $(date +%Y) - 1 ))); do \
        cp T2runtime/clock/tai2tt_bipm2019.clk T2runtime/clock/tai2tt_bipm${year}.clk; \
    done
dlakaplan commented 9 months ago

Is https://www.bipm.org/en/time-ftp/tt-bipm- the correct source location?

vhaasteren commented 9 months ago

It looks like it's in these locations now: https://webtai.bipm.org/ftp/pub/tai/ttbipm/TTBIPM.2022

dlakaplan commented 9 months ago

I am also a little confused because:

dlakaplan commented 9 months ago

If I run it locally I do pull down BIPM2022 but other things fail because the file doesn't already exist and neither does a relevant log file. If I copy in a stub then things run but I'm not sure all of the appropriate files are actually updated.

dlakaplan commented 9 months ago

I couldn't convince this to automatically update the file, but I was able to create the appropriate file using:

import bipm

bipm2022 = bipm.get_ttbipmxy_corrections_clock(2022)
bipm2022.write_tempo2_clock_file('tai2tt_bipm2022.clk')

Along with that there was a bug(?) in the code that made the top comment in BIPM 2020/2021/2022 all read BIPM 2019.

dlakaplan commented 9 months ago

And I also agree that BIPM2020 seemed to be the same as BIPM2021 (which looks OK).

dlakaplan commented 9 months ago

Closed by #11