IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28840


Ignore:
Timestamp:
Aug 4, 2010, 3:14:33 PM (16 years ago)
Author:
bills
Message:

measurements for new objects with NSTAR_GROUP > 1 were not getting assigned to objects correctly. Fix by using the unsorted lists as the sources. They are in the desired order.

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

Legend:

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

    r28241 r28840  
    247247    }
    248248
    249     N = N1[i];
    250     if (stars[N].found >= 0) continue;
    251     if (!IN_REGION (stars[N].average.R, stars[N].average.D)) continue;
    252 
    253     catalog[0].average[Nave].R             = stars[N].average.R;
    254     catalog[0].average[Nave].D             = stars[N].average.D;
     249    if (stars[i].found >= 0) continue;
     250    if (!IN_REGION (stars[i].average.R, stars[i].average.D)) continue;
     251
     252    catalog[0].average[Nave].R             = stars[i].average.R;
     253    catalog[0].average[Nave].D             = stars[i].average.D;
    255254    catalog[0].average[Nave].dR            = 0;
    256255    catalog[0].average[Nave].dD            = 0;
     
    303302    for (j = 0; j < NSTAR_GROUP; j++) {
    304303      // supply the measurments from this detection
    305       catalog[0].measure[Nmeas]           = stars[N].measure;
    306       N = N1[i + j];
     304      catalog[0].measure[Nmeas]           = stars[i + j].measure;
    307305
    308306      // the following measure elements cannot be set until here:
     
    322320      /* next[Nmeas] should always be -1 in this context (it is always the only
    323321         measurement for the star) */
    324       stars[N].found = Nmeas;
     322      stars[i].found = Nmeas;
    325323      next_meas[Nmeas] = -1;  // initial value here update below
    326324      Nmeas ++;
  • trunk/Ohana/src/addstar/src/find_matches_closest.c

    r28241 r28840  
    242242    }
    243243
    244     N = N1[i];
    245     if (stars[N].found >= 0) continue;
    246     if (!IN_REGION (stars[N].average.R, stars[N].average.D)) continue;
    247 
    248     catalog[0].average[Nave].R             = stars[N].average.R;
    249     catalog[0].average[Nave].D             = stars[N].average.D;
     244    if (stars[i].found >= 0) continue;
     245    if (!IN_REGION (stars[i].average.R, stars[i].average.D)) continue;
     246
     247    catalog[0].average[Nave].R             = stars[i].average.R;
     248    catalog[0].average[Nave].D             = stars[i].average.D;
    250249    catalog[0].average[Nave].dR            = 0;
    251250    catalog[0].average[Nave].dD            = 0;
     
    297296    for (j = 0; j < NSTAR_GROUP; j++) {
    298297        // supply the measurments from this detection
    299         catalog[0].measure[Nmeas]           = stars[N].measure;
    300         N = N1[i + j];
     298        catalog[0].measure[Nmeas]           = stars[i + j].measure;
    301299
    302300        // the following measure elements cannot be set until here:
     
    316314        /* next[Nmeas] should always be -1 in this context (it is always the only
    317315           measurement for the star) */
    318         stars[N].found = Nmeas;
     316        stars[i+j].found = Nmeas;
    319317        next_meas[Nmeas] = -1;  // inital value here update below
    320318        Nmeas ++;
Note: See TracChangeset for help on using the changeset viewer.