IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37649


Ignore:
Timestamp:
Nov 20, 2014, 9:38:34 AM (12 years ago)
Author:
eugene
Message:

save output in non-destructive ways

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

Legend:

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

    r37642 r37649  
    160160
    161161    // XXX write out an image to represent the correction
    162     FrameCorrectionWriteImageSH (frame, "map.dR.fits", TRUE);
    163     FrameCorrectionWriteImageSH (frame, "map.dD.fits", FALSE);
     162    static int version = 0;
     163    char filenameR[1024], filenameD[1024];
     164    snprintf (filenameR, 1024, "%s/map.dR.%02d.dat", CATDIR, version);
     165    snprintf (filenameD, 1024, "%s/map.dD.%02d.dat", CATDIR, version);
     166    version ++;
     167
     168    FrameCorrectionWriteImageSH (frame, filenameR, TRUE);
     169    FrameCorrectionWriteImageSH (frame, filenameD, FALSE);
    164170
    165171    SHtermsFree (dRc);
     
    236242  SHterms *Ylm = SHtermsInit (dRc->lmax);
    237243
    238   FILE *f = fopen ("sh.dat", "w");
     244  static int version = 0;
     245  char filename[1024];
     246  snprintf (filename, 1024, "%s/sh.%02d.dat", CATDIR, version);
     247  FILE *f = fopen (filename, "w");
    239248  myAssert (f, "oops");
     249  version ++;
    240250
    241251  for (i = 0; i < Nicrf; i++) {
     
    612622  // *** save the icrf points and fit residuals
    613623  {
    614     FILE *f = fopen ("map.dat", "w");
     624    static int version = 0;
     625    char filename[1024];
     626    snprintf (filename, 1024, "%s/map.%02d.dat", CATDIR, version);
     627    FILE *f = fopen (filename, "w");
     628    version ++;
    615629
    616630    for (i = 0; i < Npts; i++) {
  • branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/UpdateChips.c

    r37631 r37649  
    274274      continue;
    275275    }
     276    if (Nraw <= IMFIT_TOO_FEW) {
     277      threadinfo->Nskip ++;
     278      threadinfo->mode[i] = 0;
     279      free (raw);
     280      continue;
     281    }
    276282
    277283    /* convert average coordinates to ref entries */
  • branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/bcatalog.c

    r37623 r37649  
    6363  int Nicrf = 0;
    6464
    65   FILE *f = fopen ("test.icrf.dat", "a");
     65  char filename[1024];
     66  snprintf (filename, 1024, "%s/test.icrf.dat", CATDIR);
     67  FILE *f = fopen (filename, "a");
    6668
    6769  /* exclude stars not in range or with too few measurements */
  • branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/load_catalogs.c

    r37604 r37649  
    1919
    2020  ALLOCATE (catalog, Catalog, skylist[0].Nregions);
     21
     22  if (subselect && USE_GALAXY_MODEL) {
     23    char filename[1024];
     24    snprintf (filename, 1024, "%s/test.icrf.dat", CATDIR);
     25    unlink (filename);
     26  }
    2127
    2228  // load data from each region file, only use bright stars
  • branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/relastro_images.c

    r37631 r37649  
    7474        // XXX is is really possible that I do not update the measure.R,D on each loop??
    7575        UpdateObjects (catalog, Ncatalog, (i > 0)); // calculate <R>,<D>; if (i > 0), apply Galaxy Motion Model (if desired)
    76         FrameCorrection (catalog, Ncatalog);
    77         // if (i > 2) FrameCorrection (catalog, Ncatalog);
     76        if ((i > 1) || !USE_GALAXY_MODEL) {
     77          // if GALAXY_MODEL is selected, we want to delay the frame correction until we have
     78          // applied the galaxy model a couple of times.
     79          FrameCorrection (catalog, Ncatalog);
     80        }
    7881        UpdateChips (catalog, Ncatalog);   // measure.X,Y -> R,D, fit image.coords
    7982        MARKTIME("update chips: %f sec\n", dtime);
Note: See TracChangeset for help on using the changeset viewer.