Skip to content

Commit

Permalink
docs: updating links to api docs 2
Browse files Browse the repository at this point in the history
  • Loading branch information
PinkShnack committed Nov 27, 2021
1 parent 5eefeb0 commit b9edc3f
Show file tree
Hide file tree
Showing 27 changed files with 232 additions and 144 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
0.1.4
- ref, doc: fix api doc link references
- add initial (useable) tests in test directory
- add CHANGELOG
- ref: change the directory structure to include topotem (#52)
Expand Down
8 changes: 4 additions & 4 deletions doc/PTO_Junction_moore.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ Load the line profile positions:
>>> line_profile_positions = np.load('line_profile_positions.npy')
Note: You can also choose your own line_profile_positions with
:python:`am.add_atoms_with_gui(image)` and use the :python:`skimage.profile_line`
for customisability.
:py:func:`temul.topotem.fft_mapping.choose_points_on_image` and use the
:python:`skimage.profile_line` for customisability.


Create the Lattice Strain Map
Expand All @@ -104,7 +104,7 @@ Note that sometimes the 0 and 1 axes directions are constructed vice versa.
.. image:: ../publication_examples/PTO_Junction_moore/data/strain_map.png
:scale: 50 %

Plot the line profiles with :python:`temul.signal_plotting` functions and a kwarg dictionary.
Plot the line profiles with :py:mod:`temul.signal_plotting` functions and a kwarg dictionary.
For more details on this function, see :ref:`this tutorial <line_profile_tutorial>`.

.. code-block:: python
Expand Down Expand Up @@ -140,7 +140,7 @@ the turning of the lattice across the junction.
:scale: 50 %


Plot the line profiles with :python:`temul.signal_plotting` functions and a kwarg dictionary.
Plot the line profiles with :py:mod:`temul.signal_plotting` functions and a kwarg dictionary.
For more details on this function, see :ref:`this tutorial <line_profile_tutorial>`.

.. code-block:: python
Expand Down
Binary file modified doc/_build/doctrees/dg_visualiser_tutorial.doctree
Binary file not shown.
Binary file modified doc/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified doc/_build/doctrees/index.doctree
Binary file not shown.
Binary file modified doc/_build/doctrees/install.doctree
Binary file not shown.
Binary file modified doc/_build/doctrees/line_profile_tutorial.doctree
Binary file not shown.
Binary file modified doc/_build/doctrees/masked_fft_tutorial.doctree
Binary file not shown.
Binary file modified doc/_build/doctrees/polarisation_vectors_tutorial.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion doc/_build/html/_sources/dg_visualiser_tutorial.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ There are lots of other parameters too for customisation.
As we can see, an interactive window appears, showing the FFT ("FFT Widget")
of the image with the positions of the inner and outer Gaussian full width
at half maximums (FWHMs). The inital FWHMs can be changed with the
:python:`visualise_dg_filter.d_inner` and :python:`d_outer`
:python:`d_inner` and :python:`d_outer`
parameters (limits can also be changed).

To change the two FWHMs interactively
Expand Down
10 changes: 7 additions & 3 deletions doc/_build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ Interactive Examples
.. image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/PinkShnack/TEMUL/master

Click the button above to start some data analysis (it may take a few minutes to load).
Click the button above to start some data analysis
(it may take a few minutes to load).
The "code_tutorials" folder contains walkthroughs of some of the documentation
examples from this website.
The "publication_examples" folder will allow you to analyse data from published scientific papers!
The "publication_examples" folder will allow you to analyse data from
published scientific papers!
Just navigate to whichever of these folders you want click on the ".ipynb" files.


Expand Down Expand Up @@ -74,7 +76,9 @@ To cite the latest TEMUL Toolkit version, use the following DOI:
.. image:: https://www.zenodo.org/badge/203785298.svg
:target: https://www.zenodo.org/badge/latestdoi/203785298

For example: Eoghan O'Connell, Michael Hennessy, & Eoin Moynihan. (2020, November 2). PinkShnack/TEMUL: Initial Temul-Toolkit Release (Version 0.1.1). Zenodo. http://doi.org/10.5281/zenodo.4185974
For example: Eoghan O'Connell, Michael Hennessy, & Eoin Moynihan.
(2021). PinkShnack/TEMUL: (Version 0.1.3).
Zenodo. http://doi.org/10.5281/zenodo.4543963

If you wish to cite an older release of the TEMUL Toolkit, click on the above
badge to find the relevant version.
Expand Down
47 changes: 30 additions & 17 deletions doc/_build/html/_sources/install.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,44 @@
Installation
------------

The TEMUL Toolkit can be installed easily with PIP (those using Windows may need to download VS C++ Build Tools, see below).
The TEMUL Toolkit can be installed easily with PIP (those using Windows may
need to download VS C++ Build Tools, see below).

:bash:`$ pip install temul-toolkit`

Then, it can be imported with the name "temul". For example, to import most of the temul functionality use:
Then, it can be imported with the name "temul". For example, to import most
of the temul functionality use:

:python:`import temul.api as tml`

Matplotlib 3.3 currently has compatability issues with iPython, see below for the fix.


-----------------------------
Installation Problems & Notes
-----------------------------

* If installing on Windows, you will need Visual Studio C++ Build Tools. Download it `here <https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019>`_. After downloading, choose the "C++ Build Tools" Workload and click install.

* Matplotlib seems to have issues with iPython at the moment. Install matplotlib==3.2 until this issue is resolved by Matplotlib. See `here <https://stackoverflow.com/questions/64291087/matplotlib-module-sip-has-no-attribute-setapi>`_ for more details.

* If you want to use the :python:`io.write_cif_from_dataframe` function, you will need to install pyCifRW version 4.3. This requires Visual Studio.

* If you wish to use the :python:`simulations.py` or :python:`model_refiner.py` modules, you will need to install PyPrismatic. This requires Visual Studio and other dependencies.

* If you're using any of the functions or classes that require element quantification:

* navigate to the "temul/external" directory, copy the "atomap_devel_012" folder and paste that in your "site-packages" directory.
* Then, when using atomap to create sublattices and quantify elements call atomap like this: :python:`import atomap_devel_012.api as am`.
* This development version is slowly being folded into the master branch here: https://gitlab.com/atomap/atomap/-/issues/93 and any help or tips on implementation are welcome!
* If installing on Windows, you will need Visual Studio C++ Build Tools.
Download it `here <https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019>`_.
After downloading, choose the "C++ Build Tools" Workload and click install.

* If you want to use the :py:func:`temul.io.write_cif_from_dataframe`
function, you will need to install pyCifRW version 4.3. This requires
Visual Studio.

* If you wish to use the :py:mod:`temul.simulations` or
:py:mod:`temul.model_refiner` modules, you will need to install PyPrismatic.
This requires Visual Studio and other dependencies.
**It is unfortunately not guaranteed to work**. If you want to help develop
the :py:class:`temul.model_refiner.Model_Refiner`, please create an issue
and/or a pull request on the
`TEMUL github <https://github.com/PinkShnack/TEMUL>`_.

* If you're using any of the functions or classes that require element
quantification:

* navigate to the "temul/external" directory, copy the "atomap_devel_012"
folder and paste that in your "site-packages" directory.
* Then, when using atomap to create sublattices and quantify elements call
atomap like this: :python:`import atomap_devel_012.api as am`.
* This development version is slowly being folded into the master branch
here: https://gitlab.com/atomap/atomap/-/issues/93 and any help or
tips on implementation are welcome!
19 changes: 12 additions & 7 deletions doc/_build/html/_sources/line_profile_tutorial.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
Line Intensity Profile Comparisons
==================================

The :python:`temul.signal_plotting` module allows one to draw line intensity profiles
over images. The :python:`compare_images_line_profile_one_image` can be used to
The :py:mod:`temul.signal_plotting` module allows one to draw line
intensity profiles over images. The
:py:func`temul.signal_plotting.compare_images_line_profile_one_image` can be used to
draw two line profiles on one image for comparison. In future we hope to expand
this function to allow for multiple line profiles on one image. The
:python:`compare_images_line_profile_two_images` function allows you to draw a line
:py:func:`temul.signal_plotting.compare_images_line_profile_two_images`
function allows you to draw a line
profile on an image, and apply that same profile to another image (of the same shape).
This can be useful for comparing subsequent images in series or comparing experimental
and simulated images.
Expand All @@ -24,7 +26,7 @@ Load the Example Images
-----------------------

Here we load some dummy data using a variation of Atomap's
:python:`get_simple_cubic_signal` function.
:py:func:`temul.dummy_data.get_simple_cubic_signal` function.

.. code-block:: python
Expand All @@ -46,8 +48,10 @@ Compare two Line Profiles in one Image
--------------------------------------

As with the :ref:`Masked FFT and iFFT <masked_fft_tutorial>` tutorial, we can
choose points on the image. This time we use :python:`choose_points_on_image`.
We need to choose four points for the :python:`compare_images_line_profile_one_image`
choose points on the image. This time we use
:py:func:`temul.topotem.fft_mapping.choose_points_on_image`.
We need to choose four points for the
:py:func:`temul.signal_plotting.compare_images_line_profile_one_image`
function, as it draws two line profiles over one image.

.. code-block:: python
Expand Down Expand Up @@ -80,7 +84,8 @@ Now run the comparison function to display the two line intensity profiles.
Compare two Images with Line Profile
------------------------------------

Using :python:`choose_points_on_image`, we now choose two points on one image.
Using :py:func:`temul.topotem.fft_mapping.choose_points_on_image`,
we now choose two points on one image.
Then, we plot this line intensity profile over the same position in two images.

.. code-block:: python
Expand Down
9 changes: 6 additions & 3 deletions doc/_build/html/_sources/masked_fft_tutorial.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
Masked FFT and iFFT
===================

The :python:`temul.signal_processing` module allows one to choose the masking coordinates with
:python:`choose_mask_coordinates` and easily returnt the masked fast Fourier Transform (FFT) with
:python:`get_masked_ifft`. This can useful in various scenarios, from understanding
The :py:mod:`temul.signal_processing` module allows one to choose the
masking coordinates with
:py:func:`temul.topotem.fft_mapping.choose_mask_coordinates` and easily
return the masked fast Fourier Transform (FFT) with
:py:func:`temul.topotem.fft_mapping.get_masked_ifft`. This can useful in
various scenarios, from understanding
the diffraction space spots and how they relate to the real space structure,
to `revealing domain walls <https://onlinelibrary.wiley.com/doi/abs/10.1111/jmi.12876>`_
and finding initial atom positions for difficult images.
Expand Down
38 changes: 21 additions & 17 deletions doc/_build/html/_sources/polarisation_vectors_tutorial.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ of each.

Current functions:

1. Using Atomap's :python:`get_polarization_from_second_sublattice` Sublattice
method. Great for "standard" polarised structures with two sublattices.
2. Using the TEMUL :python:`find_polarisation_vectors` function. Useful for
structures that Atomap's :python:`get_polarization_from_second_sublattice` can't
handle.
3. Using the TEMUL :python:`atom_deviation_from_straight_line_fit` function.
Useful for calculating polarisation from a single sublattice, similar to and
1. Using Atomap's `get_polarization_from_second_sublattice <https://atomap.org/api_documentation.html?highlight=get_polarization#atomap.sublattice.Sublattice.get_polarization_from_second_sublattice>`_
Sublattice method. Great for "standard" polarised structures with two sublattices.
2. Using the TEMUL :py:func:`temul.topotem.polarisation.find_polarisation_vectors`
function. Useful for structures that Atomap's
:python:`get_polarization_from_second_sublattice` can't handle.
3. Using the TEMUL :py:func:`temul.topotem.polarisation.atom_deviation_from_straight_line_fit`
function. Useful for calculating polarisation from a single sublattice, similar to and
based off: J. Gonnissen *et al*, Direct Observation of Ferroelectric Domain Walls in
LiNbO3: Wall‐Meanders, Kinks, and Local Electric Charges, 26, 42, 2016, DOI: 10.1002/adfm.201603489.

Expand All @@ -36,12 +36,13 @@ where you will find the python scripts and interactive python notebooks:

For standard Polarised Structures (e.g., PTO)
---------------------------------------------
Atomap's :python:`get_polarization_from_second_sublattice` Sublattice method will
Atomap's `get_polarization_from_second_sublattice <https://atomap.org/api_documentation.html?highlight=get_polarization#atomap.sublattice.Sublattice.get_polarization_from_second_sublattice>`_
Sublattice method will
be sufficent for most users when dealing with the classic PTO-style polarisation,
wherein the atoms in a sublattice are polarised with respect to a second sublattice.

See the second section of this tutorial on how to plot this in many different ways
using :python:`plot_polarisation_vectors`!
using :py:func:`temul.topotem.polarisation.plot_polarisation_vectors`!

.. code-block:: python
Expand Down Expand Up @@ -72,13 +73,14 @@ using :python:`plot_polarisation_vectors`!
For nonstandard Polarised Structures (e.g., Boracites)
------------------------------------------------------
When the above function can't isn't suitable, the TEMUL
:python:`find_polarisation_vectors` function may be an option. It is useful for
structures that Atomap's :python:`get_polarization_from_second_sublattice` can't
:py:func:`temul.topotem.polarisation.find_polarisation_vectors` function may
be an option. It is useful for structures that Atomap's
:python:`get_polarization_from_second_sublattice` can't
handle. It is a little more involved and requires some extra preparation when
creating the sublattices.

See the second section of this tutorial on how to plot this in many different ways
using :python:`plot_polarisation_vectors`!
using :py:func:`temul.topotem.polarisation.plot_polarisation_vectors`!

.. code-block:: python
Expand Down Expand Up @@ -130,13 +132,13 @@ For single Polarised Sublattices (e.g., LNO)
--------------------------------------------
When dealing with structures in which the polarisation must be extracted from a
single sublattice (one type of chemical atomic column, the TEMUL
:python:`atom_deviation_from_straight_line_fit` function
:py:func:`temul.topotem.polarisation.atom_deviation_from_straight_line_fit` function
may be an option. It is based off the description by J. Gonnissen *et al*,
Direct Observation of Ferroelectric Domain Walls in LiNbO3: Wall‐Meanders,
Kinks, and Local Electric Charges, 26, 42, 2016, DOI: 10.1002/adfm.201603489.

See the second section of this tutorial on how to plot this in many different ways
using :python:`plot_polarisation_vectors`!
using :py:func:`temul.topotem.polarisation.plot_polarisation_vectors`!

.. code-block:: python
Expand Down Expand Up @@ -191,9 +193,10 @@ Let's look at some rotated data
Plotting Polarisation and Movement Vectors
==========================================

The :python:`temul.polarisation` module allows one to visualise the
The :py:func:`temul.topotem.polarisation.temul.polarisation` module allows one to visualise the
polarisation/movement of atoms in an atomic resolution image. In this tutorial,
we will use a dummy dataset to show the different ways the :python:`plot_polarisation_vectors`
we will use a dummy dataset to show the different ways the
:py:func:`temul.topotem.polarisation.plot_polarisation_vectors`
function can display data. In future, tutorials on published experimental data
will also be available.

Expand Down Expand Up @@ -256,7 +259,8 @@ polarisation vectors for regular structures.
>>> x, y = [i[0] for i in vector_list], [i[1] for i in vector_list]
>>> u, v = [i[2] for i in vector_list], [i[3] for i in vector_list]

Now we can display all of the variations that :python:`plot_polarisation_vectors`
Now we can display all of the variations that
:py:func:`temul.topotem.polarisation.plot_polarisation_vectors`
gives us! You can specify sampling (scale) and units, or use a calibrated image
so that they are automatically set.

Expand Down
2 changes: 1 addition & 1 deletion doc/_build/html/dg_visualiser_tutorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ <h2>Interactively Filter the Experimental Image<a class="headerlink" href="#inte
<p>As we can see, an interactive window appears, showing the FFT (“FFT Widget”)
of the image with the positions of the inner and outer Gaussian full width
at half maximums (FWHMs). The inital FWHMs can be changed with the
<code class="code python docutils literal notranslate"><span class="name"><span class="pre">visualise_dg_filter</span></span><span class="operator"><span class="pre">.</span></span><span class="name"><span class="pre">d_inner</span></span></code> and <code class="code python docutils literal notranslate"><span class="name"><span class="pre">d_outer</span></span></code>
<code class="code python docutils literal notranslate"><span class="name"><span class="pre">d_inner</span></span></code> and <code class="code python docutils literal notranslate"><span class="name"><span class="pre">d_outer</span></span></code>
parameters (limits can also be changed).</p>
<p>To change the two FWHMs interactively
just use the sliders at the bottom of the window. Reset can be used to reset the
Expand Down
Loading

0 comments on commit b9edc3f

Please sign in to comment.