- Timestamp:
- Mar 17, 2009, 12:08:50 PM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090301
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090301
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk merged eligible /branches/eam_branches/eam_branch_20090303 23158-23228
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/cnb_branches/cnb_branch_20090301/ppStack
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/cnb_branches/cnb_branch_20090215/ppStack merged eligible /trunk/ppStack merged eligible /branches/cnb_branch_20090215/ppStack 21495-22685 /branches/eam_branches/eam_branch_20090303/ppStack 23158-23228
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/cnb_branches/cnb_branch_20090301/ppStack/src/ppStackThread.c
r21477 r23352 9 9 10 10 #include "ppStack.h" 11 #include "ppStackOptions.h" 12 #include "ppStackThread.h" 13 11 14 12 15 #define THREAD_WAIT 10000 // Microseconds to wait if thread is not available … … 36 39 psFree(stack->threads); 37 40 for (int i = 0; i < stack->imageFits->n; i++) { 38 psFitsClose(stack->imageFits->data[i]); 39 psFitsClose(stack->maskFits->data[i]); 40 psFitsClose(stack->varianceFits->data[i]); 41 if (stack->imageFits->data[i]) { 42 psFitsClose(stack->imageFits->data[i]); 43 } 44 if (stack->maskFits->data[i]) { 45 psFitsClose(stack->maskFits->data[i]); 46 } 47 if (stack->varianceFits->data[i]) { 48 psFitsClose(stack->varianceFits->data[i]); 49 } 41 50 stack->imageFits->data[i] = stack->maskFits->data[i] = stack->varianceFits->data[i] = NULL; 42 51 } … … 47 56 } 48 57 49 ppStackThreadData *ppStackThreadDataSetup(const psArray *cells, const psArray *imageNames, 50 const psArray *maskNames, const psArray *varianceNames, 51 const psArray *covariances, const pmConfig *config) 52 { 58 ppStackThreadData *ppStackThreadDataSetup(const ppStackOptions *options, const pmConfig *config) 59 { 60 psAssert(options, "Require options"); 61 psAssert(config, "Require configuration"); 62 63 const psArray *cells = options->cells; // Array of input cells 64 const psArray *imageNames = options->imageNames; // Names of images to read 65 const psArray *maskNames = options->maskNames; // Names of masks to read 66 const psArray *varianceNames = options->varianceNames; // Names of variance maps to read 67 const psArray *covariances = options->covariances; // Covariance matrices (already read) 68 53 69 PS_ASSERT_ARRAY_NON_NULL(cells, NULL); 54 70 PS_ASSERT_ARRAYS_SIZE_EQUAL(cells, imageNames, NULL); … … 239 255 240 256 { 241 psThreadTask *task = psThreadTaskAlloc("PPSTACK_INITIAL_COMBINE", 6);257 psThreadTask *task = psThreadTaskAlloc("PPSTACK_INITIAL_COMBINE", 3); 242 258 task->function = &ppStackReadoutInitialThread; 243 259 psThreadTaskAdd(task); … … 253 269 254 270 { 255 psThreadTask *task = psThreadTaskAlloc("PPSTACK_FINAL_COMBINE", 7);271 psThreadTask *task = psThreadTaskAlloc("PPSTACK_FINAL_COMBINE", 3); 256 272 task->function = &ppStackReadoutFinalThread; 257 273 psThreadTaskAdd(task);
Note:
See TracChangeset
for help on using the changeset viewer.
