IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 18, 2010, 2:52:59 PM (16 years ago)
Author:
eugene
Message:

allow single chips without numeric ccd id

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/ReadImageHeader.c

    r26370 r27338  
    181181    // RULE: ccdnum is the value of the first string of digits in CCDNumKeyword
    182182    // For example: ccdnum(XY42.hdr) = 42, ccdnum(XY01.hdr) = 1
     183    // if no digits occur, then we assume there is only one ccd
    183184    char *p = ccdnum;
    184185    // get rid of any leading non-digit characters
    185186    while (*p && !isdigit(*p)) p++;
    186     if (*p == 0) {
    187       fprintf (stderr, "invalid ccdnum %s\n", ccdnum);
    188       return FALSE;
    189     }
    190     image[0].ccdnum = atoi(p);
     187    if (*p) {
     188      image[0].ccdnum = atoi(p);
     189    } else {
     190      image[0].ccdnum = 0;
     191    }
    191192  }
    192193
Note: See TracChangeset for help on using the changeset viewer.