IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39547 for trunk


Ignore:
Timestamp:
Apr 20, 2016, 3:53:27 PM (10 years ago)
Author:
eugene
Message:

pass zpFactor and objflags out to ipptopsps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/dvopsps/src/DetectionOps.c

    r37246 r39547  
    5757  GET_COLUMN(decErr      , "decErr",      float);
    5858  GET_COLUMN(zp          , "zp",          float);
     59  GET_COLUMN(zpFactor    , "zpFactor",    float);
    5960  GET_COLUMN(telluricExt , "telluricExt", float);
    6061  GET_COLUMN(airmass     , "airmass",     float);
     
    6768  GET_COLUMN(dMap        , "dMap",        float);
    6869  GET_COLUMN(flags       , "flags",       int);
     70  GET_COLUMN(objflags    , "objflags",    int);
    6971  gfits_free_header (&theader);
    7072  gfits_free_table  (&ftable);
     
    8385    detections[i].decErr       = decErr[i];     
    8486    detections[i].zp           = zp[i];         
     87    detections[i].zpFactor     = zpFactor[i];         
    8588    detections[i].telluricExt  = telluricExt[i];     
    8689    detections[i].airmass      = airmass[i];   
     
    9396    detections[i].dMap         = dMap[i];   
    9497    detections[i].flags        = flags[i];     
     98    detections[i].objflags     = objflags[i];     
    9599  }
    96100  fprintf (stderr, "loaded data for %lld detections\n", (long long) Nrow);
     
    107111  free (decErr     );
    108112  free (zp         );
     113  free (zpFactor   );
    109114  free (telluricExt);
    110115  free (airmass    );
     
    117122  free (dMap       );
    118123  free (flags      );
     124  free (objflags   );
    119125
    120126  gfits_free_header (&header);
     
    175181  gfits_define_bintable_column (&theader, "E", "decErr",      NULL, NULL, 1.0, 0.0);
    176182  gfits_define_bintable_column (&theader, "E", "zp",          NULL, NULL, 1.0, 0.0);
     183  gfits_define_bintable_column (&theader, "E", "zpFactor",    NULL, NULL, 1.0, 0.0);
    177184  gfits_define_bintable_column (&theader, "E", "telluricExt", NULL, NULL, 1.0, 0.0);
    178185  gfits_define_bintable_column (&theader, "E", "airmass",     NULL, NULL, 1.0, 0.0);
     
    185192  gfits_define_bintable_column (&theader, "E", "dMap",        NULL, NULL, 1.0, 0.0);
    186193  gfits_define_bintable_column (&theader, "J", "flags",       NULL, NULL, 1.0, FT_BZERO_INT32);
     194  gfits_define_bintable_column (&theader, "J", "objflags",    NULL, NULL, 1.0, FT_BZERO_INT32);
    187195
    188196  // generate the output array that carries the data
     
    201209  float      *decErr      ; ALLOCATE (decErr      ,  float,    Ndetections);
    202210  float      *zp          ; ALLOCATE (zp          ,  float,    Ndetections);
     211  float      *zpFactor    ; ALLOCATE (zpFactor    ,  float,    Ndetections);
    203212  float      *telluricExt ; ALLOCATE (telluricExt ,  float,    Ndetections);
    204213  float      *airmass     ; ALLOCATE (airmass     ,  float,    Ndetections);
     
    211220  float      *dMap        ; ALLOCATE (dMap        ,  float,    Ndetections);
    212221  uint32_t   *flags       ; ALLOCATE (flags       ,  uint32_t, Ndetections);
     222  uint32_t   *objflags    ; ALLOCATE (objflags    ,  uint32_t, Ndetections);
    213223
    214224  // assign the storage arrays
     
    225235    decErr[i]      = detections[i].decErr      ;
    226236    zp[i]          = detections[i].zp          ;
     237    zpFactor[i]    = detections[i].zpFactor    ;
    227238    telluricExt[i] = detections[i].telluricExt ;
    228239    airmass[i]     = detections[i].airmass     ;
     
    235246    dMap[i]        = detections[i].dMap        ;
    236247    flags[i]       = detections[i].flags       ;
     248    objflags[i]    = detections[i].objflags    ;
    237249  }
    238250
     
    249261  gfits_set_bintable_column (&theader, &ftable, "decErr",      decErr      , Ndetections);
    250262  gfits_set_bintable_column (&theader, &ftable, "zp",          zp          , Ndetections);
     263  gfits_set_bintable_column (&theader, &ftable, "zpFactor",    zpFactor    , Ndetections);
    251264  gfits_set_bintable_column (&theader, &ftable, "telluricExt", telluricExt , Ndetections);
    252265  gfits_set_bintable_column (&theader, &ftable, "airmass",     airmass     , Ndetections);
     
    259272  gfits_set_bintable_column (&theader, &ftable, "dMap",        dMap        , Ndetections);
    260273  gfits_set_bintable_column (&theader, &ftable, "flags",       flags       , Ndetections);
     274  gfits_set_bintable_column (&theader, &ftable, "objflags",    objflags    , Ndetections);
    261275
    262276  free (objID       );
     
    271285  free (decErr      );
    272286  free (zp          );
     287  free (zpFactor    );
    273288  free (telluricExt );
    274289  free (airmass     );
     
    281296  free (dMap        );
    282297  free (flags       );
     298  free (objflags    );
    283299
    284300  gfits_fwrite_Theader (f, &theader);
Note: See TracChangeset for help on using the changeset viewer.