IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31671


Ignore:
Timestamp:
Jun 22, 2011, 12:50:35 AM (15 years ago)
Author:
eugene
Message:

allow single direction to be chosen automatically; other minor points

Location:
trunk/psModules/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/astrom/pmAstrometryObjects.c

    r31153 r31671  
    996996            newStat->center = center;
    997997
    998             if (isfinite(newStat->minMetric) && (newStat->minMetric > 0.0) && (newStat->minMetric < minStat->minMetric)) {
     998            if (isfinite(newStat->minMetric) && (newStat->minMetric > 0.0) && (newStat->nSigma >= minSigma) && (newStat->minMetric < minStat->minMetric)) {
    999999                *minStat = *newStat;
    10001000                psLogMsg ("psModule.astrom", 4, "grid test - offset: %7.2f,%7.2f @ %6.1f deg x %7.3f (%4d pts, %5.1f sig, %5.1f var, %6.3f log metric) *",
     
    10801080    psVector *xHistNew = psVectorSmooth(NULL, xHist, tweakSmooth, tweakNsigma);
    10811081    psVector *yHistNew = psVectorSmooth(NULL, yHist, tweakSmooth, tweakNsigma);
     1082
     1083    // if we failed to smooth, just use the original vector (probably too narrow a range)
     1084    if (!xHistNew) xHistNew = psMemIncrRefCounter (xHist);
     1085    if (!yHistNew) yHistNew = psMemIncrRefCounter (yHist);
    10821086
    10831087    // select peak in x and in y
  • trunk/psModules/src/camera/pmFPAfile.c

    r30026 r31671  
    201201    newName = psStringCopy(rule);
    202202
     203    bool status = false;
    203204    if (strstr(newName, "{FPA.OBS}")) {
    204         char *name = psMetadataLookupStr(NULL, fpa->concepts, "FPA.OBS");
     205        char *name = psMetadataLookupStr(&status, fpa->concepts, "FPA.OBS");
    205206        if (name) {
    206207            psStringSubstitute(&newName, name, "{FPA.OBS}");
    207         }
     208        } 
    208209    }
    209210    if (strstr(newName, "{FPA.NAME}")) {
  • trunk/psModules/src/imcombine/pmSubtractionMask.c

    r30622 r31671  
    185185        break;
    186186      case PM_SUBTRACTION_MODE_UNSURE:
     187      case PM_SUBTRACTION_MODE_SINGLE_AUTO:
    187188      case PM_SUBTRACTION_MODE_DUAL:
    188189        maskRej |= PM_SUBTRACTION_MASK_CONVOLVE_1 | PM_SUBTRACTION_MASK_CONVOLVE_2;
     
    271272      case PM_SUBTRACTION_MODE_ERR:
    272273      case PM_SUBTRACTION_MODE_UNSURE:
     274      case PM_SUBTRACTION_MODE_SINGLE_AUTO:
    273275      default:
    274276        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unsuppored subtraction mode: %x", mode);
  • trunk/psModules/src/imcombine/pmSubtractionMatch.c

    r31059 r31671  
    154154    )
    155155{
    156     if (subMode == PM_SUBTRACTION_MODE_1 || subMode == PM_SUBTRACTION_MODE_UNSURE ||
     156    if (subMode == PM_SUBTRACTION_MODE_1 ||
     157        subMode == PM_SUBTRACTION_MODE_SINGLE_AUTO ||
    157158        subMode == PM_SUBTRACTION_MODE_DUAL) {
    158159        if (!conv1->image) {
     
    173174        }
    174175    }
    175     if (subMode == PM_SUBTRACTION_MODE_2 || subMode == PM_SUBTRACTION_MODE_UNSURE ||
     176    if (subMode == PM_SUBTRACTION_MODE_2 ||
     177        subMode == PM_SUBTRACTION_MODE_SINGLE_AUTO ||
    176178        subMode == PM_SUBTRACTION_MODE_DUAL) {
    177179        if (!conv2->image) {
     
    575577        TestModes[0] = PM_SUBTRACTION_MODE_2;
    576578        break;
     579      case PM_SUBTRACTION_MODE_SINGLE_AUTO:
     580        N_TEST_MODES = 2;
     581        TestModes[0] = PM_SUBTRACTION_MODE_1;
     582        TestModes[1] = PM_SUBTRACTION_MODE_2;
     583        break;
    577584      case PM_SUBTRACTION_MODE_DUAL:
    578585        N_TEST_MODES = 3;
     
    754761            memCheck("kernels");
    755762
     763// this section was an old version of auto-choosing the direction.  the test was not as reliable as
     764// we would like; this is replaced by pmSubtractionMatchAttempt
     765# if (0)
    756766            if (subMode == PM_SUBTRACTION_MODE_UNSURE) {
    757767                pmSubtractionMode newMode = pmSubtractionBestMode(&stamps, &kernels, subMask, rej);
     
    769779                subMode = newMode;
    770780            }
     781# endif
    771782
    772783            int numRejected = -1;       // Number of rejected stamps in each iteration
  • trunk/psModules/src/imcombine/pmSubtractionTypes.h

    r30622 r31671  
    4949    PM_SUBTRACTION_MODE_1,              // Convolve image 1
    5050    PM_SUBTRACTION_MODE_2,              // Convolve image 2
    51     PM_SUBTRACTION_MODE_UNSURE,         // Not sure yet which image to convolve so try to satisfy both
     51    PM_SUBTRACTION_MODE_UNSURE,         // deprecated way of choosing the direction
     52    PM_SUBTRACTION_MODE_SINGLE_AUTO,    // choose between SINGLE1 and SINGLE2
    5253    PM_SUBTRACTION_MODE_DUAL,           // Dual convolution
    5354} pmSubtractionMode;
Note: See TracChangeset for help on using the changeset viewer.