Commits
1177 1177 | Int nspec=spwmap.nelements(); |
1178 1178 | |
1179 1179 | // Do nothing, if nothing specified (and rely on default) |
1180 1180 | if (nspec==0) return; |
1181 1181 | |
1182 1182 | // Do nothing f a single -1 is specified |
1183 1183 | if (nspec==1 && spwmap(0)==-1) return; |
1184 1184 | |
1185 1185 | |
1186 1186 | // Alert user if too many spws specified |
1187 - | // TBD |
1188 - | // if (spwmap.nelements()>nMSSpw_) |
1187 + | if (spwmap.nelements()>uInt(nMSSpw_)) |
1188 + | throw(AipsError("Specified spwmap has more elements ("+String::toString(spwmap.nelements())+") than the number of spectral windows in the MS ("+String::toString(nMSSpw_)+").")); |
1189 1189 | |
1190 1190 | // Handle auto-fanout |
1191 1191 | if (spwmap(0)==-999) { |
1192 1192 | // Use first OK spw for all MS spws |
1193 1193 | Int gspw(0); |
1194 1194 | while (!spwInOK(gspw)) ++gspw; |
1195 1195 | spwMap_.set(gspw); |
1196 1196 | } |
1197 1197 | else { |
1198 1198 | // First trap out-of-range values |