Skip to content

implement time delay likelihood + other fixes - #99

Merged
ahuang314 merged 15 commits into
lenstronomy:mainfrom
ahuang314:main
Jun 20, 2026
Merged

implement time delay likelihood + other fixes#99
ahuang314 merged 15 commits into
lenstronomy:mainfrom
ahuang314:main

Conversation

@ahuang314

@ahuang314 ahuang314 commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator
  1. Modify the lens equation solver default arguments to be the same as lenstronomy
  2. Fix the LensModel initialization to include ddt scaling and z_source/z_source_convention initialization (matching lenstronomy behavior)
  3. Implement time delay likelihood

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.32710% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.91%. Comparing base (23a4f5c) to head (8830c03).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...nomy/Sampling/Likelihoods/time_delay_likelihood.py 94.73% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #99      +/-   ##
==========================================
- Coverage   99.98%   99.91%   -0.07%     
==========================================
  Files          80       81       +1     
  Lines        7330     7437     +107     
==========================================
+ Hits         7329     7431     +102     
- Misses          1        6       +5     
Files with missing lines Coverage Δ
...axtronomy/LensModel/Solver/lens_equation_solver.py 99.47% <ø> (ø)
jaxtronomy/LensModel/lens_model.py 100.00% <100.00%> (ø)
jaxtronomy/PointSource/point_source.py 100.00% <100.00%> (ø)
...nomy/Sampling/Likelihoods/time_delay_likelihood.py 94.73% <94.73%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ahuang314
ahuang314 requested a review from sibirrer June 20, 2026 22:29

@sibirrer sibirrer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @ahuang314! I have one comment about a for-loop, other than that, looks good

)

logL = 0
for i in range(self._num_point_sources):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just checking whether this should be a jax for loop

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

python for loops are fine in situations where the number of iterations is less than 10

@ahuang314
ahuang314 merged commit 46da9a7 into lenstronomy:main Jun 20, 2026
6 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