Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
calng
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
calibration
calng
Commits
0779b7e5
Commit
0779b7e5
authored
1 year ago
by
David Hammer
Browse files
Options
Downloads
Patches
Plain Diff
Removing block mode CM for now
parent
f322ae74
No related branches found
Branches containing commit
No related tags found
1 merge request
!41
pnCCD support
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/calng/corrections/PnccdCorrection.py
+0
-18
0 additions, 18 deletions
src/calng/corrections/PnccdCorrection.py
with
0 additions
and
18 deletions
src/calng/corrections/PnccdCorrection.py
+
0
−
18
View file @
0779b7e5
...
...
@@ -252,7 +252,6 @@ class PnccdCpuRunner(base_kernel_runner.BaseKernelRunner):
cm_min_frac
,
cm_row
,
cm_col
,
cm_block
,
):
output
=
self
.
_q_processed_data
[
q
]
output
[:]
=
self
.
_q_input_data
[
q
].
astype
(
np
.
float32
)
...
...
@@ -260,17 +259,11 @@ class PnccdCpuRunner(base_kernel_runner.BaseKernelRunner):
output
-=
self
.
_q_offset_map
[
q
]
if
flags
&
CorrectionFlags
.
COMMONMODE
:
# per rectangular block that looks like something is going on
masked
=
np
.
ma
.
masked_array
(
data
=
output
,
mask
=
(
self
.
_q_bad_pixel_map
[
q
]
!=
0
)
|
(
output
>
self
.
_q_noise_map
[
q
]
*
cm_noise_sigma
),
)
if
cm_block
:
for
block
in
np
.
hsplit
(
masked
,
4
):
if
block
.
count
()
<
block
.
size
*
cm_min_frac
:
continue
block
.
data
[:]
-=
np
.
ma
.
median
(
block
)
if
cm_row
:
subset_rows
=
masked
.
count
(
axis
=
1
)
>=
masked
.
shape
[
1
]
*
cm_min_frac
...
...
@@ -296,7 +289,6 @@ class PnccdCpuRunner(base_kernel_runner.BaseKernelRunner):
cm_min_frac
=
0.25
,
cm_row
=
True
,
cm_col
=
True
,
cm_block
=
True
,
):
# NOTE: how to best clean up all these duplicated parameters?
for
result
in
self
.
thread_pool
.
map
(
...
...
@@ -308,7 +300,6 @@ class PnccdCpuRunner(base_kernel_runner.BaseKernelRunner):
cm_min_frac
=
cm_min_frac
,
cm_row
=
cm_row
,
cm_col
=
cm_col
,
cm_block
=
cm_block
,
),
range
(
4
),
):
...
...
@@ -406,20 +397,12 @@ class PnccdCorrection(base_correction.BaseCorrection):
.
defaultValue
(
True
)
.
reconfigurable
()
.
commit
(),
BOOL_ELEMENT
(
expected
)
.
key
(
"
corrections.commonMode.enableBlock
"
)
.
assignmentOptional
()
.
defaultValue
(
True
)
.
reconfigurable
()
.
commit
(),
)
PnccdCorrection
.
_managed_keys
|=
{
"
corrections.commonMode.noiseSigma
"
,
"
corrections.commonMode.minFrac
"
,
"
corrections.commonMode.enableRow
"
,
"
corrections.commonMode.enableCol
"
,
"
corrections.commonMode.enableBlock
"
,
}
PnccdCalcatFriend
.
add_schema
(
expected
,
PnccdCorrection
.
_managed_keys
)
# TODO: bad pixel node?
...
...
@@ -459,7 +442,6 @@ class PnccdCorrection(base_correction.BaseCorrection):
cm_min_frac
=
self
.
unsafe_get
(
"
corrections.commonMode.minFrac
"
),
cm_row
=
self
.
unsafe_get
(
"
corrections.commonMode.enableRow
"
),
cm_col
=
self
.
unsafe_get
(
"
corrections.commonMode.enableCol
"
),
cm_block
=
self
.
unsafe_get
(
"
corrections.commonMode.enableBlock
"
),
)
self
.
kernel_runner
.
correct
(
flags
=
self
.
_correction_flag_enabled
,
**
args_which_should_be_cached
...
...
This diff is collapsed.
Click to expand it.
David Hammer
@hammerd
mentioned in commit
19934f5a
·
1 year ago
mentioned in commit
19934f5a
mentioned in commit 19934f5ac68c371b51e60dbd1ec094643093c44c
Toggle commit list
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