IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24716


Ignore:
Timestamp:
Jul 8, 2009, 10:07:36 AM (17 years ago)
Author:
bills
Message:

Don't fail if astrometry can't be linearized. Just leave the values in the header unchanged.

Location:
trunk/magic/remove/src
Files:
3 edited

Legend:

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

    r24382 r24716  
    377377}
    378378
    379 void
     379bool
    380380linearizeTransforms(strkAstrom *astrom)
    381381{
    382382    if (!pmAstromLinearizeTransforms((pmFPA *) astrom->fpa, (pmChip *) astrom->chip)) {
    383         streaksExit("linear fit to astrometry failed\n", PS_EXIT_UNKNOWN_ERROR);
    384     }
    385 }
     383        // streaksExit("linear fit to astrometry failed\n", PS_EXIT_UNKNOWN_ERROR);
     384        psError(PS_ERR_UNKNOWN, false, "linear fit to astrometry failed ignoring");
     385        return false;
     386    }
     387    return true;
     388}
  • trunk/magic/remove/src/streaksastrom.h

    r24382 r24716  
    3030extern bool skyToCell(strkPt *, strkAstrom *astrom, double ra, double dec);
    3131extern bool cellToSky(strkPt *, strkAstrom *astrom, double x, double y);
    32 extern void linearizeTransforms(strkAstrom *astrom);
     32extern bool linearizeTransforms(strkAstrom *astrom);
    3333
    3434extern bool SkyToLocal(strkPt *outPt, strkAstrom *astrom, double ra, double dec);
  • trunk/magic/remove/src/streaksremove.c

    r24691 r24716  
    483483    if (sf->bilevelAstrometry) {
    484484
    485         linearizeTransforms(sf->astrom);
     485        if (!linearizeTransforms(sf->astrom)) {
     486            // fit failed, leave the astrometry unchanged
     487            return;
     488        }
    486489
    487490        if (!pmAstromWriteWCS(sf->outImage->header, sf->inAstrom->fpa, sf->chip, 0.001)) {
Note: See TracChangeset for help on using the changeset viewer.