rmjarvis / TreeCorr

Code for efficiently computing 2-point and 3-point correlation functions. For documentation, go to
http://rmjarvis.github.io/TreeCorr/
Other
98 stars 37 forks source link

Fix error when using load_mem with non-radian units #145

Closed rmjarvis closed 2 years ago

rmjarvis commented 2 years ago

This PR fixes an error in the reading and writing of patch files for use with the low_mem=True option, reported by @chto in Issue #144. The patch files were intended to be written in radians to avoid an unnecessary multiply and divide on the round trip through a file. But there were some inconsistent applications of the units, so it ended up wrong. I cleaned that up in general, and added unit tests of this use case to make sure it works.

Will release this fix as a bug-fix release v4.2.9 shortly.