Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
ToolBox
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
Show more breadcrumbs
SCS
ToolBox
Commits
4cb4f415
Commit
4cb4f415
authored
5 years ago
by
Laurent Mercadier
Browse files
Options
Downloads
Plain Diff
Merge branch 'xas_plot_title' into 'master'
Fixes bug in XAS plot title See merge request
!60
parents
d452a318
8b012a25
No related branches found
No related tags found
1 merge request
!60
Fixes bug in XAS plot title
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
XAS.py
+4
-3
4 additions, 3 deletions
XAS.py
with
4 additions
and
3 deletions
XAS.py
+
4
−
3
View file @
4cb4f415
...
...
@@ -12,6 +12,7 @@
import
numpy
as
np
import
matplotlib.gridspec
as
gridspec
import
matplotlib.pyplot
as
plt
import
re
def
absorption
(
T
,
Io
):
"""
Compute the absorption A = -ln(T/Io)
...
...
@@ -190,9 +191,9 @@ def xas(nrun, bins=None, Iokey='SCS_SA3', Itkey='MCP3apd', nrjkey='nrj', Iooffse
color
=
'
C1
'
,
alpha
=
0.2
)
ax1_twin
.
set_ylabel
(
'
Io
'
)
try
:
proposalNB
=
int
(
nrun
.
attrs
[
'
runFolder
'
]
.
split
(
'
/
'
)[
-
4
][
1
:
])
runNB
=
int
(
nrun
.
attrs
[
'
runFolder
'
]
.
split
(
'
/
'
)[
-
2
][
1
:
])
ax1
.
set_title
(
'
run {
:d} p{:}
'
.
format
(
runNB
,
proposalNB
)
)
proposalNB
=
int
(
re
.
findall
(
r
'
p(\d{6})
'
,
nrun
.
attrs
[
'
runFolder
'
]
)[
0
])
runNB
=
int
(
re
.
findall
(
r
'
r(\d{4})
'
,
nrun
.
attrs
[
'
runFolder
'
]
)[
0
])
ax1
.
set_title
(
f
'
run
{
runNB
}
p
{
proposalNB
}
'
)
except
:
f
.
suptitle
(
nrun
.
attrs
[
'
plot_title
'
])
...
...
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