Changeset 12526 for trunk/pswarp/src/pswarpDefine.c
- Timestamp:
- Mar 21, 2007, 1:29:55 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpDefine.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpDefine.c
r12523 r12526 18 18 } 19 19 20 // open the full skycell file; no need to defer different depths 20 // open the full skycell file; no need to defer different depths. only load the header data 21 // XXX force fileLevel and view to be chip. is this right? 22 // skycell->type = PM_FPA_FILE_HEADER; 23 // skycell->fileLevel = PM_FPA_LEVEL_CHIP; 21 24 pmFPAview *view = pmFPAviewAlloc (0); 22 25 pmFPAfileOpen (skycell, view, config); … … 49 52 return false; 50 53 } 54 // output->fileLevel = PM_FPA_LEVEL_CHIP; 51 55 52 56 pmFPAfileCreate(output, view, config); 57 58 # if 0 59 // XXX This function should only load the skycell headers and create the output based 60 // on that file. I'm going to ask paul to look into this 61 pmFPACopyStructure (output->fpa, skycell->fpa, 1, 1); 62 63 // XXX can I just create the needed readout? 64 // create the needed readouts 65 for (int i = 0; i < output->fpa->chips->n; i++) { 66 pmChip *chip = output->fpa->chips->data[i]; 67 for (int j = 0; j < chip->cells->n; j++) { 68 pmCell *cell = chip->cells->data[j]; 69 pmReadout *readout; 70 if (cell->readouts->n == 0) { 71 readout = pmReadoutAlloc (cell); 72 } 73 bool mdok1 = false; 74 bool mdok2 = false; 75 pmHDU *hdu = pmHDUGetLowest (output->fpa, chip, cell); 76 int Nx = psMetadataLookupS32(&mdok1, hdu->header, "NAXIS1"); // Trim section 77 int Ny = psMetadataLookupS32(&mdok2, hdu->header, "NAXIS2"); // Trim section 78 if (!mdok1 || !mdok2) { 79 psError(PS_ERR_IO, true, "NAXIS1 or NAXIS2 not set --- unable to create output image.\n"); 80 return false; 81 } 82 readout->image = psImageAlloc (Nx, Ny, PS_TYPE_F32); 83 psFree (readout); 84 } 85 } 86 # endif 53 87 54 88 psFree (view);
Note:
See TracChangeset
for help on using the changeset viewer.
