- Timestamp:
- Apr 19, 2013, 4:45:57 PM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130419
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
pswarp/src/pswarpParseCamera.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130419
-
branches/eam_branches/ipp-20130419/pswarp/src/pswarpParseCamera.c
r34800 r35421 55 55 } 56 56 57 58 59 60 57 bool pswarpParseCamera(pmConfig *config) 61 58 { … … 70 67 } 71 68 72 pmFPAfile *astrom = defineInputFile(config, NULL, "PSWARP.ASTROM", "ASTROM", PM_FPA_FILE_CMF); 69 // XXX I should allow the astrometry input to be either WCS or CMF 70 // Define the input astrometry file(s) 71 bool status = false; 72 pmFPAfile *astrom = pmFPAfileDefineFromArgs(&status, config, "PSWARP.ASTROM", "ASTROM"); 73 if (!astrom) { 74 // look for the file on the RUN metadata 75 astrom = pmFPAfileDefineFromRun(&status, NULL, config, "PSWARP.ASTROM"); // File to return 76 if (!status) { 77 psLogMsg("pswarp", PS_LOG_INFO, "Failed to load file definition for %s", "PSWARP.ASTROM"); 78 } 79 } 80 if ((astrom->type != PM_FPA_FILE_CMF) && (astrom->type != PM_FPA_FILE_WCS)) { 81 psLogMsg("pswarp", PS_LOG_INFO, "%s is neither CMF nor WCS", "PSWARP.ASTROM"); 82 } 73 83 psLogMsg("pswarp", PS_LOG_INFO, "Astrometry source: %s", astrom ? "supplied" : "header"); 74 84 85 // Define the input mask file(s) 75 86 pmFPAfile *inMask = defineInputFile(config, input, "PSWARP.MASK", "MASK", PM_FPA_FILE_MASK); 76 87 if (!inMask) { … … 78 89 } 79 90 91 // Define the input variance file(s) 80 92 pmFPAfile *inVariance = defineInputFile(config, input, "PSWARP.VARIANCE", "VARIANCE", 81 93 PM_FPA_FILE_VARIANCE); … … 91 103 92 104 // The input skycell is a required argument: it defines the output image 93 // XXX we may need a different skycell structure here105 pmConfig *skyConfig = NULL; 94 106 pmFPAfile *skycell = NULL; 95 pmConfig *skyConfig = NULL; 96 bool status = pswarpDefineSkycell(&skycell, &skyConfig, config, "PSWARP.SKYCELL", "SKYCELL"); 97 if (!status) { 98 psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.SKYCELL"); 99 return false; 100 } 107 108 # define USE_PSWARP_DEFINE_SKYCELL 0 109 # if (USE_PSWARP_DEFINE_SKYCELL) 110 // XXX this function is no longer needed; drop 111 status = pswarpDefineSkycell(&skycell, &skyConfig, config, "PSWARP.SKYCELL", "SKYCELL"); 112 # else 113 skycell = pmFPAfileDefineNewConfig(&status, &skyConfig, config, "PSWARP.SKYCELL", "SKYCELL"); 114 # endif 115 116 if (!status || !skycell) { 117 psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.SKYCELL"); 118 return false; 119 } 120 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "SKYCELL.CAMERA", 0, "Name of camera for skycell", skyConfig->cameraName); 101 121 psFree(skyConfig); 102 122 … … 142 162 if (inBackground && psMetadataLookupBool(&mdok, recipe, "BACKGROUND.MODEL")) { 143 163 pmFPAfile *outBackground = pmFPAfileDefineSkycell(config, NULL, "PSWARP.OUTPUT.BKGMODEL"); 144 /* pmFPAfile *outBackground = pmFPAfileDefineFromFPA(config,output->fpa, */145 /* psMetadataLookupS32(&mdok,recipe,"BKG.XGRID"), */146 /* psMetadataLookupS32(&mdok,recipe,"BKG.YGRID"), */147 /* "PSWARP.OUTPUT.BKGMODEL"); */148 164 outBackground->xBin = psMetadataLookupS32(&mdok, recipe, "BKG.XGRID"); 149 165 outBackground->yBin = psMetadataLookupS32(&mdok, recipe, "BKG.YGRID");
Note:
See TracChangeset
for help on using the changeset viewer.
