Skip to content

Commit 9e9c2d9

Browse files
committed
allow FLAC compression of unitless timestreams too
1 parent b50e51f commit 9e9c2d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/src/G3Timestream.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ template <class A> void G3Timestream::save(A &ar, unsigned v) const
119119
uint8_t nanflag;
120120
size_t nans = 0;
121121

122-
if (units != Counts)
122+
if (units != Counts && units != None)
123123
log_fatal("Cannot use FLAC on non-counts timestreams");
124124

125125
// Copy to 24-bit integers
@@ -259,7 +259,7 @@ template <class A> void G3Timestream::load(A &ar, unsigned v)
259259
callback.outbuf = new std::vector<int32_t>();
260260
callback.pos = 0;
261261

262-
if (units != Counts)
262+
if (units != Counts && units != None)
263263
log_fatal("Cannot use FLAC on non-counts timestreams");
264264

265265
ar & cereal::make_nvp("nanflag", nanflag);
@@ -421,7 +421,7 @@ void G3Timestream::SetFLACCompression(int use_flac)
421421
{
422422

423423
#ifdef G3_HAS_FLAC
424-
if (use_flac != 0 && units != Counts)
424+
if (use_flac != 0 && units != Counts && units != None)
425425
log_fatal("Cannot use FLAC on non-counts timestreams");
426426

427427
use_flac_ = use_flac;

0 commit comments

Comments
 (0)