fixed compile bugs in non-debug mode

This commit is contained in:
eddyem 2017-03-28 14:17:55 +03:00
parent 680dba91dd
commit 21955bbb57
3 changed files with 7 additions and 6 deletions

View File

@ -20,6 +20,7 @@
#include "fitsview.h"
#include "gtk.h"
#include "CUtools.h"
#include "imtools.h"
#include <pthread.h>
#include <fftw3.h>

View File

@ -168,10 +168,12 @@ gboolean writefits(char *filename, IMAGE *image){
}
gtk_tree_path_free(path);
}
#ifdef EBUG
GLfloat min, wd;
min = image->stat.min;
wd = image->stat.max - min;
DBG("min = %f, wd = %f", min, wd);
#endif
/* int i,j;
GLfloat *newdata = malloc(sz*sizeof(GLfloat));
GLfloat *ptro = newdata, *ptri = image->data;
@ -355,7 +357,7 @@ gboolean readfits(gchar *filename, IMAGE *image){
TRYFITS(fits_read_img, fp, TFLOAT, 1, sz, &nullval, image->data, &stat);
GLfloat *ptr = image->data;
GLfloat min, max, wd;
GLfloat min, max;
min = 1e6; max = 0.;
for(i=0; i<h; i++)
for(j=0; j<w; j++, ptr++){
@ -363,8 +365,7 @@ gboolean readfits(gchar *filename, IMAGE *image){
if(tmp > max) max = tmp;
else if(tmp < min) min = tmp;
}
wd = max - min;
DBG("min = %f, wd = %f", min, wd);
DBG("min = %f, wd = %f", min, max-min);
image->stat.max = max;
image->stat.min = min;
// histogram isn't initialized yet

View File

@ -162,7 +162,7 @@ gboolean get_circle_center(Window *window, BOX *box, PIX *pix, Coordinates *crds
int N = 0, X0, Y0, X, Y, n;
l_uint32 *pixdata, *pixptr;
l_int32 w, h, d, wpl, sz, i, x, y;
double Xcenter, Ycenter, Radius, xx, yy, Intens, X2, Y2;
double Xcenter, Ycenter, xx, yy, Intens, X2, Y2;
GLfloat *data;
if(!check_box(window, box, &X0, &Y0, &X, &Y)) return FALSE;
if(!(pix && crds)) return FALSE;
@ -177,8 +177,7 @@ gboolean get_circle_center(Window *window, BOX *box, PIX *pix, Coordinates *crds
n = 0;
Xcenter = (double)(X0 + X) / 2.;
Ycenter = (double)(Y0 + Y) / 2.;
Radius = (double)(w + h) / 4.;
DBG("x0=%g, y0=%g, r0=%g, N=%d", Xcenter, Ycenter, Radius, N);
DBG("x0=%g, y0=%g, r0=%g, N=%d", Xcenter, Ycenter, (double)(w + h) / 4., N);
Xcenter = Ycenter = X2 = Y2 = Intens = 0.;
AxisX = 0.; AxisY = (double)HT;
for(y = 0; y < h; y++){