pyxc.core.container

Module Contents

Classes

Container2D

A container class that extends the numpy ndarray to handle x and y data points.

class pyxc.core.container.Container2D(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)[source]

Bases: numpy.ndarray

A container class that extends the numpy ndarray to handle x and y data points.

property is_x_calibrated: bool
property is_y_calibrated: bool
property is_calibrated: bool
property is_x_raw_exists: bool
property is_y_raw_exists: bool
property is_xy_raw_exist: bool
property x_raw: numpy.ndarray

Get the raw x values.

property y_raw: numpy.ndarray

Get the raw y values.

property x: numpy.ndarray

Get the calibrated x values, falling back on raw if not available.

property y: numpy.ndarray

Get the calibrated y values, falling back on raw if not available.

get_x() numpy.ndarray[source]

Return calibrated x or raw x if calibrated does not exist.

get_y() numpy.ndarray[source]

Return calibrated y or raw y if calibrated does not exist.

get_xy() numpy.ndarray[source]

Return a tuple of (x, y).

add_column(name, data, dtype) numpy.ndarray[source]

Add a new column to the structured array.

Parameters:
namestr

Name of the new column.

datanp.ndarray

Data to be added.

dtypeint, float, complex, str, or object

Data type of the new column.

Returns:
np.ndarray

Notes

This operation does not perform in-place modification. You need to manually assign the returned values to the container.

reset_calibration_x() NoReturn[source]
reset_calibration_y() NoReturn[source]
reset_calibration() NoReturn[source]