IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37005


Ignore:
Timestamp:
Jul 13, 2014, 11:01:58 AM (12 years ago)
Author:
eugene
Message:

read DETEFF.MAGREF for detection limit; move free for catalog.found and similar in dvo_catalog_free; rename catalog.found to catalog.found_t to ensure we catch all instances

Location:
branches/eam_branches/ipp-20140610/Ohana/src/addstar/src
Files:
5 edited

Legend:

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

    r36833 r37005  
    4545  image[0].NY = Ny;
    4646
    47   image[0].refColor = NAN;
     47  image[0].refColorBlue = NAN;
     48  image[0].refColorRed = NAN;
    4849
    4950  if (!gfits_scan (header, "TZERO",   "%d",  1, &image[0].tzero) && !ACCEPT_TIME) {
     
    135136
    136137  tmp = 0;
    137   gfits_scan (header, "FLIMIT",   "%lf", 1, &tmp);
     138  // gfits_scan (header, "FLIMIT",   "%lf", 1, &tmp);
     139  gfits_scan (header, "DETEFF.MAGREF", "%lf", 1, &tmp);
    138140  image[0].detection_limit = tmp * 10.0;
    139141
  • branches/eam_branches/ipp-20140610/Ohana/src/addstar/src/find_matches.c

    r36910 r37005  
    3636  ALLOCATE (Y2, double, NAVE);
    3737  ALLOCATE (N2, off_t,  NAVE);
    38   ALLOCATE (catalog[0].found, off_t, NAVE);
     38  ALLOCATE (catalog[0].found_t, off_t, NAVE);
    3939  /* for secfilt j and star i, secfilt[i*Nsecfilt+j] */
    4040
     
    7777  if (Nstars < 1) {
    7878    if (VERBOSE) fprintf (stderr, "skipping %s, no overlapping stars\n", catalog[0].filename);
    79     free (catalog[0].found);
    8079    free (X1);
    8180    free (Y1);
     
    9291    RD_to_XY (&X2[i], &Y2[i], catalog[0].average[i].R, catalog[0].average[i].D, &tcoords);
    9392    N2[i] = i;
    94     catalog[0].found[N2[i]] = -1;
     93    catalog[0].found_t[N2[i]] = -1;
    9594  }
    9695  if (Nave > 1) sort_coords_index (X2, Y2, N2, Nave);
     
    219218      }
    220219      /* this catalog star matches more than one image star */
    221       if (catalog[0].found[n] > -1) {
    222         catalog[0].measure[catalog[0].found[n]].dbFlags |= ID_MEAS_BLEND_OBJ;
     220      if (catalog[0].found_t[n] > -1) {
     221        catalog[0].measure[catalog[0].found_t[n]].dbFlags |= ID_MEAS_BLEND_OBJ;
    223222        catalog[0].measure[Nmeas].dbFlags |= ID_MEAS_BLEND_OBJ;
    224223      } else {
    225         catalog[0].found[n] = Nmeas;
     224        catalog[0].found_t[n] = Nmeas;
    226225      }
    227226      /* Nm is updated, but not written out in -update mode (for existing entries)
     
    329328  if (VERBOSE) fprintf (stderr, "Nstars, Nave, Nmeas: "OFF_T_FMT" "OFF_T_FMT" "OFF_T_FMT", ("OFF_T_FMT" matches)\n",  Nstars,  Nave,  Nmeas,  Nmatch);
    330329
    331   free (catalog[0].found);
    332330  free (X1);
    333331  free (Y1);
  • branches/eam_branches/ipp-20140610/Ohana/src/addstar/src/find_matches_closest.c

    r36922 r37005  
    3636  ALLOCATE (Y2, double, NAVE);
    3737  ALLOCATE (N2, off_t,  NAVE);
    38   ALLOCATE (catalog[0].found, off_t, NAVE);
     38  ALLOCATE (catalog[0].found_t, off_t, NAVE);
    3939  /* for secfilt j and star i, secfilt[i*Nsecfilt+j] */
    4040
     
    7777  if (Nstars < 1) {
    7878    if (VERBOSE) fprintf (stderr, "skipping %s, no overlapping stars\n", catalog[0].filename);
    79     free (catalog[0].found);
    8079    free (X1);
    8180    free (Y1);
     
    9291    RD_to_XY (&X2[i], &Y2[i], catalog[0].average[i].R, catalog[0].average[i].D, &tcoords);
    9392    N2[i] = i;
    94     catalog[0].found[N2[i]] = -1;
     93    catalog[0].found_t[N2[i]] = -1;
    9594  }
    9695  if (Nave > 1) sort_coords_index (X2, Y2, N2, Nave);
     
    261260       Nm is recalculated in build_meas_links if loaded table is not sorted */
    262261    stars[N].found = Nmeas;
    263     catalog[0].found[n] = Nmeas;
     262    catalog[0].found_t[n] = Nmeas;
    264263    catalog[0].average[n].Nmeasure ++;
    265264    Nmeas ++;
     
    390389  if (VERBOSE) fprintf (stderr, "Nstars, Nave, Nmeas, Nlens: "OFF_T_FMT" "OFF_T_FMT" "OFF_T_FMT" "OFF_T_FMT", ("OFF_T_FMT" matches)\n",  Nstars,  Nave,  Nmeas,  Nlens, Nmatch);
    391390
    392   free (catalog[0].found);
    393391  free (X1);
    394392  free (Y1);
  • branches/eam_branches/ipp-20140610/Ohana/src/addstar/src/find_matches_closest_refstars.c

    r36903 r37005  
    3131  ALLOCATE (Y2, double, NAVE);
    3232  ALLOCATE (N2, off_t,  NAVE);
    33   ALLOCATE (catalog[0].found, off_t, NAVE);
     33  ALLOCATE (catalog[0].found_t, off_t, NAVE);
    3434  /* for secfilt j and star i, secfilt[i*Nsecfilt+j] */
    3535
     
    7171  if (Nstars < 1) {
    7272    if (VERBOSE) fprintf (stderr, "skipping %s, no overlapping stars\n", catalog[0].filename);
    73     free (catalog[0].found);
    7473    free (X1);
    7574    free (Y1);
     
    8685    RD_to_XY (&X2[i], &Y2[i], catalog[0].average[i].R, catalog[0].average[i].D, &tcoords);
    8786    N2[i] = i;
    88     catalog[0].found[N2[i]] = -1;
     87    catalog[0].found_t[N2[i]] = -1;
    8988  }
    9089  if (Nave > 1) sort_coords_index (X2, Y2, N2, Nave);
     
    220219    /* this catalog star matches more than one image star */
    221220    // XXX should this be an average flag?
    222     if (catalog[0].found[n] > -1) {
    223       catalog[0].measure[catalog[0].found[n]].dbFlags |= ID_MEAS_BLEND_OBJ;
     221    if (catalog[0].found_t[n] > -1) {
     222      catalog[0].measure[catalog[0].found_t[n]].dbFlags |= ID_MEAS_BLEND_OBJ;
    224223      catalog[0].measure[Nmeas].dbFlags |= ID_MEAS_BLEND_OBJ;
    225224    } else {
    226       catalog[0].found[n] = Nmeas;
     225      catalog[0].found_t[n] = Nmeas;
    227226    }
    228227
     
    331330  if (VERBOSE) fprintf (stderr, "Nstars, Nave, Nmeas: "OFF_T_FMT" "OFF_T_FMT" "OFF_T_FMT", ("OFF_T_FMT" matches)\n",  Nstars,  Nave,  Nmeas,  Nmatch);
    332331
    333   free (catalog[0].found);
    334332  free (X1);
    335333  free (Y1);
  • branches/eam_branches/ipp-20140610/Ohana/src/addstar/src/find_matches_refstars.c

    r36903 r37005  
    3737  ALLOCATE (Y2, double, NAVE);
    3838  ALLOCATE (N2, off_t,  NAVE);
    39   ALLOCATE (catalog[0].found, off_t, NAVE);
     39  ALLOCATE (catalog[0].found_t, off_t, NAVE);
    4040  REALLOCATE (catalog[0].average, Average, NAVE);
    4141  REALLOCATE (catalog[0].secfilt, SecFilt, NAVE*catalog[0].Nsecfilt);
     
    6969    RD_to_XY (&X2[i], &Y2[i], catalog[0].average[i].R, catalog[0].average[i].D, &tcoords);
    7070    N2[i] = i;
    71     catalog[0].found[N2[i]] = -1;
     71    catalog[0].found_t[N2[i]] = -1;
    7272  }
    7373  if (Nave > 1) sort_coords_index (X2, Y2, N2, Nave);
     
    190190      }
    191191      /* this catalog star matches more than one image star */
    192       if (catalog[0].found[n] > -1) {
    193         catalog[0].measure[catalog[0].found[n]].dbFlags |= ID_MEAS_BLEND_OBJ;
     192      if (catalog[0].found_t[n] > -1) {
     193        catalog[0].measure[catalog[0].found_t[n]].dbFlags |= ID_MEAS_BLEND_OBJ;
    194194        catalog[0].measure[Nmeas].dbFlags |= ID_MEAS_BLEND_OBJ;
    195195      } else {
    196         catalog[0].found[n] = Nmeas;
     196        catalog[0].found_t[n] = Nmeas;
    197197      }
    198198
     
    305305  if (VERBOSE) fprintf (stderr, "Nstars, Nave, Nmeas: %d "OFF_T_FMT" "OFF_T_FMT", ("OFF_T_FMT" matches)\n",  Nstars,  Nave,  Nmeas,  Nmatch);
    306306
    307   free (catalog[0].found);
    308307  free (X1);
    309308  free (Y1);
Note: See TracChangeset for help on using the changeset viewer.