IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 22, 2007, 5:09:53 PM (19 years ago)
Author:
Paul Price
Message:

When we went to process TC3 images, we found that our camera formats
didn't handle its case (PHU=CHIP, EXT=CELL) properly. In order to
accomodate it, I've reworked the camera formats (including adding a
source to an FPA, and generating mosaic camera configurations). Now,
the particular format of the camera format file is *very* dependent
upon the FITS file:

Case PHU EXTENSIONS Description

  1. FPA CHIP CONTENTS(METADATA) has a list of extensions, each with a chip type.

CHIPS(METADATA) has a list of chip types, each with cell:type

  1. FPA CELL CONTENTS(METADATA) has a list of extensions, each with chip:cell:type

No need for CHIPS.

  1. FPA NONE CONTENTS(STRING) has a list of extensions, chip:cell:type

No need for CHIPS

  1. CHIP CELL CONTENTS(METADATA) is a menu, each with a chip type

CHIPS(METADATA) has a list of chip types(METADATA), containg a list of
extensions.

  1. CHIP NONE CONTENTS(METADATA) is a menu, each with a chip type

CHIPS(METADATA) has a list of chip types(STRING) with cell:type

  1. CELL NONE CONTENTS(METADATA) is a menu, each with a cell type.

No need for CHIPS.

Debugged and plugged memory leaks for this fix. Now able to
successfully read TC3 and Megacam (all 3 formats). Can't run ppImage
with PPIMAGE_N on file with PHU=CHIP because it's trying to write out
a PHU (at the FPA level) before it reads any of the input data. This
behaviour exists in a previous version (IPP 1.0; in fact, the current
fix deals with it a bit better --- error instead of SEGV), so it
should be safe to use this now.

File:
1 edited

Legend:

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

    r12397 r12564  
    5757        while ((cItem = psListGetAndIncrement(cIter))) {
    5858            if (cItem->type != PS_DATA_STRING) {
    59                 psLogMsg(__func__, PS_LOG_WARN, "psMetadataItem from list is of type %x instead of "
     59                psWarning("psMetadataItem from list is of type %x instead of "
    6060                         "%x (PS_DATA_STRING) --- can't interpret.\n", cItem->type, PS_DATA_STRING);
    6161                psFree(cIter);
     
    178178        }
    179179    default:
    180         psLogMsg(__func__, PS_LOG_WARN, "Type of %s is not suitable for a FITS header --- not added.\n",
     180        psWarning("Type of %s is not suitable for a FITS header --- not added.\n",
    181181                 item->name);
    182182        return false;
     
    261261                if (strcasecmp(source, "HEADER") == 0) {
    262262                    if (cameraItem->type != PS_DATA_STRING) {
    263                         psLogMsg(__func__, PS_LOG_WARN, "Concept %s is specified by header, but is not "
     263                        psWarning("Concept %s is specified by header, but is not "
    264264                                 "of type STR --- ignored.\n", conceptItem->name);
    265265                        continue;
     
    286286                    psTrace("psModules.concepts", 8, "Checking %s against camera format.\n", name);
    287287                    if (! compareConcepts(formatted, cameraItem)) {
    288                         psLogMsg(__func__, PS_LOG_WARN, "Concept %s is specified by value in the camera "
     288                        psWarning("Concept %s is specified by value in the camera "
    289289                                 "format, but the values don't match.\n", name);
    290290                    }
    291291                    psFree(formatted);
    292292                } else {
    293                     psLogMsg(__func__, PS_LOG_WARN, "Concept source %s isn't HEADER or VALUE --- can't "
     293                    psWarning("Concept source %s isn't HEADER or VALUE --- can't "
    294294                             "write\n", nameSource);
    295295                }
     
    303303
    304304                if (! compareConcepts(formatted, cameraItem)) {
    305                     psLogMsg(__func__, PS_LOG_WARN, "Concept %s is specified by value in the camera "
     305                    psWarning("Concept %s is specified by value in the camera "
    306306                             "format, but the values don't match.\n", name);
    307307                }
     
    347347                psString dependKey = psMetadataLookupStr(&mdok, defaults, dependName); // The keyword
    348348                if (!mdok || !dependKey || strlen(dependKey) == 0) {
    349                     psLogMsg(__func__, PS_LOG_WARN, "Can't find %s in the DEFAULTS for %s --- ignored.\n",
     349                    psWarning("Can't find %s in the DEFAULTS for %s --- ignored.\n",
    350350                             dependName, name);
    351351                    psFree(dependName);
     
    354354                psString dependValue = psMetadataLookupStr(&mdok, concepts, dependKey); // The value
    355355                if (!mdok || !dependValue || strlen(dependValue) == 0) {
    356                     psLogMsg(__func__, PS_LOG_WARN, "Concept %s specified by %s isn't of type STR -- "
     356                    psWarning("Concept %s specified by %s isn't of type STR -- "
    357357                             "ignored.\n", dependKey, dependName);
    358358                    psFree(dependName);
     
    360360                }
    361361                // Get the actual item of interest, and correct the name to match the concept name
    362                 defaultItem = psMetadataLookup(defaultItem->data.md, dependValue);
    363                 if (!defaultItem) {
    364                     psLogMsg(__func__, PS_LOG_WARN, "Concept dependency name %s is not found "
    365                              "in concept table for %s -- ignored.\n", dependValue, dependName);
     362                defaultItem = psMetadataLookup(defaultItem->data.md, dependValue);
     363                if (!defaultItem) {
     364                    psWarning("Concept dependency name %s is not found "
     365                             "in concept table for %s -- ignored.\n", dependValue, dependName);
    366366                    psFree(dependName);
    367367                    continue;
    368                 }
     368                }
    369369                defaultItem = psMetadataItemCopy(defaultItem);
    370370                psFree(dependName);
     
    381381            }
    382382            if (! compareConcepts(formatted, defaultItem)) {
    383                 psLogMsg(__func__, PS_LOG_WARN, "Concept %s is specified by the DEFAULTS in the camera "
     383                psWarning("Concept %s is specified by the DEFAULTS in the camera "
    384384                         "format, but the values don't match.\n", name);
    385385            }
     
    418418        if (headerItem) {
    419419            if (headerItem->type != PS_DATA_STRING) {
    420                 psLogMsg(__func__, PS_LOG_WARN, "TRANSLATION keyword for concept %s isn't of type STR ---"
     420                psWarning("TRANSLATION keyword for concept %s isn't of type STR ---"
    421421                         " ignored.", name);
    422422                continue;
     
    471471        if (dbItem) {
    472472            if (dbItem->type != PS_DATA_METADATA) {
    473                 psLogMsg(__func__, PS_LOG_WARN, "DATABASE keyword for concept %s isn't of type METADATA "
     473                psWarning("DATABASE keyword for concept %s isn't of type METADATA "
    474474                         "--- ignored.\n", name);
    475475                continue;
     
    508508                        char *dependName = psListGetAndIncrement(valuesIter); // Name for the value
    509509                        if (!strlen(column) || !strlen(name)) {
    510                             psLogMsg(__func__, PS_LOG_WARN, "One of the columns or value names for %s is "
     510                            psWarning("One of the columns or value names for %s is "
    511511                                     " empty --- ignored.\n", name);
    512512                        } else {
     
    543543                    // Note that we use limit=2 in order to test if there are multiple rows returned
    544544                    if (! dbResult || dbResult->n == 0) {
    545                         psLogMsg(__func__, PS_LOG_WARN, "Unable to find any rows in DB for %s --- "
     545                        psWarning("Unable to find any rows in DB for %s --- "
    546546                                 "ignored\n", name);
    547547                        return false;
    548548                    } else {
    549549                        if (dbResult->n > 1) {
    550                             psLogMsg(__func__, PS_LOG_WARN, "Multiple rows returned in DB lookup for %s "
     550                            psWarning("Multiple rows returned in DB lookup for %s "
    551551                                     "--- ignored.\n", name);
    552552                        }
Note: See TracChangeset for help on using the changeset viewer.