IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 6086 for trunk/ippTools/src


Ignore:
Timestamp:
Jan 20, 2006, 11:47:20 AM (21 years ago)
Author:
jhoblitt
Message:

table field updates
more cleanups

Location:
trunk/ippTools/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/p2insertPendingFrames.c

    r6063 r6086  
    2424        p2PendingExpRow *pendingExposure = p2PendingExpRowAlloc(
    2525        rawFrame->exposure->exp_id,
     26        rawFrame->exposure->camera,
     27        rawFrame->exposure->filter,
    2628        rawFrame->exposure->class,
    2729        rawFrame->exposure->nclass,
     
    3840            p2PendingImfileRow *pendingImage = p2PendingImfileRowAlloc(
    3941                rawImage->exp_id,
     42                rawImage->exptype,
    4043                rawImage->class,
    4144                rawImage->class_id,
  • trunk/ippTools/src/p2pendingToDone.c

    r6063 r6086  
    22
    33// select pending frames (exposure+images) which are done/not done
    4 psArray *p2pendingToDone (p2Config *config, psArray *pendingFrames) {
     4psArray *p2pendingToDone(p2Config *config, psArray *pendingFrames) {
    55
    66    psArray *doneFrames = psArrayAlloc(pendingFrames->n);
     
    99    for (int i = 0; i < pendingFrames->n; i++) {
    1010        p2PendingFrame *pendingFrame = pendingFrames->data[i];
    11 //      if (pendingFrame->exposure->state != P2_STATE_DONE) continue;
     11// if (pendingFrame->exposure->state != P2_STATE_DONE) continue;
    1212
    13         p2DoneExpRow *doneExposure = p2DoneExpRowAlloc(
    14             pendingFrame->exposure->exp_id,
    15             pendingFrame->exposure->class,
    16             pendingFrame->exposure->nclass,
    17             pendingFrame->exposure->nclass, // XXX ndone is uneeded?
    18             pendingFrame->exposure->p1_version,
    19             pendingFrame->exposure->p2_version
    20         //doneExposure->state = P2_STATE_DONE;
    21     );
     13        p2DoneExpRow *doneExposure = p2DoneExpRowAlloc(
     14            pendingFrame->exposure->exp_id,
     15            pendingFrame->exposure->camera,
     16            pendingFrame->exposure->filter,
     17            pendingFrame->exposure->class,
     18            pendingFrame->exposure->nclass, // XXX ndone is uneeded?
     19            0xFF, // ndone
     20            pendingFrame->exposure->p1_version,
     21            pendingFrame->exposure->p2_version
     22            //doneExposure->state = P2_STATE_DONE;
     23        );
    2224
    23         psArray *doneImages = psArrayAlloc (pendingFrame->images->n);
    24         doneImages->n = 0;
    25         for (int j = 0; j < pendingFrame->images->n; j++) {
    26             p2PendingImfileRow *pendingImage = pendingFrame->images->data[j];
     25        psArray *doneImages = psArrayAlloc(pendingFrame->images->n);
     26        doneImages->n = 0;
     27        for (int j = 0; j < pendingFrame->images->n; j++) {
     28        p2PendingImfileRow *pendingImage = pendingFrame->images->data[j];
    2729
    2830        /*
    29             if (pendingImage->state != P2_STATE_DONE) {
    30                 psAbort ("p2search", "programming error!");
    31             }
     31        if (pendingImage->state != P2_STATE_DONE) {
     32            psAbort ("p2search", "programming error!");
     33        }
    3234        */
    3335
    34             p2DoneImfileRow *doneImage = p2DoneImfileRowAlloc(
    35                 pendingImage->exp_id,
    36                 pendingImage->class,
    37                 pendingImage->class_id,
    38                 pendingImage->p1_version,
    39                 pendingImage->p2_version,
     36        p2DoneImfileRow *doneImage = p2DoneImfileRowAlloc(
     37            pendingImage->exp_id,
     38            pendingImage->exptype,
     39            pendingImage->class,
     40            pendingImage->class_id,
     41            pendingImage->p1_version,
     42            pendingImage->p2_version,
    4043            "", // recipe
    4144            "", // stats
    42                 pendingImage->url
     45            pendingImage->url
    4346        );
    4447
    45             psArrayAdd (doneImages, 100, doneImage);
    46         }
    47        
    48     // XXX FIXME
    49         p2DoneFrame *doneFrame = p2DoneFrameAlloc(doneExposure, doneImages);
     48        psArrayAdd(doneImages, 100, doneImage);
     49}
    5050
    51         psArrayAdd (doneFrames, 100, doneFrame);
     51        // XXX FIXME
     52        p2DoneFrame *doneFrame = p2DoneFrameAlloc(doneExposure, doneImages);
     53
     54        psArrayAdd(doneFrames, 100, doneFrame);
    5255    }
     56
    5357    return doneFrames;
    54 } 
     58}
    5559
    5660// XXX the filename layout is defined by this code
  • trunk/ippTools/src/p2rawToPending.c

    r6083 r6086  
    22
    33// select pending frames (exposure+images) which are done/not done
    4 psArray *p2rawToPending (p2Config *config, psArray *rawFrames) {
     4psArray *p2rawToPending(p2Config *config, psArray *rawFrames) {
    55
    66    psArray *pendingFrames = psArrayAlloc(rawFrames->n);
     
    88
    99    for (int i = 0; i < rawFrames->n; i++) {
    10         ppRawFrame *rawFrame = rawFrames->data[i];
     10        ppRawFrame *rawFrame = rawFrames->data[i];
    1111
    12         p2PendingExpRow *pendingExposure = p2PendingExpRowAlloc(
    13             rawFrame->exposure->exp_id,
    14             rawFrame->exposure->class,
    15             rawFrame->exposure->nclass,
    16             0xff,   // p1
    17             0xff    // p2
    18     );
    19 
    20         psArray *pendingImages = psArrayAlloc (rawFrame->images->n);
    21         pendingImages->n = 0;
    22         for (int j = 0; j < rawFrame->images->n; j++) {
    23             rawImfileRow *rawImage = rawFrame->images->data[j];
    24             p2PendingImfileRow *pendingImage = p2PendingImfileRowAlloc(
    25                 rawImage->exp_id,
    26                 rawImage->class,
    27                 rawImage->class_id,
    28                 0xff,   // p1
    29                 0xff,   // p2
    30             "",     // recipe
    31             "",     // stats
    32                 rawImage->url
     12        p2PendingExpRow *pendingExposure = p2PendingExpRowAlloc(
     13            rawFrame->exposure->exp_id,
     14            rawFrame->exposure->camera,
     15            rawFrame->exposure->filter,
     16            rawFrame->exposure->class,
     17            rawFrame->exposure->nclass,
     18            0xff,   // p1
     19            0xff    // p2
    3320        );
    3421
    35             psArrayAdd (pendingImages, 100, pendingImage);
    36         }
    37        
    38         p2PendingFrame *pendingFrame = p2PendingFrameAlloc (pendingExposure, pendingImages);
    39         psArrayAdd (pendingFrames, 100, pendingFrame);
     22        psArray *pendingImages = psArrayAlloc(rawFrame->images->n);
     23        pendingImages->n = 0;
     24        for (int j = 0; j < rawFrame->images->n; j++) {
     25            rawImfileRow *rawImage = rawFrame->images->data[j];
     26            p2PendingImfileRow *pendingImage = p2PendingImfileRowAlloc(
     27                rawImage->exp_id,
     28                rawImage->exptype,
     29                rawImage->class,
     30                rawImage->class_id,
     31                0xff,   // p1
     32                0xff,   // p2
     33                "",     // recipe
     34                "",     // stats
     35                rawImage->url
     36            );
     37
     38            psArrayAdd(pendingImages, 100, pendingImage);
     39        }
     40
     41        p2PendingFrame *pendingFrame = p2PendingFrameAlloc(pendingExposure,
     42            pendingImages);
     43        psArrayAdd(pendingFrames, 100, pendingFrame);
    4044    }
     45
    4146    return pendingFrames;
    42 } 
     47}
    4348
    4449// XXX the filename layout is defined by this code
  • trunk/ippTools/src/p2writePendingFrames.c

    r6063 r6086  
    55
    66    for (int i = 0; i < frames->n; i++) {
    7         p2PendingFrame *frame = frames->data[i];
    8        
    9         for (int j = 0; j < frame->images->n; j++) {
    10             p2PendingImfileRow *image = frame->images->data[j];
    11             fprintf (stdout, "%s %d %s %s %s\n",
    12                      image->exp_id,
    13                      image->p2_version,
    14                      image->class,
    15                      image->class_id,
    16                      image->url);
    17         }
     7        p2PendingFrame *frame = frames->data[i];
     8        for (int j = 0; j < frame->images->n; j++) {
     9            p2PendingImfileRow *image = frame->images->data[j];
     10            fprintf (stdout, "%s %d %s %s %s\n",
     11            image->exp_id,
     12            image->p2_version,
     13            image->class,
     14            image->class_id,
     15            image->url);
     16        }
    1817    }
     18
    1919    return true;
    2020}
Note: See TracChangeset for help on using the changeset viewer.