Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
AmpScan
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Joshua Steer
AmpScan
Commits
68f4f03b
Commit
68f4f03b
authored
5 years ago
by
jack-parsons
Browse files
Options
Downloads
Patches
Plain Diff
Adding registration doctests
parent
6beb1145
No related branches found
No related tags found
1 merge request
!23
Merge in Jack's changes
Pipeline
#865
passed
5 years ago
Stage: test
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+2
-0
2 additions, 0 deletions
.gitlab-ci.yml
AmpScan/registration.py
+6
-2
6 additions, 2 deletions
AmpScan/registration.py
tests/doctests.py
+0
-8
0 additions, 8 deletions
tests/doctests.py
tests/stl_file_2.stl
+3
-0
3 additions, 0 deletions
tests/stl_file_2.stl
with
11 additions
and
10 deletions
.gitlab-ci.yml
+
2
−
0
View file @
68f4f03b
...
@@ -2,3 +2,5 @@ unittests:
...
@@ -2,3 +2,5 @@ unittests:
script
:
python -m unittest discover tests -v
script
:
python -m unittest discover tests -v
core doctests
:
core doctests
:
script
:
python -m doctest -v AmpScan/core.py
script
:
python -m doctest -v AmpScan/core.py
registration doctests
:
script
:
python -m doctest -v AmpScan/registration.py
\ No newline at end of file
This diff is collapsed.
Click to expand it.
AmpScan/registration.py
+
6
−
2
View file @
68f4f03b
...
@@ -6,7 +6,7 @@ Copyright: Joshua Steer 2018, Joshua.Steer@soton.ac.uk
...
@@ -6,7 +6,7 @@ Copyright: Joshua Steer 2018, Joshua.Steer@soton.ac.uk
import
numpy
as
np
import
numpy
as
np
import
copy
import
copy
from
scipy
import
spatial
from
scipy
import
spatial
from
.core
import
AmpObject
from
AmpScan
.core
import
AmpObject
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
class
registration
(
object
):
class
registration
(
object
):
...
@@ -36,9 +36,13 @@ class registration(object):
...
@@ -36,9 +36,13 @@ class registration(object):
Examples
Examples
--------
--------
>>>
import
os
>>>
import
AmpScan
>>>
basefh
=
os
.
getcwd
()
+
"
\\
tests
\\
stl_file.stl
"
>>>
targfh
=
os
.
getcwd
()
+
"
\\
tests
\\
stl_file_2.stl
"
>>>
baseline
=
AmpScan
.
AmpObject
(
basefh
)
>>>
baseline
=
AmpScan
.
AmpObject
(
basefh
)
>>>
target
=
AmpScan
.
AmpObject
(
targfh
)
>>>
target
=
AmpScan
.
AmpObject
(
targfh
)
>>>
reg
=
AmpScan
.
registration
(
steps
=
10
,
neigh
=
10
,
smooth
=
1
).
reg
>>>
reg
=
AmpScan
.
registration
(
baseline
,
target
,
steps
=
10
,
neigh
=
10
,
smooth
=
1
).
reg
"""
"""
def
__init__
(
self
,
baseline
,
target
,
method
=
'
point2plane
'
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
baseline
,
target
,
method
=
'
point2plane
'
,
*
args
,
**
kwargs
):
...
...
This diff is collapsed.
Click to expand it.
tests/doctests.py
deleted
100644 → 0
+
0
−
8
View file @
6beb1145
import
AmpScan.core
as
core
import
AmpScan.trim
as
trim
if
__name__
==
'
__main__
'
:
import
doctest
doctest
.
testmod
(
core
,
verbose
=
True
)
doctest
.
testmod
(
trim
,
verbose
=
True
)
This diff is collapsed.
Click to expand it.
tests/stl_file_2.stl
0 → 100644
LFS
+
3
−
0
View file @
68f4f03b
File added
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment