Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ess-python-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
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
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESS Beam Physics
ess-python-tools
Commits
762cd2d9
Commit
762cd2d9
authored
4 years ago
by
Yngve Levinsen
Browse files
Options
Downloads
Patches
Plain Diff
ess.TraceWin.project remove dbg print, cleaning
parent
ba377c71
No related branches found
No related tags found
No related merge requests found
Pipeline
#51231
failed
4 years ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ess/TraceWin.py
+3
-5
3 additions, 5 deletions
ess/TraceWin.py
with
3 additions
and
5 deletions
ess/TraceWin.py
+
3
−
5
View file @
762cd2d9
...
...
@@ -1594,13 +1594,11 @@ class project:
self
.
_dict
[
parameter
]
=
value
def
_check_rule_same_sign
(
self
,
variables
,
explanation
,
fail_on_err
):
import
numpy
s
1
=
numpy
.
sign
(
self
.
get
(
variables
[
0
])
)
v
1
=
self
.
get
(
variables
[
0
])
for
i
in
range
(
1
,
len
(
variables
)):
s2
=
numpy
.
sign
(
self
.
get
(
variables
[
i
]))
print
(
"
DBG
"
,
s1
,
s2
)
if
s1
!=
s2
:
v2
=
self
.
get
(
variables
[
i
])
if
abs
(
v1
+
v2
)
!=
abs
(
v1
)
+
abs
(
v2
):
errmsg
=
f
"
{
variables
[
i
]
}
and
{
variables
[
0
]
}
have opposite signs
\n
Explanation/logic:
{
explanation
}
"
if
fail_on_err
:
raise
ValueError
(
errmsg
)
...
...
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