aboutsummaryrefslogtreecommitdiff
path: root/src/peaks.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-01-15 09:36:04 +0100
committerThomas White <taw@physics.org>2010-01-15 09:36:04 +0100
commit4400739e74b8f4f37c1bdc64ed16022103a2089b (patch)
treef690734f3010a7ef1d3d8f5d96680d1eb84a607c /src/peaks.c
parentbe91dcd68350569a709699867a1c25cf7ea6d15a (diff)
Handle upper and lower CCDs correctly
Diffstat (limited to 'src/peaks.c')
-rw-r--r--src/peaks.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/peaks.c b/src/peaks.c
index 984d4d3b..60849d0e 100644
--- a/src/peaks.c
+++ b/src/peaks.c
@@ -26,6 +26,14 @@
#define PEAK_WINDOW_SIZE (10)
+static int in_streak(int x, int y)
+{
+ if ( (y>512) && (y<768) && (abs(x-493)<15) ) return 1;
+ if ( (y>768) && (abs(x-480)<15) ) return 1;
+ return 0;
+}
+
+
struct peak {
int x;
int y;
@@ -199,7 +207,7 @@ void search_peaks(struct image *image, int dump_peaks)
if ( data[x+width*y] < 800 ) continue;
/* Ignore streak */
- if ( abs(x-image->x_centre) < 15 ) continue;
+ if ( in_streak(x, y) ) continue;
/* Get gradients */
dx1 = data[x+width*y] - data[(x+1)+width*y];