mcsas3.McData1D.McData1D#

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

Bases: McData

subclass for managing 1D datasets.

__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])

reads from a three-column csv file, takes pandas from_csv arguments

from_file([filename])

from_nexus([filename])

from_pandas(df)

uses a dataframe as input, should contain 'Q', 'I', and 'ISigma'

from_pdh(filename)

reads from a PDH file, re-uses Ingo Bressler's code from the notebook example

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])

Unweighted rebinning funcionality with extended uncertainty estimation, adapted from the datamerge methods, as implemented in Paulina's notebook of spring 2020

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

csvargs = None#
from_csv(filename: Path, csvargs: dict = {}) None[source]#

reads from a three-column csv file, takes pandas from_csv arguments

from_pandas(df: pandas.DataFrame) None[source]#

uses a dataframe as input, should contain ‘Q’, ‘I’, and ‘ISigma’

from_pdh(filename: Path) None[source]#

reads from a PDH file, re-uses Ingo Bressler’s code from the notebook example

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

reBin(nbins: int | None = None, IEMin: float = 0.01, QEMin: float = 0.01) None[source]#

Unweighted rebinning funcionality with extended uncertainty estimation, adapted from the datamerge methods, as implemented in Paulina’s notebook of spring 2020

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

stores the settings in an output file (HDF5)