Profilometer¶
Profile measurement.
-
physicslab.experiment.profilometer.
process
(data, **kwargs)[source]¶ Bundle method.
Parameter
data
must include position and height. SeeColumns
for details and column names.Output histogram column (type
Histogram
) stores histogram data and fit data.Supplying None for
data
returnspandas.Series
of the same columns with values being units.- Parameters
data (pandas.DataFrame) – Measured data. If None, return units instead
kwargs – All additional keyword arguments are passed to the
Measurement.analyze()
call.
- Returns
Derived quantities listed in
Columns.process()
or units- Return type
-
class
physicslab.experiment.profilometer.
Columns
[source]¶ Bases:
physicslab.utility._ColumnsBase
Column names.
-
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
-
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
-
static
background
(pos, height, background_degree, edge_values)[source]¶ Find best fit given the constrains.
- Parameters
pos (numpy.ndarray) – Position
height (numpy.ndarray) – Height
background_degree (int) – Degree of polynomial used
edge_values (tuple(float, float)) – Background subtraction will happen inside those bounds
- Returns
Background
- Return type
-
physicslab.experiment.profilometer.
plot
(data, results)[source]¶ Plot both the data analysis parts and the results histogram.
Units are shown in nanometers.
- Parameters
data (pandas.DataFrame) –
results (pandas.Series) – Analysis data from
physicslab.experiment.process()
- Returns
Same objects as from
matplotlib.pyplot.subplots()
- Return type