IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 9, 2007, 4:25:46 PM (19 years ago)
Author:
Paul Price
Message:

Ensure we can perform a chip mosaic on skycells.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAfileDefine.c

    r14203 r14462  
    9595// Define an output pmFPAfile
    9696pmFPAfile *pmFPAfileDefineOutputForFormat(const pmConfig *config, // Configuration
    97                                           pmFPA *fpa, // Optional FPA to bind
    98                                           const char *name, // Name of file rule
    99                                           const char *cameraName, // Name of camera configuration to use
    100                                           const char *formatName // Name of camera format to use
     97                                          pmFPA *fpa, // Optional FPA to bind
     98                                          const char *name, // Name of file rule
     99                                          const char *cameraName, // Name of camera configuration to use
     100                                          const char *formatName // Name of camera format to use
    101101    )
    102102{
     
    10091009    pmFPAfile *file;                    // The new file
    10101010    if (config->cameraName[0] == '_' &&
    1011         strcmp(config->cameraName + strlen(config->cameraName) - 5, "-CHIP") == 0) {
     1011        (strcmp(config->cameraName + strlen(config->cameraName) - 5, "-CHIP") == 0 ||
     1012         strcmp(config->cameraName + strlen(config->cameraName) - 8, "-SKYCELL") == 0)) {
    10121013        // The input camera has already been mosaicked to this level
    10131014        file = pmFPAfileDefineOutputForFormat(config, NULL, filename, config->cameraName, config->formatName);
    10141015    } else {
    1015         psString cameraName = NULL;         // Name of the new (automatically-generated) camera configuration
    1016         psStringAppend(&cameraName, "_%s-CHIP", config->cameraName);
     1016        psString cameraName = NULL; // Name of the new (automatically-generated) camera configuration
     1017        if (config->cameraName[0] == '_' &&
     1018            strcmp(config->cameraName + strlen(config->cameraName) - 4 , "-FPA") == 0) {
     1019            cameraName = psStringNCopy(config->cameraName + 1, strlen(config->cameraName) - 5);
     1020        } else {
     1021            cameraName = psMemIncrRefCounter(config->cameraName);
     1022        }
     1023        psString newCameraName = NULL;  // Name of the new (automatically-generated) camera configuration
     1024        psStringAppend(&newCameraName, "_%s-CHIP", cameraName);
    10171025
    10181026        // Find the correct camera configuration
     
    10411049    pmFPAfile *file;                    // The new file
    10421050    if (config->cameraName[0] == '_' &&
    1043             strcmp(config->cameraName + strlen(config->cameraName) - 4 , "-FPA") == 0) {
     1051        (strcmp(config->cameraName + strlen(config->cameraName) - 4 , "-FPA") == 0 ||
     1052         strcmp(config->cameraName + strlen(config->cameraName) - 8, "-SKYCELL") == 0)) {
    10441053        // The input camera has already been mosaicked to this level
    10451054        file = pmFPAfileDefineOutputForFormat(config, NULL, filename, config->cameraName, config->formatName);
    10461055    } else {
    10471056
    1048         psString original;                  // Name of the original camera configuration
     1057        psString original = NULL;       // Name of the original camera configuration
    10491058        if (config->cameraName[0] == '_' &&
    10501059            strcmp(config->cameraName + strlen(config->cameraName) - 5 , "-CHIP") == 0) {
    10511060            // It's a chip mosaic; we need to get the original name
    10521061            original = psStringNCopy(config->cameraName + 1, strlen(config->cameraName) - 6);
     1062        } else if (config->cameraName[0] == '_' &&
     1063            strcmp(config->cameraName + strlen(config->cameraName) - 8, "-SKYCELL") == 0) {
     1064            original = psStringNCopy(config->cameraName + 1, strlen(config->cameraName) - 9);
    10531065        } else {
    10541066            original = psMemIncrRefCounter(config->cameraName);
Note: See TracChangeset for help on using the changeset viewer.