IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 10, 2009, 5:03:08 PM (17 years ago)
Author:
Paul Price
Message:

Don't use VARFACTOR any more --- covariance matrix takes care of this.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/concepts/pmConcepts.c

    r24777 r25046  
    377377        conceptRegisterS32("CELL.XWINDOW", "Start of cell window (pixels)",p_pmConceptParse_Positions,p_pmConceptFormat_Positions, NULL, true, PM_FPA_LEVEL_CELL);
    378378        conceptRegisterS32("CELL.YWINDOW", "Start of cell window (pixels)",p_pmConceptParse_Positions,p_pmConceptFormat_Positions, NULL, true, PM_FPA_LEVEL_CELL);
    379         conceptRegisterF32("CELL.VARFACTOR", "Variance factor for conversion from large to small scales", NULL, NULL, NULL, true, PM_FPA_LEVEL_CELL);
    380379
    381380        // CELL.TRIMSEC
     
    485484        concept[length - 1] = '\0';
    486485
    487         // special variants:
    488         if (!strcmp(concept, "FPA.DATE")) {
    489           psTime *fpaTime = psMetadataLookupPtr(NULL, fpa->concepts, "FPA.TIME");
    490           if (!fpaTime) {
    491             psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Missing concept FPA.TIME needed for FPA.DATE");
    492             psFree(string);
    493             return NULL;
    494           }
    495           psString dateTimeString = psTimeToISO(fpaTime); // String representation
    496           psList *dateTime = psStringSplit(dateTimeString, "T", true);
    497           psFree(dateTimeString);
    498           psString dateString = psMemIncrRefCounter(psListGet(dateTime, PS_LIST_HEAD)); // The date string
    499           psFree (dateTime);
    500 
    501           if (!psStringSubstitute(&string, dateString, "{FPA.DATE}")) {
    502               psError(PS_ERR_UNKNOWN, false, "Unable to replace concept %s", concept);
    503               psFree(string);
    504               psFree(dateString);
    505               return NULL;
    506           }
    507           psFree (dateString);
    508           continue;
    509         }
     486        // special variants:
     487        if (!strcmp(concept, "FPA.DATE")) {
     488          psTime *fpaTime = psMetadataLookupPtr(NULL, fpa->concepts, "FPA.TIME");
     489          if (!fpaTime) {
     490            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Missing concept FPA.TIME needed for FPA.DATE");
     491            psFree(string);
     492            return NULL;
     493          }
     494          psString dateTimeString = psTimeToISO(fpaTime); // String representation
     495          psList *dateTime = psStringSplit(dateTimeString, "T", true);
     496          psFree(dateTimeString);
     497          psString dateString = psMemIncrRefCounter(psListGet(dateTime, PS_LIST_HEAD)); // The date string
     498          psFree (dateTime);
     499
     500          if (!psStringSubstitute(&string, dateString, "{FPA.DATE}")) {
     501              psError(PS_ERR_UNKNOWN, false, "Unable to replace concept %s", concept);
     502              psFree(string);
     503              psFree(dateString);
     504              return NULL;
     505          }
     506          psFree (dateString);
     507          continue;
     508        }
    510509
    511510        psTrace("psModules.concepts", 7, "Interpolating concept %s", concept);
Note: See TracChangeset for help on using the changeset viewer.