Changeset 13686
- Timestamp:
- Jun 6, 2007, 2:19:54 PM (19 years ago)
- Location:
- trunk/pswarp/src
- Files:
-
- 2 edited
-
pswarpLoop.c (modified) (4 diffs)
-
pswarpTransformReadout_Opt.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpLoop.c
r13661 r13686 68 68 psError(PS_ERR_UNKNOWN, false, "Unable to read bilevel mosaic astrometry for input FPA."); 69 69 psFree(view); 70 psFree(stats); 70 71 return false; 71 72 } … … 87 88 psError(PS_ERR_UNKNOWN, false, "Unable to read bilevel chip astrometry for input FPA."); 88 89 psFree(view); 90 psFree(stats); 89 91 return false; 90 92 } … … 94 96 psError(PS_ERR_UNKNOWN, false, "Unable to read WCS astrometry for input FPA."); 95 97 psFree(view); 98 psFree(stats); 96 99 return false; 97 100 } … … 106 109 // process each of the readouts 107 110 pmReadout *readout; 108 while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) { 109 pmFPAfileIOChecks (config, view, PM_FPA_BEFORE); 110 if (! readout->data_exists) { continue; } 111 while ((readout = pmFPAviewNextReadout(view, input->fpa, 1)) != NULL) { 112 pmFPAfileIOChecks(config, view, PM_FPA_BEFORE); 113 if (!readout->data_exists) { 114 continue; 115 } 111 116 112 // XXX _Opt version uses locally-linear map 113 // pswarpTransformReadout (output, readout, config); 114 pswarpTransformReadout_Opt (output, readout, config); 117 pswarpTransformReadout_Opt(output, readout, config); 115 118 116 pmFPAfileIOChecks (config, view, PM_FPA_AFTER);119 pmFPAfileIOChecks(config, view, PM_FPA_AFTER); 117 120 } 121 pmFPAfileIOChecks(config, view, PM_FPA_AFTER); 122 } 123 pmFPAfileIOChecks(config, view, PM_FPA_AFTER); 124 } 118 125 119 pmFPAfileIOChecks (config, view, PM_FPA_AFTER); 120 } 121 pmFPAfileIOChecks (config, view, PM_FPA_AFTER); 126 pmCell *outCell = output->parent; // Output cell 127 pmChip *outChip = outCell->parent; // Output chip 128 pmFPA *outFPA = outChip->parent; // Output FPA 129 130 if (!pmFPACopyConcepts(output->parent->parent->parent, input->fpa)) { 131 psError(PS_ERR_UNKNOWN, false, "Unable to copy concepts from input to output."); 132 psFree(stats); 133 psFree(view); 134 return false; 122 135 } 136 137 138 // XXX Hack so that INSTRUME header keyword and the like are not updated properly 139 // If INSTRUME (etc) is updated, then the FITS file with the warped image will be often 140 // recognised as coming from the old camera, not the new, warped camera. 141 // The proper solution to this, I believe, would be to define a skycell derivative of the 142 // old camera, so that the skycell can be recognised as coming from the old camera (and would 143 // also therefore inherit all its recipes, which would be good), rather than having a completely 144 // different camera. That will take some work; the below solution should be good enough for now. 145 { 146 psMetadataItem *item; // Concepts item to update 147 148 item = psMetadataLookup(outFPA->concepts, "FPA.INSTRUMENT"); 149 psFree(item->data.V); 150 item->data.V = NULL; 151 152 item = psMetadataLookup(outFPA->concepts, "FPA.DETECTOR"); 153 psFree(item->data.V); 154 item->data.V = NULL; 155 } 156 157 123 158 124 159 // Perform statistics on the output image -
trunk/pswarp/src/pswarpTransformReadout_Opt.c
r13660 r13686 2 2 3 3 // NOTE: in this function, the coordinates are transformed from the OUTPUT to the INPUT 4 bool pswarpTransformReadout_Opt (pmReadout *output, pmReadout *input, pmConfig *config)4 bool pswarpTransformReadout_Opt(pmReadout *output, pmReadout *input, pmConfig *config) 5 5 { 6 6 // XXX this implementation currently ignores the use of the region
Note:
See TracChangeset
for help on using the changeset viewer.
