Changeset 14405


Ignore:
Timestamp:
08/24/12 12:00:01 (12 years ago)
Author:
tbretz
Message:
Correctly initialize MTime; if the gain is 0 because a sample is broken make sure no division by zro happens
File:
1 edited

Legend:

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

    r14237 r14405  
    183183
    184184            const int64_t div = gain[abs];
    185             vec[i] = double(v)*scalegain/div;
     185            vec[i] = div==0 ? 0 : double(v)*scalegain/div;
    186186        }
    187187    }
     
    211211
    212212            const int64_t div = gain[abs]*scalerel;
    213             vec[i] = double(v)*scalegain/div;
     213            vec[i] = div==0 ? 0 : double(v)*scalegain/div;
    214214        }
    215215    }
     
    986986
    987987#ifdef __MARS__
    988         const MTime now;
     988        const MTime now(-1);
    989989        file.SetStr(  "TELESCOP", "FACT",               "Telescope that acquired this data");
    990990        file.SetStr(  "PACKAGE",  "MARS",               "Package name");
Note: See TracChangeset for help on using the changeset viewer.