IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 4, 2023, 12:12:53 PM (3 years ago)
Author:
eugene
Message:

merge changes from trunk: handle inversion failures and missing DETEFF

Location:
branches/eam_branches/ipp-20220316/psastro
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20220316/psastro

  • branches/eam_branches/ipp-20220316/psastro/src/psastroOneChipGrid.c

    r40084 r42370  
    2222    bool status;
    2323    pmAstromStats *stats = NULL;
     24    char *chipname = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME");
     25
    2426
    2527    // do we need to get a rough initial match?
     
    4951    }
    5052
    51     psLogMsg ("psastro", 3, "grid search using %ld raw vs %ld ref stars\n", rawGridStars->n, refGridStars->n);
     53    psLogMsg ("psastro", 3, "grid search for chip %s using %ld raw vs %ld ref stars\n",chipname,rawGridStars->n, refGridStars->n);
    5254
    5355    // find initial offset / rotation / scale
    5456    pmAstromStats *gridStats = pmAstromGridMatch (rawGridStars, refGridStars, recipe);
    5557    if (gridStats == NULL) {
    56         psLogMsg ("psastro", 3, "failed to find a grid match solution\n");
     58        psLogMsg ("psastro", 3, "failed to find a grid match solution for chip %s\n",chipname);
    5759        psFree (rawGridStars);
    5860        psFree (refGridStars);
     
    6062        return false;
    6163    }
    62     psLogMsg ("psastro", 3, "basic grid search result - offset: %f,%f pixels, rotation: %f deg\n", gridStats->offset.x, gridStats->offset.y, DEG_RAD*gridStats->angle);
     64    psLogMsg ("psastro", 3, "basic grid search result for chip %s - offset: %f,%f pixels, rotation: %f deg\n",chipname, gridStats->offset.x, gridStats->offset.y, DEG_RAD*gridStats->angle);
    6365
    6466# if (1)
     
    7375        return false;
    7476    }
    75     psLogMsg ("psastro", 3, "tweak grid search result - offset: %f,%f pixels, rotation: %f deg\n", stats->offset.x, stats->offset.y, DEG_RAD*stats->angle);
     77    psLogMsg ("psastro", 3, "tweak grid search result for chip %s - offset: %f,%f pixels, rotation: %f deg\n",chipname, stats->offset.x, stats->offset.y, DEG_RAD*stats->angle);
    7678# else
    7779    // EAM TEST: skip tweak
     
    8284    // adjust the chip.toFPA terms only
    8385    pmAstromGridApply (chip->toFPA, stats);
    84     psastroUpdateChipToFPA (fpa, chip); // updates PSASTRO.RAWSTARS and PSASTRO.REFSTARS
     86    psastroUpdateChipToFPA (fpa, chip); // updates PSASTRO.RAWSTARS and PSASTRO.REFSTARS (see note below)
    8587    psFree (gridStats);
    8688    psFree (rawGridStars);
     
    9092    return true;
    9193}
     94
     95/* if psastroUpdateChiptoFPA fails to invert the toFPA transformation,
     96   the ref->chip coordinates will not be set.  This is not a problem
     97   at this stage since they are not used in the calculation.  Later
     98   passes can still yield a valid solution.
     99*/
Note: See TracChangeset for help on using the changeset viewer.