diff options
Diffstat (limited to 'src/detector.c')
-rw-r--r-- | src/detector.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/detector.c b/src/detector.c index c542a5a1..a202d5a3 100644 --- a/src/detector.c +++ b/src/detector.c @@ -280,6 +280,23 @@ struct panel *find_panel(struct detector *det, double fs, double ss) } +int find_panel_number(struct detector *det, int fs, int ss) +{ + int p; + + for ( p=0; p<det->n_panels; p++ ) { + if ( (fs >= det->panels[p].min_fs) + && (fs <= det->panels[p].max_fs) + && (ss >= det->panels[p].min_ss) + && (ss <= det->panels[p].max_ss) ) { + return p; + } + } + + return -1; +} + + void fill_in_values(struct detector *det, struct hdfile *f) { int i; |