IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 1, 2007, 11:03:03 AM (20 years ago)
Author:
eugene
Message:

added various plots, more work on the mosaic astrometry

File:
1 edited

Legend:

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

    r10861 r10864  
    7575                if (rawstars == NULL) { continue; }
    7676
    77                 if (psTraceGetLevel("psastro.dump.rawstars") > 2) {
    78                   dump_stars (rawstars, fpa, chip);
    79                 }
    80 
    81                 if (psTraceGetLevel("psastro.plot.rawstars") > 2) {
    82                   plot_stars (rawstars, fpa, chip);
    83                 }
    84 
    8577                for (int i = 0; i < rawstars->n; i++) {
    8678                    pmAstromObj *raw = rawstars->data[i];
     
    10092                    DECmax = PS_MAX (raw->sky->d, DECmax);
    10193                }
     94
     95                // dump or plot the resulting projected positions
     96                if (psTraceGetLevel("psastro.dump") > 0) {
     97                    psastroDumpRawstars (rawstars, fpa, chip);
     98                }
     99
     100                if (psTraceGetLevel("psastro.plot") > 0) {
     101                    psastroPlotRawstars (rawstars, fpa, chip);
     102                }
    102103            }
    103104        }
     
    125126   sky (ra, dec)
    126127*/
    127 
    128 dump_stars (psArray *rawstars, pmFPA *fpa, pmChip *chip) {
    129 
    130   FILE *f1 = fopen ("rawstars.up.dat", "w");
    131   FILE *f2 = fopen ("rawstars.dn.dat", "w");
    132   for (int i = 0; i < rawstars->n; i++) {
    133     pmAstromObj *raw = rawstars->data[i];
    134 
    135     psPlaneTransformApply (raw->FP, chip->toFPA, raw->chip);
    136     psPlaneTransformApply (raw->TP, fpa->toTPA, raw->FP);
    137     psDeproject (raw->sky, raw->TP, fpa->toSky);
    138 
    139     fprintf (f1, "%d  %f %f  %f %f  %f %f  %f %f\n", i,
    140              raw->sky->r, raw->sky->d,
    141              raw->TP->x, raw->TP->y,
    142              raw->FP->x, raw->FP->y,
    143              raw->chip->x, raw->chip->y);
    144                
    145     psPlane *fp = psPlaneAlloc();
    146     psPlane *tp = psPlaneAlloc();
    147     psPlane *ch = psPlaneAlloc();
    148                        
    149     psProject (tp, raw->sky, fpa->toSky);
    150     psPlaneTransformApply (fp, fpa->fromTPA, tp);
    151     psPlaneTransformApply (ch, chip->fromFPA, fp);
    152                        
    153     fprintf (f2, "%d  %f %f  %f %f  %f %f  %f %f\n", i,
    154              raw->sky->r, raw->sky->d,
    155              tp->x, tp->y,
    156              fp->x, fp->y,
    157              ch->x, ch->y);
    158                
    159     psFree (fp);
    160     psFree (tp);
    161     psFree (ch);
    162   }
    163 
    164   fclose (f1);
    165   fclose (f2);
    166 }
Note: See TracChangeset for help on using the changeset viewer.