Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycalibration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor 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
calibration
pycalibration
Commits
816db504
Commit
816db504
authored
11 months ago
by
Philipp Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
Carry Shimadzu output channel as part of source name pattern in CalCat
parent
074e8c14
No related branches found
Branches containing commit
No related tags found
1 merge request
!939
[Generic][Shimadzu] Dynamic flat-field characterization and correction for MHz microscopy
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cal_tools/shimadzu.py
+10
-7
10 additions, 7 deletions
src/cal_tools/shimadzu.py
with
10 additions
and
7 deletions
src/cal_tools/shimadzu.py
+
10
−
7
View file @
816db504
...
@@ -4,7 +4,6 @@ from cal_tools.calcat_interface2 import ShimadzuHPVX2Conditions
...
@@ -4,7 +4,6 @@ from cal_tools.calcat_interface2 import ShimadzuHPVX2Conditions
class
ShimadzuHPVX2
:
class
ShimadzuHPVX2
:
channel
=
"
daqOutput
"
image_key
=
"
data.image.pixels
"
image_key
=
"
data.image.pixels
"
copy_keys
=
[
copy_keys
=
[
"
data.image.binning
"
,
"
data.image.binning
"
,
...
@@ -27,8 +26,7 @@ class ShimadzuHPVX2:
...
@@ -27,8 +26,7 @@ class ShimadzuHPVX2:
def
conditions
(
self
,
dc
:
"
DataCollection
"
,
module
=
None
):
# noqa: F821
def
conditions
(
self
,
dc
:
"
DataCollection
"
,
module
=
None
):
# noqa: F821
if
module
is
None
:
if
module
is
None
:
source_pattern
=
self
.
source_name_pattern
.
format
(
source_pattern
=
self
.
source_name_pattern
.
format
(
modno
=
'
*
'
)
f
"
*:
{
self
.
channel
}
"
)
det_dc
=
dc
.
select
(
source_pattern
)
det_dc
=
dc
.
select
(
source_pattern
)
if
not
det_dc
.
instrument_sources
:
if
not
det_dc
.
instrument_sources
:
raise
ValueError
(
"
No detector sources are found
"
)
raise
ValueError
(
"
No detector sources are found
"
)
...
@@ -41,12 +39,17 @@ class ShimadzuHPVX2:
...
@@ -41,12 +39,17 @@ class ShimadzuHPVX2:
return
ShimadzuHPVX2Conditions
(
burst_frame_count
=
float
(
num_frames
))
return
ShimadzuHPVX2Conditions
(
burst_frame_count
=
float
(
num_frames
))
def
instrument_source
(
self
,
module
:
int
):
def
instrument_source
(
self
,
module
:
int
):
source_name
=
self
.
source_name_pattern
.
format
(
module
)
return
self
.
source_name_pattern
.
format
(
modno
=
module
)
return
f
"
{
source_name
}
:
{
self
.
channel
}
"
def
corrected_source
(
self
,
module
:
int
):
def
corrected_source
(
self
,
module
:
int
):
source_name
=
self
.
source_name_pattern
.
format
(
module
)
source_name
=
self
.
source_name_pattern
.
format
(
modno
=
module
)
# Replace type with CORR.
parts
=
source_name
.
split
(
'
/
'
)
parts
=
source_name
.
split
(
'
/
'
)
parts
[
1
]
=
"
CORR
"
parts
[
1
]
=
"
CORR
"
source_name
=
'
/
'
.
join
(
parts
)
source_name
=
'
/
'
.
join
(
parts
)
return
f
"
{
source_name
}
:output
"
# Replace channel with output.
source_name
=
source_name
[:
source_name
.
index
(
'
:
'
)]
+
'
:output
'
return
source_name
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