IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 24, 2015, 5:32:13 AM (11 years ago)
Author:
eugene
Message:

adding dvo methods for galphot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libdvo/src/dvo_photcode_ops.c

    r38553 r38635  
    18541854LENSFIELD(E1);
    18551855LENSFIELD(E2);
     1856
     1857# define GALPHOT_FIELD(NAME, VALUE)                                             \
     1858  float GalphotValue_##NAME (PhotCode *code, GalPhot *galphot, int Ngalphot) { \
     1859    int n;                                                              \
     1860    if (code == NULL) return NAN;                                       \
     1861    for (n = 0; n < Ngalphot; n++) {                                    \
     1862      short equivCode = GetPhotcodeEquivCodebyCode (galphot[n].photcode); \
     1863      if (!equivCode) continue;                                         \
     1864      if (equivCode != code->code) continue;                            \
     1865      float value = galphot[n].VALUE;                                   \
     1866      return (value);                                                   \
     1867    }                                                                   \
     1868    return NAN;                                                         \
     1869  }
     1870
     1871GALPHOT_FIELD(GAL_MAG,         mag);           
     1872GALPHOT_FIELD(GAL_MAG_ERR,     magErr);   
     1873GALPHOT_FIELD(GAL_MAJ,         majorAxis);             
     1874GALPHOT_FIELD(GAL_MAJ_ERR,     majorAxisErr);
     1875GALPHOT_FIELD(GAL_MIN,         minorAxis);             
     1876GALPHOT_FIELD(GAL_MIN_ERR,     minorAxisErr);   
     1877GALPHOT_FIELD(GAL_THETA,       theta);     
     1878GALPHOT_FIELD(GAL_THETA_ERR,   thetaErr); 
     1879GALPHOT_FIELD(GAL_INDEX,       index);     
     1880GALPHOT_FIELD(GAL_CHISQ,       chisq);     
     1881GALPHOT_FIELD(GAL_NPIX,        Npix);       
     1882GALPHOT_FIELD(GAL_TYPE,        modelType);       
Note: See TracChangeset for help on using the changeset viewer.