IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 8, 2012, 5:30:49 PM (14 years ago)
Author:
watersc1
Message:

Crosstalk spike masking and improved ghost model application.

File:
1 edited

Legend:

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

    r26259 r33851  
    128128                for (int i = 0; i < refstars->n; i++) {
    129129                    pmAstromObj *ref = refstars->data[i];
     130                    psTrace("psastro.ghost",5,"Begin ghost %d/%ld: MAX_MAG: %g; ref_mag: %g @ (%.10g,%.10g)",i,refstars->n,MAX_MAG,ref->Mag,ref->sky->r * 180 / M_PI,ref->sky->d * 180.0 / M_PI);
    130131                    if (ref->Mag > MAX_MAG) continue;
    131132
     
    163164                    pmChip *ghostChip = psastroFindChip (&ghost->chip->x, &ghost->chip->y, fpa, -ghost->srcFP->x, -ghost->srcFP->y);
    164165                    // fprintf (stderr, "raw chip position: %f, %f ", ghost->chip->x, ghost->chip->y);
    165 
     166                    float ref_chip_x = ghost->chip->x;
     167                    float ref_chip_y = ghost->chip->y;
    166168                    ghostChip = psastroFindChip (&ghost->chip->x, &ghost->chip->y, fpa, ghost->FP->x, ghost->FP->y);
    167169                    // fprintf (stderr, "-> model chip position: %f, %f\n", ghost->chip->x, ghost->chip->y);
    168170
     171                    if (ghostChip) {
     172                      psTrace("psastro.ghost",5,"   in ghost: %d/%ld: ref: (%f,%f) or (%f,%f,%s) ghost: (%f,%f) or (%f,%f,%s) %f inner: (%f,%f,%f) outer: (%f,%f,%f)",
     173                              i,refstars->n,
     174                              ref->FP->x,ref->FP->y,
     175                              ref_chip_x,ref_chip_y,psMetadataLookupStr(NULL,chip->concepts,"CHIP.NAME"),
     176                              ghost->FP->x,ghost->FP->y,
     177                              ghost->chip->x,ghost->chip->y,psMetadataLookupStr(NULL,ghostChip->concepts,"CHIP.NAME"),
     178                              rSrc,
     179                              ghost->inner.major,ghost->inner.minor,ghost->inner.theta,
     180                              ghost->outer.major,ghost->outer.minor,ghost->outer.theta);
     181/*                    psWarning("   GHOST_DATA: %d/%ld: ref: (%f,%f) or (%f,%f,%s) ghost: (%f,%f) or (%f,%f,%s) %f inner: (%f,%f,%f) outer: (%f,%f,%f)", */
     182/*                            i,refstars->n, */
     183/*                            ref->FP->x,ref->FP->y, */
     184/*                            ref_chip_x,ref_chip_y,psMetadataLookupStr(NULL,chip->concepts,"CHIP.NAME"), */
     185/*                            ghost->FP->x,ghost->FP->y, */
     186/*                            ghost->chip->x,ghost->chip->y,psMetadataLookupStr(NULL,ghostChip->concepts,"CHIP.NAME"), */
     187/*                            rSrc, */
     188/*                            ghost->inner.major,ghost->inner.minor,ghost->inner.theta, */
     189/*                            ghost->outer.major,ghost->outer.minor,ghost->outer.theta); */
     190                    }
     191                    else {
     192                      psTrace("psastro.ghost",5,"   in ghost: %d/%ld: ref: (%f,%f) ghost: (%f,%f) or (%f,%f,%s) inner: (%f,%f,%f) outer: (%f,%f,%f)",
     193                              i,refstars->n,
     194                              ref->FP->x,ref->FP->y,
     195                              ghost->FP->x,ghost->FP->y,
     196                              ghost->chip->x,ghost->chip->y,"NONE",
     197                              ghost->inner.major,ghost->inner.minor,ghost->inner.theta,
     198                              ghost->outer.major,ghost->outer.minor,ghost->outer.theta);
     199                    }                 
     200                     
     201
     202                           
    169203                    if (!ghostChip) goto skip;
    170204                    if (!ghostChip->cells) goto skip;
    171205                    if (!ghostChip->cells->n) goto skip;
     206
     207                   
    172208                    pmCell *ghostCell = ghostChip->cells->data[0];
    173209                    if (!ghostCell) goto skip;
     
    190226
    191227                skip:
     228                   
    192229                    psFree (ghost);
    193230                }
Note: See TracChangeset for help on using the changeset viewer.