Changeset 26259 for trunk/psastro/src/psastroUtils.c
- Timestamp:
- Nov 22, 2009, 2:57:41 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroUtils.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroUtils.c
r21422 r26259 106 106 } 107 107 108 bool psastroUpdateChipToFPA (pmFPA *fpa, pmChip *chip , psArray *rawstars, psArray *refstars) {108 bool psastroUpdateChipToFPA (pmFPA *fpa, pmChip *chip) { 109 109 110 110 psRegion *region = pmChipPixels (chip); … … 114 114 psFree (region); 115 115 116 for (int i = 0; i < rawstars->n; i++) { 117 pmAstromObj *raw = rawstars->data[i]; 118 119 psPlaneTransformApply (raw->FP, chip->toFPA, raw->chip); 120 psPlaneTransformApply (raw->TP, fpa->toTPA, raw->FP); 121 psDeproject (raw->sky, raw->TP, fpa->toSky); 122 } 123 124 for (int i = 0; i < refstars->n; i++) { 125 pmAstromObj *ref = refstars->data[i]; 126 psPlaneTransformApply (ref->chip, chip->fromFPA, ref->FP); 116 // loop over cells in this chip 117 for (int nCell = 0; nCell < chip->cells->n; nCell++) { 118 pmCell *cell = chip->cells->data[nCell]; 119 if (!cell->process || !cell->file_exists) { continue; } 120 121 // loop over readouts in this cell 122 for (int nRead = 0; nRead < cell->readouts->n; nRead++) { 123 pmReadout *readout = cell->readouts->data[nRead]; 124 if (! readout->data_exists) { continue; } 125 126 // select the raw objects for this readout 127 psArray *rawstars = psMetadataLookupPtr (NULL, readout->analysis, "PSASTRO.RAWSTARS"); 128 if (rawstars) { 129 for (int i = 0; i < rawstars->n; i++) { 130 pmAstromObj *raw = rawstars->data[i]; 131 psPlaneTransformApply (raw->FP, chip->toFPA, raw->chip); 132 psPlaneTransformApply (raw->TP, fpa->toTPA, raw->FP); 133 psDeproject (raw->sky, raw->TP, fpa->toSky); 134 } 135 } 136 137 psArray *refstars = psMetadataLookupPtr (NULL, readout->analysis, "PSASTRO.REFSTARS"); 138 if (refstars) { 139 for (int i = 0; i < refstars->n; i++) { 140 pmAstromObj *ref = refstars->data[i]; 141 psPlaneTransformApply (ref->chip, chip->fromFPA, ref->FP); 142 } 143 } 144 } 127 145 } 128 146
Note:
See TracChangeset
for help on using the changeset viewer.
