Skip to content

Commit

Permalink
add support for frequency averaging with multiple spws
Browse files Browse the repository at this point in the history
also update error messages now that frequency_average handles uneven freq spacing
  • Loading branch information
bhazelton committed Jun 22, 2023
1 parent 986976c commit eb044b4
Show file tree
Hide file tree
Showing 3 changed files with 712 additions and 387 deletions.
18 changes: 7 additions & 11 deletions pyuvdata/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,20 +544,16 @@ def _check_freq_spacing(
chanwidth_error = True
if raise_errors and spacing_error:
raise ValueError(
"The frequencies are not evenly spaced (probably "
"because of a select operation) or has differing "
"values of channel widths. Some file formats "
"(e.g. uvfits, miriad) and methods (frequency_average) "
"do not support unevenly spaced frequencies."
"The frequencies are not evenly spaced (probably because of a select "
"operation) or has differing values of channel widths. Some file formats "
"(e.g. uvfits, miriad) do not support unevenly spaced frequencies."
)
if raise_errors and chanwidth_error:
raise ValueError(
"The frequencies are separated by more than their "
"channel width (probably because of a select operation). "
"Some file formats (e.g. uvfits, miriad) and "
"methods (frequency_average) do not support "
"frequencies that are spaced by more than their "
"channel width."
"The frequencies are separated by more than their channel width (probably "
"because of a select operation). Some file formats (e.g. uvfits, miriad) "
"do not support frequencies that are spaced by more than their channel "
"width."
)

return spacing_error, chanwidth_error
Expand Down
Loading

0 comments on commit eb044b4

Please sign in to comment.