IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37308


Ignore:
Timestamp:
Aug 25, 2014, 10:48:52 AM (12 years ago)
Author:
eugene
Message:

fix isfinite definition, do not floop ipptopsps with fprintf statements

Location:
branches/eam_branches/ipp-20140813/Ohana
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140813/Ohana

  • branches/eam_branches/ipp-20140813/Ohana/src/dvopsps/src/insert_detections_dvopsps.c

    r37246 r37308  
    9595    dvo_catalog_unlock (&catalog);
    9696    dvo_catalog_free (&catalog);
     97
     98    if (!status) {
     99      fprintf (stderr, "failure to insert data in mysql\n");
     100      exit (2);
     101    }
    97102  }
    98103
  • branches/eam_branches/ipp-20140813/Ohana/src/dvopsps/src/insert_detections_dvopsps_catalog.c

    r37246 r37308  
    210210  // XXX check return status
    211211  if (mysql) {
    212     if (DEBUG) fprintf (stderr, "%s\n", buffer->buffer);
    213212    int mysqlStatus = mysql_query(mysql, buffer->buffer);
    214213    if (mysqlStatus) {
     
    216215      fprintf (stderr, "%s\n", mysql_error(mysql));
    217216      fprintf (stderr, "Nbuffer: %d\n", buffer->Nbuffer);
     217      if (DEBUG) fprintf (stderr, "%s\n", buffer->buffer);
    218218      status = FALSE;
    219219    }
     
    232232
    233233int insert_detections_mysql_detvalue (IOBuffer *buffer, Detections *detection) {
     234
     235  if (detection->detectID == 164458937060000101) {
     236    fprintf (stderr, "isfinite: %d\n", isfinite(detection->dMpsf));
     237    fprintf (stderr, "isnan: %d\n", isnan(detection->dMpsf));
     238    fprintf (stderr, "isinf: %d\n", isinf(detection->dMpsf));
     239  }
    234240
    235241  PrintIOBuffer (buffer, "(%lu, ", detection->objID);       // objID
     
    268274
    269275  if (isfinite(flux) && (flux > 0.0)) {
    270     fprintf (stderr, "how did we get here?\n");
     276    // fprintf (stderr, "funny flux: %f with mag %f\n", flux, mag);
    271277    return (zp - 2.5*log10(flux));
    272278  }
  • branches/eam_branches/ipp-20140813/Ohana/src/getstar

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20140813/Ohana/src/libohana/include/ohana.h

    r37033 r37308  
    192192
    193193# ifndef isfinite
    194 # define isfinite(A) (!isnan(A))
     194# define isfinite(A) (!isnan(A) && !isinf(A))
    195195# endif
    196196
Note: See TracChangeset for help on using the changeset viewer.