test_padis_reconstructor.pyΒΆ

Source: tests/models/test_padis_reconstructor.py

Test padis reconstructor behaviour.

class IdentityOp

Provide the identity op test double used by this module.

IdentityOp.domain_shape(self)

Handle domain shape for the PaDIS workflow.

IdentityOp.range_shape(self)

Handle range shape for the PaDIS workflow.

IdentityOp.forward(self, x)

Apply the forward operation to the requested values.

IdentityOp.adjoint(self, y)

Handle adjoint for the PaDIS workflow.

IdentityOp.inverse(self, y)

Handle inverse for the PaDIS workflow.

class ScaledIdentityOp(scale)

Provide the scaled identity op test double used by this module.

ScaledIdentityOp.forward(self, x)

Apply the forward operation to the requested values.

ScaledIdentityOp.adjoint(self, y)

Handle adjoint for the PaDIS workflow.

ScaledIdentityOp.inverse(self, y)

Handle inverse for the PaDIS workflow.

class ZeroPatchModel

Provide the zero patch model test double used by this module.

ZeroPatchModel.forward(self, x, time_cond)

Apply the forward operation to the requested values.

class GradModePatchModel

Provide the grad mode patch model test double used by this module.

GradModePatchModel.forward(self, x, time_cond)

Apply the forward operation to the requested values.

class ZeroWholeImageModel

Provide the zero whole image model test double used by this module.

class AffineDenoiserModel(*, use_noise_level=False)

Provide the affine denoiser model test double used by this module.

AffineDenoiserModel.normalise(self, x)

Handle normalise for the PaDIS workflow.

AffineDenoiserModel.unnormalise(self, x, target=None)

Handle unnormalise for the PaDIS workflow.

AffineDenoiserModel.forward(self, x, noise_level=None)

Apply the forward operation to the requested values.

test_padis_dps_langevin_reconstructor_smoke()

Verify that padis dps langevin reconstructor smoke.

test_padis_dps_disable_data_consistency_denoises_without_grad()

Verify that padis dps disable data consistency denoises without grad.

test_fdk_baseline_uses_inverse_and_measurement_domain_conversion()

Verify that fdk baseline uses inverse and measurement domain conversion.

test_pnp_denoiser_wraps_normalisation_and_optional_noise_level()

Verify that pnp denoiser wraps normalisation and optional noise level.

test_load_pnp_denoiser_accepts_string_path(tmp_path)

Verify that load pnp denoiser accepts string path.

test_pnp_reconstruction_runs_with_lion_operator_without_ct_backend()

Verify that pnp reconstruction runs with lion operator without ct backend.

test_whole_image_diffusion_reconstructor_smoke()

Verify that whole image diffusion reconstructor smoke.

test_padis_dps_alias_maps_to_dps_langevin()

Verify that padis dps alias maps to dps langevin.

test_padis_paper_ct_sampling_preset()

Verify that padis paper ct sampling preset.

test_padis_public_repo_ct_sampling_preset()

Verify that padis public repo ct sampling preset.

test_padis_default_sampling_uses_unscaled_data_step_like_original_repo()

Verify that padis default sampling uses unscaled data step like original repo.

test_padis_lion_physics_sampling_uses_lipschitz_scaled_least_squares()

Verify that padis lion physics sampling uses lipschitz scaled least squares.

test_padis_noise_schedule_modes()

Verify that padis noise schedule modes.

test_padis_data_consistency_scale_schedule()

Verify that padis data consistency scale schedule.

test_padis_adjoint_data_consistency_scale_can_differ_from_dps_scale()

Verify that padis adjoint data consistency scale can differ from dps scale.

test_padis_langevin_reconstructor_smoke()

Verify that padis langevin reconstructor smoke.

test_padis_ddnm_pseudoinverse_is_not_noise_initial_state()

Verify that padis ddnm pseudoinverse is not noise initial state.

test_padis_ddnm_pseudoinverse_clip_can_be_overridden_per_term()

Verify that padis ddnm pseudoinverse clip can be overridden per term.

test_padis_ddnm_corrected_clip_clamps_score_target(monkeypatch)

Verify that padis ddnm corrected clip clamps score target.

test_padis_langevin_honours_stop_after_outer_steps(monkeypatch)

Verify that padis langevin honours stop after outer steps.

test_padis_predictor_corrector_reconstructor_smoke()

Verify that padis predictor corrector reconstructor smoke.

test_padis_predictor_corrector_uses_paper_linear_step_size_by_default()

Verify that padis predictor corrector uses paper linear step size by default.

test_padis_predictor_corrector_keeps_score_sde_squared_step_size_option()

Verify that padis predictor corrector keeps score sde squared step size option.

test_padis_predictor_corrector_denoises_corrector_at_next_sigma(monkeypatch)

Verify that padis predictor corrector denoises corrector at next sigma.

test_padis_predictor_corrector_public_compat_denoises_corrector_at_current_sigma(monkeypatch)

Verify that padis predictor corrector public compat denoises corrector at current sigma.

test_padis_predictor_corrector_can_reuse_predictor_patch_layout(monkeypatch)

Verify that padis predictor corrector can reuse predictor patch layout.

test_padis_predictor_corrector_honours_stop_after_outer_steps(monkeypatch)

Verify that padis predictor corrector honours stop after outer steps.

test_padis_patch_denoising_zeroes_padding_border()

Verify that padis patch denoising zeroes padding border.

test_fixed_overlap_patch_layout_uses_paper_overlap()

Verify that fixed overlap patch layout uses paper overlap.

test_fixed_overlap_patch_layout_covers_full_central_image()

Verify that fixed overlap patch layout covers full central image.

test_fixed_overlap_public_helper_layouts_match_public_repo_starts()

Verify that fixed overlap public helper layouts match public repo starts.

test_fixed_overlap_patch_average_and_stitch_smoke()

Verify that fixed overlap patch average and stitch smoke.

test_fixed_overlap_patch_average_and_stitch_overlap_semantics(monkeypatch)

Verify that fixed overlap patch average and stitch overlap semantics.

test_fixed_overlap_patch_denoising_respects_patch_batch_size(monkeypatch)

Verify that fixed overlap patch denoising respects patch batch size.

test_regular_patch_denoising_respects_patch_batch_size(monkeypatch)

Verify that regular patch denoising respects patch batch size.

test_regular_patch_denoising_honours_legacy_checkpoint_alias(monkeypatch)

Verify that regular patch denoising honours legacy checkpoint alias.

test_fixed_overlap_patch_denoising_can_checkpoint_batches(monkeypatch)

Verify that fixed overlap patch denoising can checkpoint batches.

test_padis_patch_layout_uses_supplied_generator()

Verify that padis patch layout uses supplied generator.

test_padis_paper_squared_residual_gradient_matches_formula()

Verify that padis paper squared residual gradient matches formula.

test_padis_least_squares_gradient_uses_lipschitz_step_form()

Verify that padis least squares gradient uses lipschitz step form.

test_padis_norm_gradient_matches_public_repo_formula()

Verify that padis norm gradient matches public repo formula.

test_padis_scaled_identity_paper_gradient_matches_closed_form()

Verify that padis scaled identity paper gradient matches closed form.

test_padis_adjoint_correction_matches_scaled_identity_closed_form()

Verify that padis adjoint correction matches scaled identity closed form.

test_padis_adjoint_data_step_schedule_matches_paper_and_public_repo()

Verify that padis adjoint data step schedule matches paper and public repo.

test_padis_least_squares_adjoint_step_uses_lipschitz_form()

Verify that padis least squares adjoint step uses lipschitz form.

test_padis_data_gradient_normalization_uses_measurement_operator_norm()

Verify that padis data gradient normalization uses measurement operator norm.

test_padis_data_gradient_normalization_uses_measurement_lipschitz_constant()

Verify that padis data gradient normalization uses measurement lipschitz constant.

test_padis_data_gradient_normalization_can_be_disabled()

Verify that padis data gradient normalization can be disabled.