IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 2, 2005, 3:30:32 PM (21 years ago)
Author:
Paul Price
Message:

Working with release 8. Overscan, bias, flat-fielding all working.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/scripts/src/phase2/pmFPAConceptsGet.c

    r5371 r5462  
    100100    psMetadataItem *defItem = psMetadataLookup(defaults, concept);
    101101    if (defItem) {
    102         if (defItem->type == PS_META_META) {
     102        if (defItem->type == PS_DATA_METADATA) {
    103103            // A dependent default
    104104            psTrace(__func__, 7, "Evaluating dependent default....\n");
     
    122122                return NULL;
    123123            }
    124             if (depItem->type != PS_META_STR) {
     124            if (depItem->type != PS_DATA_STRING) {
    125125                psError(PS_ERR_IO, true, "Value of %s is not of type string, as required for dependency"
    126126                        " --- ignored.\n", dependsOn);
     
    270270    if (item) {
    271271        switch (item->type) {
    272           case PS_META_F32:
     272          case PS_DATA_F32:
    273273            value = item->data.F32;
    274274            break;
    275           case PS_META_F64:
     275          case PS_DATA_F64:
    276276            // Assume it's OK to truncate to floating point from double
    277277            value = (float)item->data.F64;
    278278            break;
    279           case PS_META_S32:
     279          case PS_DATA_S32:
    280280            // Promote to float
    281281            value = (float)item->data.S32;
     
    370370    if (item) {
    371371        switch (item->type) {
    372           case PS_META_STR:
     372          case PS_DATA_STRING:
    373373            value = item->data.V;
    374374            break;
     
    383383    psTrace(__func__, 7, "Adding %s (%s): %s\n", name, comment, value);
    384384
    385     psMetadataAdd(concepts, PS_LIST_TAIL, name, PS_META_STR, comment, value);
     385    psMetadataAdd(concepts, PS_LIST_TAIL, name, PS_DATA_STRING, comment, value);
    386386}
    387387
     
    428428                ra = raItem->data.F64;
    429429                break;
    430               case PS_META_STR:
     430              case PS_DATA_STRING:
    431431                // Sexagesimal format
    432432                {
     
    480480        }
    481481
    482         psMetadataAdd(fpa->concepts, PS_LIST_TAIL, "FPA.RA", PS_META_F64,
     482        psMetadataAdd(fpa->concepts, PS_LIST_TAIL, "FPA.RA", PS_DATA_F64,
    483483                      "Right Ascension of the boresight (radians)", ra);
    484484
     
    497497                dec = decItem->data.F64;
    498498                break;
    499               case PS_META_STR:
     499              case PS_DATA_STRING:
    500500                // Sexagesimal format
    501501                {
     
    549549        }
    550550
    551         psMetadataAdd(fpa->concepts, PS_LIST_TAIL, "FPA.DEC", PS_META_F64,
     551        psMetadataAdd(fpa->concepts, PS_LIST_TAIL, "FPA.DEC", PS_DATA_F64,
    552552                      "Declination of the boresight (radians)", dec);
    553553
     
    633633            psError(PS_ERR_IO, false, "Couldn't find CELL.TRIMSEC.\n");
    634634            *trimsec = psRegionSet(0.0, 0.0, 0.0, 0.0);
    635         } else if (secItem->type != PS_META_STR) {
     635        } else if (secItem->type != PS_DATA_STRING) {
    636636            psError(PS_ERR_IO, true, "CELL.TRIMSEC is not of type STR (%x)\n", secItem->type);
    637637            *trimsec = psRegionSet(0.0, 0.0, 0.0, 0.0);
     
    643643                psError(PS_ERR_IO, false, "Couldn't find CELL.TRIMSEC.SOURCE.\n");
    644644                *trimsec = psRegionSet(0.0, 0.0, 0.0, 0.0);
    645             } else if (sourceItem->type != PS_META_STR) {
     645            } else if (sourceItem->type != PS_DATA_STRING) {
    646646                psError(PS_ERR_IO, true, "CELL.TRIMSEC.SOURCE is not of type STR (%x)\n", sourceItem->type);
    647647                *trimsec = psRegionSet(0.0, 0.0, 0.0, 0.0);
     
    681681        } // Looking up CELL.TRIMSEC
    682682
    683         psMetadataAdd(cell->concepts, PS_LIST_TAIL, "CELL.TRIMSEC", PS_META_UNKNOWN,
     683        psMetadataAdd(cell->concepts, PS_LIST_TAIL, "CELL.TRIMSEC", PS_DATA_UNKNOWN,
    684684                      "Trim section", trimsec);
    685685        psFree(trimsec);
     
    693693        if (! secItem) {
    694694            psError(PS_ERR_IO, false, "Couldn't find CELL.BIASSEC.\n");
    695         } else if (secItem->type != PS_META_STR) {
     695        } else if (secItem->type != PS_DATA_STRING) {
    696696            psError(PS_ERR_IO, true, "CELL.BIASSEC is not of type STR (%x)\n", secItem->type);
    697697        } else {
     
    701701            if (! sourceItem) {
    702702                psError(PS_ERR_IO, false, "Couldn't find CELL.BIASSEC.SOURCE.\n");
    703             } else if (sourceItem->type != PS_META_STR) {
     703            } else if (sourceItem->type != PS_DATA_STRING) {
    704704                psError(PS_ERR_IO, true, "CELL.BIASSEC.SOURCE is not of type STR (%x)\n", sourceItem->type);
    705705            } else {
     
    752752        } // Looking up CELL.BIASSEC
    753753
    754         psMetadataAdd(cell->concepts, PS_LIST_TAIL, "CELL.BIASSEC", PS_META_LIST, "Bias sections", biassecs);
     754        psMetadataAdd(cell->concepts, PS_LIST_TAIL, "CELL.BIASSEC", PS_DATA_LIST, "Bias sections", biassecs);
    755755        psFree(biassecs);
    756756    }
     
    762762        if (! binItem) {
    763763            psError(PS_ERR_IO, false, "Couldn't find CELL.XBIN.\n");
    764         } else if (binItem->type == PS_META_STR) {
     764        } else if (binItem->type == PS_DATA_STRING) {
    765765            psString binString = binItem->data.V; // The string containing the binning
    766766            if (sscanf(binString, "%d %*d", &xBin) != 1 &&
     
    784784        if (! binItem) {
    785785            psError(PS_ERR_IO, false, "Couldn't find CELL.YBIN.\n");
    786         } else if (binItem->type == PS_META_STR) {
     786        } else if (binItem->type == PS_DATA_STRING) {
    787787            psString binString = binItem->data.V; // The string containing the binning
    788788            if (sscanf(binString, "%*d %d", &yBin) != 1 &&
     
    809809        if (! sysItem) {
    810810            psError(PS_ERR_IO, true, "Couldn't find CELL.TIMESYS --- assuming UTC.\n");
    811         } else if (sysItem->type != PS_META_STR) {
     811        } else if (sysItem->type != PS_DATA_STRING) {
    812812            psError(PS_ERR_IO, true, "CELL.TIMESYS isn't of type STRING --- assuming UTC.\n");
    813813        } else {
     
    839839                if (mdok && strlen(timeFormat) > 0) {
    840840                    switch (timeItem->type) {
    841                       case PS_META_STR:
     841                      case PS_DATA_STRING:
    842842                        {
    843843                            psString timeString = timeItem->data.V;     // String with the time
     
    887887                                            psError(PS_ERR_IO, false, "Unable to find time header: %s\n",
    888888                                                    timeName);
    889                                         } else if (timeItem->type == PS_META_STR) {
     889                                        } else if (timeItem->type == PS_DATA_STRING) {
    890890                                            // Time is a string, in the usual way:
    891891                                            psStringAppend(&dateString, "T%s", timeItem->data.V);
     
    965965        } // Getting CELL.TIME
    966966
    967         psMetadataAdd(cell->concepts, PS_LIST_TAIL, "CELL.TIME", PS_META_UNKNOWN, "Time of exposure", time);
     967        psMetadataAdd(cell->concepts, PS_LIST_TAIL, "CELL.TIME", PS_DATA_UNKNOWN, "Time of exposure", time);
    968968        psFree(time);
    969969    }
Note: See TracChangeset for help on using the changeset viewer.