IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34620 for trunk


Ignore:
Timestamp:
Oct 28, 2012, 2:26:34 PM (14 years ago)
Author:
eugene
Message:

merge from eam_branches/ipp-20120905: secfilt->stackID is not secfilt->stackDetectID, and comes from the psps detection ID

Location:
trunk/Ohana/src
Files:
19 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/src/mkcmf.c

    r34405 r34620  
    178178  }
    179179   
     180  gauss_init (2048);
     181
    180182  // load test stars from a file:
    181183  Nstars = 0;
     
    254256  gfits_modify (&header, "NASTRO",   "%d", 1, 10);
    255257
    256   gfits_modify (&header, "IMAGEID",  "%d", 1, (int)(1000*drand48()));
    257   gfits_modify (&header, "SOURCEID", "%d", 1, (int)(100*drand48()));
     258  int imageID = 1000.0*drand48();
     259  int sourceID = 100.0*drand48();
     260
     261  gfits_modify (&header, "IMAGEID",  "%d", 1, imageID);
     262  gfits_modify (&header, "SOURCEID", "%d", 1, sourceID);
    258263
    259264  PutCoords (&coords, &header);
     
    396401  // this needs to make different output 'stars' entries depending on the desired type
    397402  ALLOCATE (stars, PS1_DEV_0, Nstars);
    398   gauss_init (2048);
    399403  for (i = 0; i < Nstars; i++) {
    400404    stars[i].detID = i;
     
    441445  // this needs to make different output 'stars' entries depending on the desired type
    442446  ALLOCATE (stars, PS1_DEV_1, Nstars);
    443   gauss_init (2048);
    444447  for (i = 0; i < Nstars; i++) {
    445448    stars[i].detID = i;
     
    489492  // this needs to make different output 'stars' entries depending on the desired type
    490493  ALLOCATE (stars, CMF_PS1_V1, Nstars);
    491   gauss_init (2048);
    492494  for (i = 0; i < Nstars; i++) {
    493495    stars[i].detID = i;
     
    537539  // this needs to make different output 'stars' entries depending on the desired type
    538540  ALLOCATE (stars, CMF_PS1_V2, Nstars);
    539   gauss_init (2048);
    540541  for (i = 0; i < Nstars; i++) {
    541542    stars[i].detID = i;
     
    591592  // this needs to make different output 'stars' entries depending on the desired type
    592593  ALLOCATE (stars, CMF_PS1_V3, Nstars);
    593   gauss_init (2048);
    594594  for (i = 0; i < Nstars; i++) {
    595595    stars[i].detID = i;
     
    649649  // this needs to make different output 'stars' entries depending on the desired type
    650650  ALLOCATE (stars, CMF_PS1_V4, Nstars);
    651   gauss_init (2048);
    652651  for (i = 0; i < Nstars; i++) {
    653652    stars[i].detID = i;
     
    660659    stars[i].M = M[i];
    661660    stars[i].Map = M[i] - 0.05;
     661    stars[i].MapRaw = M[i] - 0.10;
     662
     663    stars[i].Flux = flux;
     664    stars[i].dFlux = flux * fSN;
     665
     666    stars[i].apFlux = pow(10.0, -0.4*stars[i].Map);
     667    stars[i].apFluxErr = stars[i].apFlux * fSN;
    662668
    663669    if (ADDNOISE) {
  • trunk/Ohana/src/libautocode/def/secfilt-ps1-v4.d

    r34260 r34620  
    66
    77# elements of data structure / FITS table
    8 FIELD  M,           MAG,           float,      average mag in this band,              mags
    9 FIELD  Map,         MAG_AP,        float,      ave aperture mag in this band,         mags
    10 FIELD  Mkron,       MAG_KRON,      float,      ave kron mag in this band,             mags
    11 FIELD  dMkron,      MAG_KRON_ERR,  float,      formal error on average kron mag,      mags
    12 FIELD  dM,          MAG_ERR,       float,      formal error on average mag,           mags
    13 FIELD  Xm,          MAG_CHI,       float,      chisq on average mag,                  [100*log(value)]
    14 FIELD  FluxPSF,     FLUX_PSF,      float,      mean flux psf fit (PS1: stack)
    15 FIELD  dFluxPSF,    FLUX_PSF_ERR,  float,      mean flux psf error
    16 FIELD  FluxKron,    FLUX_KRON,     float,      mean flux kron ap (PS1: stack)
    17 FIELD  dFluxKron,   FLUX_KRON_ERR, float,      mean flux kron err
    18 FIELD  flags,       FLAGS,         uint32_t,   photometry flags
    19 FIELD  Ncode,       NCODE,         short,      number of detections in band
    20 FIELD  Nused,       NUSED,         short,      number of detections used in average
    21 FIELD  M_20,        MAG_20,        short,      lower 20percent mag,                   millimags
    22 FIELD  M_80,        MAG_80,        short,      upper 20percent mag,                   millimags
    23 FIELD  ubercalDist, UBERCAL_DIST,  short,      number of images from an ubercal-image
    24 FIELD  Mstdev,      MAG_STDEV,     short,      standard deviation of measurements,    millimags
    25 FIELD  stackID,     STACK_ID,      uint32_t,   image ID of stack used for fluxes (if any)
    26 FIELD  dummy,       DUMMY,         uint32_t,   padding
     8FIELD  M,             MAG,             float,      average mag in this band,              mags
     9FIELD  Map,           MAG_AP,          float,      ave aperture mag in this band,         mags
     10FIELD  Mkron,         MAG_KRON,        float,      ave kron mag in this band,             mags
     11FIELD  dMkron,        MAG_KRON_ERR,    float,      formal error on average kron mag,      mags
     12FIELD  dM,            MAG_ERR,         float,      formal error on average mag,           mags
     13FIELD  Xm,            MAG_CHI,         float,      chisq on average mag,                  [100*log(value)]
     14FIELD  FluxPSF,       FLUX_PSF,        float,      mean flux psf fit (PS1: stack)
     15FIELD  dFluxPSF,      FLUX_PSF_ERR,    float,      mean flux psf error
     16FIELD  FluxKron,      FLUX_KRON,       float,      mean flux kron ap (PS1: stack)
     17FIELD  dFluxKron,     FLUX_KRON_ERR,   float,      mean flux kron err
     18FIELD  flags,         FLAGS,           uint32_t,   photometry flags
     19FIELD  Ncode,         NCODE,           short,      number of detections in band
     20FIELD  Nused,         NUSED,           short,      number of detections used in average
     21FIELD  M_20,          MAG_20,          short,      lower 20percent mag,                   millimags
     22FIELD  M_80,          MAG_80,          short,      upper 20percent mag,                   millimags
     23FIELD  ubercalDist,   UBERCAL_DIST,    short,      number of images from an ubercal-image
     24FIELD  Mstdev,        MAG_STDEV,       short,      standard deviation of measurements,    millimags
     25FIELD  stackDetectID, STACK_DETECT_ID, uint64_t,   detection ID on stack used for fluxes (if any)
  • trunk/Ohana/src/libautocode/def/secfilt.d

    r34260 r34620  
    66
    77# elements of data structure / FITS table
    8 FIELD  M,           MAG,           float,      average mag in this band,              mags
    9 FIELD  Map,         MAG,           float,      average mag in this band,              mags
    10 FIELD  Mkron,       MAG_KRON,      float,      ave kron mag in this band,             mags
    11 FIELD  dMkron,      MAG_KRON_ERR,  float,      formal error on average kron mag,      mags
    12 FIELD  dM,          MAG_ERR,       float,      formal error on average mag,           mags
    13 FIELD  Xm,          MAG_CHI,       float,      chisq on average mag,                  [100*log(value)]
    14 FIELD  FluxPSF,     FLUX_PSF,      float,      mean flux psf fit (PS1: stack)
    15 FIELD  dFluxPSF,    FLUX_PSF_ERR,  float,      mean flux psf error
    16 FIELD  FluxKron,    FLUX_KRON,     float,      mean flux kron ap (PS1: stack)
    17 FIELD  dFluxKron,   FLUX_KRON_ERR, float,      mean flux kron err
    18 FIELD  flags,       FLAGS,         uint32_t,   photometry flags
    19 FIELD  Ncode,       NCODE,         short,      number of detections in band
    20 FIELD  Nused,       NUSED,         short,      number of detections used in average
    21 FIELD  M_20,        MAG_20,        short,      lower 20percent mag,                   millimags
    22 FIELD  M_80,        MAG_80,        short,      upper 20percent mag,                   millimags
    23 FIELD  ubercalDist, UBERCAL_DIST,  short,      number of images from an ubercal-image
    24 FIELD  Mstdev,      MAG_STDEV,     short,      standard deviation of measurements,    millimags
    25 FIELD  stackID,     STACK_ID,      uint32_t,   image ID of stack used for fluxes (if any)
    26 FIELD  dummy,       DUMMY,         uint32_t,   padding
     8FIELD  M,             MAG,             float,      average mag in this band,              mags
     9FIELD  Map,           MAG,             float,      average mag in this band,              mags
     10FIELD  Mkron,         MAG_KRON,        float,      ave kron mag in this band,             mags
     11FIELD  dMkron,        MAG_KRON_ERR,    float,      formal error on average kron mag,      mags
     12FIELD  dM,            MAG_ERR,         float,      formal error on average mag,           mags
     13FIELD  Xm,            MAG_CHI,         float,      chisq on average mag,                  [100*log(value)]
     14FIELD  FluxPSF,       FLUX_PSF,        float,      mean flux psf fit (PS1: stack)
     15FIELD  dFluxPSF,      FLUX_PSF_ERR,    float,      mean flux psf error
     16FIELD  FluxKron,      FLUX_KRON,       float,      mean flux kron ap (PS1: stack)
     17FIELD  dFluxKron,     FLUX_KRON_ERR,   float,      mean flux kron err
     18FIELD  flags,         FLAGS,           uint32_t,   photometry flags
     19FIELD  Ncode,         NCODE,           short,      number of detections in band
     20FIELD  Nused,         NUSED,           short,      number of detections used in average
     21FIELD  M_20,          MAG_20,          short,      lower 20percent mag,                   millimags
     22FIELD  M_80,          MAG_80,          short,      upper 20percent mag,                   millimags
     23FIELD  ubercalDist,   UBERCAL_DIST,    short,      number of images from an ubercal-image
     24FIELD  Mstdev,        MAG_STDEV,       short,      standard deviation of measurements,    millimags
     25FIELD  stackDetectID, STACK_DETECT_ID, uint64_t,   detection ID on stack used for fluxes (if any)
    2726
    2827# *** 20090206 : new fields : M_20, M_80; dropped dummy
  • trunk/Ohana/src/libdvo/include/dvodb.h

    r34260 r34620  
    4545      MAG_80,
    4646      MAG_UC_DIST,
    47       MAG_STACK_ID,
     47      MAG_STACK_DET_ID,
    4848      MAG_FLUX_PSF,
    4949      MAG_FLUX_PSF_ERR,
  • trunk/Ohana/src/libdvo/src/dbExtractAverages.c

    r34405 r34620  
    242242          value.Flt = PhotUCdist (field->photcode, average, secfilt);
    243243          break;
    244         case MAG_STACK_ID:
     244        case MAG_STACK_DET_ID:
    245245          value.Int = PhotStackID (field->photcode, average, secfilt);
    246246          break;
  • trunk/Ohana/src/libdvo/src/dbFields.c

    r34405 r34620  
    5656  if (!strcasecmp (string, "80"))          return (MAG_80);
    5757  if (!strcasecmp (string, "ucdist"))      return (MAG_UC_DIST);
    58   if (!strcasecmp (string, "stackID"))     return (MAG_STACK_ID);
     58  if (!strcasecmp (string, "stackDetectID")) return (MAG_STACK_DET_ID);
    5959  if (!strcasecmp (string, "fluxpsf"))     return (MAG_FLUX_PSF);
    6060  if (!strcasecmp (string, "fluxpsferr"))  return (MAG_FLUX_PSF_ERR);
     
    260260  field->magMode = mode;
    261261  switch (mode) {
    262     case MAG_STACK_ID:
     262    case MAG_STACK_DET_ID:
    263263    case MAG_NCODE:
    264264    case MAG_NPHOT:
     
    351351  field->magMode = mode;
    352352  switch (mode) {
    353     case MAG_STACK_ID:
     353    case MAG_STACK_DET_ID:
    354354    case MAG_NCODE:
    355355    case MAG_NPHOT:
  • trunk/Ohana/src/libdvo/src/dvo_catalog.c

    r34429 r34620  
    134134  secfilt->ubercalDist = 1000;
    135135  secfilt->Mstdev      = NAN_S_SHORT;
    136   secfilt->stackID     = 0;
    137 
    138   secfilt->dummy       = 0;
     136  secfilt->stackDetectID     = 0;
    139137}
    140138
  • trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_1.c

    r34405 r34620  
    235235    out[i].FluxKron    = NAN;
    236236    out[i].dFluxKron   = NAN;
    237     out[i].stackID     = 0;
     237    out[i].stackDetectID     = 0;
    238238 }
    239239  return (out);
  • trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_2.c

    r34405 r34620  
    229229    out[i].FluxKron    = NAN;
    230230    out[i].dFluxKron   = NAN;
    231     out[i].stackID     = 0;
     231    out[i].stackDetectID     = 0;
    232232 }
    233233  return (out);
  • trunk/Ohana/src/libdvo/src/dvo_convert_PS1_REF.c

    r34405 r34620  
    190190    out[i].FluxKron    = NAN;
    191191    out[i].dFluxKron   = NAN;
    192     out[i].stackID     = 0;
     192    out[i].stackDetectID     = 0;
    193193 }
    194194  return (out);
  • trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V1.c

    r34405 r34620  
    233233    out[i].FluxKron    = NAN;
    234234    out[i].dFluxKron   = NAN;
    235     out[i].stackID     = 0;
     235    out[i].stackDetectID     = 0;
    236236 }
    237237  return (out);
  • trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V2.c

    r34405 r34620  
    236236    out[i].FluxKron    = NAN;
    237237    out[i].dFluxKron   = NAN;
    238     out[i].stackID     = 0;
     238    out[i].stackDetectID     = 0;
    239239 }
    240240  return (out);
  • trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V3.c

    r34405 r34620  
    234234    out[i].FluxKron    = NAN;
    235235    out[i].dFluxKron   = NAN;
    236     out[i].stackID     = 0;
     236    out[i].stackDetectID     = 0;
    237237 }
    238238  return (out);
  • trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V4.c

    r34405 r34620  
    221221
    222222  for (i = 0; i < Nvalues; i++) {
    223     out[i].M           = in[i].M;     
    224     out[i].Map         = in[i].Map;     
    225     out[i].Mkron       = in[i].Mkron;     
    226     out[i].dMkron      = in[i].dMkron;     
    227     out[i].dM          = in[i].dM;     
    228     out[i].Xm          = in[i].Xm;     
    229     out[i].FluxPSF     = in[i].FluxPSF;
    230     out[i].dFluxPSF    = in[i].dFluxPSF;
    231     out[i].FluxKron    = in[i].FluxKron;
    232     out[i].dFluxKron   = in[i].dFluxKron;
    233     out[i].flags       = in[i].flags;     
    234     out[i].Ncode       = in[i].Ncode;
    235     out[i].Nused       = in[i].Nused;
    236     out[i].M_20        = in[i].M_20;     
    237     out[i].M_80        = in[i].M_80;     
    238     out[i].Mstdev      = in[i].Mstdev;     
    239     out[i].ubercalDist = in[i].ubercalDist;     
    240     out[i].stackID     = in[i].stackID;     
     223    out[i].M             = in[i].M;     
     224    out[i].Map           = in[i].Map;     
     225    out[i].Mkron         = in[i].Mkron;     
     226    out[i].dMkron        = in[i].dMkron;     
     227    out[i].dM            = in[i].dM;     
     228    out[i].Xm            = in[i].Xm;     
     229    out[i].FluxPSF       = in[i].FluxPSF;
     230    out[i].dFluxPSF      = in[i].dFluxPSF;
     231    out[i].FluxKron      = in[i].FluxKron;
     232    out[i].dFluxKron     = in[i].dFluxKron;
     233    out[i].flags         = in[i].flags;     
     234    out[i].Ncode         = in[i].Ncode;
     235    out[i].Nused         = in[i].Nused;
     236    out[i].M_20          = in[i].M_20;     
     237    out[i].M_80          = in[i].M_80;     
     238    out[i].Mstdev        = in[i].Mstdev;     
     239    out[i].ubercalDist   = in[i].ubercalDist;     
     240    out[i].stackDetectID = in[i].stackDetectID;     
    241241 }
    242242  return (out);
     
    251251
    252252  for (i = 0; i < Nvalues; i++) {
    253     out[i].M           = in[i].M;     
    254     out[i].Map         = in[i].Map;     
    255     out[i].Mkron       = in[i].Mkron;     
    256     out[i].dMkron      = in[i].dMkron;     
    257     out[i].dM          = in[i].dM;     
    258     out[i].Xm          = in[i].Xm;     
    259     out[i].FluxPSF     = in[i].FluxPSF;
    260     out[i].dFluxPSF    = in[i].dFluxPSF;
    261     out[i].FluxKron    = in[i].FluxKron;
    262     out[i].dFluxKron   = in[i].dFluxKron;
    263     out[i].flags       = in[i].flags;     
    264     out[i].Ncode       = in[i].Ncode;
    265     out[i].Nused       = in[i].Nused;
    266     out[i].M_20        = in[i].M_20;     
    267     out[i].M_80        = in[i].M_80;     
    268     out[i].Mstdev      = in[i].Mstdev;     
    269     out[i].ubercalDist = in[i].ubercalDist;     
    270     out[i].stackID     = in[i].stackID;     
     253    out[i].M             = in[i].M;     
     254    out[i].Map           = in[i].Map;     
     255    out[i].Mkron         = in[i].Mkron;     
     256    out[i].dMkron        = in[i].dMkron;     
     257    out[i].dM            = in[i].dM;     
     258    out[i].Xm            = in[i].Xm;     
     259    out[i].FluxPSF       = in[i].FluxPSF;
     260    out[i].dFluxPSF      = in[i].dFluxPSF;
     261    out[i].FluxKron      = in[i].FluxKron;
     262    out[i].dFluxKron     = in[i].dFluxKron;
     263    out[i].flags         = in[i].flags;     
     264    out[i].Ncode         = in[i].Ncode;
     265    out[i].Nused         = in[i].Nused;
     266    out[i].M_20          = in[i].M_20;     
     267    out[i].M_80          = in[i].M_80;     
     268    out[i].Mstdev        = in[i].Mstdev;     
     269    out[i].ubercalDist   = in[i].ubercalDist;     
     270    out[i].stackDetectID = in[i].stackDetectID;
    271271  }
    272272  return (out);
  • trunk/Ohana/src/libdvo/src/dvo_convert_elixir.c

    r34405 r34620  
    244244    out[i].FluxKron   = NAN;
    245245    out[i].dFluxKron  = NAN;
    246     out[i].stackID     = 0;
     246    out[i].stackDetectID     = 0;
    247247  }
    248248  return (out);
  • trunk/Ohana/src/libdvo/src/dvo_convert_loneos.c

    r34405 r34620  
    237237    out[i].FluxKron   = NAN;
    238238    out[i].dFluxKron  = NAN;
    239     out[i].stackID     = 0;
     239    out[i].stackDetectID     = 0;
    240240  }
    241241  return (out);
  • trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_0.c

    r34405 r34620  
    244244    out[i].FluxKron    = NAN;
    245245    out[i].dFluxKron   = NAN;
    246     out[i].stackID     = 0;
     246    out[i].stackDetectID     = 0;
    247247 }
    248248  return (out);
  • trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_1.c

    r34405 r34620  
    244244    out[i].FluxKron    = NAN;
    245245    out[i].dFluxKron   = NAN;
    246     out[i].stackID     = 0;
     246    out[i].stackDetectID     = 0;
    247247 }
    248248  return (out);
  • trunk/Ohana/src/libdvo/src/dvo_photcode_ops.c

    r34260 r34620  
    664664
    665665  Ns = photcodes[0].hashNsec[code[0].code];
    666   ID = (Ns == -1) ? 0 : secfilt[Ns].stackID;
     666  ID = (Ns == -1) ? 0 : secfilt[Ns].stackDetectID;
    667667  return (ID);
    668668}
Note: See TracChangeset for help on using the changeset viewer.