Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review 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
mantidproject
mantid
Commits
7946ece1
Commit
7946ece1
authored
8 years ago
by
Federico Montesino Pouzols
Browse files
Options
Downloads
Patches
Plain Diff
avoid spurious newlines in .prm files on windows, re #16252
parent
e3f1477f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/EnggDiffraction/EnggDiffractionPresenter.h
+1
-0
1 addition, 0 deletions
...stomInterfaces/EnggDiffraction/EnggDiffractionPresenter.h
scripts/Engineering/EnggUtils.py
+11
-7
11 additions, 7 deletions
scripts/Engineering/EnggUtils.py
with
12 additions
and
7 deletions
MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/EnggDiffraction/EnggDiffractionPresenter.h
+
1
−
0
View file @
7946ece1
...
...
@@ -323,6 +323,7 @@ private:
const
std
::
vector
<
double
>
&
difc
,
const
std
::
vector
<
double
>
&
tzero
,
const
std
::
vector
<
std
::
string
>
&
bankNames
,
const
std
::
string
&
ceriaNo
,
const
std
::
string
&
vanNo
,
const
std
::
string
&
templateFile
=
""
);
/// keep track of the paths the user "browses to", to add them in
...
...
This diff is collapsed.
Click to expand it.
scripts/Engineering/EnggUtils.py
+
11
−
7
View file @
7946ece1
...
...
@@ -393,15 +393,19 @@ def write_ENGINX_GSAS_iparam_file(output_file, difc, tzero, bank_names=None,
# - instrument constants/parameters (ICONS)
# - instrument calibration comment with run numbers (CALIB)
output_lines
=
[]
for
b_idx
,
bank_name
in
enumerate
(
bank_names
):
patterns
=
[
"
INS %d ICONS
"
%
(
b_idx
+
1
),
"
INS CALIB
"
]
for
b_idx
,
_bank_name
in
enumerate
(
bank_names
):
patterns
=
[
"
INS %d ICONS
"
%
(
b_idx
+
1
),
# bank calibration parameters: DIFC, DIFA, TZERO
"
INS CALIB
"
,
# calibration run numbers (Vanadium and Ceria)
"
INS INCBM
"
# A his file for open genie (with ceria run number in the name)
]
difa
=
0.0
# the ljust(80) ensures a length of 80 characters for the lines (GSAS rules...)
replacements
=
[
(
"
INS %d ICONS %.2f %.2f %.2f
"
%
(
b_idx
+
1
,
difc
[
b_idx
],
difa
,
tzero
[
b_idx
])).
ljust
(
80
)
+
'
\r\n
'
,
(
"
INS CALIB %d %d ceo2
"
%
(
ceria_run
,
vanadium_run
)).
ljust
(
80
)
+
'
\r\n
'
]
replacements
=
[
(
"
INS {0} ICONS {1:.2f} {2:.2f} {3:.2f}
"
.
format
(
b_idx
+
1
,
difc
[
b_idx
],
difa
,
tzero
[
b_idx
])).
ljust
(
80
)
+
'
\n
'
,
(
"
INS CALIB {0} {1} ceo2
"
.
format
(
ceria_run
,
vanadium_run
)).
ljust
(
80
)
+
'
\n
'
,
(
"
INS INCBM ob+mon_{0}_North_and_South_banks.his
"
.
format
(
ceria_run
)).
ljust
(
80
)
+
'
\n
'
]
output_lines
=
[
replace_patterns
(
line
,
patterns
,
replacements
)
for
line
in
temp_lines
]
...
...
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