IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39282 for trunk


Ignore:
Timestamp:
Dec 17, 2015, 8:47:03 AM (11 years ago)
Author:
eugene
Message:

handle case of no data in the galaxy table

Location:
trunk/Ohana/src/addstar/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/src/loadgalphot_readstars.c

    r39271 r39282  
    7878    int found = FALSE;
    7979    int myHash = strhash (tmpname, 0xff);
    80     fprintf (stderr, "model %s, hash: %d\n", tmpname, myHash);
     80    if (VERBOSE == 2) fprintf (stderr, "model %s, hash: %d\n", tmpname, myHash);
    8181    ModelTypeHash[i] = myHash;
    8282    for (j = 0; (j < 3) && !found; j++) {
     
    146146
    147147  ftable_xgal.header = &header_xgal;
     148  if (header_xgal.Naxis[1] == 0) {
     149    if (VERBOSE) fprintf (stderr, "no data in file %s, skipping\n", filename);
     150    gfits_free_header (&header_xgal);
     151    gfits_free_header (&PHU);
     152    fclose (f);
     153    return NULL;
     154  }
    148155
    149156  if (!gfits_fread_ftable_data (f, &ftable_xgal, FALSE)) {
  • trunk/Ohana/src/addstar/src/loadgalphot_table.c

    r38600 r39282  
    77
    88  GalPhot_Stars *stars = loadgalphot_readstars (filename, &Nstars, options);
     9  if (!stars) return FALSE;
    910
    1011  // sort the stars by RA
Note: See TracChangeset for help on using the changeset viewer.