envifile

This modules loads general envifiles via mmap, to get good random access performance.

runmacs.spec.io.envifile.E(stats)[source]

compute average of cumulative EnviFile

class runmacs.spec.io.envifile.EnviFile[source]

Represents an bil, bip or bsq envi-file as numpy array.

Load a file, by passing the filename (without .hdr or .raw) to the constructor. After loading, the object behaves like a standary numpy array:

data = EnviFile('basefilename')

The dimensions are ordered as follows:

data[lines, samples, bands]
class runmacs.spec.io.envifile.EnviFileRaw(filename, suffix='raw')[source]

This class allows to read an ENVI file as raw bytes with some meta information, the idea is to provide a sequential an serializable interface to support parallel workers which look at the whole file.

runmacs.spec.io.envifile.std(stats)[source]

compute standard deviation of cumulative EnviFile