Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
Takin
mag-core
Commits
b96dc99c
Commit
b96dc99c
authored
Jul 29, 2019
by
Tobias WEBER
Browse files
added dpi option to covariance calculator
parent
30293719
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/tascalc/cov.py
View file @
b96dc99c
...
...
@@ -17,6 +17,7 @@ plot_neutrons = True # also plot neutron events
centre_on_Q
=
False
# centre plots on Q or zero?
ellipse_points
=
128
# number of points to draw ellipses
symsize
=
0.25
dpi
=
600
# column indices in kf,kf file
ki_start_idx
=
0
# start index of ki 3-vector
...
...
@@ -395,8 +396,8 @@ def plot_ellipses(file, Q4, w, Qmean, \
if
verbose
:
print
(
"Saving 2d plot to
\"
%s
\"
."
%
file
)
print
(
"Saving 3d plot to
\"
%s
\"
."
%
file3d
)
fig
.
savefig
(
file
)
fig3d
.
savefig
(
file3d
)
fig
.
savefig
(
file
,
dpi
=
dpi
)
fig3d
.
savefig
(
file3d
,
dpi
=
dpi
)
if
plot_results
:
plot
.
show
()
...
...
@@ -448,6 +449,7 @@ if __name__ == "__main__":
args
.
add_argument
(
"--bx"
,
default
=
None
,
type
=
float
,
nargs
=
"?"
,
help
=
"x component of second orientation vector"
)
args
.
add_argument
(
"--by"
,
default
=
None
,
type
=
float
,
nargs
=
"?"
,
help
=
"y component of second orientation vector"
)
args
.
add_argument
(
"--bz"
,
default
=
None
,
type
=
float
,
nargs
=
"?"
,
help
=
"z component of second orientation vector"
)
args
.
add_argument
(
"--dpi"
,
default
=
dpi
,
type
=
int
,
nargs
=
"?"
,
help
=
"DPI of output plot file"
)
argv
=
args
.
parse_args
()
verbose
=
(
argv
.
noverbose
==
False
)
...
...
@@ -455,6 +457,7 @@ if __name__ == "__main__":
plot_neutrons
=
(
argv
.
noneutrons
==
False
)
centre_on_Q
=
argv
.
centreonQ
use_kikf_file
=
argv
.
kikf
dpi
=
argv
.
dpi
infile
=
argv
.
file
outfile
=
argv
.
save
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment