IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 20, 2010, 12:05:07 PM (16 years ago)
Author:
eugene
Message:

optimizations for dvomerge and relastro; complete checks of db I/O success; fix overloaded image flags

Location:
trunk/Ohana
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana

    • Property svn:mergeinfo deleted
  • trunk/Ohana/src/addstar/src/FilterStars.c

    r28965 r29001  
    11# include "addstar.h"
    2 #include "pslib/psMetadata.h"
    3 #include "psmodules/pmSourceMasks.h"
    42# define EXTERNAL_ID TRUE
    53
  • trunk/Ohana/src/addstar/src/LoadData.c

    r28966 r29001  
    8080         
    8181    inStars = ReadStarsFITS (f, headers[Nhead], headers[Ndata], &images[0][Nvalid].nstar);
     82    if (!inStars) {
     83      // XXX need to free the data here or in ReadStarsFITS on error
     84      continue;
     85    }
    8286    inStars = FilterStars (inStars, &images[0][Nvalid], Nvalid, options);
    8387    *stars = MergeStars (*stars, Nstars, inStars, images[0][Nvalid].nstar);
  • trunk/Ohana/src/addstar/src/ReadStarsFITS.c

    r27435 r29001  
    4949  if (stars == NULL) {
    5050    fprintf (stderr, "ERROR: invalid table type %s\n", type);
    51     exit (1);
     51    return (NULL);
    5252  }
    5353  // Nstars is not necessarily == *nstars (The former is the number of detections, the
     
    6969  swapped = FALSE;
    7070  smpdata = gfits_table_get_SMPData (table, &Nstars, &swapped);
     71  if (!smpdata) {
     72    fprintf (stderr, "skipping inconsistent entry\n");
     73    return (NULL);
     74  }
    7175  ZeroPt = GetZeroPoint();
    7276
     
    108112
    109113  ps1data = gfits_table_get_PS1_DEV_0 (table, &Nstars, NULL);
     114  if (!ps1data) {
     115    fprintf (stderr, "skipping inconsistent entry\n");
     116    return (NULL);
     117  }
    110118  ZeroPt = GetZeroPoint();
    111119
     
    153161
    154162  ps1data = gfits_table_get_PS1_DEV_1 (table, &Nstars, NULL);
     163  if (!ps1data) {
     164    fprintf (stderr, "skipping inconsistent entry\n");
     165    return (NULL);
     166  }
    155167  ZeroPt = GetZeroPoint();
    156168
     
    212224
    213225  ps1data = gfits_table_get_CMF_PS1_V1 (table, &Nstars, NULL);
     226  if (!ps1data) {
     227    fprintf (stderr, "skipping inconsistent entry\n");
     228    return (NULL);
     229  }
    214230  ZeroPt = GetZeroPoint();
    215231
     
    284300
    285301  ps1data = gfits_table_get_CMF_PS1_V1_Alt (table, &Nstars, NULL);
     302  if (!ps1data) {
     303    fprintf (stderr, "skipping inconsistent entry\n");
     304    return (NULL);
     305  }
    286306  ZeroPt = GetZeroPoint();
    287307
     
    348368
    349369  ps1data = gfits_table_get_CMF_PS1_V2 (table, &Nstars, NULL);
     370  if (!ps1data) {
     371    fprintf (stderr, "skipping inconsistent entry\n");
     372    return (NULL);
     373  }
    350374  ZeroPt = GetZeroPoint();
    351375
  • trunk/Ohana/src/addstar/src/find_matches_refstars.c

    r28241 r29001  
    218218    }
    219219
    220     N = N1[i];
     220    N = i;
    221221    if (stars[N][0].found > -1) continue;
    222222    if (!IN_REGION (stars[N][0].average.R, stars[N][0].average.D)) continue;
     
    286286
    287287    for (j = 0; j < NREFSTAR_GROUP; j++) {
    288       N = N1[i + j];
     288      N = i + j;
    289289
    290290      catalog[0].measure[Nmeas]          = stars[N][0].measure;
  • trunk/Ohana/src/addstar/test/dvomerge.dvo

    r28368 r29001  
    9595    subset T = t if (id == imageID[$i])
    9696    set dT = T - time[$i]
    97     vstat -q dT
     97    vstat dT
    9898    tapOK {abs($MEAN)  < 0.00001} "time for measure ID $i (MEAN)"
    9999    tapOK {abs($SIGMA) < 0.00001} "time for measure ID $i (SIGMA)"
Note: See TracChangeset for help on using the changeset viewer.