IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28717


Ignore:
Timestamp:
Jul 27, 2010, 10:26:06 AM (16 years ago)
Author:
bills
Message:

change format of input file to setphot include the error in the zero point. set dMcal to these values

Location:
trunk/Ohana/src/uniphot
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/uniphot/include/uniphot.h

    r27790 r28717  
    4141typedef struct {
    4242    float zpt;
     43    float zpt_err;
    4344    e_time time;
    4445    int found;
  • trunk/Ohana/src/uniphot/src/load_zpt_table.c

    r27790 r28717  
    55  int Nzpts, NZPTS;
    66  ZptTable *zpts;
    7   double zpt, mjd;
     7  double zpt, mjd, zpt_err;
    88
    99  FILE *f;
     
    1919  ALLOCATE (zpts, ZptTable, NZPTS);
    2020
    21   // format is fixed: (time) (zpt)
     21  // format is fixed: (time) (zpt) (zpt_err)
    2222  int status;
    23   while ((status = fscanf (f, "%lf %lf", &mjd, &zpt)) == 2) {
     23  while ((status = fscanf (f, "%lf %lf %lf", &mjd, &zpt, &zpt_err)) == 3) {
    2424    zpts[Nzpts].zpt = zpt;
     25    zpts[Nzpts].zpt_err = zpt_err;
    2526    zpts[Nzpts].time = ohana_mjd_to_sec (mjd);
    2627    zpts[Nzpts].found = FALSE;
  • trunk/Ohana/src/uniphot/src/match_zpts_to_images.c

    r27790 r28717  
    7070    // we have a match: set zpt and record the match
    7171    image[Ni].Mcal = SCALE*code[0].C - zpts[Nz].zpt;
     72    image[Ni].dMcal = zpts[Nz].zpt_err;
    7273    image[Ni].flags &= ~ID_IMAGE_NOCAL; // clear the NOCAL flag
    7374    zpts[Nz].found = TRUE;
  • trunk/Ohana/src/uniphot/src/update_catalog_setphot.c

    r28241 r28717  
    7474
    7575  off_t i, j, m, id, idx, found;
    76   float Mcal;
     76  float Mcal, dMcal;
    7777
    7878  found = 0;   
     
    8686      id = index[idx];
    8787      Mcal = image[id].Mcal;
     88      dMcal = image[id].dMcal;
    8889
    89       catalog[0].measure[m].Mcal = image[id].Mcal;
     90      catalog[0].measure[m].Mcal = Mcal;
     91      catalog[0].measure[m].dMcal = dMcal;
    9092      found ++;
    9193    }
Note: See TracChangeset for help on using the changeset viewer.