Skip to content

Commit

Permalink
more arguments added
Browse files Browse the repository at this point in the history
  • Loading branch information
ismael-mendoza committed Nov 1, 2024
1 parent deebb0e commit e61fe4a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions bpd/pipelines/image_ellips.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

def get_target_galaxy_params_simple(
rng_key: PRNGKeyArray,
sigma_e: float = 1e-3,
shape_noise: float = 1e-3,
lf: float = 3.0,
hlr: float = 1.0,
x: float = 0.0, # pixels
Expand All @@ -27,7 +27,7 @@ def get_target_galaxy_params_simple(
g2: float = 0.0,
):
"""Fix all parameters except ellipticity, which come from prior."""
e = sample_ellip_prior(rng_key, sigma=sigma_e, n=1)
e = sample_ellip_prior(rng_key, sigma=shape_noise, n=1)
return {
"lf": lf,
"hlr": hlr,
Expand Down Expand Up @@ -162,14 +162,19 @@ def pipeline_image_interim_samples(
pixel_scale: float = 0.2,
psf_hlr: float = 0.7,
background: float = 1.0,
fft_size: int = 256,
):

k1, k2 = random.split(rng_key)

init_position = initialization_fnc(k1, true_params=true_params, data=target_image)

_draw_fnc = partial(
draw_gaussian, pixel_scale=pixel_scale, slen=slen, psf_hlr=psf_hlr
draw_gaussian,
pixel_scale=pixel_scale,
slen=slen,
psf_hlr=psf_hlr,
fft_size=fft_size,
)
_loglikelihood = partial(loglikelihood, draw_fnc=_draw_fnc, background=background)
_logprior = partial(logprior, sigma_e=sigma_e_int)
Expand Down

0 comments on commit e61fe4a

Please sign in to comment.