Skip to content

Commit

Permalink
test increasing number of processes
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-a-cox committed Oct 7, 2024
1 parent 8c69cfa commit 2aea32d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions fftvis/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def simulate_vis(
flat_array_tol: float = 0.0,
live_progress: bool = True,
interpolation_function: str = "az_za_map_coordinates",
nprocesses: int | None = 1,
):
"""
Parameters:
Expand Down Expand Up @@ -137,6 +138,7 @@ def simulate_vis(
flat_array_tol=flat_array_tol,
live_progress=live_progress,
interpolation_function=interpolation_function,
nprocesses=nprocesses,
)


Expand Down
5 changes: 3 additions & 2 deletions fftvis/tests/test_compare_matvis.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
@pytest.mark.parametrize('precision', [2,1])
@pytest.mark.parametrize('use_analytic_beam', [True, False])
@pytest.mark.parametrize('tilt_array', [True, False])
def test_simulate(polarized: bool, precision: int, use_analytic_beam: bool, tilt_array: bool):
@pytest.mark.parametrize('nprocesses', [1, 2])
def test_simulate(polarized: bool, precision: int, use_analytic_beam: bool, tilt_array: bool, nprocesses: int):

(
ants,
Expand Down Expand Up @@ -49,7 +50,7 @@ def test_simulate(polarized: bool, precision: int, use_analytic_beam: bool, tilt
fvis = simulate.simulate_vis(
ants, flux, ra, dec, freqs, times.jd, cpu_beams[0], eps=1e-10 if precision==2 else 6e-8,
baselines=sim_baselines, polarized=polarized, precision=precision,
telescope_loc=location,
telescope_loc=location, nprocesses=nprocesses
)

# Should have shape (nfreqs, ntimes, nants, nants)
Expand Down

0 comments on commit 2aea32d

Please sign in to comment.