Index: trunk/ippToPsps/src/ippToPspsBatchDetection.c
===================================================================
--- trunk/ippToPsps/src/ippToPspsBatchDetection.c	(revision 29294)
+++ trunk/ippToPsps/src/ippToPspsBatchDetection.c	(revision 29295)
@@ -11,16 +11,4 @@
 #include "ippToPspsConfig.h"
 #include "ippToPspsDetEnums.h"
-#include "fitsio.h"
-
-// Gets uncalibrated instrumental flux from magnitude
-static __inline bool ippToPsps_getFlux(const float exposureTime, const float magnitude, float* flux, const float magnitudeErr, float* fluxErr) {
-
-    *flux = powf(10.0, -0.4*magnitude) / exposureTime;
-    if (!isfinite(*flux) || *flux < 0.000001) return false;
-    if (fluxErr) *fluxErr = fabsf((magnitudeErr * *flux)/1.085736);
-    //  if (fluxErr)    printf("Mag = %03.03f, Flux = %03.03f, Mag err = %03.03f, Flux Err = %03.03f\n", magnitude, *flux, magnitudeErr, *fluxErr);
-         
-    return true;
-}
 
 /**
@@ -37,5 +25,4 @@
     int status = 0;
     fitsfile *fitsIn;         
-    int nKeys;
 
     if (fits_open_file(&fitsIn, this->inputFiles[0], READONLY, &status)) {
@@ -46,4 +33,5 @@
 
     // get primary header and pull stuff out for later
+    int nKeys;
     fits_get_hdrspace(fitsIn, &nKeys, NULL, &status);
 
