Skip to content

Commit

Permalink
fix: docs and variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-murray committed Feb 12, 2025
1 parent 2e5589e commit 4c8fd3b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions hera_cal/lst_stack/averaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,8 @@ def average_and_inpaint_per_night_single_bl(
The eigenvalue cutoff for determining DPSS filters.
cache : dict
A cache for storing DPSS filter matrices.
spws
The spectral windows to consider when flagging out large gaps.
Returns
-------
Expand Down Expand Up @@ -923,7 +925,7 @@ def _get_post_inpaint_flags(
) | stackf

nf = stackf.shape[1]
flaggy_flags = np.zeros_like(stackf, dtype=bool)
post_inpaint_flags = np.zeros_like(stackf, dtype=bool)
for night, convflg in enumerate(convolved_flags):
flagged_stretches = true_stretches(convflg)
for stretch in flagged_stretches:
Expand All @@ -935,8 +937,8 @@ def _get_post_inpaint_flags(
band.start <= stretch.start < (band.stop or nf)
or band.start <= stretch.stop < (band.stop or nf)
):
flaggy_flags[night, band] = True
return flaggy_flags
post_inpaint_flags[night, band] = True
return post_inpaint_flags


def average_and_inpaint_simultaneously(
Expand All @@ -953,6 +955,7 @@ def average_and_inpaint_simultaneously(
use_unbiased_estimator: bool = False,
sample_cov_fraction: float = 0.0,
use_night_to_night_cov: bool = True,
spws: tuple[slice] = (slice(0, None, None),),
):
"""
Average and inpaint simultaneously for all baselines in a stack.
Expand Down Expand Up @@ -1101,7 +1104,7 @@ def average_and_inpaint_simultaneously(
**kw
)
else:
flagged_mean[:], _, model = average_and_inpaint_per_night_single_bl(**kw)
flagged_mean[:], _, model = average_and_inpaint_per_night_single_bl(spws=spws, **kw)

Check warning on line 1107 in hera_cal/lst_stack/averaging.py

View check run for this annotation

Codecov / codecov/patch

hera_cal/lst_stack/averaging.py#L1107

Added line #L1107 was not covered by tests
if return_models:
all_models[(antpair[0], antpair[1], pol)] = model.copy()

Expand Down

0 comments on commit 4c8fd3b

Please sign in to comment.