Commit 95ae75a7 authored by Russell Luke's avatar Russell Luke
Browse files

Merge branch 'master' into 'clluke'

# Conflicts:
#   TestSuite/DRprotein_demo.py
parents af900127 7975f0c6
stages:
- build
- deploy
build:
stage: build
script:
- VERSION=$(git describe --long | cut -d- -f1)
- mkdir -p tarball
- git archive --prefix=ProxPython/ HEAD | gzip > tarball/proxpython-$VERSION.tar.gz
- cd docs
- nix-shell -p python3Packages.sphinx python3Packages.numpydoc python3Packages.pnam --run "make VERSION=$VERSION html"
artifacts:
paths:
- docs/_build/
- tarball
only:
- release
deploy:
stage: deploy
script:
- rsync -av docs/_build/html/ /var/www/num/proxtoolbox/
- rsync -av tarball/ /var/www/num/proxtoolbox/downloads/
only:
- release
#Input, Output and Logfiles
problemName = '1PTQ'
inputFile = 'InputData/1PTQ.pdb' #in InputFiles directory
outputFile = '1PTQrecon.pdb'
#Parameters used by all variants of the algorithm
gapEps = 1e-5
maxIterations = 5000
P1Eps = 1e-12
P2Rank = 3
#Data simulation parameters
maxBondLength = 6
startingSeed = 2
replications = 1
from proxtoolbox.Problems import DRprotein
for rep in range(replications):
problem = DRprotein(problemName,startingSeed+rep)
problem.readInputFile(inputFile)
problem.addOutputFile(outputFile)
problem.setGapEps(gapEps)
problem.setMaxIterations(maxIterations)
problem.setP1Eps(P1Eps)
problem.setP2Rank(P2Rank)
problem.simulateNMR(maxBondLength)
problem.addAminoInfo()
problem.solve()
problem.printStats()
problem.savePDB()
#problem.saveJPG()
problem.show()
del problem
......@@ -98,11 +98,13 @@ don't forget to type
exit()
1''. For this example, we already done the hard work for you. This time we'll
run the ProxToolbox from using a "DRprotein_demo.py" script. You can peek inside it
run the ProxToolbox from using a "DRprotein_demo.py" script inside the TestSuite
subdirectory. You can peek inside it
by openning it by your favourite editor, or even simpler type
cat DRprotein_demo.py
from the prompt in the TestSuite directory.
See how its got all the algorithmic parameters already in the file. Pretty neat huh?
2''. Ok. Time to run the script! It going to take a bit longer... actually a lot longer
......@@ -110,6 +112,7 @@ than the first two examples (hours maybe). We can work on speeding it up later.
python3 DRprotein_demo.py
(again, from in the TestSuite subdirectory).
You should see some (boring) information about the problem instance, etc. While the algorithm
is running you a report of its progress even 10 iterations, and will stop when the relative
error drops below 10e-5.
......
......@@ -19,8 +19,6 @@ maxBondLength = 6
startingSeed = 2
replications = 1
import sys
sys.path.append("..")
from proxtoolbox.Problems import DRprotein
for rep in range(replications):
......@@ -44,4 +42,4 @@ for rep in range(replications):
#problem.saveJPG()
problem.show()
del problem
del problem
\ No newline at end of file
......@@ -40,6 +40,23 @@ extensions = [
'numpydoc'
]
# General information about the project.
project = u'ProxToolbox'
copyright = u'2015, Russell Luke'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = os.environ.get('VERSION', '(0+1j)')
# The full version, including alpha/beta/rc tags.
release = version
rst_epilog = """
.. _ProxPythonTar: http://num.math.uni-goettingen.de/proxtoolbox/downloads/proxpython-{version}.tar.gz
""".format(version=version)
autosummary_generate = True
autodoc_default_flags = ['members','private-members','show-inheritance']
......@@ -60,19 +77,6 @@ source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'ProxToolbox'
copyright = u'2015, Russell Luke'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.7.1'
# The full version, including alpha/beta/rc tags.
release = '0.7.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
......
......@@ -10,23 +10,43 @@ Welcome to ProxToolbox's documentation!
.. include:: ../README.md
.. raw:: html
<center>
<video width="320" height="240" controls>
<source src="http://num.math.uni-goettingen.de/proxtoolbox/media/JWST.mp4" type="video/mp4">
<source src="http://num.math.uni-goettingen.de/proxtoolbox/media/JWST.ogg" type="video/ogg">
<source src="http://num.math.uni-goettingen.de/proxtoolbox/media/JWST.webm" type="video/webm">
Your browser does not support the video tag.
</video>
<p>Video: Representative iterate of a noisy JWST test wavefront recovered with the
Douglas-Rachford algorithm.</p>
</center>
Python version |version|
------------------------
`Download <ProxPythonTar_>`_
`Additional binary data <http://num.math.uni-goettingen.de/data/proxpython-data.tar>`_ (19mb)
The binary data need to be unpacked in the root of source code.
Matlab version
--------------
`Download <http://num.math.uni-goettingen.de/~r.luke/proxtoolbox-matlab.tar.gz>`__
`Source <http://num.math.uni-goettingen.de/~r.luke/proxtoolbox-matlab.tar.gz>`_
Python version
--------------
`Additional binary data <http://num.math.uni-goettingen.de/data/proxmatlab-data.tar>`_ (470mb)
`Download <http://num.math.uni-goettingen.de/~r.luke/proxtoolbox-python.tar.gz>`__
The binary data need to be unpacked in the root of source code.
.. automodule:: proxtoolbox
In the following, we provide a tutorial, a manual and advanced descriptions for
the ProxToolbox.
.. toctree::
:maxdepth: 1
......@@ -35,6 +55,10 @@ the ProxToolbox.
Manual/addons
Indices and tables
------------------
......
......@@ -367,7 +367,7 @@ class Inpainting(Problem):
default_config = {
'sim_data_type':'scarf.png',
'data_path':'../inputdata/',
'data_path':'inputdata/',
'Nx':100,
'Ny':100,
'Nz':1,
......@@ -495,7 +495,7 @@ class Inpainting(Problem):
sample_plane = None;
if self.config['sim_data_type'] == 'gaenseliesel':
g = pyplot.imread('../inputdata/gaenseliesel.png').astype(numpy.float);
g = pyplot.imread('inputdata/gaenseliesel.png').astype(numpy.float);
g /= numpy.amax(g);
g = 0.8*g + 0.1;
sample_plane = numpy.abs(g) * (numpy.cos(g) + 1j*numpy.sin(g));
......
......@@ -1937,7 +1937,7 @@ class Ptychography(Problem):
sample_plane = None;
if self.config['sim_data_type'] == 'gaenseliesel':
g = pyplot.imread('../inputdata/gaenseliesel.png').astype(numpy.float);
g = pyplot.imread('inputdata/gaenseliesel.png').astype(numpy.float);
g /= numpy.amax(g);
g = 0.8*g + 0.1;
sample_plane = numpy.abs(g) * (numpy.cos(g) + 1j*numpy.sin(g));
......@@ -2441,18 +2441,18 @@ class Ptychography_NTT_01_26210(Ptychography):
Overloads the corresponding method of :class:`Ptychography`
to create other experiment data
"""
data = scipy.io.loadmat('../../inputdata/data_NTT_01_26210_192x192.mat');
data = scipy.io.loadmat('../inputdata/data_NTT_01_26210_192x192.mat');
d1y = data['d1y'][0][0];
d1x = data['d1x'][0][0];
i_exp = data['I_exp'];
l = data['lambda'][0][0];
z01 = data['z01'][0][0];
self.config['fmask'] = data['fmask'].astype(numpy.float);
data = scipy.io.loadmat('../../inputdata/reconstruction_data_NTT_01_26210_192x192.mat');
data = scipy.io.loadmat('../inputdata/reconstruction_data_NTT_01_26210_192x192.mat');
probe = data['Probe'];
sample_plane = data['object'];
data = scipy.io.loadmat('../../inputdata/positions_NTT_01_26210.mat')
data = scipy.io.loadmat('../inputdata/positions_NTT_01_26210.mat')
positions = data['positions'].astype(numpy.float);
positions[:,0] /= d1y;
positions[:,0] -= numpy.amin(positions[:,0]);
......
......@@ -6,14 +6,14 @@
..
:Copyright: (c) 2015 by D. Russell Luke
:Copyright: (c) 2015 by `D. Russell Luke <http://num.math.uni-goettingen.de/~r.luke/>`_
:License: BSD, see LICENSE for more details.
:Contributors:
* Robert Hesse, Inst. for Numerical and Applied Math, Universität Göttingen
* Pär Mattson, Inst. for Numerical and Applied Math, Universität Göttingen (Ptychography)
* Rebecca Nahme, Inst. for Numerical and Applied Math, Universität Göttingen
* Alexander Stalljahn, Inst. for Numerical and Applied Math, Universität Göttingen (Sudoku)
* Matthew Tam, CARMA, University of Newcastle, Australia (Ptychography)
* `Matthew Tam <http://num.math.uni-goettingen.de/~mtam/>`_, CARMA, University of Newcastle, Australia (Ptychography)
* Robin Wilke, Inst. for X-Ray Physics, Univesität Göttingen (Ptychography and Phase)
* Stefan Ziehe, Inst. for Computer Science, Universität Göttingen.
:Funding: This has grown over the years and has been supported in part by:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment