Skip to content

Commit efcf5bb

Browse files
committed
Added checks for input catalog properties
1 parent e948dd1 commit efcf5bb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/egg-gencat.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,14 @@ int main(int argc, char* argv[]) {
433433
);
434434
}
435435

436+
// Verify input
437+
uint_t nbad = count(out.z <= 0 || out.m <= 4 || out.m > 13);
438+
if (nbad != 0) {
439+
error("input catalog contains ", nbad, " unphysical galax", (nbad == 1 ? "y" : "ies"));
440+
note("must have z > 0 and 4 < m < 13");
441+
return 1;
442+
}
443+
436444
if (verbose) {
437445
note("found ", out.z.size(), " galaxies");
438446
}

0 commit comments

Comments
 (0)