IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24806


Ignore:
Timestamp:
Jul 15, 2009, 2:35:49 PM (17 years ago)
Author:
eugene
Message:

test code to track down refstar precision errors; if we re-calculate astrometry, drop existing MATCHED_REFS table (now invalid)

File:
1 edited

Legend:

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

    r24646 r24806  
    4949    pmFPAview *view = pmFPAviewAlloc (0);
    5050    pmFPA *fpa = input->fpa;
     51
     52    // XXX kind of a hack -- think this through a bit more clearly:
     53    if (psMetadataLookupPtr (&status, fpa->analysis, "MATCHED_REFS")) {
     54        // we loaded a set of matched references from an earlier astrometry
     55        // analysis.  however, we are re-doing the astrometry here, so remove
     56        // that prior set of matched references
     57        psMetadataRemoveKey (fpa->analysis, "MATCHED_REFS");
     58    }
    5159
    5260    // sort by mag
     
    114122                psTrace ("psastro", 4, "Added %ld refstars\n", refstars->n);
    115123
     124# if (0)
     125                // XXX test
     126                FILE *outfile = fopen ("refstars.dat", "w");
     127                assert (outfile);
     128                for (int nn = 0; nn < refstars->n; nn++) {
     129                          pmAstromObj *ref = refstars->data[nn];
     130                          fprintf (outfile, "%lf %lf\n", ref->sky->r*PS_DEG_RAD, ref->sky->d*PS_DEG_RAD);
     131                }
     132                fclose (outfile);
     133# endif
     134
    116135                psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSASTRO.REFSTARS", PS_DATA_ARRAY, "astrometry matches", refstars);
    117136                psFree (refstars);
Note: See TracChangeset for help on using the changeset viewer.