IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37646


Ignore:
Timestamp:
Nov 20, 2014, 6:31:06 AM (12 years ago)
Author:
eugene
Message:

clean up some verbosity; zero out rows as well as colums associated with masked fitted elements

Location:
branches/eam_branches/ipp-20140904/Ohana/src/relastro/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/FitChip.c

    r37622 r37646  
    334334  int i;
    335335  for (i = 0; i < Npts; i++) {
    336     fprintf (f, "%4d %10.6f %10.6f  %10.6f %10.6f  %9.2f %9.2f  %9.2f %9.2f\n",
    337              i, raw[i].R, raw[i].D, raw[i].P, raw[i].Q, raw[i].L, raw[i].M, raw[i].X, raw[i].Y);
     336    fprintf (f, "%4d %10.6f %10.6f  %10.6f %10.6f  %9.2f %9.2f  %9.2f %9.2f  %9.4f\n",
     337             i, raw[i].R, raw[i].D, raw[i].P, raw[i].Q, raw[i].L, raw[i].M, raw[i].X, raw[i].Y, raw[i].dPos);
    338338  }
    339339  fclose (f);
  • branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/ImageOps.c

    r37631 r37646  
    207207    if (VERBOSE2 || (MATCHCAT && (N_onImage[i] < 20))) {
    208208      name = GetPhotcodeNamebyCode (image[i].photcode);
    209       fprintf (stderr, "image "OFF_T_FMT" (%d, %s) has "OFF_T_FMT" of %d measures (%s, %s)",  i,  image[i].imageID, image[i].name, N_onImage[i], image[i].nstar,
     209      int showExample = (Nfew < 30);
     210      if (showExample) fprintf (stderr, "image "OFF_T_FMT" (%d, %s) has "OFF_T_FMT" of %d measures (%s, %s) ",  i,  image[i].imageID, image[i].name, N_onImage[i], image[i].nstar,
    210211               ohana_sec_to_date(image[i].tzero), name);
    211212      if (N_onImage[i] < 20) {
    212         fprintf (stderr, "*");
     213        if (showExample) fprintf (stderr, "*");
    213214        Nfew ++;
    214215      }
    215216      if (N_onImage[i] < 15) {
    216         fprintf (stderr, "*** warning ***");
     217        if (showExample) fprintf (stderr, "*** warning ***");
    217218        Nbad ++;
    218219      }
    219       fprintf (stderr, "\n");
     220      if (showExample) fprintf (stderr, "\n");
    220221    }
    221222  }
  • branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/fitpoly.c

    r37622 r37646  
    7878}
    7979 
     80int array_print (double **matrix, int Nx, int Ny) {
     81
     82  int i, j;
     83  for (i = 0; i < Nx; i++) {
     84    for (j = 0; j < Ny; j++) {
     85      fprintf (stderr, "%10.3e ", matrix[i][j]);
     86    }
     87    fprintf (stderr, "\n");
     88  }
     89  return TRUE;
     90}
     91
     92int fit_print (CoordFit *fit) {
     93
     94  fprintf (stderr, "Npts: %d, Norder: %d, Nterms: %d, Nsums: %d, Nelems: %d\n",
     95           fit[0].Npts, fit[0].Norder, fit[0].Nterms, fit[0].Nsums, fit[0].Nelems);
     96
     97  fprintf (stderr, "sums: \n");
     98  array_print (fit[0].sum, fit[0].Nsums, fit[0].Nsums);
     99
     100  fprintf (stderr, "xsums: \n");
     101  array_print (fit[0].xsum, fit[0].Nterms, fit[0].Nterms);
     102
     103  fprintf (stderr, "ysums: \n");
     104  array_print (fit[0].ysum, fit[0].Nterms, fit[0].Nterms);
     105
     106  fprintf (stderr, "xfits: \n");
     107  array_print (fit[0].xfit, fit[0].Nterms, fit[0].Nterms);
     108
     109  fprintf (stderr, "yfits: \n");
     110  array_print (fit[0].yfit, fit[0].Nterms, fit[0].Nterms);
     111 
     112  return TRUE;
     113}
     114
    80115// XXX use implicit masks as below or explicit masks (with function to set?)
    81116// XXX eg, add a global mask to this file and
     
    134169      for (j = 0; j < fit[0].Nelems; j++) {
    135170        matrix[i][j] = 0.0;
     171        matrix[j][i] = 0.0;
    136172      }
    137173      vector[i][0] = 0.0;
Note: See TracChangeset for help on using the changeset viewer.