mcsas3.McData.McData#

class mcsas3.McData.McData(df: pandas.DataFrame | None = None, loadFromFile: Path | None = None, resultIndex: int = 1, **kwargs: dict)[source]#

Bases: object

A simple base class for a data carrier object that can load from a range of sources, and do rebinning for too large datasets. This is inherited by the McData1D and McData2D classes intended for actual use.

__init__(df: pandas.DataFrame | None = None, loadFromFile: Path | None = None, resultIndex: int = 1, **kwargs: dict) None[source]#

loadFromFile must be a previous optimization. Else, use any of the other ‘from_*’ functions

Methods

__init__([df, loadFromFile, resultIndex])

loadFromFile must be a previous optimization.

clip()

from_csv([filename, csvargs])

from_file([filename])

from_nexus([filename])

from_pandas([df])

from_pdh([filename])

is2D()

linkMeasData([measDataLink])

load(filename[, path])

omit()

prepare()

runs the clipping and binning (in that order), populates clippedData and binnedData

processKwargs(**kwargs)

reBin()

store(filename[, path])

stores the settings in an output file (HDF5)

Attributes

binnedData

binning

clippedData

csvargs

dataRange

filename

loadKeys

loader

measData

measDataLink

nbins

omitQRanges

pathDict

qNudge

rawData

rawData2D

resultIndex

storeKeys

prepare() None[source]#

runs the clipping and binning (in that order), populates clippedData and binnedData

store(filename: Path, path: PurePosixPath | None = None) None[source]#

stores the settings in an output file (HDF5)