LALFrameH losing precision when storing epoch
Description of problem
When I create a LALFrameH structure from the SWIG bindings of LALFrame 1.5.5 that contains a nano-second precision GPS epoch, I can't then add a TimeSeries to that frame that has the same epoch due to a precision error.
Expected behavior
It should work.
Steps to reproduce
>>> import lal
>>> import lalframe
>>> start = lal.LIGOTimeGPS(1260000000, 12600)
>>> series = lal.CreateREAL8TimeSeries('test', start, 0, 1, '', 1)
>>> frame = lalframe.FrameNew(series.epoch, .25, "test", 0, 0, 0)
>>> lalframe.FrameAddREAL8TimeSeriesProcData(frame, series)
XLAL Error - XLALFrameAddREAL8TimeSeriesProcData (/home/conda/feedstock_root/build_artifacts/lalframe-split_1633350855411/work/lib/LALFrameIO.c:601): Series start time 1260000000.000012600 is earlier than frame start time 1260000000.000012636
XLAL Error - XLALFrameAddREAL8TimeSeriesProcData (/home/conda/feedstock_root/build_artifacts/lalframe-split_1633350855411/work/lib/LALFrameIO.c:601): Invalid argument
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: Invalid argument
Context/environment
System information
Hostname: laptop
Operating system: Debian 10 under WSL 2
Python version: 3.9.7 (conda-forge)
Conda info
$ conda info
active environment : __test
active env location : /home/duncan/opt/mambaforge/envs/__test
shell level : 2
user config file : /home/duncan/.condarc
populated config files : /home/duncan/opt/mambaforge/.condarc
/home/duncan/.condarc
conda version : 4.10.3
conda-build version : 3.21.4
python version : 3.9.7.final.0
virtual packages : __linux=5.10.60.1=0
__glibc=2.28=0
__unix=0=0
__archspec=1=x86_64
base environment : /home/duncan/opt/mambaforge (writable)
conda av data dir : /home/duncan/opt/mambaforge/etc/conda
conda av metadata url : None
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
package cache : /home/duncan/opt/mambaforge/pkgs
/home/duncan/.conda/pkgs
envs directories : /home/duncan/opt/mambaforge/envs
/home/duncan/.conda/envs
platform : linux-64
user-agent : conda/4.10.3 requests/2.26.0 CPython/3.9.7 Linux/5.10.60.1-microsoft-standard-WSL2 debian/10 glibc/2.28
UID:GID : 1000:1000
netrc file : None
offline mode : False
Conda list
$ conda list
# packages in environment at /home/duncan/opt/mambaforge/envs/__test:
#
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 1_gnu conda-forge
boost-cpp 1.74.0 h359cf19_5 conda-forge
bzip2 1.0.8 h7f98852_4 conda-forge
c-ares 1.18.1 h7f98852_0 conda-forge
ca-certificates 2021.10.8 ha878542_0 conda-forge
fftw 3.3.10 nompi_h74d3f13_101 conda-forge
gsl 2.7 he838d99_0 conda-forge
hdf5 1.12.1 nompi_h7f166f4_102 conda-forge
icu 69.1 h9c3ff4c_0 conda-forge
krb5 1.19.2 h48eae69_3 conda-forge
ld_impl_linux-64 2.36.1 hea4e1c9_2 conda-forge
ldas-tools-al 2.6.7 h37f9cb6_0 conda-forge
ldas-tools-framecpp 2.8.1 h36659b4_0 conda-forge
libblas 3.9.0 12_linux64_openblas conda-forge
libcblas 3.9.0 12_linux64_openblas conda-forge
libcurl 7.80.0 h494985f_0 conda-forge
libedit 3.1.20191231 he28a2e2_2 conda-forge
libev 4.33 h516909a_1 conda-forge
libffi 3.4.2 h7f98852_5 conda-forge
libframel 8.41.3 h7f98852_1 conda-forge
libgcc-ng 11.2.0 h1d223b6_11 conda-forge
libgfortran-ng 11.2.0 h69a702a_11 conda-forge
libgfortran5 11.2.0 h5c6108e_11 conda-forge
libgomp 11.2.0 h1d223b6_11 conda-forge
liblal 7.1.4 fftw_hace999c_100 conda-forge
liblalframe 1.5.5 h7f98852_1 conda-forge
liblapack 3.9.0 12_linux64_openblas conda-forge
libnghttp2 1.43.0 ha19adfc_1 conda-forge
libopenblas 0.3.18 pthreads_h8fe5266_0 conda-forge
libssh2 1.10.0 ha35d2d1_2 conda-forge
libstdcxx-ng 11.2.0 he4da1e4_11 conda-forge
libzlib 1.2.11 h36c2ea0_1013 conda-forge
ligo-segments 1.4.0 py39h3811e60_1 conda-forge
lz4-c 1.9.3 h9c3ff4c_1 conda-forge
ncurses 6.2 h58526e2_4 conda-forge
numpy 1.21.4 py39hdbf815f_0 conda-forge
openssl 3.0.0 h7f98852_2 conda-forge
pip 21.3.1 pyhd8ed1ab_0 conda-forge
python 3.9.7 hf930737_3_cpython conda-forge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python-lal 7.1.4 fftw_py39h4fa004c_100 conda-forge
python-lalframe 1.5.5 py39he31b8b0_1 conda-forge
python_abi 3.9 2_cp39 conda-forge
readline 8.1 h46c0cb4_0 conda-forge
scipy 1.7.3 py39hee8e79c_0 conda-forge
setuptools 59.4.0 py39hf3d152e_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sqlite 3.37.0 h9cd32fc_0 conda-forge
tk 8.6.11 h27826a3_1 conda-forge
tzdata 2021e he74cb21_0 conda-forge
wheel 0.37.0 pyhd8ed1ab_1 conda-forge
xz 5.2.5 h516909a_1 conda-forge
zlib 1.2.11 h36c2ea0_1013 conda-forge
zstd 1.5.0 ha95c52a_0 conda-forge