IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 29, 2009, 6:15:31 PM (17 years ago)
Author:
beaumont
Message:

merged with head

Location:
branches/cnb_branches/cnb_branch_20090301
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/cnb_branches/cnb_branch_20090301

  • branches/cnb_branches/cnb_branch_20090301/pswarp/src/pswarp.h

    r23352 r23594  
    7272} pswarpTransformTileArgs;
    7373
    74 pswarpTransformTileArgs *pswarpTransformTileArgsAlloc();
     74pswarpTransformTileArgs *pswarpTransformTileArgsAlloc(void);
    7575bool pswarpTransformTile (pswarpTransformTileArgs *args);
    7676
     
    8787bool pswarpMatchRange (int *minX, int *minY, int *maxX, int *maxY, pmReadout *dest, pmReadout *src);
    8888
    89 pswarpMap *pswarpMapAlloc ();
     89pswarpMap *pswarpMapAlloc (void);
    9090pswarpMapGrid *pswarpMapGridAlloc (int Nx, int Ny);
    9191
     
    111111 * define threads for this program
    112112 */
    113 bool pswarpSetThreads ();
     113bool pswarpSetThreads (void);
    114114
    115115/// Return software version
  • branches/cnb_branches/cnb_branch_20090301/pswarp/src/pswarpMapGrid.c

    r21323 r23594  
    4343    // measure the map for the center of each superpixel
    4444    for (ni = 0, i = xMin; ni < nXpts; i += nXpix, ni++) {
    45         for (nj = 0, j = yMin; nj < nYpts; j += nYpix, nj++) {
    46             pswarpMapSetLocalModel (grid->maps[ni][nj], dest, src, i, j);
    47         }
     45        for (nj = 0, j = yMin; nj < nYpts; j += nYpix, nj++) {
     46            pswarpMapSetLocalModel (grid->maps[ni][nj], dest, src, i, j);
     47        }
    4848    }
    49            
     49
    5050    grid->nXpix = nXpix;
    5151    grid->nYpix = nYpix;
     
    112112
    113113    for (int i = 0; i < grid->nXpts - 1; i++) {
    114         for (int j = 0; j < grid->nYpts - 1; j++) {
    115 
    116             // measure the output coordinates for the next grid position using the current grid map
    117             // compare with the coordinates measured using the next grid map
    118             pswarpMapApply (&xRaw, &yRaw, grid->maps[i][j], grid->maps[i][j]->xo + grid->nXpix, grid->maps[i][j]->yo);
    119             pswarpMapApply (&xRef, &yRef, grid->maps[i+1][j], grid->maps[i][j]->xo + grid->nXpix, grid->maps[i][j]->yo);
    120 
    121             double posError = hypot (xRaw-xRef, yRaw-yRef);
    122             maxError = PS_MAX (maxError, posError);
    123         }
    124     }   
     114        for (int j = 0; j < grid->nYpts - 1; j++) {
     115
     116            // measure the output coordinates for the next grid position using the current grid map
     117            // compare with the coordinates measured using the next grid map
     118            pswarpMapApply (&xRaw, &yRaw, grid->maps[i][j], grid->maps[i][j]->xo + grid->nXpix, grid->maps[i][j]->yo);
     119            pswarpMapApply (&xRef, &yRef, grid->maps[i+1][j], grid->maps[i][j]->xo + grid->nXpix, grid->maps[i][j]->yo);
     120
     121            double posError = hypot (xRaw-xRef, yRaw-yRef);
     122            maxError = PS_MAX (maxError, posError);
     123        }
     124    }
    125125    return maxError;
    126126}
     
    176176    psPlaneTransformApply (FP, fpaDest->fromTPA, TP);
    177177    psPlaneTransformApply (V00, chipDest->fromFPA, FP);
    178    
     178
    179179    /** V(1,0) position */
    180180    offset->x = ix + 1;
     
    186186    psPlaneTransformApply (FP, fpaDest->fromTPA, TP);
    187187    psPlaneTransformApply (V10, chipDest->fromFPA, FP);
    188    
     188
    189189    /** V(0,1) position */
    190190    offset->x = ix;
     
    204204    map->Yy = V01->y - V00->y;
    205205    map->Yo = V00->y - map->Yx*ix - map->Yy*iy;
    206  
     206
    207207    map->xo = ix;
    208208    map->yo = iy;
     
    224224}
    225225
    226 pswarpMap *pswarpMapAlloc () {
     226pswarpMap *pswarpMapAlloc(void) {
    227227
    228228  pswarpMap *map = (pswarpMap *) psAlloc (sizeof(pswarpMap));
     
    238238
    239239    for (int i = 0; i < grid->nXpts; i++) {
    240         for (int j = 0; j < grid->nYpts; j++) {
    241             psFree (grid->maps[i][j]);
    242         }
    243         psFree (grid->maps[i]);
     240        for (int j = 0; j < grid->nYpts; j++) {
     241            psFree (grid->maps[i][j]);
     242        }
     243        psFree (grid->maps[i]);
    244244    }
    245245    psFree (grid->maps);
     
    256256      grid->maps[i] = psAlloc (nYpts*sizeof(void *));
    257257      for (int j = 0; j < nYpts; j++) {
    258           grid->maps[i][j] = pswarpMapAlloc();
     258          grid->maps[i][j] = pswarpMapAlloc();
    259259      }
    260260  }
     
    264264  grid->nXpix = 0;
    265265  grid->nYpix = 0;
    266  
     266
    267267  return grid;
    268268}
  • branches/cnb_branches/cnb_branch_20090301/pswarp/src/pswarpParseCamera.c

    r23352 r23594  
    2424
    2525    // look for the file on the RUN metadata
    26     pmFPAfile *file = pmFPAfileDefineFromRun(&status, config, filerule); // File to return
     26    pmFPAfile *file = pmFPAfileDefineFromRun(&status, bind, config, filerule); // File to return
    2727    if (!status) {
    2828        psError(PSWARP_ERR_CONFIG, false, "Failed to load file definition for %s", filerule);
  • branches/cnb_branches/cnb_branch_20090301/pswarp/src/pswarpSetMaskBits.c

    r21368 r23594  
    3333
    3434    // mask for non-linear flat regions (default to DETECTOR if not defined)
    35     psImageMaskType badMask = pmConfigMaskGet("BAD.WARP", config);
     35    psImageMaskType badMask = pmConfigMaskGet("CONV.BAD", config);
    3636    if (!badMask) {
    3737        badMask = 0x01;
    38         pmConfigMaskSet (config, "BAD.WARP", badMask);
     38        pmConfigMaskSet (config, "CONV.BAD", badMask);
    3939    }
    4040    maskOut |= badMask;
    4141
    4242    // mask for non-linear flat regions (default to DETECTOR if not defined)
    43     psImageMaskType poorMask = pmConfigMaskGet("POOR.WARP", config);
     43    psImageMaskType poorMask = pmConfigMaskGet("CONV.POOR", config);
    4444    if (!poorMask) {
    4545        poorMask = 0x02;
    46         pmConfigMaskSet (config, "POOR.WARP", poorMask);
     46        pmConfigMaskSet (config, "CONV.POOR", poorMask);
    4747    }
    4848    maskOut |= poorMask;
  • branches/cnb_branches/cnb_branch_20090301/pswarp/src/pswarpSetThreads.c

    r21323 r23594  
    2323}
    2424
    25 bool pswarpSetThreads () {
     25bool pswarpSetThreads(void) {
    2626
    2727    psThreadTask *task = NULL;
  • branches/cnb_branches/cnb_branch_20090301/pswarp/src/pswarpTransformReadout.c

    r21529 r23594  
    3737    // output mask bits
    3838    psImageMaskType maskIn   = psMetadataLookupImageMask(&mdok, recipe, "MASK.INPUT");
    39     psImageMaskType maskPoor = pmConfigMaskGet("POOR.WARP", config);
    40     psImageMaskType maskBad  = pmConfigMaskGet("BAD.WARP", config);
     39    psImageMaskType maskPoor = pmConfigMaskGet("CONV.POOR", config);
     40    if (!maskPoor) {
     41        maskPoor = pmConfigMaskGet("POOR.WARP", config);
     42    }
     43    psImageMaskType maskBad  = pmConfigMaskGet("CONV.BAD", config);
     44    if (!maskBad) {
     45        maskBad  = pmConfigMaskGet("BAD.WARP", config);
     46    }
    4147    psAssert(mdok, "MASK.INPUT was not defined");
    4248
  • branches/cnb_branches/cnb_branch_20090301/pswarp/src/pswarpTransformTile.c

    r21368 r23594  
    2424}
    2525
    26 pswarpTransformTileArgs *pswarpTransformTileArgsAlloc()
     26pswarpTransformTileArgs *pswarpTransformTileArgsAlloc(void)
    2727{
    2828    pswarpTransformTileArgs *args = psAlloc(sizeof(pswarpTransformTileArgs));
Note: See TracChangeset for help on using the changeset viewer.