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
806a742b
Commit
806a742b
authored
5 years ago
by
Laurent Mercadier
Browse files
Options
Downloads
Patches
Plain Diff
Automatically finds semester and topic
parent
5ec7d187
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!51
Automatically finds semester and topic
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DSSC.py
+10
-8
10 additions, 8 deletions
DSSC.py
with
10 additions
and
8 deletions
DSSC.py
+
10
−
8
View file @
806a742b
...
@@ -8,6 +8,7 @@ import warnings
...
@@ -8,6 +8,7 @@ import warnings
import
psutil
import
psutil
import
karabo_data
as
kd
import
karabo_data
as
kd
from
karabo_data.read_machinery
import
find_proposal
from
karabo_data.geometry2
import
DSSC_1MGeometry
from
karabo_data.geometry2
import
DSSC_1MGeometry
import
ToolBox
as
tb
import
ToolBox
as
tb
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
...
@@ -20,21 +21,22 @@ from imageio import imread
...
@@ -20,21 +21,22 @@ from imageio import imread
class
DSSC
:
class
DSSC
:
def
__init__
(
self
,
semester
,
proposal
,
topic
=
'
SCS
'
,
distance
=
1
):
def
__init__
(
self
,
proposal
,
distance
=
1
):
"""
Create a DSSC object to process DSSC data.
"""
Create a DSSC object to process DSSC data.
inputs:
inputs:
semester: semester string
proposal: (int,str) proposal number string
proposal: proposal number string
distance: (float) distance sample to DSSC detector in meter
topic: topic, by default SCS
distance: distance sample to DSSC detector in meter
"""
"""
self
.
semester
=
semester
if
isinstance
(
proposal
,
int
):
proposal
=
'
p{:06d}
'
.
format
(
proposal
)
runFolder
=
find_proposal
(
proposal
)
self
.
semester
=
runFolder
.
split
(
'
/
'
)[
-
2
]
self
.
proposal
=
proposal
self
.
proposal
=
proposal
self
.
topic
=
topic
self
.
topic
=
runFolder
.
split
(
'
/
'
)[
-
3
]
self
.
tempdir
=
None
self
.
tempdir
=
None
self
.
save_folder
=
f
'
/gpfs/exfel/exp/
{
self
.
topic
}
/
{
self
.
semester
}
/
{
self
.
proposal
}
/
usr/condensed_runs/
'
self
.
save_folder
=
os
.
path
.
join
(
runFolder
,
'
usr/condensed_runs/
'
)
self
.
distance
=
distance
self
.
distance
=
distance
self
.
px_pitch_h
=
236
# horizontal pitch in microns
self
.
px_pitch_h
=
236
# horizontal pitch in microns
self
.
px_pitch_v
=
204
# vertical pitch in microns
self
.
px_pitch_v
=
204
# vertical pitch in microns
...
...
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