Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iexcode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
29id
iexcode
Commits
c5f55f55
Commit
c5f55f55
authored
2 years ago
by
rodolakis
Browse files
Options
Downloads
Patches
Plain Diff
moved logfile set to reset
parent
d8488b17
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
iexcode/instruments/ARPES.py
+8
-3
8 additions, 3 deletions
iexcode/instruments/ARPES.py
iexcode/instruments/Logfile.py
+6
-2
6 additions, 2 deletions
iexcode/instruments/Logfile.py
with
14 additions
and
5 deletions
iexcode/instruments/ARPES.py
+
8
−
3
View file @
c5f55f55
...
@@ -40,7 +40,7 @@ def ARPES_init(*userName,**kwargs):
...
@@ -40,7 +40,7 @@ def ARPES_init(*userName,**kwargs):
**kwargs:
**kwargs:
set_folders: sets the mda and EA folders (default => True)
set_folders: sets the mda and EA folders (default => True)
reset: to reset the detectors in the IOC, etc (default =>
Tru
e)
reset: to reset the detectors in the IOC,
sets the logfile name,
etc (default =>
Fals
e)
xrays: sets global variable and detectors for x-ray (default => True)
xrays: sets global variable and detectors for x-ray (default => True)
mode: used sets the detectors
'
user
'
/
'
staff
'
(default =>
'
user
'
)
mode: used sets the detectors
'
user
'
/
'
staff
'
(default =>
'
user
'
)
"""
"""
...
@@ -48,7 +48,7 @@ def ARPES_init(*userName,**kwargs):
...
@@ -48,7 +48,7 @@ def ARPES_init(*userName,**kwargs):
kwargs
.
setdefault
(
'
xrays
'
,
True
)
kwargs
.
setdefault
(
'
xrays
'
,
True
)
kwargs
.
setdefault
(
'
mode
'
,
'
user
'
)
kwargs
.
setdefault
(
'
mode
'
,
'
user
'
)
kwargs
.
setdefault
(
'
set_folders
'
,
True
)
kwargs
.
setdefault
(
'
set_folders
'
,
True
)
kwargs
.
setdefault
(
'
reset
'
,
Tru
e
)
kwargs
.
setdefault
(
'
reset
'
,
Fals
e
)
#motors
#motors
physical_motors
=
[
'
x
'
,
'
y
'
,
'
z
'
,
'
th
'
,
'
chi
'
,
'
phi
'
]
physical_motors
=
[
'
x
'
,
'
y
'
,
'
z
'
,
'
th
'
,
'
chi
'
,
'
phi
'
]
...
@@ -76,7 +76,7 @@ def ARPES_init(*userName,**kwargs):
...
@@ -76,7 +76,7 @@ def ARPES_init(*userName,**kwargs):
user_name
=
iex
.
BL
.
mda
.
user_name
()
user_name
=
iex
.
BL
.
mda
.
user_name
()
#update for default scanRecord advanced parameters
#update for default scanRecord advanced parameters
iex
.
BL
.
mda
.
log
=
Logfile
(
'
ARPES
'
,
user_name
,
_ARPES_log_dictionary
)
iex
.
BL
.
mda
.
log
=
Logfile
(
'
ARPES
'
,
user_name
,
_ARPES_log_dictionary
,
set_file
=
False
)
#EA
#EA
if
EA
.
connected
:
if
EA
.
connected
:
...
@@ -103,6 +103,8 @@ def ARPES_init(*userName,**kwargs):
...
@@ -103,6 +103,8 @@ def ARPES_init(*userName,**kwargs):
_enable_endstation_cameras
()
_enable_endstation_cameras
()
print
(
'
\n
ARPES initalized
'
)
print
(
'
\n
ARPES initalized
'
)
print
(
'
\t
path =
"'
+
iex
.
BL
.
mda
.
filepath
()
+
'"'
)
print
(
'
\t
prefix =
"'
+
iex
.
BL
.
mda
.
prefix
()
+
'"'
)
#return any detectors or other parameters that you want access to from jupyter
#return any detectors or other parameters that you want access to from jupyter
return
tey
,
ca15
return
tey
,
ca15
...
@@ -258,6 +260,9 @@ def ARPES_reset():
...
@@ -258,6 +260,9 @@ def ARPES_reset():
print
(
"
resetting ARPES Lakeshore
"
)
print
(
"
resetting ARPES Lakeshore
"
)
Lakeshore_reset
(
pv
,
LS_355_defaults
)
Lakeshore_reset
(
pv
,
LS_355_defaults
)
#set the logfile name
iex
.
BL
.
mda
.
log
.
name_set
()
##############################################################################################################
##############################################################################################################
############################## get all ##############################
############################## get all ##############################
##############################################################################################################
##############################################################################################################
...
...
This diff is collapsed.
Click to expand it.
iexcode/instruments/Logfile.py
+
6
−
2
View file @
c5f55f55
...
@@ -42,7 +42,7 @@ def log_name_set(file_name):
...
@@ -42,7 +42,7 @@ def log_name_set(file_name):
############################## general logfile functions ##############################
############################## general logfile functions ##############################
##############################################################################################################
##############################################################################################################
class
Logfile
:
class
Logfile
:
def
__init__
(
self
,
endstation_name
,
user_name
,
log_dictionary
):
def
__init__
(
self
,
endstation_name
,
user_name
,
log_dictionary
,
set_file
=
False
):
"""
"""
endstation: used for filename pv (
'
ARPES
'
/
'
Kappa
'
/
'
Octupole
'
/
'
Test
'
)
endstation: used for filename pv (
'
ARPES
'
/
'
Kappa
'
/
'
Octupole
'
/
'
Test
'
)
user_name: used for filepath
user_name: used for filepath
...
@@ -55,7 +55,11 @@ class Logfile:
...
@@ -55,7 +55,11 @@ class Logfile:
self
.
filepath
=
self
.
_fpath
()
self
.
filepath
=
self
.
_fpath
()
self
.
log_dictionary
=
log_dictionary
self
.
log_dictionary
=
log_dictionary
self
.
name_set
()
if
set_file
:
self
.
name_set
()
else
:
print
(
'
\n
log_filename =
'
+
caget
(
self
.
_name_pv
(),
as_string
=
True
))
print
(
'
\t
use log_name_set to change
'
)
def
_name_pv
(
self
):
def
_name_pv
(
self
):
"""
"""
...
...
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