Changeset 17185 for trunk/FACT++


Ignore:
Timestamp:
09/19/13 16:17:25 (11 years ago)
Author:
tbretz
Message:
Reverting to last revision.
File:
1 edited

Legend:

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

    r17174 r17185  
    551551        }
    552552
     553        UpdateHum( time, humidities);
    553554        UpdateTemp(time, temperatures);
    554555        UpdateVolt(time, voltages);
    555556        UpdateCur( time, currents);
    556         UpdateHum( time, humidities);
    557557
    558558        StartRead();
     
    697697        rms /= T.size();
    698698        rms -= avg*avg;
    699         rms = rms<0 ? 0 : sqrt(rms);
     699        rms = rms<0 ? 0 : sqrt(rms - avg*avg);
    700700
    701701        // Clean broken reports
     
    725725        T = inter.Interpolate(T);
    726726
    727         avg = 0;
    728         rms = 0;
    729         for (int i=0; i<320; i++)
    730         {
    731             avg += T[i];
    732             rms += T[i]*T[i];
    733         }
    734 
    735         avg /= 320;
    736         rms /= 320;
    737         rms -= avg*avg;
    738         rms = rms<0 ? 0 : sqrt(rms);
    739 
    740         vector<float> out;
    741         out.reserve(322);
    742         out.assign(T.cbegin(), T.cend());
    743         out.emplace_back(avg);
    744         out.emplace_back(rms);
    745 
    746727        // Update the Dim service with the interpolated positions
    747         Update(fDimTemp2, out, time);
     728        Update(fDimTemp2, vector<float>(T.cbegin(), T.cend()), time);
    748729    }
    749730
     
    774755                    "|T_back[deg C]:FTM backpanel temperatures FTM (top/bottom), FSC (top/bottom)"
    775756                    "|T_eth[deg C]:Ethernet switches temperatures top (front/back), bottom (f/b)"),
    776         fDimTemp2  ("FSC_CONTROL/BIAS_TEMP", "F:1;F:320;F:1;F:1",
     757        fDimTemp2  ("FSC_CONTROL/BIAS_TEMP", "F:1;F:320",
    777758                    "|t[s]:FSC uptime"
    778                     "|T[deg C]:Interpolated temperatures at bias patch positions"
    779                     "|T_avg[deg C]:Average temperature calculated from all patches"
    780                     "|T_rms[deg C]:Temperature RMS calculated from all patches"),
     759                    "|T[deg C]:Interpolated temperatures at bias patch positions"),
    781760        fDimHum    ("FSC_CONTROL/HUMIDITY", "F:1;F:4",
    782761                    "|t[s]:FSC uptime"
     
    947926        fFSC.SetVerbose(!conf.Get<bool>("quiet"));
    948927
    949         const string fname1 = conf.Get<string>("sensor-pos-file");
     928        const string fname1 = conf.Get<string>("sesnor-pos-file");
    950929        const auto v1 = ReadVector(fname1);
    951930        if (v1.size() != 31)
Note: See TracChangeset for help on using the changeset viewer.