IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 16, 2009, 6:35:43 PM (17 years ago)
Author:
eugene
Message:

remove clumpfor raw and ref stars for entire run, save as SUBSET

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091113/psastro/src/psastroUtils.c

    r21422 r26167  
    106106}
    107107
    108 bool psastroUpdateChipToFPA (pmFPA *fpa, pmChip *chip, psArray *rawstars, psArray *refstars) {
     108bool psastroUpdateChipToFPA (pmFPA *fpa, pmChip *chip) {
    109109
    110110    psRegion *region = pmChipPixels (chip);
     
    114114    psFree (region);
    115115
    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        }
    127145    }
    128146
Note: See TracChangeset for help on using the changeset viewer.