/* * This script will take a number of exposures with increasing * exposure time. It is useful, for instance, when measuring * the photon conversion factor of your camera * * Edit the first three variable (nrExpsures, startExposure, and * finalExposure) to your liking. * * Nico Stuurman, 2/4/2010 */ // final (maximum exposure in ms) double finalExposure = 640; // Nr of data points desired int nrExposures = 50; // initial exposure in ms double startExposure = 0.0025; // Place where data will be auto-saved acqRoot = "C:/Data"; // data set name acqName = "ecf"; // DO NOT EDIT BELOW THIS LINE double minimumExposure = 0.0025; if (startExposure <= 0) startExposure = minimumExposure; // sanity check if (finalExposure < startExposure) { tmp = startExpsore; startExposure = finalExposure; finalExposure = tmp; } double calculateFactor(int nrExp, double startExp, double endExp) { double estimate = 1.0; boolean success = false; increment = 0.001; if (nrExp < 5) increment = 0.1; else if (nrExp < 15) increment = 0.01; while (!success) { exp = startExp; for (i=1; i= endExp) success = true; else estimate += increment; } exp = startExp; for (i=1; i