IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 26, 2006, 10:46:32 AM (20 years ago)
Author:
eugene
Message:

adding proper motion and parallax to addstar, dropping _PS from RA and DEC in average

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/gstar.c

    r6642 r6683  
    7272  catalog.filename = skylist[0].filename[0];
    7373  switch (lock_catalog (&catalog, LCK_SOFT)) {
    74   case 2:
    75     unlock_catalog (&catalog);
    76   case 0:
    77     return (FALSE);
     74    case 2:
     75      unlock_catalog (&catalog);
     76    case 0:
     77      return (FALSE);
    7878  }
    7979  catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
     
    9292  /* stars are not guaranteed to be sorted in RA or in DEC, so first sort the list */
    9393  for (i = 0; i < Nstars; i++) {
    94     RA[i] = catalog.average[i].R_PS;
    95     DEC[i] = catalog.average[i].D_PS;
     94    RA[i] = catalog.average[i].R;
     95    DEC[i] = catalog.average[i].D;
    9696    N1[i] = i;
    9797  }
     
    138138      k = N1[i];
    139139      if (!QUIET) {
    140           fprintf (GetOutfile(), "star: %d\n", k);
    141           fprintf (GetOutfile(), "%9.5f %9.5f %3d of %3d  %4.1f %5d\n", catalog.average[k].R_PS, catalog.average[k].D_PS,
    142                    catalog.average[k].Nm, catalog.average[k].Nn + catalog.average[k].Nm,
    143                    0.01*catalog.average[k].Xp, catalog.average[k].code);
     140        fprintf (GetOutfile(), "star: %d\n", k);
     141        fprintf (GetOutfile(), "%9.5f %9.5f %3d of %3d  %4.1f %5d\n", catalog.average[k].R, catalog.average[k].D,
     142                 catalog.average[k].Nm, catalog.average[k].Nn + catalog.average[k].Nm,
     143                 0.01*catalog.average[k].Xp, catalog.average[k].code);
    144144     
    145           /* filter names -- primary code is 0 in this function */
    146           for (j = 0; j < Nsec + 1; j++) {
    147               code = GetPhotcodebyNsec (j);
    148               fprintf (GetOutfile (), "%s ", code[0].name);
    149           }
    150           fprintf (GetOutfile (), "\n");
    151 
    152           /* average mags */
    153           print_value (GetOutfile(), catalog.average[k].M_PS, catalog.average[k].M_PS);
    154           for (j = 0; j < Nsec; j++) print_value (GetOutfile(), catalog.secfilt[j + Nsec*k].M_PS, catalog.secfilt[j + Nsec*k].M_PS);
    155           fprintf (GetOutfile(), "\n");
    156 
    157           /* average mag errors */
    158           print_value (GetOutfile(), catalog.average[k].dM_PS, catalog.average[k].dM_PS);
    159           for (j = 0; j < Nsec; j++) print_value (GetOutfile(), catalog.secfilt[j + Nsec*k].dM_PS, catalog.secfilt[j + Nsec*k].dM_PS);
    160           fprintf (GetOutfile(), "\n");
    161 
    162           /* average mag chisq */
    163           print_value (GetOutfile(), pow (10.0, 0.01*catalog.average[k].Xm), catalog.average[k].Xm);
    164           for (j = 0; j < Nsec; j++) print_value (GetOutfile(), pow (10.0, 0.01*catalog.secfilt[j + Nsec*k].Xm), catalog.secfilt[j + Nsec*k].Xm);
    165           fprintf (GetOutfile(), "\n");
     145        /* filter names -- primary code is 0 in this function */
     146        for (j = 0; j < Nsec + 1; j++) {
     147          code = GetPhotcodebyNsec (j);
     148          fprintf (GetOutfile (), "%s ", code[0].name);
     149        }
     150        fprintf (GetOutfile (), "\n");
     151
     152        /* average mags */
     153        print_value (GetOutfile(), catalog.average[k].M, catalog.average[k].M);
     154        for (j = 0; j < Nsec; j++) print_value (GetOutfile(), catalog.secfilt[j + Nsec*k].M_PS, catalog.secfilt[j + Nsec*k].M_PS);
     155        fprintf (GetOutfile(), "\n");
     156
     157        /* average mag errors */
     158        print_value (GetOutfile(), catalog.average[k].dM, catalog.average[k].dM);
     159        for (j = 0; j < Nsec; j++) print_value (GetOutfile(), catalog.secfilt[j + Nsec*k].dM_PS, catalog.secfilt[j + Nsec*k].dM_PS);
     160        fprintf (GetOutfile(), "\n");
     161
     162        /* average mag chisq */
     163        print_value (GetOutfile(), pow (10.0, 0.01*catalog.average[k].Xm), catalog.average[k].Xm);
     164        for (j = 0; j < Nsec; j++) print_value (GetOutfile(), pow (10.0, 0.01*catalog.secfilt[j + Nsec*k].Xm), catalog.secfilt[j + Nsec*k].Xm);
     165        fprintf (GetOutfile(), "\n");
    166166      }
    167167
Note: See TracChangeset for help on using the changeset viewer.