gradoptics.integrator.stratified_sampling_integrator
- class gradoptics.integrator.stratified_sampling_integrator.StratifiedSamplingIntegrator(nb_mc_steps)
Bases:
gradoptics.integrator.base_integrator.BaseIntegratorComputes line integrals using stratified sampling
- __init__(nb_mc_steps)
- Parameters
nb_mc_steps – Number of Monte Carlo integration steps used for approximating the integral (
int)
- compute_integral(incident_rays, pdf, t_min, t_max)
Computes the line integral between
t_minandt_maxof the incident rays through the densitypdf- Parameters
incident_rays – The rays for which the line integrals should be computed (
Rays)pdf – The pdf for which line integrals should be computed
t_min – Lower integration bounds (
torch.tensor)t_max – Higher integration bounds (
torch.tensor)
- Returns
Computed lines integrals (
torch.tensor)