IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34078


Ignore:
Timestamp:
Jun 26, 2012, 10:54:57 AM (14 years ago)
Author:
eugene
Message:

handle pedantic build warnings

Location:
branches/eam_branches/ipp-20120601
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120601/Ohana/src/imregister/imreg/imregclient.c

    r33985 r34078  
    3535      exit (1);
    3636    }
    37     fscanf (f, "%d %f %f", &tmpint, &image[0].sky, &image[0].fwhm);
     37    if (fscanf (f, "%d %f %f", &tmpint, &image[0].sky, &image[0].fwhm) != 3) {
     38      fprintf (stderr, "error reading stats\n");
     39    }
    3840    image[0].ccd = tmpint;
    3941    fclose (f);
     
    5153    for (i = 0; i < Nentry; i++) {
    5254      image[i] = image[0];
    53       fscanf (f, "%d %f %f", &tmpint, &image[i].sky, &image[i].fwhm);
     55      if (fscanf (f, "%d %f %f", &tmpint, &image[i].sky, &image[i].fwhm) != 3) {
     56        fprintf (stderr, "error reading stats\n");
     57      }
    5458      image[i].seq = tmpint;
    5559      if (image[i].seq == Nslice) continue;
  • branches/eam_branches/ipp-20120601/Ohana/src/imregister/spreg/modify.c

    r27435 r34078  
    2424      if (!strncmp (spectrum[i].pathname, output.oldpath, Nold)) {
    2525        strcpy (tmppath, &spectrum[i].pathname[Nold]);
    26         snprintf (spectrum[i].pathname, 128, "%s%s", output.newpath, tmppath);
     26        snprintf (spectrum[i].pathname, 64, "%s%s", output.newpath, tmppath);
    2727      }
    2828    }
  • branches/eam_branches/ipp-20120601/Ohana/src/libautocode/def/common.h

    r34077 r34078  
    3232# define rawshort short
    3333
    34 # define DVO_IMAGE_NAME_LEN 128
     34# define DVO_IMAGE_NAME_LEN 121
    3535
    3636/*** rawshort is used to handle the broken pre-autocode photreg tables
  • branches/eam_branches/ipp-20120601/Ohana/src/libohana/src/time.c

    r33982 r34078  
    9090
    9191  char *p1, *p2;
    92   // double tmp;
     92  double tmp;
    9393  int mode;
    9494
    9595  p1 = line;
    96   strtod (p1, &p2);
     96  tmp = strtod (p1, &p2);
     97  if (0) { fprintf (stderr, "tmp: %f\n", tmp); }
    9798  mode = TIME_DATE;
    9899  if (p2 == p1 + strlen (p1) - 1) {
  • branches/eam_branches/ipp-20120601/psLib/src/math/psMinimizePowell.c

    r28998 r34078  
    367367    psF32 c = 0.0;
    368368    psF32 n = 0.0;
    369     psF32 fa = 0.0;
    370     psF32 fb = 0.0;
    371     psF32 fc = 0.0;
    372369    psF32 fn = 0.0;
    373370    psF32 mul = 0.0;
     
    415412        PS_VECTOR_ADD_MULTIPLE(params, paramMask, line, tmpb, b);
    416413        PS_VECTOR_ADD_MULTIPLE(params, paramMask, line, tmpc, c);
    417         fa = func(tmpa, coords);
    418         fb = func(tmpb, coords);
    419         fc = func(tmpc, coords);
     414        psF32 fb = func(tmpb, coords);
     415# if (PS_TRACE_ON)
     416        psF32 fa = func(tmpa, coords);
     417        psF32 fc = func(tmpc, coords);
    420418        psTrace("psLib.math", 6, "LineMin: f(%f %f %f) is (%f %f %f)\n", a, b, c, fa, fb, fc);
     419# endif
    421420
    422421        // We determine which is the biggest segment in [a,b,c] then split
  • branches/eam_branches/ipp-20120601/psModules/src/objects/pmPSFtryMakePSF.c

    r30044 r34078  
    231231        // XXX we are using the same stats structure on each pass: do we need to re-init it?
    232232        // XXX we hardwire this to SAMPLE stats above (psphotChoosePSF.c), hardwire here instead?
    233         psStatsOptions meanOption = psStatsMeanOption(psf->psfTrendStats->options);
    234         psStatsOptions stdevOption = psStatsStdevOption(psf->psfTrendStats->options);
    235 
     233     
    236234        pmTrend2D *trend = NULL;
    237         float mean, stdev;
    238235
    239236        // XXX we are using the same stats structure on each pass: do we need to re-init it?
     
    249246            return true;
    250247        }
     248
     249# if (PS_TRACE_ON)
     250        float mean, stdev;
     251        psStatsOptions meanOption = psStatsMeanOption(psf->psfTrendStats->options);
     252        psStatsOptions stdevOption = psStatsStdevOption(psf->psfTrendStats->options);
    251253        mean = psStatsGetValue (trend->stats, meanOption);
    252254        stdev = psStatsGetValue (trend->stats, stdevOption);
    253255        psTrace ("psModules.objects", 4, "clipped E0 : %f +/- %f keeping %ld of %ld\n", mean, stdev, psf->psfTrendStats->clippedNvalues, e0->n);
     256# endif
     257
    254258        if (psf->psfTrendMode == PM_TREND_MAP) psImageMapCleanup (trend->map);
    255259        pmSourceVisualPSFModelResid (trend, x, y, e0, srcMask);
     
    264268            return true;
    265269        }
     270# if (PS_TRACE_ON)
    266271        mean = psStatsGetValue (trend->stats, meanOption);
    267272        stdev = psStatsGetValue (trend->stats, stdevOption);
    268273        psTrace ("psModules.objects", 4, "clipped E1 : %f +/- %f keeping %ld of %ld\n", mean, stdev, psf->psfTrendStats->clippedNvalues, e1->n);
     274# endif
    269275        if (psf->psfTrendMode == PM_TREND_MAP) psImageMapCleanup (trend->map);
    270276        pmSourceVisualPSFModelResid (trend, x, y, e1, srcMask);
     
    279285            return true;
    280286        }
     287# if (PS_TRACE_ON)
    281288        mean = psStatsGetValue (trend->stats, meanOption);
    282289        stdev = psStatsGetValue (trend->stats, stdevOption);
    283290        psTrace ("psModules.objects", 4, "clipped E2 : %f +/- %f keeping %ld of %ld\n", mean, stdev, psf->psfTrendStats->clippedNvalues, e2->n);
     291# endif
    284292        if (psf->psfTrendMode == PM_TREND_MAP) psImageMapCleanup (trend->map);
    285293        pmSourceVisualPSFModelResid (trend, x, y, e2, srcMask);
  • branches/eam_branches/ipp-20120601/psphot/src/psphotSourceFits.c

    r32744 r34078  
    224224    if (source->type == PM_SOURCE_TYPE_DEFECT) return false;
    225225    if (source->type == PM_SOURCE_TYPE_SATURATED) return false;
    226 
    227 # define TEST_X -420.0
    228 # define TEST_Y 300.0
    229    
    230     if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) {
    231         fprintf (stderr, "test galaxy\n");
    232     }
    233 
    234 # undef TEST_X
    235 # undef TEST_Y
    236226
    237227    // set the radius based on the footprint (also sets the mask pixels)
     
    513503    }
    514504
    515 # define TEST_X -540.0
    516 # define TEST_Y 540.0
    517    
    518     if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) {
    519         psTraceSetLevel("psModules.objects.pmPCM_MinimizeChisq", 5);
    520     }
    521 
    522505    float t1, t2, t4, t5;
    523506    if (TIMING) { psTimerStart ("psphotFitPCM"); }
     
    569552    }
    570553
    571     if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) {
    572         psTraceSetLevel("psModules.objects.pmPCM_MinimizeChisq", 0);
    573     }
    574 
    575554    // psTraceSetLevel("psLib.math.psMinimizeLMChi2", 0);
    576555    psFree (pcm);
     
    578557    return model;
    579558}
    580 
    581 # undef TEST_X
    582 # undef TEST_Y
    583559
    584560// note that these should be 1/2n of the standard sersic index
     
    603579    float xMin = NAN;
    604580    float chiSquare[N_INDEX_GUESS];
    605 
    606 # define TEST_X -540.0
    607 # define TEST_Y 540.0
    608    
    609     if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) {
    610         psTraceSetLevel("psModules.objects.pmPCM_MinimizeChisq", 5);
    611     }
    612581
    613582    for (int i = 0; i < N_INDEX_GUESS; i++) {
     
    635604    assert (iMin >= 0);
    636605
    637     if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) {
    638         psTraceSetLevel("psModules.objects.pmPCM_MinimizeChisq", 0);
    639     }
    640 
    641606    model->flags = PM_MODEL_STATUS_NONE; // do not attempt to handle failures here, let the next iteration deal with it
    642607    model->params->data.F32[PM_PAR_7] = 0.5/indexGuess[iMin];
     
    666631    float xMin = NAN;
    667632    float chiSquare[N_INDEX_GUESS];
    668 
    669     if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) {
    670         psTraceSetLevel("psModules.objects.pmPCM_MinimizeChisq", 5);
    671     }
    672633
    673634    for (int i = 0; i < N_INDEX_GUESS; i++) {
     
    701662    }
    702663    assert (iMin >= 0);
    703    
    704     if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) {
    705         psTraceSetLevel("psModules.objects.pmPCM_MinimizeChisq", 0);
    706     }
    707664
    708665    model->flags = PM_MODEL_STATUS_NONE; // do not attempt to handle failures here, let the next iteration deal with it
Note: See TracChangeset for help on using the changeset viewer.