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_elixir.c

    r38462 r40291  
    2424    out[i].dM       = (in[i].dM      == NAN_U_CHAR)  ? NAN : in[i].dM     * 0.001;
    2525    out[i].dt       = (in[i].dt      == NAN_S_SHORT) ? NAN : in[i].dt     * 0.001;
    26     out[i].Mcal     = (in[i].Mcal    == NAN_S_SHORT) ? NAN : in[i].Mcal   * 0.001;
     26    out[i].McalPSF  = (in[i].Mcal    == NAN_S_SHORT) ? NAN : in[i].Mcal   * 0.001;
     27    out[i].McalAPER = (in[i].Mcal    == NAN_S_SHORT) ? NAN : in[i].Mcal   * 0.001;
    2728    out[i].Map      = (in[i].Mgal    == NAN_S_SHORT) ? NAN : in[i].Mgal   * 0.001;
    2829    out[i].airmass  = (in[i].airmass == NAN_S_SHORT) ? NAN : in[i].airmass* 0.001;
     
    7273    out[i].dM       = isnan(in[i].dM     ) ? NAN_U_CHAR  : in[i].dM      * 1000.0;
    7374    out[i].dt       = isnan(in[i].dt     ) ? NAN_S_SHORT : in[i].dt      * 1000.0;
    74     out[i].Mcal     = isnan(in[i].Mcal   ) ? NAN_S_SHORT : in[i].Mcal    * 1000.0;
     75    out[i].Mcal     = isnan(in[i].McalPSF) ? NAN_S_SHORT : in[i].McalPSF * 1000.0;
    7576    out[i].Mgal     = isnan(in[i].Map    ) ? NAN_S_SHORT : in[i].Map     * 1000.0;
    7677    out[i].airmass  = isnan(in[i].airmass) ? NAN_S_SHORT : in[i].airmass * 1000.0;
     
    109110
    110111    // changed for PANSTARRS_DEV_0 (moved from Average to Measure)
    111     primary[0][i].M     = (in[i].M  == NAN_S_SHORT) ? NAN : in[i].M  * 0.001;     
    112     primary[0][i].dM    = (in[i].dM == NAN_S_SHORT) ? NAN : in[i].dM * 0.001;     
     112    primary[0][i].MpsfChp  = (in[i].M  == NAN_S_SHORT) ? NAN : in[i].M  * 0.001;     
     113    primary[0][i].dMpsfChp = (in[i].dM == NAN_S_SHORT) ? NAN : in[i].dM * 0.001;     
    113114    primary[0][i].Mchisq= pow (10.0, 0.01*in[i].Xm);     
    114115
     
    142143
    143144    // changed for PANSTARRS_DEV_0 (moved from Average to Measure)
    144     out[i].M       = isnan(primary[i].M)  ? NAN_S_SHORT : primary[i].M   * 1000.0;
    145     out[i].dM      = isnan(primary[i].dM) ? NAN_S_SHORT : primary[i].dM  * 1000.0;
     145    out[i].M       = isnan(primary[i].MpsfChp)  ? NAN_S_SHORT : primary[i].MpsfChp   * 1000.0;
     146    out[i].dM      = isnan(primary[i].dMpsfChp) ? NAN_S_SHORT : primary[i].dMpsfChp  * 1000.0;
    146147    out[i].Xm      = 100.0*log10(primary[i].Mchisq);     
    147148
     
    172173
    173174    // added or changed for PANSTARRS_DEV_0
    174     out[i].M     = (in[i].M  == NAN_S_SHORT) ? NAN : in[i].M   * 0.001;
    175     out[i].dM    = (in[i].dM == NAN_S_SHORT) ? NAN : in[i].dM  * 0.001;
     175    out[i].MpsfChp     = (in[i].M  == NAN_S_SHORT) ? NAN : in[i].M   * 0.001;
     176    out[i].dMpsfChp    = (in[i].dM == NAN_S_SHORT) ? NAN : in[i].dM  * 0.001;
    176177  }
    177178  return (out);
     
    190191
    191192    // added or changed for PANSTARRS_DEV_0
    192     out[i].M     = isnan(in[i].M)  ? NAN_S_SHORT : in[i].M   * 1000.0;
    193     out[i].dM    = isnan(in[i].dM) ? NAN_S_SHORT : in[i].dM  * 1000.0;
     193    out[i].M     = isnan(in[i].MpsfChp)  ? NAN_S_SHORT : in[i].MpsfChp   * 1000.0;
     194    out[i].dM    = isnan(in[i].dMpsfChp) ? NAN_S_SHORT : in[i].dMpsfChp  * 1000.0;
    194195  }
    195196  return (out);
     
    223224    out[i].NX               = in[i].NX;
    224225    out[i].NY               = in[i].NY;
    225     out[i].Xm               = in[i].Xm;
    226226    out[i].photcode         = in[i].source;
    227227    out[i].exptime          = in[i].exptime;
     
    252252    out[i].apmifit          = (in[i].apmifit  == NAN_S_SHORT) ? NAN : in[i].apmifit  * 0.001;
    253253    out[i].dapmifit         = (in[i].dapmifit == NAN_S_SHORT) ? NAN : in[i].dapmifit * 0.001;
    254     out[i].Mcal             = (in[i].Mcal     == NAN_S_SHORT) ? NAN : in[i].Mcal     * 0.001;
     254
     255    out[i].McalPSF          = (in[i].Mcal     == NAN_S_SHORT) ? NAN : in[i].Mcal     * 0.001;
     256    out[i].McalAPER         = (in[i].Mcal     == NAN_S_SHORT) ? NAN : in[i].Mcal     * 0.001;
    255257    out[i].dMcal            = (in[i].dMcal    == NAN_S_SHORT) ? NAN : in[i].dMcal    * 0.001;
     258    out[i].McalChiSq        = (in[i].dMcal    == NAN_S_SHORT) ? NAN : pow(10.0, 0.01*in[i].Xm);
     259
    256260    out[i].sidtime          = NAN;
    257261    out[i].latitude         = NAN;
     
    295299    out[i].NY               = in[i].NY;
    296300
    297     out[i].Xm               = in[i].Xm;
    298301    out[i].source           = in[i].photcode;
    299302    out[i].exptime          = in[i].exptime;
     
    324327    out[i].apmifit          = isnan(in[i].apmifit ) ? NAN_S_SHORT : in[i].apmifit  * 1000.0;
    325328    out[i].dapmifit         = isnan(in[i].dapmifit) ? NAN_S_SHORT : in[i].dapmifit * 1000.0;
    326     out[i].Mcal             = isnan(in[i].Mcal    ) ? NAN_S_SHORT : in[i].Mcal     * 1000.0;
     329
     330    out[i].Mcal             = isnan(in[i].McalPSF ) ? NAN_S_SHORT : in[i].McalPSF  * 1000.0;
    327331    out[i].dMcal            = isnan(in[i].dMcal   ) ? NAN_S_SHORT : in[i].dMcal    * 1000.0;
     332    out[i].Xm               = isnan(in[i].dMcal   ) ? NAN_S_SHORT : 100.0*log10(in[i].McalChiSq);
    328333
    329334    // changed or added for PS1_V1
Note: See TracChangeset for help on using the changeset viewer.