Port SPIIR Template Bank Generation Code to Python3
This issue will be resolved when the original spiirbank submodule of gstlal-spiir is ported from Python2.7 to Python3.
As this code is technically not required for operation of the Python3 pipeline, the SPIIR team has decided to de-prioritize this component of the port as it won't be running alongside the O4 pipeline. Instead, we only need to generate our SPIIR template banks once (and this can be done in Python2.7) and then we can use the outputted data as input for the Python3 pipeline with minimal changes (specifically, we should only need to convert the columns with ilwd:char data types to their corresponding modern data types).
Progress To Date (9th November 2022)
Some progress has already been made on this issue in early branches of /gstreamer_python_upgrade, however we decided to delete this submodule to minimize the extent of code we had to upgrade and debug.
Additionally, there is a work-in-progress Python3 data library that aims to handle data generation and processing for common SPIIR workflows that can be found here (as of 9th November 2022): https://github.com/tanghyd/spiir (or its mirror on the LSC GitLab here: https://git.ligo.org/spiir-group/spiir). The feature/iir/waveform branch has a Python3 version of the spiirbank code taken from an older version of /gstreamer_python_upgrade and incorporated into this package, where installation is straightforward using a conda igwn environment. When this feature is finalized in the spiir repository (opposed to the gstlal-spiir pipeline repository), we should just be able to pip install .
the spiir package, and be able to import the necessary spiirbank template bank generation utilities in this submodule.
Note that there are some difficulties when it comes to installing C extensions - namely that the spiirbank submodule (note that this submodule is called something like spiir.waveform.iir in the "spiir" package repository) relies on C code that in turn imports GSL and LAL. However, the spiir package also requires lalsuite to be installed and importable in Python - this means that our installation of LALSuite must accommodate both C and Python and we should not have separate installs for the separate programming languages. So far, the simplest way to solve this problem has been to install LALSuite using conda, e.g. with igwn-py39 (pip does not provide the necessary LAL header files used to build the C extensions in setup.py).
Required Tests
To ensure that our port from Python2.7 to Python3 is successful, we should compare a set of IIR-approximated template banks from the legacy Python2.7 code against the newer Python3 code. We should hope to see no (or minimal) differences.
Progress Update (10th January 2023)
We have started a merge request that aims to build our spiirbank C extensions into the spiir Python library when using a conda environment (e.g. IGWN conda distributions).
See: spiir-group/spiir!1