IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 6, 2008, 6:42:41 PM (18 years ago)
Author:
bills
Message:

completed excising of non-wapred pixels and various other changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/magic/remove/src/streaksastrom.c

    r20520 r20573  
    1 #include "streaks.h"
     1#include "streaksremove.h"
    22
    33// Initialize the astrometry object for current cell
    44strkAstrom *
    5 streakSetAstrometry(strkAstrom *astrom, pmFPA *fpa, pmChip *chip, bool fromCell, psMetadata *md, int numCols, int numRows)
     5streakSetAstrometry(strkAstrom *astrom, ippStage stage, pmFPA *fpa, pmChip *chip, bool fromCell, psMetadata *md, int numCols, int numRows)
    66{
    77    if (!astrom) {
     
    3939            return false;
    4040        }
    41     } else if (md) {
     41    } else if (md && (stage == IPP_STAGE_RAW)) {
    4242        // The metadata is the raw header
    4343        // Assumes GPC1
     44        //
     45        // Shouldn't these lookups be F32 ?
    4446        cell_x0 =  psMetadataLookupS32(&mdok, md, "IMNPIX1");
    4547        if (!mdok) {
    4648            psError(PS_ERR_UNKNOWN, true, "IMNPIX1 for cell is not set.\n");
    47             return NULL;
     49            // return NULL;
    4850        }
    4951        cell_y0 = psMetadataLookupS32(&mdok, md, "IMNPIX2");
     
    6365            return false;
    6466        }
     67
    6568    } else {
    6669        // no metadata regular cell
     
    108111    outPt->y = (pt->chip->y - astrom->cell_y0) * astrom->yParity;
    109112
     113//    printf("cell: %f %f chip: %f %f\n", outPt->x, outPt->y, pt->chip->x, pt->chip->y);
     114
    110115    return true;
    111116}
     
    136141    return true;
    137142}
     143
     144void
     145cellToChip(PixelPos *chip, strkAstrom *astrom, PixelPos *cell)
     146{
     147    // TODO: do I need to worry about going from int to float and back again here?
     148    chip->x = (cell->x * astrom->xParity) + astrom->cell_x0;
     149    chip->y = (cell->y * astrom->yParity) + astrom->cell_y0;
     150}
    138151 
Note: See TracChangeset for help on using the changeset viewer.