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
5d0c0fa5
Commit
5d0c0fa5
authored
3 months ago
by
Thomas Kluyver
Browse files
Options
Downloads
Patches
Plain Diff
Apply suggestions from review
parent
b4f97ba3
No related branches found
No related tags found
1 merge request
!1055
[Jungfrau][FF] Improve Fitting performance and stop using pydetlib + many refactors.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cal_tools/jungfrau/jungfrau_ff.py
+4
-4
4 additions, 4 deletions
src/cal_tools/jungfrau/jungfrau_ff.py
with
4 additions
and
4 deletions
src/cal_tools/jungfrau/jungfrau_ff.py
+
4
−
4
View file @
5d0c0fa5
...
...
@@ -68,8 +68,8 @@ def chunk_multi(data, block_size):
for
j
in
range
(
0
,
cols
,
chunk_cols
):
chunk
=
data
[
...,
i
:
min
(
i
+
chunk_rows
,
rows
),
j
:
min
(
j
+
chunk_cols
,
cols
)
i
:
i
+
chunk_rows
,
j
:
j
+
chunk_cols
]
chunks
.
append
(
chunk
)
...
...
@@ -96,7 +96,7 @@ def fill_histogram(image_data, histogram_bins):
if
not
isinstance
(
image_data
,
np
.
ndarray
):
raise
TypeError
(
"
Expected imgs numpy ndarray type.
"
)
if
image_data
.
ndim
<
4
:
if
image_data
.
ndim
!=
4
:
raise
ValueError
(
"
Expected 4D imgs array.
"
)
n_cells
,
n_rows
,
n_cols
=
image_data
.
shape
[
1
:]
...
...
@@ -218,7 +218,7 @@ def rebin_histo(hist, bin_centers, rebin_factor):
x_out
=
bin_centers
[::
rebin_factor
]
h_out
=
np
.
sum
(
hist
[:
len
(
hist
)
-
(
len
(
hist
)
%
rebin_factor
)]
.
reshape
(
-
1
,
rebin_factor
),
# noqa
hist
.
reshape
(
-
1
,
rebin_factor
),
axis
=
1
,
)
x_out
=
bin_centers
[::
rebin_factor
]
...
...
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