IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15199


Ignore:
Timestamp:
Oct 3, 2007, 4:31:48 PM (19 years ago)
Author:
eugene
Message:

added a new dump function

File:
1 edited

Legend:

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

    r12806 r15199  
    6868    fclose (f1);
    6969    fclose (f2);
     70    return true;
     71}
     72
     73bool psastroDumpMatchedStars (char *filename, psArray *rawstars, psArray *refstars, psArray *match) {
     74   
     75    FILE *f = fopen (filename, "w");
     76
     77    for (int i = 0; i < match->n; i++) {
     78        pmAstromMatch *pair = match->data[i];
     79        pmAstromObj *raw = rawstars->data[pair->raw];
     80        pmAstromObj *ref = refstars->data[pair->ref];
     81
     82        fprintf (f, "%f %f  %f %f  %f %f  %f %f  %f   |   ", 
     83                 DEG_RAD*raw->sky->r, DEG_RAD*raw->sky->d,
     84                 raw->TP->x, raw->TP->y,
     85                 raw->FP->x, raw->FP->y,
     86                 raw->chip->x, raw->chip->y, raw->Mag);
     87
     88        fprintf (f, "%f %f  %f %f  %f %f  %f %f  %f\n",
     89                 DEG_RAD*ref->sky->r, DEG_RAD*ref->sky->d,
     90                 ref->TP->x, ref->TP->y,
     91                 ref->FP->x, ref->FP->y,
     92                 ref->chip->x, ref->chip->y, ref->Mag);
     93    }
     94    fclose (f);
     95
    7096    return true;
    7197}
Note: See TracChangeset for help on using the changeset viewer.