IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 22, 2009, 2:57:41 PM (17 years ago)
Author:
eugene
Message:

various fixes to psastro:

1) added bootstrap resampling to zero point error analysis
2) added iterative clump removal from refstars and rawstars
3) added unique reference match option
4) some improved visualizations
5) improved mosaic iterations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroUtils.c

    r21422 r26259  
    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.