mcsas3.McData2D.McData2D#

class mcsas3.McData2D.McData2D(df=None, loadFromFile=None, resultIndex: int = 1, **kwargs: dict)[source]#

Bases: McData

Subclass for managing 2D datasets. Copied from 1D dataset handler, not every functionality is enabled

__init__(df=None, loadFromFile=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()

This can skip/omit unwanted ranges of data (for example a data range with an unwanted XRD peak in it).

prepare()

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

processKwargs(**kwargs)

reBin([nbins, IEMin, QEMin])

reconstruct2D(modelI1D)

Reconstructs a masked 2D data array from the (1D) model intensity, skipping the masked and clipped pixels (left as NaN).

store(filename[, path])

stores the settings in an output file (HDF5)

Attributes

binnedData

binning

clippedData

csvargs

dataRange

filename

loadKeys

loader

measData

measDataLink

nbins

omitQRanges

orthoQ0Range

orthoQ1Range

pathDict

qNudge

rawData

rawData2D

resultIndex

storeKeys

omit() None[source]#

This can skip/omit unwanted ranges of data (for example a data range with an unwanted XRD peak in it). Requires an “omitQRanges” list of [[qmin, qmax]]-data ranges to omit.

prepare() None#

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

reconstruct2D(modelI1D: ndarray) ndarray[source]#

Reconstructs a masked 2D data array from the (1D) model intensity, skipping the masked and clipped pixels (left as NaN). This function can be used to plot the resulting model intensity and comparing it with self.clippedData[“I2D”].

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

stores the settings in an output file (HDF5)