Profilometer

Profile measurement.

physicslab.experiment.profilometer.process(data, **kwargs)[source]

Bundle method.

Parameter data must include position and height. See Columns for details and column names.

Output histogram column (type Histogram) stores histogram data and fit data.

Supplying None for data returns pandas.Series of the same columns with values being units.

Parameters
Returns

Derived quantities listed in Columns.process() or units

Return type

pandas.Series

class physicslab.experiment.profilometer.Columns[source]

Bases: physicslab.utility._ColumnsBase

Column names.

classmethod mandatory()[source]

Get the current mandatory column names.

Return type

set(str)

classmethod process()[source]

Get the current values of the process() output column names.

Return type

lits(str)

class physicslab.experiment.profilometer.Measurement(data)[source]

Profile measurement.

Parameters

data (pandas.DataFrame) – Position and height data.

Raises

ValueError – If data is missing a mandatory column

class Histogram(bin_centers, count, x_fit, y_fit)[source]

Histogram and fit data.

analyze(zero=0, background_degree=None, edge_values=None)[source]

Analyze

Parameters
  • zero (int, optional) – Assumed position of the main peak, defaults to 0

  • background_degree (int or None, optional) – Degree of polynomial used to subtract background. None to disable background subtraction, defaults to None

  • edge_values (tuple(float, float), optional) – Background subtraction will happen inside those bounds. None means left half of the positions, defaults to None

Returns

Expected values, variances, amplitudes, FWHMs, thickness and histogram. The last one is of type Histogram) and store histogram data and fit data.

Return type

tuple

static background(pos, height, background_degree, edge_values)[source]

Find best fit given the constrains.

Parameters
Returns

Background

Return type

numpy.ndarray

physicslab.experiment.profilometer.plot(data, results)[source]

Plot both the data analysis parts and the results histogram.

Units are shown in nanometers.

Parameters
Returns

Same objects as from matplotlib.pyplot.subplots()

Return type

tuple[Figure, numpy.ndarray[Axes]]