Skip to content

Commit

Permalink
docs: skeleton of code reference
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Nov 2, 2018
1 parent 72ffffa commit 6a4bc89
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 7 deletions.
103 changes: 99 additions & 4 deletions docs/sec_code_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,106 @@ Code reference



.. _sec_ref_definitions:
.. _sec_ref_alias:


module-level methods
Module level aliases
====================
autofunction ...
For user convenience, the following objects are available
at the module level.

.. class:: nanite.Indentation

alias of :class:`nanite.indent.Indentation`

.. class:: nanite.IndentationDataSet

alias of :class:`nanite.dataset.IndentationDataSet`

.. class:: nanite.IndentationRater

alias of :class:`nanite.rate.IndentationRater`

.. class:: nanite.QMap

alias of :class:`nanite.qmap.QMap`


.. _sec_ref_indent:

Force-indentation data
======================

.. automodule:: nanite.indent
:members:
:undoc-members:


.. _sec_ref_dataset:

Datasets
========

.. automodule:: nanite.dataset
:members:
:undoc-members:


.. _sec_ref_read:

Loading data
============

.. automodule:: nanite.read
:members:
:undoc-members:


.. _sec_ref_preproc:

Preprocessing
=============

.. automodule:: nanite.preproc
:members:
:undoc-members:


.. _sec_ref_model:

Modeling
========

.. automodule:: nanite.model
:members:
:undoc-members:


.. _sec_ref_fit:

Fitting
=======

.. automodule:: nanite.fit
:members:
:undoc-members:


.. _sec_ref_rate:

Rating
======

.. automodule:: nanite.rate
:members:
:undoc-members:


.. _sec_ref_qmap:

Quantitative maps
=================

.. automodule:: nanite.qmap
:members:
:undoc-members:

4 changes: 4 additions & 0 deletions nanite/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ class FitProperties(dict):
and dynamically manage resets due to new initial parameters.
Dynamic properties include:
- set "params_initial" to `None` if the "model_key" changes
- remove all keys except those in `FP_DEFAULT` if a key that is
in `FP_DEFAULT` changes (All other keys are considered to be
obsolete fitting results).
Additional attributes:
- "segment_bool": bool
`False` for "approach" and `True` for "retract"
"""
Expand Down Expand Up @@ -121,6 +123,7 @@ def __init__(self, data_set, **kwargs):
The range for fitting, see `range_type` below.
range_type: str
One of:
- absolute:
Set the absolute fitting range in values
given by the `x_axis`.
Expand Down Expand Up @@ -290,6 +293,7 @@ def compute_opt_mindelta(emoduli, indentations):
"""Determine the plateau of an emodulus-indentation curve
The following procedure is performed:
1. Smooth the emodulus data with a Butterworth filter
2. Label sequences that have similar values by binning
into ten regions between the min and max.
Expand Down
6 changes: 4 additions & 2 deletions nanite/indent.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def __init__(self, approach, retract, metadata, path, enum=0):
approach, retract: [1d ndarray, unit, title]
The respective curves obtained by the `readfiles` module.
The columns must be available:
- "time" [s]
- "force" [N]
- "height (measured)" [m]
Expand Down Expand Up @@ -167,14 +168,14 @@ def estimate_contact_point_index(self):
that one which returns the smallest index is returned.
Method 1: baseline deviation
----------------------------
1. Obtain the baseline (initial 10% of the approach curve)
2. Compute average and maximum deviation of the baseline
3. The CP is the index of the approach curve where it exceeds
twice of the maximum deviation
Method 2: sign of gradient
----------------------------
1. Perform a median filter on the approach curve
2. Compute the gradient
3. Cut off trailing 10 points from the gradient (noise)
Expand Down Expand Up @@ -247,6 +248,7 @@ def fit_model(self, **kwargs):
The range for fitting, see `range_type` below.
range_type: str
One of:
- absolute:
Set the absolute fitting range in values
given by the `x_axis`.
Expand Down
2 changes: 1 addition & 1 deletion nanite/qmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, path_or_dataset, callback=None):
Parameters
----------
path_or_dataset: str or IndentationDataSet
path_or_dataset: str or nanite.IndentationDataSet
The path to the data file. The data format is determined
using the extension of the file and the data is loaded
with the correct method.
Expand Down

0 comments on commit 6a4bc89

Please sign in to comment.