Skip to content
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

Add LPT model #71

Merged
merged 4 commits into from
Mar 5, 2024
Merged

Add LPT model #71

merged 4 commits into from
Mar 5, 2024

Conversation

Justinezgh
Copy link
Collaborator

This PR aims to add an lpt model

setup.py Outdated
@@ -24,5 +24,6 @@
"optax>=0.1.4",
"scikit-learn>=1.2.0",
"wheel",
"JaxPM @ git+https://github.com/DifferentiableUniverseInitiative/JaxPM.git"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should probably pin the version of JaxPM

return dx.reshape([-1, 3])


def convergence_Born(cosmo, density_planes, r, a, dx, dz, coords, z_source):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to keep consistency in naming throughout the code.
Typically capital letter are only used for Classes and CONSTANTS.
functions => snake_case
classes => CamelCase

Suggested change
def convergence_Born(cosmo, density_planes, r, a, dx, dz, coords, z_source):
def convergence_born(cosmo, density_planes, r, a, dx, dz, coords, z_source):



# Define the probabilistic model
def lensingLpt(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment

Suggested change
def lensingLpt(
def lensing_lpt(

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment applies for the file name => lpt_field.py or lpt.py is better

@Justinezgh Justinezgh merged commit 6a6d717 into main Mar 5, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants