Skip to content

Commit 0965915

Browse files
committed
Added sanity checks for filters
1 parent aaf3002 commit 0965915

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/egg-gencat.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,16 @@ int phypp_main(int argc, char* argv[]) {
158158
vec1d lam, res;
159159
fits::read_table(fil.second, ftable(lam, res));
160160

161+
if (lam.size() != res.size()) {
162+
warning("mismatch in wavelength and response for filter ", fil.first);
163+
continue;
164+
}
165+
166+
if (max(res) <= 0) {
167+
warning("zero transmission for filter ", fil.first);
168+
continue;
169+
}
170+
161171
// Compute reference wavelength
162172
double trlam = integrate(lam, lam*res);
163173

0 commit comments

Comments
 (0)