Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CCS
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marko Mecina
CCS
Commits
c166e0fb
Commit
c166e0fb
authored
May 18, 2024
by
Marko Mecina
Browse files
Options
Downloads
Patches
Plain Diff
add FEE row/column correction utility
parent
26572af3
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Ccs/calibrations_SMILE.py
+61
-0
61 additions, 0 deletions
Ccs/calibrations_SMILE.py
with
61 additions
and
0 deletions
Ccs/calibrations_SMILE.py
+
61
−
0
View file @
c166e0fb
...
@@ -917,6 +917,67 @@ class BadPixelMask:
...
@@ -917,6 +917,67 @@ class BadPixelMask:
self
.
array
=
mask
self
.
array
=
mask
class
RowColCorrection
:
ROW_CORR_ADDR
=
0x40664C00
COL_CORR_ADDR
=
0x40665C00
ROW_CORR_SIZE
=
4096
COL_CORR_SIZE
=
2048
def
__init__
(
self
):
self
.
_row_corr
=
bytearray
(
self
.
ROW_CORR_SIZE
)
self
.
_col_corr
=
bytearray
(
self
.
COL_CORR_SIZE
)
self
.
ccd2_e_rows
=
bytearray
(
self
.
ROW_CORR_SIZE
//
4
)
self
.
ccd2_f_rows
=
bytearray
(
self
.
ROW_CORR_SIZE
//
4
)
self
.
ccd4_e_rows
=
bytearray
(
self
.
ROW_CORR_SIZE
//
4
)
self
.
ccd4_f_rows
=
bytearray
(
self
.
ROW_CORR_SIZE
//
4
)
self
.
ccd2_e_cols
=
bytearray
(
self
.
COL_CORR_SIZE
//
4
)
self
.
ccd2_f_cols
=
bytearray
(
self
.
COL_CORR_SIZE
//
4
)
self
.
ccd4_e_cols
=
bytearray
(
self
.
COL_CORR_SIZE
//
4
)
self
.
ccd4_f_cols
=
bytearray
(
self
.
COL_CORR_SIZE
//
4
)
@property
def
row_corr
(
self
):
self
.
_row_corr
[::
4
]
=
self
.
ccd4_e_rows
self
.
_row_corr
[
1
::
4
]
=
self
.
ccd4_f_rows
self
.
_row_corr
[
2
::
4
]
=
self
.
ccd2_e_rows
self
.
_row_corr
[
3
::
4
]
=
self
.
ccd2_f_rows
return
bytes
(
self
.
_row_corr
)
@row_corr.setter
def
row_corr
(
self
,
binary
):
assert
len
(
binary
)
==
self
.
ROW_CORR_SIZE
self
.
_row_corr
=
bytearray
(
binary
)
self
.
ccd4_e_rows
=
self
.
_row_corr
[::
4
]
self
.
ccd4_f_rows
=
self
.
_row_corr
[
1
::
4
]
self
.
ccd2_e_rows
=
self
.
_row_corr
[
2
::
4
]
self
.
ccd2_f_rows
=
self
.
_row_corr
[
3
::
4
]
@property
def
col_corr
(
self
):
self
.
_col_corr
[::
4
]
=
self
.
ccd4_e_cols
self
.
_col_corr
[
1
::
4
]
=
self
.
ccd4_f_cols
self
.
_col_corr
[
2
::
4
]
=
self
.
ccd2_e_cols
self
.
_col_corr
[
3
::
4
]
=
self
.
ccd2_f_cols
return
bytes
(
self
.
_col_corr
)
@col_corr.setter
def
col_corr
(
self
,
binary
):
assert
len
(
binary
)
==
self
.
COL_CORR_SIZE
self
.
_col_corr
=
bytearray
(
binary
)
self
.
ccd4_e_cols
=
self
.
_col_corr
[::
4
]
self
.
ccd4_f_cols
=
self
.
_col_corr
[
1
::
4
]
self
.
ccd2_e_cols
=
self
.
_col_corr
[
2
::
4
]
self
.
ccd2_f_cols
=
self
.
_col_corr
[
3
::
4
]
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
...
...
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