sheap.MasterSampler.Samplers.Utils.montecarlo_utils module
Monte Carlo Sampler utils
?
- phys_trust_region_inits(key, *, params_class, best_params, phys_bounds, num_samples=100, sigma_phys=None, frac_box_sigma=0.05, k_sigma=0.5)[source]
- resample_spec_all(key, spec)[source]
Resample flux for all objects in spec using their per-pixel errors.
- Assumes spec has shape (C, N_obj, X) with:
spec[0, :, :] = wavelength (unchanged) spec[1, :, :] = flux (resampled) spec[2, :, :] = 1-sigma error (used for noise)
- Parameters:
key (jax.random.PRNGKey)
spec (array-like, shape (3, N_obj, X))
- Returns:
spec_out – Same as input but with resampled flux channel.
- Return type:
jnp.ndarray, shape (3, N_obj, X), dtype float32