IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 22, 2009, 3:00:47 PM (16 years ago)
Author:
eugene
Message:

various updates from eam_branches/20091113

1) psf model order limits now consistent in poly and map modes
2) added subpix visualization
3) added model fit in MATCHED_REFS
4) handle input smf files with empty extensions (earlier failure)
5) function for generating unique reference matches

Location:
trunk/psModules/src/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects

    • Property svn:mergeinfo deleted
  • trunk/psModules/src/objects/pmPSFtryModel.c

    r25819 r26260  
    7272    }
    7373
    74     // XXX set the min number of needed source more carefully (depends on psfTrendMode?)
    75     int orderMax = PS_MAX (options->psfTrendNx, options->psfTrendNy);
    76     if ((sources->n < 15) && (orderMax >= 3)) orderMax = 2;
    77     if ((sources->n < 11) && (orderMax >= 2)) orderMax = 1;
    78     if ((sources->n <  8) && (orderMax >= 1)) orderMax = 0;
     74    // hard limit on minimum number of stars
    7975    if ((sources->n <  3)) {
    8076        psError (PS_ERR_UNKNOWN, true, "failed to determine PSF parameters");
     
    8278    }
    8379
    84     int orderMin;
     80    // this is a bit tricky, because we have two cases (MAP vs POLY), and they have a different
     81    // definition for 'order' (order_MAP = order_POLY + 1).  in addition, we have a
     82    // user-specified MAX order, which we should respect, regardless of the mode
     83
     84    // set the max order (0 = constant) which the number of psf stars can support:
     85    // rule of thumb: require 3 stars per 'cell' (order+1)^2
     86    int MaxOrderForStars = 0;
     87    if (sources->n >= 12) MaxOrderForStars = 1; // 4 cells
     88    if (sources->n >= 27) MaxOrderForStars = 2; // 9 cells
     89    if (sources->n >= 48) MaxOrderForStars = 3; // 16 cells
     90    if (sources->n >  75) MaxOrderForStars = 4; // 25 cells
     91
     92    int orderMax = PS_MAX (options->psfTrendNx, options->psfTrendNy);
     93    int orderMin = 0;
    8594    if (options->psfTrendMode == PM_TREND_MAP) {
    86         orderMin = 1;
    87         orderMax = PS_MAX(orderMax, 1);
    88     } else {
    89         orderMin = 0;
    90     }
     95        MaxOrderForStars ++;
     96        orderMin ++;
     97    }
     98    orderMax = PS_MIN (orderMax, MaxOrderForStars);
    9199
    92100    // save the raw source mask (generated by pmPSFtryFitEXT)
Note: See TracChangeset for help on using the changeset viewer.