Skip to content

Commit

Permalink
Addressing review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kartographer committed Dec 7, 2023
1 parent 3da63df commit 9c862da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ All notable changes to this project will be documented in this file.
## [Unreleased]

### Added
- Added a `check_surface_based_positions` positions method for verifying antenna
positions are near surface of whatever celestial body their positions are referenced to
(either the Earth or Moon, currently).
- Added a switch to `UVData.write_ms` called `flip_conj`, which allows a user to write
out data with the baseline conjugation scheme flipped from the standard `UVData`
convention.
- Added the `utils.determine_pol_order` method for determining polarization
order based on a specified scheme ("AIPS" or "CASA").
- Added a `check_surface_based_positions` positions method for verifying antenna
positions are near surface of whatever celestial body their positions are referenced to
(either the Earth or Moon, currently).

### Changed
- Changed `UVData.write_ms` to sort polarizations based on CASA-preferred ordering.
- Added some functionality to the `utils._convert_to_slices` method to enable quick
assessment of whether an indexing array can be replaced by a single slice.
- Increased the tolerance to 75 mas (equivalent to 5 ms time error) for a warning about
values in `lst_array` not conforming to expectations for `UVData`, `UVCal`, and `UVFlag`
(was 1 mas) inside of `check`. Additionally, added a keyword to `check` enable the
tolerance value to be user-specified.
- Changed the behavior of checking of telescope location to look at the combination of
`antenna_positions` and `telescope_location` together for `UVData`, `UVCal`, and `UVFlag`.
Additionally, failing this check results in a warning (was an error).
- Changed `UVData.write_ms` to sort polarizations based on CASA-preferred ordering.
- Added some functionality to the `utils._convert_to_slices` method to enable quick
assessment of whether an indexing array can be replaced by a single slice.

## [2.4.1] - 2023-10-13

Expand Down
5 changes: 4 additions & 1 deletion pyuvdata/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5847,7 +5847,10 @@ def _convert_to_slices(
max_nslice = max_nslice_frac * Ninds
check = len(slices) <= max_nslice

return [indices] if (not check and return_index_on_fail) else slices, check
if return_index_on_fail and not check:
return [indices], check

Check warning on line 5851 in pyuvdata/utils.py

View check run for this annotation

Codecov / codecov/patch

pyuvdata/utils.py#L5851

Added line #L5851 was not covered by tests
else:
return slices, check


def _get_slice_len(s, axlen):
Expand Down

0 comments on commit 9c862da

Please sign in to comment.