eggplantbren / DNest3

Diffusive Nested Sampling
GNU General Public License v3.0
20 stars 6 forks source link

Added command line option to gzip the sample.txt file #15

Closed mattpitkin closed 8 years ago

mattpitkin commented 8 years ago

In projects with very large numbers of parameters the sample.txt file could get pretty large. To help reduce the file size I've allowed the user to specify a new -z option, which will instead output samples to a gzipped file - sample.txt.gz. This requires zlib to be installed and the Boost iostreams library. I've added checks for these libraries on compilation, so if zlib is not found then the -z option won't be allowed and standard functionality used.

In any python postprocessing for reading in the samples numpy.loadtxt is fine reading in gzipped file is they have the .gz suffix.

This pull request also includes a bug fix that was present in the Sampler class definition when compiling without Boost.

eggplantbren commented 8 years ago

Cool idea! Thanks.