Skip to content

Commit

Permalink
likelihood update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ismael-mendoza committed Dec 11, 2024
1 parent 7428fe5 commit 0573141
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bpd/likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@ def shear_loglikelihood(
_, _, _ = e_post.shape # (N, K, 2)
_prior = partial(prior, sigma=sigma_e)

Check failure on line 31 in bpd/likelihood.py

View workflow job for this annotation

GitHub Actions / build (3.10)

Ruff (RUF052)

bpd/likelihood.py:31:5: RUF052 Local dummy variable `_prior` is accessed

Check failure on line 31 in bpd/likelihood.py

View workflow job for this annotation

GitHub Actions / build (3.11)

Ruff (RUF052)

bpd/likelihood.py:31:5: RUF052 Local dummy variable `_prior` is accessed

# denom
e_post_mag = norm(e_post, axis=-1)
denom = interim_prior(e_post_mag) # (N, K), can ignore angle in prior as uniform

# for num, use trick
# p(w_n' | g, alpha ) = p(w_n' \cross^{-1} g | alpha ) = p(w_n | alpha) * |jac(w_n / w_n')|

# for num, need to include Jacobian of shear transoformation
# shape = (N, K, 2)
grad1 = _grad_fnc1(e_post, g)
grad2 = _grad_fnc2(e_post, g)
Expand Down

0 comments on commit 0573141

Please sign in to comment.