IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37682


Ignore:
Timestamp:
Nov 28, 2014, 5:24:11 AM (12 years ago)
Author:
eugene
Message:

need to mod the way I save backup coords

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

Legend:

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

    r37680 r37682  
    6969}
    7070
     71void AstromOffsetMapCopy (AstromOffsetMap *map) {
     72
     73  if (!map) return;
     74
     75  AstromOffsetMap *tgt = AstromOffsetMInit (map->Nx, map->Ny);
     76
     77  tgt->dX = map->dX;
     78  tgt->dY = map->dY;
     79
     80  int j, k;
     81  for (j = 0; j < tgt->Nx; j++) {
     82    for (k = 0; k < map->Ny; k++) {
     83      tgt->dXv[j][k] = map->dXv[j][k];
     84      tgt->dYv[j][k] = map->dYv[j][k];
     85    }
     86  }
     87
     88  int j;
     89  for (j = 0; j < map->Nx; j++) {
     90    if (map->dXv) free (map->dXv[j]);
     91    if (map->dYv) free (map->dYv[j]);
     92  }
     93
     94  free (map->dXv);
     95  free (map->dYv);
     96
     97  free (map);
     98
     99  return;
     100}
     101
    71102void AstromOffsetTableFree (AstromOffsetTable *table) {
    72103
  • branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/CoordOps.c

    r34088 r37682  
    77static Coords *oldCoords;   // list of available images
    88static off_t  NoldCoords;   // number of available images
     9
     10AstromOffsetTable *table = NULL;
    911
    1012void initCoords (void) {
     
    2426  memset (nPosSum,    0, N*sizeof(off_t));
    2527  memset (isBadCoord, 0, N*sizeof(int));
     28
     29  // create a table to save tables with their coords
     30  table = AstromOffsetTableInit();
     31
    2632}
    2733
  • branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/ImageOps.c

    r37665 r37682  
    221221    }
    222222  }
    223   fprintf (stderr, OFF_T_FMT" total images, %d with < 20 measurements, %d with < 15\n", Nimage, Nfew, Nbad);
     223  if (MATCHCAT) fprintf (stderr, OFF_T_FMT" total images, %d with < 20 measurements, %d with < 15\n", Nimage, Nfew, Nbad);
    224224}
    225225
Note: See TracChangeset for help on using the changeset viewer.