File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -241,19 +241,14 @@ struct TimeDomainRecord : public BaseRecord
241241 , range_min(ValueY(0.0 ))
242242 , range_mid(ValueY(0.0 ))
243243 {
244- /* The time unit is specified in picoseconds at most. Given that we're
245- using a 32-bit float, we truncate any information beyond that point. */
246- int time_unit_ps = static_cast <int >(raw->header ->time_unit * 1e12 );
247- double time_unit = static_cast <double >(time_unit_ps) * 1e-12 ;
248-
249- sampling_period.value = static_cast <double >(raw->header ->sampling_period ) * time_unit;
244+ sampling_period.value = static_cast <double >(raw->header ->sampling_period ) * raw->header ->time_unit ;
250245 sampling_frequency.value = std::round (1.0 / sampling_period.value );
251246
252247 double record_start;
253248 if (convert_horizontal)
254249 {
255250 step = sampling_period.value ;
256- record_start = static_cast <double >(raw->header ->record_start ) * time_unit;
251+ record_start = static_cast <double >(raw->header ->record_start ) * raw-> header -> time_unit ;
257252 }
258253 else
259254 {
You can’t perform that action at this time.
0 commit comments