-
Notifications
You must be signed in to change notification settings - Fork 374
Make changes to constants, use numpy/astropy but use LAL when requested #5235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make changes to constants, use numpy/astropy but use LAL when requested #5235
Conversation
|
ugh, I need to move some of the changes out of this branch again - there is some stuff to do with time conversions that should be a separate PR as well. I am converting to draft |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
spxiwh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this mostly does what it says. I have a few questions, but mostly it looks good to me.
Are there no Cython codes doing c-imports of LAL constants? spa_tmplt_cpu.pyx does seem to import lal, but then uses libc.math for PI and doesn't use lal at all.
| # You should have received a copy of the GNU General Public License | ||
| # along with with program; see the file COPYING. If not, write to the | ||
| # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
| # MA 02111-1307 USA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for this module to still exist? PhenomC is now outdated, this is not how we do GPU waveforms for templates ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Doesn't need to be resolved here, just wondering out loud)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you did miss the same thing in SpinTaylorF2.py though ... Again though that one might well be better removed at this point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I missed anything in SpinTaylorF2?
|
Would you want me to update the libc.math usages? I was mainly focused on not using lalsuite |
Use numpy / astropy constants instead of lal. Allow use of lal constants if a environment variable is set.
Standard information about the request
This is a change to the source of truth for certain values
This change affects: the offline search, the live search, inference, PyGRB (but shouldn't actually affect anything if values are the same)
This change changes: documentation, result presentation / plotting, scientific output (but shouldn't actually affect anything if values are the same)
This change: has appropriate unit tests, follows style guidelines (See e.g. PEP8), has been proposed using the contribution guidelines
Motivation
I am worried about bloat of the pycbc package, and removing lal dependency (when we will use it for non-LIGO searches in future) should make the package significantly smaller
Contents
Links to any issues or associated PRs
This was part of #5217 but was getting to be hard to manage along with with the changes to the epoch
Testing performed
Testing according to the CI should pass. all constants are currently with np.isclose between numpy/astropy and lal