Alter the LJHFile classes in core/files.py so that they have two read-only properties:
alldata returns either the raw memmapped pulse data, or a bitwise-inverted copy of it, depending on self.invert_data
data[key] returns a copy of all (if key is :) or part of the data (for any other value of key, such as slices, etc), and the copy will be inverted if self.invert_data evaluates True.
The reason to have the indexed data[key] interface is to allow copying and inverting only a small amount of data, if key refers to a small slice, such as one pulse record.
This read-only interface is passed up to the MicrocalDataset that owns the file, so the same properties .alldata and .data[key] apply to it, too.
Alter the
LJHFile
classes incore/files.py
so that they have two read-only properties:alldata
returns either the raw memmapped pulse data, or a bitwise-inverted copy of it, depending onself.invert_data
data[key]
returns a copy of all (ifkey
is:
) or part of the data (for any other value ofkey
, such as slices, etc), and the copy will be inverted ifself.invert_data
evaluates True.The reason to have the indexed
data[key]
interface is to allow copying and inverting only a small amount of data, ifkey
refers to a small slice, such as one pulse record.This read-only interface is passed up to the
MicrocalDataset
that owns the file, so the same properties.alldata
and.data[key]
apply to it, too.Fixes #286.