IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 31, 2012, 4:02:00 PM (14 years ago)
Author:
eugene
Message:

add PS1_V4 schema; add set mean fluxes based on stacks; define the primary image ID (based on distance from center or boundary tree) and set mean flux from stacks based on that info; fix (uniquify) psps ID for stack detections; mean fluxes are in Jy; detection fluxes are instrumental counts per second

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/lib.shell/check_stack.c

    r20936 r34260  
    11# include "opihi.h"
     2# ifndef MAX_INT
     3# define MAX_INT 2147483647
     4# endif
    25
    36int check_stack (StackVar *stack, int Nstack, int validsize) {
     
    1215
    1316      /** if this is a number, put it on the list of scalars and move on.  assume value is
    14        * an int unless proven otherwise **/
     17       * an int unless proven otherwise.
     18
     19       If we have built libdvo with opihi_int defined as a 32bit signed int, then we have
     20       an overflow for values > MAX_INT (2^31).  If the float value is larger than this,
     21       we should treat the value as a float.  (NOTE: this means we cannot use 32bit flags,
     22       only 31bit flags.
     23
     24      **/
     25
    1526      stack[i].FltValue = strtod (stack[i].name, &c1);
    1627      stack[i].IntValue = strtol (stack[i].name, &c2, 0);
     28      if ((fabs(stack[i].FltValue) > MAX_INT) && (c1 == stack[i].name + strlen (stack[i].name))) {
     29        stack[i].type  = 'S'; // 'S' == (float)
     30        continue;
     31      }
    1732      if (c2 == stack[i].name + strlen (stack[i].name)) {
    1833        stack[i].type  = 's'; // 's' == (int)
Note: See TracChangeset for help on using the changeset viewer.