IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 13, 2017, 10:53:48 AM (9 years ago)
Author:
eugene
Message:

merge EAM development branch changes for DR2 into trunk (add PS1_V6 dvo format; change Mcal to McalPSF, McalAPER; change opihi int vectors to 64bit)

Location:
trunk/Ohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana

  • trunk/Ohana/src/libdvo/src/dvo_convert_loneos.c

    r38462 r40291  
    2626    out[i].M        = (in[i].M       == NAN_S_SHORT) ? NAN : in[i].M      * 0.001;
    2727    out[i].dM       = (in[i].dM      == NAN_U_CHAR)  ? NAN : in[i].dM     * 0.001;
    28     out[i].Mcal     = (in[i].Mcal    == NAN_S_SHORT) ? NAN : in[i].Mcal   * 0.001;
     28    out[i].McalPSF  = (in[i].Mcal    == NAN_S_SHORT) ? NAN : in[i].Mcal   * 0.001;
     29    out[i].McalAPER = (in[i].Mcal    == NAN_S_SHORT) ? NAN : in[i].Mcal   * 0.001;
    2930    out[i].Map      = (in[i].M       == NAN_S_SHORT) ? NAN : in[i].M      * 0.001;
    3031    out[i].photcode = in[i].source;
     
    5960    out[i].M      = isnan(in[i].M      ) ? NAN_S_SHORT : in[i].M       * 1000.0;
    6061    out[i].dM     = isnan(in[i].dM     ) ? NAN_U_CHAR  : in[i].dM      * 1000.0;
    61     out[i].Mcal   = isnan(in[i].Mcal   ) ? NAN_S_SHORT : in[i].Mcal    * 1000.0;
     62    out[i].Mcal   = isnan(in[i].McalPSF) ? NAN_S_SHORT : in[i].McalPSF * 1000.0;
    6263    out[i].source = in[i].photcode;
    6364    out[i].t      = in[i].t;
     
    8990
    9091    // changed for PANSTARRS_DEV_0 (moved from Average to Measure)
    91     primary[0][i].M    = (in[i].M  == NAN_S_SHORT) ? NAN : in[i].M  * 0.001;     
    92     primary[0][i].Mchisq= pow (10.0, 0.01*in[i].Xm);     
     92    primary[0][i].MpsfChp = (in[i].M  == NAN_S_SHORT) ? NAN : in[i].M  * 0.001;     
     93    primary[0][i].Mchisq  = pow (10.0, 0.01*in[i].Xm);     
    9394
    9495    // added for PANSTARRS_DEV_0
     
    123124
    124125    // changed for PANSTARRS_DEV_0 (moved from Average to Measure)
    125     out[i].M       = isnan(primary[i].M)  ? NAN_S_SHORT : primary[i].M   * 1000.0;
     126    out[i].M       = isnan(primary[i].MpsfChp)  ? NAN_S_SHORT : primary[i].MpsfChp   * 1000.0;
    126127    out[i].Xm      = 100.0*log10(primary[i].Mchisq);     
    127128
     
    152153
    153154    // added or changed for PANSTARRS_DEV_0
    154     out[i].M    = (in[i].M  == NAN_S_SHORT) ? NAN : in[i].M * 0.001;
     155    out[i].MpsfChp = (in[i].M  == NAN_S_SHORT) ? NAN : in[i].M * 0.001;
    155156  }
    156157  return (out);
     
    169170
    170171    // added or changed for PANSTARRS_DEV_0
    171     out[i].M    = isnan(in[i].M)  ? NAN_S_SHORT : in[i].M * 1000.0;
     172    out[i].M    = isnan(in[i].MpsfChp)  ? NAN_S_SHORT : in[i].MpsfChp * 1000.0;
    172173  }
    173174  return (out);
     
    202203    out[i].NY               = in[i].NY;
    203204
    204     out[i].Xm               = in[i].Xm;
    205205    out[i].photcode         = in[i].source;
    206206    out[i].exptime          = in[i].exptime;
     
    231231    out[i].apmifit          = (in[i].apmifit  == NAN_S_SHORT) ? NAN : in[i].apmifit  * 0.001;
    232232    out[i].dapmifit         = (in[i].dapmifit == NAN_S_SHORT) ? NAN : in[i].dapmifit * 0.001;
    233     out[i].Mcal             = (in[i].Mcal     == NAN_S_SHORT) ? NAN : in[i].Mcal     * 0.001;
     233
     234    out[i].McalPSF          = (in[i].Mcal     == NAN_S_SHORT) ? NAN : in[i].Mcal     * 0.001;
     235    out[i].McalAPER         = (in[i].Mcal     == NAN_S_SHORT) ? NAN : in[i].Mcal     * 0.001;
    234236    out[i].dMcal            = (in[i].dMcal    == NAN_S_SHORT) ? NAN : in[i].dMcal    * 0.001;
     237    out[i].McalChiSq        = (in[i].dMcal    == NAN_S_SHORT) ? NAN : pow(10.0, 0.01*in[i].Xm);
     238
    235239    out[i].sidtime          = NAN;
    236240    out[i].latitude         = NAN;
     
    274278    out[i].NY               = in[i].NY;
    275279
    276     out[i].Xm               = in[i].Xm;
    277280    out[i].source           = in[i].photcode;
    278281    out[i].exptime          = in[i].exptime;
     
    303306    out[i].apmifit          = isnan(in[i].apmifit ) ? NAN_S_SHORT : in[i].apmifit  * 1000.0;
    304307    out[i].dapmifit         = isnan(in[i].dapmifit) ? NAN_S_SHORT : in[i].dapmifit * 1000.0;
    305     out[i].Mcal             = isnan(in[i].Mcal    ) ? NAN_S_SHORT : in[i].Mcal     * 1000.0;
     308
     309    out[i].Mcal             = isnan(in[i].McalPSF ) ? NAN_S_SHORT : in[i].McalPSF  * 1000.0;
    306310    out[i].dMcal            = isnan(in[i].dMcal   ) ? NAN_S_SHORT : in[i].dMcal    * 1000.0;
     311    out[i].Xm               = isnan(in[i].dMcal   ) ? NAN_S_SHORT : 100.0*log10(in[i].McalChiSq);
    307312
    308313    // changed or added for PS1_V1
Note: See TracChangeset for help on using the changeset viewer.