edbennett / glue_analysis

MIT License
0 stars 1 forks source link

Check consistency of headers #37

Open chillenzer opened 11 months ago

chillenzer commented 11 months ago

read_correlators_binary does not check that the corr_file's and vev_file's headers are consistent. I believe you could give it inconsistent data that other parts of the code could choke on much later.

chillenzer commented 10 months ago

This has happened in production by now and the error handling in 8e55725 also catches this. But the error one gets in this scenario is kind of cryptic: If corr_file and vev_file are both _read, the first run (with corr_file) can pass and the second (with vev_file) can raise the exception. All you end up with is the message that the header is inconsistent and suggested a different number of elements.