Skip to content

Commit

Permalink
Merge branch 'nansmoother' of github.com:tjgalvin/flint into nansmoother
Browse files Browse the repository at this point in the history
  • Loading branch information
tgalvin committed Jan 11, 2024
2 parents 1c611b5 + 18d9388 commit 4c20f2e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions flint/calibrate/aocalibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ def flag_aosolutions(
flag_ant_xyyx_mean_gain: bool = False,
zero_cross_terms: bool = False,
smooth_solutions: bool = False,
plot_solutions: bool = True,
plot_solutions_throughout: bool = True,
) -> Path:
"""Will open a previously solved ao-calibrate solutions file and flag additional channels and antennae.
Expand All @@ -687,7 +687,7 @@ def flag_aosolutions(
flag_ant_xyyx_mean_gain (bool, optional): Whether to flag antennas based on the mean gain ratio of the XY and YX amplitude gains. Defaults to False.
zero_cross_terms (bool, optional): Set the XY and YX terms of each Jones to be 0. Defaults to False.
smooth_solutions (blool, optional): Smooth the complex gain solutions after flaggined. Defaults to False.
plot_solutions (bool, Optional): If True, the solutions will be plotted at different stages of processing. Defaults to True.
plot_solutions_throughout (bool, Optional): If True, the solutions will be plotted at different stages of processing. Defaults to True.
Returns:
Path: Path to the updated solutions file. This is out_solutions_path if provided, otherwise solutions_path
Expand Down Expand Up @@ -814,7 +814,7 @@ def flag_aosolutions(
ms_path=solutions_path, include_preflagger=True, include_smoother=False
)
solutions.save(output_path=out_solutions_path)
if plot_solutions:
if plot_solutions_throughout:
plot_solutions(solutions=out_solutions_path, ref_ant=ref_ant)

if smooth_solutions:
Expand All @@ -829,7 +829,7 @@ def flag_aosolutions(
ms_path=solutions_path, include_preflagger=True, include_smoother=True
)
solutions.save(output_path=out_solutions_path)
if plot_solutions:
if plot_solutions_throughout:
plot_solutions(solutions=out_solutions_path, ref_ant=None)

total_flagged = np.sum(~np.isfinite(bandpass)) / np.prod(bandpass.shape)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_aocalibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def ao_sols_known_bad(tmpdir):


def test_known_bad_sols(ao_sols_known_bad):
flag_aosolutions(solutions_path=ao_sols_known_bad, plot_solutions=False)
flag_aosolutions(solutions_path=ao_sols_known_bad, plot_solutions_throughout=False)


def test_load_aosols(ao_sols):
Expand Down

0 comments on commit 4c20f2e

Please sign in to comment.