IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39139 for trunk


Ignore:
Timestamp:
Nov 15, 2015, 9:11:33 AM (11 years ago)
Author:
eugene
Message:

update to merge galphot entries as well

Location:
trunk/Ohana/src/dvomerge/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/dvomerge/src/LoadCatalog.c

    r38986 r39139  
    11# include "dvomerge.h"
     2# define SKIP_GALPHOT 0
    23
    34int LoadCatalog (Catalog *catalog, SkyRegion *region, char *filename, char *mode, int Nsecfilt) {
     
    1011  // always load all of the data (if any exists)
    1112  // XXXX TEMP HACK : skip GALPHOT
    12   // XXXX catalog[0].catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT | DVO_LOAD_LENSING | DVO_LOAD_LENSOBJ | DVO_LOAD_STARPAR | DVO_LOAD_GALPHOT;
     13
     14# if (SKIP_GALPHOT) 
    1315  catalog[0].catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT | DVO_LOAD_LENSING | DVO_LOAD_LENSOBJ | DVO_LOAD_STARPAR;
     16# else
     17  catalog[0].catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT | DVO_LOAD_LENSING | DVO_LOAD_LENSOBJ | DVO_LOAD_STARPAR | DVO_LOAD_GALPHOT;
     18# endif
    1419 
    1520  catalog[0].catformat = dvo_catalog_catformat (CATFORMAT);  // set the default catformat from config data
  • trunk/Ohana/src/dvomerge/src/merge_catalogs_old.c

    r38986 r39139  
    5454  NLENS = Nlens = output[0].Nlensing;
    5555  NSTAR = Nstar = output[0].Nstarpar;
     56  NGALP = Ngalp = output[0].Ngalphot;
    5657
    5758  // current max obj ID for this catalog
     
    118119    next_lens = init_lensing_links (output[0].average, Nave, output[0].lensing, Nlens);
    119120    next_star = init_starpar_links (output[0].average, Nave, output[0].starpar, Nstar);
     121    next_galp = init_galphot_links (output[0].average, Nave, output[0].galphot, Ngalp);
    120122  } else {
    121123    next_meas = build_measure_links (output[0].average, Nave, output[0].measure, Nmeas);
    122124    next_lens = build_lensing_links (output[0].average, Nave, output[0].lensing, Nlens);
    123125    next_star = build_starpar_links (output[0].average, Nave, output[0].starpar, Nstar);
     126    next_galp = build_galphot_links (output[0].average, Nave, output[0].galphot, Ngalp);
    124127  }   
    125128
     
    192195      REALLOCATE (next_star, off_t, NSTAR);
    193196      REALLOCATE (output[0].starpar, StarPar, NSTAR);
     197    }
     198    if (Ngalp + input[0].average[N].Ngalphot >= NGALP) {
     199      NGALP = Ngalp + input[0].average[N].Ngalphot + 1000;
     200      REALLOCATE (next_galp, off_t, NGALP);
     201      REALLOCATE (output[0].galphot, Galphot, NGALP);
    194202    }
    195203
Note: See TracChangeset for help on using the changeset viewer.