Ignore:
Timestamp:
04/04/14 11:02:41 (10 years ago)
Author:
tbretz
Message:
Updated with the current prediction from the calibration paper; make plots only for VHE sources.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/makedata.cc

    r17367 r17651  
    9999    // ------------------ Precalc moon coord ---------------------
    100100
    101     vector<pair<EquPosn, double>> fMoonCoords;
     101    vector<tuple<EquPosn, double, double>> fMoonCoords;
     102    vector<EquPosn> fSunCoords;
    102103
    103104    for (double h=0; h<1; h+=1./(24*12))
    104105    {
     106        const EquPosn sun  = GetSolarEquCoords(jd+h);
    105107        const EquPosn moon = GetLunarEquCoords(jd+h, 0.01);
    106108        const double  disk = GetLunarDisk(jd+h);
     109        const double edist = GetLunarEarthDist(jd+h)/384400;
    107110
    108         fMoonCoords.emplace_back(moon, disk);
     111        fMoonCoords.emplace_back(moon, disk, edist);
     112        fSunCoords.emplace_back(sun);
    109113    }
    110114
     
    136140        const HrzPosn hrz = GetHrzFromEqu(pos, jd+h);
    137141
    138         // Get moon properties and
    139         const EquPosn moon = fMoonCoords[i].first;
    140         const double  disk = fMoonCoords[i].second;
    141         const HrzPosn hrzm = GetHrzFromEqu(moon, jd+h);
     142        // Get sun and moon properties and
     143            const EquPosn  sun   = fSunCoords[i];
     144            const EquPosn  moon  = get<0>(fMoonCoords[i]);
     145            const double   disk  = get<1>(fMoonCoords[i]);
     146            const double   edist = get<2>(fMoonCoords[i]);
     147            const HrzPosn  hrzm  = GetHrzFromEqu(moon, jd+h);
     148            const ZdAzPosn hrzs  = GetHrzFromEqu(sun,  jd+h);
    142149
    143         // Angular distance between source and moon
     150        // Distance between source and moon
    144151        const double angle = GetAngularSeparation(moon, pos);
    145152
    146         // Distance between earth and moon relative to major semi-axis
    147         const double dist  = GetLunarEarthDist(jd+h)/384400;
     153        // Current prediction
     154        const double sin_malt  = hrzm.alt<0 ? 0 : sin(hrzm.alt*M_PI/180);
     155        const double cos_mdist = cos(angle*M_PI/180);
     156        const double sin_szd   = sin(hrzs.zd*M_PI/180);
    148157
    149         // Current prediction
    150         const double calt = sin(hrzm.alt*M_PI/180);
    151         const double cang = 1-sin(angle*M_PI/180);
     158        const double k0 = pow(disk,      2.63);
     159        const double k1 = pow(sin_malt,  0.60);
     160        const double k2 = pow(edist,    -2.00);
     161        const double k3 = exp(0.67*cos_mdist*cos_mdist*cos_mdist*cos_mdist);
     162        const double k4 = exp(-97.8+105.8*sin_szd*sin_szd);
    152163
    153         //const double lc = cang==0 ? -1 : calt*pow(disk, 2.2)*pow(dist, -2);
    154         //const double cur = lc>0 ? 4+103*lc : 4;
    155 
    156         const double lc  = sqrt(calt)*pow(disk, 2.3)*pow(cang+1, 1)*pow(dist, -2);
    157         const double cur = lc>0 ? 7.2 + 69*lc : 7.2;
     164        const double cur = 6.2 + 95.7*k0*k1*k2*k3 + k4;
    158165
    159166        // Relative  energy threshold prediction
Note: See TracChangeset for help on using the changeset viewer.