Skip to content

Commit 4bf6ca3

Browse files
authored
Merge pull request #43 from radionets-project/normalization
Add normalization bool parameter to visibility calculations
2 parents 0399262 + f720ae3 commit 4bf6ca3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/changes/43.optimization.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added optional `normalize` parameter to `pyvisgen.visibility.vis_loop` to decide whether to apply a normalization multiplier of `0.5` (default: True)

pyvisgen/simulation/visibility.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def vis_loop(
4747
mode="full",
4848
batch_size="auto",
4949
show_progress=False,
50+
normalize=True,
5051
):
5152
torch.set_num_threads(num_threads)
5253
torch._dynamo.config.suppress_errors = True
@@ -81,7 +82,8 @@ def vis_loop(
8182

8283
# normalize visibilities to factor 0.5,
8384
# so that the Stokes I image is normalized to 1
84-
B *= 0.5
85+
if normalize:
86+
B *= 0.5
8587

8688
# calculate vis
8789
visibilities = Visibilities(

0 commit comments

Comments
 (0)