diff --git a/docs/changes/43.optimization.rst b/docs/changes/43.optimization.rst new file mode 100644 index 0000000..3db1a66 --- /dev/null +++ b/docs/changes/43.optimization.rst @@ -0,0 +1 @@ +Added optional `normalize` parameter to `pyvisgen.visibility.vis_loop` to decide whether to apply a normalization multiplier of `0.5` (default: True) diff --git a/pyvisgen/simulation/visibility.py b/pyvisgen/simulation/visibility.py index 2a36ffb..6444fc0 100644 --- a/pyvisgen/simulation/visibility.py +++ b/pyvisgen/simulation/visibility.py @@ -46,6 +46,7 @@ def vis_loop( mode="full", batch_size=100, show_progress=False, + normalize=True, ): torch.set_num_threads(num_threads) torch._dynamo.config.suppress_errors = True @@ -74,7 +75,8 @@ def vis_loop( # normalize visibilities to factor 0.5, # so that the Stokes I image is normalized to 1 - B *= 0.5 + if normalize: + B *= 0.5 # calculate vis visibilities = Visibilities(