Skip to content

Commit

Permalink
Update visibility.py
Browse files Browse the repository at this point in the history
Change `use_tqdm` variable name to `show_progress`
  • Loading branch information
tgross03 authored Jul 18, 2024
1 parent 7a35727 commit 79ddd58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyvisgen/simulation/visibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def add(self, visibilities):
]


def vis_loop(obs, SI, num_threads=10, noisy=True, mode="full", batch_size=100, use_tqdm=False):
def vis_loop(obs, SI, num_threads=10, noisy=True, mode="full", batch_size=100, show_progress=False):
torch.set_num_threads(num_threads)
torch._dynamo.config.suppress_errors = True

Expand Down Expand Up @@ -97,7 +97,7 @@ def vis_loop(obs, SI, num_threads=10, noisy=True, mode="full", batch_size=100, u

batches = torch.arange(bas[:].shape[1]).split(batch_size)

if use_tqdm:
if show_progress:
batches = tqdm(batches)

Check warning on line 101 in pyvisgen/simulation/visibility.py

View check run for this annotation

Codecov / codecov/patch

pyvisgen/simulation/visibility.py#L101

Added line #L101 was not covered by tests

for p in batches:
Expand Down Expand Up @@ -170,4 +170,4 @@ def generate_noise(shape, obs, SEFD):
noise = torch.normal(mean=0, std=std, size=shape, device=obs.device)
noise = noise + 1.0j * torch.normal(mean=0, std=std, size=shape, device=obs.device)

return noise
return noise

0 comments on commit 79ddd58

Please sign in to comment.