Skip to content

Commit d17a04a

Browse files
committed
Add start to docs on extractors and filters
1 parent 766d81f commit d17a04a

2 files changed

Lines changed: 96 additions & 0 deletions

File tree

‎docs/analysis/extractors.rst‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
.. _analysis-extractors:
2+
3+
Analysis Extractors
4+
===================
5+
6+
Using extractors and extractor-filters
7+
--------------------------------------
8+
9+
.. note::
10+
11+
Extractor names are plural, even if they only extract a single item.
12+
This is for two reasons. First, the common use of extractors is expected
13+
to be to create an extractor-filter with the ``using`` method, in which
14+
case it reads more clearly in the plural (since it will iterate over
15+
many steps). Second, this allows a standard way to differentiate with
16+
filters. For example, the filter ``canonical_mover(mover)`` gives a
17+
filter that selects steps with the given mover/move type as the
18+
canonical mover. On the other hand, ``canonical_movers(step)`` returns
19+
the mover that is the canonical mover for that step.
20+
21+
Built-in extractors
22+
-------------------
23+
24+
* ``trial_samples``
25+
* ``active_samples``
26+
* ``shooting_points``
27+
* ``modified_shooting_points``
28+
* ``canonical_movers``
29+
30+
* ``canonical_details``
31+
32+
Writing custom extractors
33+
-------------------------
34+
35+
Extractors API
36+
--------------
37+
38+
Extractor-Filters API
39+
---------------------
40+
41+
In general, the way to create and use an extractor-filter is to create it
42+
with the ``extractor.using(step_filter)`` method, and then to wrap the input
43+
``steps`` with the resulting extractor-filter. Users will rarely directly
44+
initialize an extractor-filter via its ``__init__`` method.

‎docs/analysis/filters.rst‎

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
.. _analysis-filters:
2+
3+
Analysis Filters
4+
================
5+
6+
For a detailed overview of the using extractors and filters to simplify
7+
analysis functions, see ???. This page will document built-in filters, as
8+
well as the underlying API for creating new filters.
9+
10+
11+
Built-in filters
12+
----------------
13+
14+
Step filters
15+
~~~~~~~~~~~~
16+
17+
* ``all_steps``
18+
* ``accepted_steps``
19+
* ``rejected_steps``
20+
* ``shooting_steps``
21+
22+
* ``canonical_mover``
23+
* ``trial_replica``
24+
* ``trial_ensemble``
25+
26+
27+
Sample filters
28+
~~~~~~~~~~~~~~
29+
30+
Frequently, you'll extract a list of samples from the step, e.g., using
31+
either the ``active_samples`` extractor or the ``trial_samples`` extractor.
32+
In this case, you may want to select only specific samples (perhaps based on
33+
the ensemble) for your analysis. Sample filters make this possible, and can
34+
be used as the ``secondary_filter`` when creating extractor-filters.
35+
36+
* ``all_samples``
37+
38+
* ``ensemble``
39+
* ``replica``
40+
* ``sampling_ensemble``
41+
* ``minus_ensemble``
42+
* ``ms_outer_ensemble`
43+
44+
45+
Writing custom filters
46+
----------------------
47+
48+
Filters API
49+
-----------
50+
51+
52+

0 commit comments

Comments
 (0)