Skip to content
Snippets Groups Projects
Commit 9aad1c26 authored by Matthijs van der Wild's avatar Matthijs van der Wild
Browse files

Adds an exception to scripts/sort_times_into_freqGroups.py.

The script scripts/sort_times_into_freqGroups.py did not
check whether the number of measurement sets supplied is
greater than or equal to 1. In this case, the definition
of freqliste raises a ValueError. This patch adds an
exception for this singular case.
parent eba3f971
No related branches found
No related tags found
1 merge request!120Adds an exception to scripts/sort_times_into_freqGroups.py.
Pipeline #33874 passed
......@@ -160,7 +160,11 @@ def main(MSfile, numSB=10, NDPPPfill=True, stepname=None, mergeLastGroup=False,
freqliste = np.array(list(freqset))
freqliste.sort()
freq_width = np.min(freqliste[1:]-freqliste[:-1])
try:
freq_width = np.min(freqliste[1:]-freqliste[:-1])
except:
# This exception takes of the case that only 1 MS is supplied
freq_width = file_bandwidth
if file_bandwidth > freq_width:
raise ValueError("Bandwidth of files is larger than minimum frequency step between two files!")
if file_bandwidth < (freq_width*0.51):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment