IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 17, 2006, 9:31:44 PM (20 years ago)
Author:
magnier
Message:

working on new linear fit process

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmSource.c

    r10049 r10075  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-11-17 23:01:30 $
     8 *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-11-18 07:31:44 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3131static void sourceFree(pmSource *tmp)
    3232{
    33     psTrace(__func__, 5, "---- begin ----\n");
     33    psTrace("psModules.objects", 5, "---- begin ----\n");
    3434    psFree(tmp->peak);
    3535    psFree(tmp->pixels);
     
    4040    psFree(tmp->modelEXT);
    4141    psFree(tmp->blends);
    42     psTrace(__func__, 5, "---- end ----\n");
     42    psTrace("psModules.objects", 5, "---- end ----\n");
    4343}
    4444
     
    6565pmSource *pmSourceAlloc()
    6666{
    67     psTrace(__func__, 5, "---- begin ----\n");
     67    psTrace("psModules.objects", 5, "---- begin ----\n");
    6868    static int id = 1;
    6969    pmSource *source = (pmSource *) psAlloc(sizeof(pmSource));
     
    9090    source->pixWeight = NAN;
    9191
    92     psTrace(__func__, 5, "---- end ----\n");
     92    psTrace("psModules.objects", 5, "---- end ----\n");
    9393    return(source);
    9494}
     
    205205pmPSFClump pmSourcePSFClump(psArray *sources, psMetadata *recipe)
    206206{
    207     psTrace(__func__, 5, "---- begin ----\n");
     207    psTrace("psModules.objects", 5, "---- begin ----\n");
    208208
    209209    # define NPIX 10
     
    291291        stats = psImageStats (stats, splane, NULL, 0);
    292292        peaks = pmFindImagePeaks (splane, stats[0].max / 2);
    293         psTrace (__func__, 2, "clump threshold is %f\n", stats[0].max/2);
     293        psTrace ("psModules.objects", 2, "clump threshold is %f\n", stats[0].max/2);
    294294
    295295        const bool keep_psf_clump = psMetadataLookupBool(NULL, recipe, "KEEP_PSF_CLUMP");
     
    323323        psArraySort (peaks, pmPeaksCompareDescend);
    324324        clump = peaks->data[0];
    325         psTrace (__func__, 2, "clump is at %d, %d (%f)\n", clump->x, clump->y, clump->counts);
     325        psTrace ("psModules.objects", 2, "clump is at %d, %d (%f)\n", clump->x, clump->y, clump->counts);
    326326
    327327        // define section window for clump
     
    369369        psfClump.dY = stats->clippedStdev;
    370370
    371         psTrace (__func__, 2, "clump  X,  Y: %f, %f\n", psfClump.X, psfClump.Y);
    372         psTrace (__func__, 2, "clump DX, DY: %f, %f\n", psfClump.dX, psfClump.dY);
     371        psTrace ("psModules.objects", 2, "clump  X,  Y: %f, %f\n", psfClump.X, psfClump.Y);
     372        psTrace ("psModules.objects", 2, "clump DX, DY: %f, %f\n", psfClump.dX, psfClump.dY);
    373373        // these values should be pushed on the recipe somewhere
    374374
     
    379379    }
    380380
    381     psTrace(__func__, 5, "---- end ----\n");
     381    psTrace("psModules.objects", 5, "---- end ----\n");
    382382    return (psfClump);
    383383}
     
    391391bool pmSourceRoughClass(psArray *sources, psMetadata *recipe, pmPSFClump clump)
    392392{
    393     psTrace(__func__, 5, "---- begin ----");
     393    psTrace("psModules.objects", 5, "---- begin ----");
    394394
    395395    psBool rc = true;
     
    498498    psFree (starsn);
    499499
    500     psTrace (__func__, 2, "Nstar:    %3d\n", Nstar);
    501     psTrace (__func__, 2, "Npsf:     %3d\n", Npsf);
    502     psTrace (__func__, 2, "Next:     %3d\n", Next);
    503     psTrace (__func__, 2, "Nsatstar: %3d\n", Nsatstar);
    504     psTrace (__func__, 2, "Nsat:     %3d\n", Nsat);
    505     psTrace (__func__, 2, "Ncr:      %3d\n", Ncr);
    506 
    507     psTrace(__func__, 5, "---- end ----\n");
     500    psTrace ("psModules.objects", 2, "Nstar:    %3d\n", Nstar);
     501    psTrace ("psModules.objects", 2, "Npsf:     %3d\n", Npsf);
     502    psTrace ("psModules.objects", 2, "Next:     %3d\n", Next);
     503    psTrace ("psModules.objects", 2, "Nsatstar: %3d\n", Nsatstar);
     504    psTrace ("psModules.objects", 2, "Nsat:     %3d\n", Nsat);
     505    psTrace ("psModules.objects", 2, "Ncr:      %3d\n", Ncr);
     506
     507    psTrace("psModules.objects", 5, "---- end ----\n");
    508508    return(rc);
    509509}
     
    531531                     psF32 radius)
    532532{
    533     psTrace(__func__, 5, "---- begin ----\n");
     533    psTrace("psModules.objects", 5, "---- begin ----\n");
    534534    PS_ASSERT_PTR_NON_NULL(source, false);
    535535    PS_ASSERT_PTR_NON_NULL(source->peak, false);
     
    637637    // XXX EAM - the limit is a bit arbitrary.  make it user defined?
    638638    if ((numPixels < 0.75*R2) || (Sum <= 0)) {
    639         psTrace (__func__, 3, "no valid pixels for source\n");
    640         psTrace(__func__, 5, "---- end (false) ----\n");
     639        psTrace ("psModules.objects", 3, "no valid pixels for source\n");
     640        psTrace("psModules.objects", 5, "---- end (false) ----\n");
    641641        return (false);
    642642    }
    643643
    644     psTrace (__func__, 4, "sky: %f  Sum: %f  X1: %f  Y1: %f  X2: %f  Y2: %f  XY: %f  Npix: %d\n",
     644    psTrace ("psModules.objects", 4, "sky: %f  Sum: %f  X1: %f  Y1: %f  X2: %f  Y2: %f  XY: %f  Npix: %d\n",
    645645             sky, Sum, X1, Y1, X2, Y2, XY, numPixels);
    646646
     
    653653    y = Y1/Sum;
    654654    if ((fabs(x) > radius) || (fabs(y) > radius)) {
    655         psTrace (__func__, 3, "large centroid swing; invalid peak %d, %d\n",
     655        psTrace ("psModules.objects", 3, "large centroid swing; invalid peak %d, %d\n",
    656656                 source->peak->x, source->peak->y);
    657         psTrace(__func__, 5, "---- end(false)  ----\n");
     657        psTrace("psModules.objects", 5, "---- end(false)  ----\n");
    658658        return (false);
    659659    }
     
    673673    source->moments->Sy = sqrt(PS_MAX(Y2/Sum - PS_SQR(y), 0));
    674674
    675     psTrace (__func__, 4,
     675    psTrace ("psModules.objects", 4,
    676676             "sky: %f  Sum: %f  x: %f  y: %f  Sx: %f  Sy: %f  Sxy: %f\n",
    677677             sky, Sum, source->moments->x, source->moments->y,
    678678             source->moments->Sx, source->moments->Sy, source->moments->Sxy);
    679679
    680     psTrace(__func__, 5, "---- end ----\n");
     680    psTrace("psModules.objects", 5, "---- end ----\n");
    681681    return(true);
    682682}
Note: See TracChangeset for help on using the changeset viewer.