IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39432


Ignore:
Timestamp:
Mar 4, 2016, 1:51:25 PM (10 years ago)
Author:
eugene
Message:

skip warp detections for bcatalog (we do not calibration warp images); add a measurement of the stack systematic floor; apply the MeasPos information for each file as they are loaded (rather than accumulate)

Location:
branches/eam_branches/ohana.20160226/src/relastro
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20160226/src/relastro/Makefile

    r39375 r39432  
    4141$(SRC)/Shutdown.$(ARCH).o            \
    4242$(SRC)/UpdateChips.$(ARCH).o         \
     43$(SRC)/UpdateStacks.$(ARCH).o         \
    4344$(SRC)/UpdateMosaic.$(ARCH).o        \
    4445$(SRC)/UpdateObjects.$(ARCH).o       \
  • branches/eam_branches/ohana.20160226/src/relastro/include/relastro.h

    r39412 r39432  
    528528int UpdateSimple (Catalog *catalog, int Ncatalog);
    529529int UpdateChips (Catalog *catalog, int Ncatalog, int Nloop);
     530int UpdateStacks (Catalog *catalog, int Ncatalog);
    530531int UpdateMosaic (Catalog *catalog, int Ncatalog);
    531532int UpdateMeasures (Catalog *catalog, int Ncatalog);
  • branches/eam_branches/ohana.20160226/src/relastro/src/ImageOps.c

    r39411 r39432  
    11# include "relastro.h"
    2 int isGPC1chip (int photcode);
    32
    43# define USE_IMAGE_ID 1
  • branches/eam_branches/ohana.20160226/src/relastro/src/UpdateMeasures.c

    r39385 r39432  
    7171
    7272      double dR = 3600.0*fabs(csdec*(oldR - R));
    73       double dD = 3600.0*fabs(oldD - R);
     73      double dD = 3600.0*fabs(oldD - D);
    7474
    7575      // complain if the new location is far from the old location
  • branches/eam_branches/ohana.20160226/src/relastro/src/bcatalog.c

    r39375 r39432  
    184184      offset = catalog[0].average[i].measureOffset + j;
    185185     
     186      // we do not measure astrometry for the warps, so skip:
     187      if (isGPC1warp(catalog[0].measure[offset].photcode)) continue;
     188
    186189      // filter objects based on user supplied criteria, including SIGMA_LIM
    187190      if (!MeasFilterTest(&catalog[0].measure[offset], TRUE)) {
  • branches/eam_branches/ohana.20160226/src/relastro/src/relastro_parallel_images.c

    r38986 r39432  
    141141        LOGRTIME("slurp_meas_pos loop %d on %s, host %d: %f sec\n", i, myHostName, REGION_HOST_ID, dtime);
    142142      }
     143
     144      // measure scatter for stacks
     145      UpdateStacks (catalog, Ncatalog);
     146      LOGRTIME("UpdateStacks on %s, host %d: %f sec\n", myHostName, REGION_HOST_ID, dtime);
     147
    143148      // create summary plots of the process
    144149      // relastroVisualSummaryChips();
  • branches/eam_branches/ohana.20160226/src/relastro/src/share_meas_pos.c

    r39411 r39432  
    5858  off_t i, k;
    5959
    60   int Nmeaspos = 0;
    61   MeasPos *measpos = NULL;
    62   ALLOCATE (measpos, MeasPos, 1);
    63 
    6460  fprintf (stderr, "grabbing meas object pos from other hosts...\n");
    6561
     
    7874    LOGRTIME("meas_load_sync host %d loop %d on %s, host %d: %f sec\n", i, nloop, myHostName, REGION_HOST_ID, dtime);
    7975   
    80     off_t Nsubset = 0;
     76    off_t Nmeaspos = 0;
    8177    char *posfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "measpos.fits");
    82     MeasPos *measposSubset = MeasPosLoad (posfile, &Nsubset);
     78    MeasPos *measpos = MeasPosLoad (posfile, &Nmeaspos);
    8379    free (posfile);
    8480    LOGRTIME("MeasPosLoad host %d loop %d on %s, host %d: %f sec\n", i, nloop, myHostName, REGION_HOST_ID, dtime);
    8581
    86     // merge_meas_pos reallocs measpos and frees the input measposSubset
    87     measpos = merge_meas_pos (measpos, &Nmeaspos, measposSubset, Nsubset);
    88     LOGRTIME("merge_meas_pos host %d loop %d on %s, host %d: %f sec\n", i, nloop, myHostName, REGION_HOST_ID, dtime);
     82    // apply the loaded measurement positions:
     83    for (off_t j = 0; j < Nmeaspos; j++) {
     84      int objID = measpos[j].objID;
     85      int catID = measpos[j].catID;
     86
     87      // set the meas mag
     88      int catSeq;
     89      off_t objSeq;
     90      if (!catID_and_objID_to_seq (catID, objID, &catSeq, &objSeq)) {
     91        // XXX what should I do if this does not match?
     92        continue;
     93      }
     94      myAssert (catSeq < Ncatalog, "oops");
     95
     96      off_t m = catalog[catSeq].average[objSeq].measureOffset;
     97      for (k = 0; k < catalog[catSeq].average[objSeq].Nmeasure; k++, m++) {
     98        if (catalog[catSeq].measureT[m].imageID != measpos[j].imageID) continue;
     99        catalog[catSeq].measureT[m].R = measpos[j].R;
     100        catalog[catSeq].measureT[m].D = measpos[j].D;
     101        if (catalog[catSeq].measure) {
     102          catalog[catSeq].measure[m].R = measpos[j].R;
     103          catalog[catSeq].measure[m].D = measpos[j].D;
     104        }
     105      }
     106    }
     107    free (measpos);
     108    LOGRTIME("match_catID_and_objID/meas loop %d on %s, host %d: %f sec\n", nloop, myHostName, REGION_HOST_ID, dtime);
    89109  }
    90110  LOGRTIME("meas_load_done loop %d on %s, host %d: %f sec\n", nloop, myHostName, REGION_HOST_ID, dtime);
    91 
    92   for (i = 0; i < Nmeaspos; i++) {
    93     int objID = measpos[i].objID;
    94     int catID = measpos[i].catID;
    95 
    96     // set the meas mag
    97     int catSeq;
    98     off_t objSeq;
    99     if (!catID_and_objID_to_seq (catID, objID, &catSeq, &objSeq)) {
    100         // XXX what should I do if this does not match?
    101         continue;
    102     }
    103     myAssert (catSeq < Ncatalog, "oops");
    104 
    105     off_t m = catalog[catSeq].average[objSeq].measureOffset;
    106     for (k = 0; k < catalog[catSeq].average[objSeq].Nmeasure; k++, m++) {
    107       if (catalog[catSeq].measureT[m].imageID != measpos[i].imageID) continue;
    108       catalog[catSeq].measureT[m].R = measpos[i].R;
    109       catalog[catSeq].measureT[m].D = measpos[i].D;
    110       if (catalog[catSeq].measure) {
    111         catalog[catSeq].measure[m].R = measpos[i].R;
    112         catalog[catSeq].measure[m].D = measpos[i].D;
    113       }
    114     }
    115   }
    116   free (measpos);
    117   LOGRTIME("match_catID_and_objID/meas loop %d on %s, host %d: %f sec\n", nloop, myHostName, REGION_HOST_ID, dtime);
    118111
    119112  fprintf (stderr, "DONE grabbing meas object pos from other hosts...\n");
Note: See TracChangeset for help on using the changeset viewer.