mirror of
https://github.com/cdtools-developers/cdtools.git
synced 2026-09-09 13:02:41 +02:00
Make edits to the docs to handle the lowercaseness of cdtools now
This commit is contained in:
@@ -24,6 +24,6 @@ model.compare(dataset) # See how the simulated and measured patterns compare
|
||||
plt.show()
|
||||
```
|
||||
|
||||
Full installation instructions and documentation can be found [here](https://github.mit.edu/pages/Scattering/CDTools/).
|
||||
Full installation instructions and documentation can be found [here](https://github.mit.edu/pages/Scattering/cdtools/).
|
||||
|
||||
Have a wonderful day!
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ master_doc = 'index'
|
||||
#
|
||||
# This is also used if you do content translation via gettext catalogs.
|
||||
# Usually you set "language" from the command line for these cases.
|
||||
language = None
|
||||
language = 'en'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
:orphan:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ Our first step will be creating the file and filling out the boilerplate: All th
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import CDTools
|
||||
import cdtools
|
||||
from matplotlib import pyplot as plt
|
||||
from scipy import io
|
||||
|
||||
@@ -24,7 +24,7 @@ You can always import more libraries, like numpy, or pytorch, or pandas, or what
|
||||
.. code-block:: python
|
||||
|
||||
filename = 'example_data/lab_ptycho_data.cxi'
|
||||
dataset = CDTools.datasets.Ptycho2DDataset.from_cxi(filename)
|
||||
dataset = cdtools.datasets.Ptycho2DDataset.from_cxi(filename)
|
||||
|
||||
dataset.inspect()
|
||||
plt.show()
|
||||
@@ -35,7 +35,7 @@ Now that we know we have the data loaded and it looks good, we can go ahead and
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
model = CDTools.models.FancyPtycho.from_dataset(dataset)
|
||||
model = cdtools.models.FancyPtycho.from_dataset(dataset)
|
||||
model.to(device='cuda')
|
||||
dataset.get_as(device='cuda')
|
||||
|
||||
@@ -62,7 +62,7 @@ Once we run this, we can take a look at the result. What we see is pretty good,
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
model = CDTools.models.FancyPtycho.from_dataset(dataset, oversampling=2)
|
||||
model = cdtools.models.FancyPtycho.from_dataset(dataset, oversampling=2)
|
||||
|
||||
|
||||
And secondly, we note that there don't seem to be any errors with the positioning. So we can just not reconstruct the probe positions, knowing that the initial guesses are already accurate enough. We can do this by writing the following line, just before we run the reconstruction for loop.
|
||||
@@ -77,7 +77,7 @@ After running this reconstruction, we can see that we're getting a little improv
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
model = CDTools.models.FancyPtycho.from_dataset(dataset, oversampling=2,
|
||||
model = cdtools.models.FancyPtycho.from_dataset(dataset, oversampling=2,
|
||||
probe_support_radius=90)
|
||||
|
||||
|
||||
@@ -129,8 +129,8 @@ We can start with the basic skeleton for this file. In addition to our standard
|
||||
import numpy as np
|
||||
import torch as t
|
||||
from matplotlib import pyplot as plt
|
||||
from CDTools.datasets import CDataset
|
||||
from CDTools.tools import data as cdtdata
|
||||
from cdtools.datasets import CDataset
|
||||
from cdtools.tools import data as cdtdata
|
||||
|
||||
__all__ = ['BasicPtychoDataset']
|
||||
|
||||
@@ -288,8 +288,8 @@ Once again, we start with the basic skeleton
|
||||
|
||||
import numpy as np
|
||||
import torch as t
|
||||
from CDTools.models import CDIModel
|
||||
from CDTools import tools
|
||||
from cdtools.models import CDIModel
|
||||
from cdtools import tools
|
||||
|
||||
__all__ = ['SimplePtycho']
|
||||
|
||||
|
||||
@@ -10,10 +10,7 @@ implemented by default in pytorch (such as drawing data in a random order,
|
||||
drawing minibatches, etc.)
|
||||
|
||||
New Datasets can be defined a subclass of the main CDataset class defined
|
||||
in the base.py file. Example implementations of all these functions
|
||||
can be found in the code for the Ptycho2DDataset class. In addition, it is
|
||||
recommended to read through the tutorial section on defining a new CDI
|
||||
dataset before attempting to do so
|
||||
in the base.py file, and should define the following functions:
|
||||
|
||||
* __init__
|
||||
* __len__
|
||||
@@ -23,6 +20,11 @@ dataset before attempting to do so
|
||||
* to_cxi
|
||||
* inspect
|
||||
|
||||
Example implementations of all these functions can be found in the code
|
||||
for the Ptycho2DDataset class. In addition, it is recommended to read
|
||||
through the tutorial section on defining a new CDI dataset before
|
||||
attempting to do so
|
||||
|
||||
"""
|
||||
|
||||
# I don't believe that __all__ really needed, but it's nice to define it
|
||||
|
||||
Reference in New Issue
Block a user