IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37429


Ignore:
Timestamp:
Sep 23, 2014, 5:42:05 PM (12 years ago)
Author:
eugene
Message:

loadstarpar populates the db

Location:
branches/eam_branches/ipp-20140904/Ohana/src/addstar/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/addstar.c

    r37357 r37429  
    132132      }
    133133    }
    134     MARKTIME ("load cpt: %f sec\n", dtime); RESETTIME;
     134    if (VERBOSE) MARKTIME ("load cpt: %f sec\n", dtime); RESETTIME;
    135135
    136136    // Naves_disk == 0 implies an empty catalog file
     
    163163        break;
    164164    }
    165     MARKTIME ("match stars: %f sec\n", dtime); RESETTIME;
     165    if (VERBOSE) MARKTIME ("match stars: %f sec\n", dtime); RESETTIME;
    166166
    167167    /* report total updated values */
     
    183183    dvo_catalog_unlock (&catalog);
    184184    dvo_catalog_free (&catalog);
    185     MARKTIME ("save cpt: %f sec\n", dtime); RESETTIME;
     185    if (VERBOSE) MARKTIME ("save cpt: %f sec\n", dtime); RESETTIME;
    186186
    187187    if (options.mode == ADDSTAR_MODE_REFCAT) free (stars);
  • branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/args_loadstarpar.c

    r37422 r37429  
    9797
    9898  if (argc < 2) {
    99     fprintf (stderr, "USAGE: loadstarpar [options] (wisefile) [..more files]\n");
     99    fprintf (stderr, "USAGE: loadstarpar [options] (fitsfile) [..more files]\n");
    100100    exit (2);
    101101  }
  • branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/find_matches_starpar.c

    r37422 r37429  
    2222  ALLOCATE (Y2, double, NAVE);
    2323  ALLOCATE (N2, off_t,  NAVE);
    24 
    25   ALLOCATE (catalog[0].found_t, off_t, NAVE);
    2624
    2725  /* internal counters */
     
    5755    RD_to_XY (&X2[i], &Y2[i], catalog[0].average[i].R, catalog[0].average[i].D, &tcoords);
    5856    N2[i] = i;
    59     catalog[0].found_t[N2[i]] = -1;
    6057  }
    6158  sort_coords_index (X2, Y2, N2, Nave);
     
    8885    }
    8986
    90     if (stars[N1[i]].found != -1) {
     87    if (stars[N1[i]].found) {
    9188      /* this star has already been assigned to an object in this or another catalog */
    9289      i++;
     
    144141    // XXX if I add R,D to starpar, I should rationalize R,D to the same boundary?
    145142
    146     stars[N].found = Nstarpar;
    147     catalog[0].found_t[n] = Nstarpar;
     143    stars[N].found = TRUE;
    148144    catalog[0].average[n].Nstarpar ++;
    149145    Nstarpar ++;
     
    156152
    157153    // skip already matched stars
    158     if (stars[i].found != -1) continue;
     154    if (stars[i].found) continue;
    159155    if (!IN_REGION (stars[i].R, stars[i].D)) continue;
    160156
     
    194190    catalog[0].starpar[Nstarpar].catID  = catID;
    195191
    196     stars[i].found = Nstarpar;
     192    stars[i].found = TRUE;
    197193    Nstarpar ++;
    198194    Nave ++;
     
    204200 
    205201  catalog[0].sorted = FALSE;
    206 
    207   /* note stars which have been found in this catalog */
    208   for (i = 0; i < Nstars; i++) {
    209     if (stars[i].found > -1) {
    210       stars[i].found = -2;
    211     }
    212   }
    213202
    214203  /* check if the catalog has changed?  if no change, no need to write */
  • branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/loadstarpar_readstars.c

    r37422 r37429  
    4949  GET_COLUMN (glat,    "l",    float);
    5050  GET_COLUMN (glon,    "b",    float);
    51   GET_COLUMN (conv,    "conv", char);
     51  GET_COLUMN (conv,    "conv", byte);
    5252  GET_COLUMN (lnZ,     "lnZ",  float);
    5353  GET_COLUMN (DistMag, "DM",   float);
     
    113113    float dEbv     = 0.5*(errImage[i*20 + 5*0 + 3] - errImage[i*20 + 5*0 + 1]);
    114114    float dDistMag = 0.5*(errImage[i*20 + 5*1 + 3] - errImage[i*20 + 5*1 + 1]);
    115     float dFeH     = 0.5*(errImage[i*20 + 5*2 + 3] - errImage[i*20 + 5*2 + 1]);
    116     float dM_r     = 0.5*(errImage[i*20 + 5*3 + 3] - errImage[i*20 + 5*3 + 1]);
     115    float dM_r     = 0.5*(errImage[i*20 + 5*2 + 3] - errImage[i*20 + 5*2 + 1]);
     116    float dFeH     = 0.5*(errImage[i*20 + 5*3 + 3] - errImage[i*20 + 5*3 + 1]);
    117117
    118118    stars[Nstars].R = R;
Note: See TracChangeset for help on using the changeset viewer.