IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42000


Ignore:
Timestamp:
Jan 26, 2022, 10:05:47 AM (4 years ago)
Author:
eugene
Message:

adding ippps2-specific mods to the (now deprecated) old tag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-ps2-20190404/ppSub/src/ppSubCamera.c

    r38709 r42000  
    180180    psAssert(config, "Require configuration");
    181181
     182
     183   
    182184    // Input image
    183185    pmFPAfile *input = defineInputFile(&success, config, NULL, "PPSUB.INPUT", "INPUT", PM_FPA_FILE_IMAGE);
     
    205207    }
    206208
     209    int did_rewrite = 0;
     210   
    207211    // Reference image
    208212    pmFPAfile *ref = defineInputFile(&success, config, NULL, "PPSUB.REF", "REF", PM_FPA_FILE_IMAGE);
    209213    if (!success) {
    210214        psError(psErrorCodeLast(), false, "Failed to build FPA from PPSUB.REF");
    211         return false;
     215        //        return false;
     216
     217        psErrorClear();
     218        fprintf(stderr,"%s\n", config->cameraName);
     219        psStringSubstitute(&( config->cameraName ),"GPC1","GPC2");
     220        fprintf(stderr,"%s\n", config->cameraName);
     221        did_rewrite = 1;
     222       
     223        ref = defineInputFile(&success, config, NULL, "PPSUB.REF", "REF", PM_FPA_FILE_IMAGE);
     224        if (!success) {
     225          return false;
     226        }
    212227    }
    213228
     
    226241    defineInputFile(&success, config, NULL, "PPSUB.REF.SOURCES", "REF.SOURCES", PM_FPA_FILE_CMF);
    227242    if (!success) {
     243      if (did_rewrite == 1) {
     244        // Sometimes we use the warp sources instead of the stack
     245        psErrorClear();
     246        did_rewrite = 0;
     247       
     248        fprintf(stderr,"%s\n", config->cameraName);
     249        psStringSubstitute(&( config->cameraName ),"GPC2","GPC1");
     250        fprintf(stderr,"%s\n", config->cameraName);
     251        defineInputFile(&success, config, NULL, "PPSUB.REF.SOURCES", "REF.SOURCES", PM_FPA_FILE_CMF);
     252        if (!success) {
     253          psError(psErrorCodeLast(), false, "Failed to build FPA from PPSUB.REF.SOURCES");
     254          return false;
     255        }
     256      }
     257      else {
    228258        psError(psErrorCodeLast(), false, "Failed to build FPA from PPSUB.REF.SOURCES");
    229259        return false;
    230     }
    231 
     260      }
     261    }
     262
     263    if (did_rewrite == 1) {
     264      fprintf(stderr,"%s\n", config->cameraName);
     265      psStringSubstitute(&( config->cameraName ),"GPC2","GPC1");
     266      fprintf(stderr,"%s\n", config->cameraName);
     267    }
     268   
    232269    // Now that the camera has been determined, we can read the recipe
    233270    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim
Note: See TracChangeset for help on using the changeset viewer.