Changeset 16966 for trunk/Mars/mcore


Ignore:
Timestamp:
07/19/13 12:50:54 (11 years ago)
Author:
tbretz
Message:
Changed sign of the offset, so that the offset/slope combination represents a line in volt-vs-dac, added slope.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mcore/PixelMap.h

    r15268 r16966  
    202202    float Vnom;                /// Channel bias voltage nominal
    203203    float Voff;                /// Channel bias voltage offset
     204    float Vslope;              /// Channel bias voltage slope
    204205
    205206    BiasMapEntry() : hv_board(-1) { }
     
    248249            str >> entry.Vnom;
    249250            str >> entry.Voff;
     251            str >> entry.Vslope;
    250252
    251253#ifdef __EXCEPTIONS
     
    343345        {
    344346            const int ch = it->hv_board*32 + it->hv_channel;
    345             volt[ch] = -it->Voff;
     347            volt[ch] = it->Voff;
    346348        }
    347349
    348350        return volt;
    349351    }
     352
     353    std::vector<float> Vslope() const
     354    {
     355        std::vector<float> slope(416);
     356
     357        for (std::vector<BiasMapEntry>::const_iterator it=begin(); it!=end(); it++)
     358        {
     359            const int ch = it->hv_board*32 + it->hv_channel;
     360            slope[ch] = it->Vslope;
     361        }
     362
     363        return slope;
     364    }
    350365};
    351366
Note: See TracChangeset for help on using the changeset viewer.