IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13006


Ignore:
Timestamp:
Apr 24, 2007, 1:43:47 PM (19 years ago)
Author:
rhl
Message:

Renamed psphotSortBy* to psphotSourceSortBy*

Location:
trunk/psphot/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotBasicDeblend.c

    r12792 r13006  
    1919
    2020    // we need sources spatially-sorted to find overlaps
    21     sources = psArraySort (sources, psphotSortByY);
     21    sources = psArraySort (sources, pmSourceSortByY);
    2222
    2323    // source analysis is done in peak order (brightest first)
  • trunk/psphot/src/psphotBlendFit.c

    r12792 r13006  
    1313
    1414    // source analysis is done in S/N order (brightest first)
    15     sources = psArraySort (sources, psphotSortBySN);
     15    sources = psArraySort (sources, pmSourceSortBySN);
    1616   
    1717    // S/N limit to perform full non-linear fits
  • trunk/psphot/src/psphotDeblendSatstars.c

    r12792 r13006  
    1313
    1414    // we need sources spatially-sorted to find overlaps
    15     sources = psArraySort (sources, psphotSortByY);
     15    sources = psArraySort (sources, pmSourceSortByY);
    1616
    1717    // source analysis is done in peak order (brightest first)
  • trunk/psphot/src/psphotEnsemblePSF.c

    r12792 r13006  
    2424
    2525    // source analysis is done in spatial order
    26     refSources = psArraySort (refSources, psphotSortByY);
     26    refSources = psArraySort (refSources, pmSourceSortByY);
    2727
    2828    // storage arrays for fitSources and sequence index
  • trunk/psphot/src/psphotSortBySN.c

    r12792 r13006  
    11# include "psphotInternal.h"
    22
     3
    34// sort by SN (descending)
    4 int psphotSortBySN (const void **a, const void **b)
     5int pmPeakSortBySN (const void **a, const void **b)
     6{
     7    pmPeak *A = *(pmPeak **)a;
     8    pmPeak *B = *(pmPeak **)b;
     9
     10    psF32 fA = A->SN;
     11    psF32 fB = B->SN;
     12    if (isnan (fA)) fA = 0;
     13    if (isnan (fB)) fB = 0;
     14
     15    psF32 diff = fA - fB;
     16    if (diff > FLT_EPSILON) return (-1);
     17    if (diff < FLT_EPSILON) return (+1);
     18    return (0);
     19}
     20
     21// sort by Y (ascending)
     22int pmPeakSortByY (const void **a, const void **b)
     23{
     24    pmPeak *A = *(pmPeak **)a;
     25    pmPeak *B = *(pmPeak **)b;
     26
     27    psF32 fA = A->y;
     28    psF32 fB = B->y;
     29
     30    psF32 diff = fA - fB;
     31    if (diff > FLT_EPSILON) return (+1);
     32    if (diff < FLT_EPSILON) return (-1);
     33    return (0);
     34}
     35
     36// sort by SN (descending)
     37int pmSourceSortBySN (const void **a, const void **b)
    538{
    639    pmSource *A = *(pmSource **)a;
     
    1952
    2053// sort by Y (ascending)
    21 int psphotSortByY (const void **a, const void **b)
     54int pmSourceSortByY (const void **a, const void **b)
    2255{
    2356    pmSource *A = *(pmSource **)a;
  • trunk/psphot/src/psphotSourcePlots.c

    r12792 r13006  
    1414
    1515    // examine PSF sources in S/N order (brightest first)
    16     sources = psArraySort (sources, psphotSortBySN);
     16    sources = psArraySort (sources, pmSourceSortBySN);
    1717
    1818    // counters to track the size of the image and area used in a row
  • trunk/psphot/src/psphotTestPSF.c

    r12792 r13006  
    1717
    1818    // examine PSF sources in S/N order (brightest first)
    19     sources = psArraySort (sources, psphotSortBySN);
     19    sources = psArraySort (sources, pmSourceSortBySN);
    2020
    2121    // array to store candidate PSF stars
  • trunk/psphot/src/psphotWeightBias.c

    r12792 r13006  
    1515
    1616    // source analysis is done in S/N order (brightest first)
    17     sources = psArraySort (sources, psphotSortBySN);
     17    sources = psArraySort (sources, pmSourceSortBySN);
    1818
    1919    // set fitting method to use non-poisson errors (local sky error)
Note: See TracChangeset for help on using the changeset viewer.