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
8e3a2150
Commit
8e3a2150
authored
3 years ago
by
David Hammer
Browse files
Options
Downloads
Patches
Plain Diff
Fix indentation
parent
7e6d6bc9
No related branches found
No related tags found
2 merge requests
!12
Snapshot: field test deployed version as of end of run 202201
,
!3
Base correction device, CalCat interaction, DSSC and AGIPD devices
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/calng/kernels/agipd_gpu.cu
+20
-20
20 additions, 20 deletions
src/calng/kernels/agipd_gpu.cu
src/calng/kernels/dssc_gpu.cu
+3
-3
3 additions, 3 deletions
src/calng/kernels/dssc_gpu.cu
with
23 additions
and
23 deletions
src/calng/kernels/agipd_gpu.cu
+
20
−
20
View file @
8e3a2150
...
...
@@ -11,20 +11,20 @@ extern "C" {
Will convert to output dtype for output
*/
__global__
void
correct
(
const
{{
input_data_dtype
}}
*
data
,
const
unsigned
short
*
cell_table
,
const
unsigned
char
corr_flags
,
// default_gain can be 0, 1, or 2, and is relevant for fixed gain mode (no THRESHOLD)
const
unsigned
char
default_gain
,
const
float
*
threshold_map
,
const
float
*
offset_map
,
const
float
*
rel_gain_pc_map
,
const
float
*
md_additional_offset
,
const
float
*
rel_gain_xray_map
,
const
float
g_gain_value
,
const
unsigned
int
*
bad_pixel_map
,
const
float
bad_pixel_mask_value
,
float
*
gain_map
,
// TODO: more compact yet plottable representation
{{
output_data_dtype
}}
*
output
)
{
const
unsigned
short
*
cell_table
,
const
unsigned
char
corr_flags
,
// default_gain can be 0, 1, or 2, and is relevant for fixed gain mode (no THRESHOLD)
const
unsigned
char
default_gain
,
const
float
*
threshold_map
,
const
float
*
offset_map
,
const
float
*
rel_gain_pc_map
,
const
float
*
md_additional_offset
,
const
float
*
rel_gain_xray_map
,
const
float
g_gain_value
,
const
unsigned
int
*
bad_pixel_map
,
const
float
bad_pixel_mask_value
,
float
*
gain_map
,
// TODO: more compact yet plottable representation
{{
output_data_dtype
}}
*
output
)
{
const
size_t
X
=
{{
pixels_x
}};
const
size_t
Y
=
{{
pixels_y
}};
const
size_t
input_cells
=
{{
data_memory_cells
}};
...
...
@@ -83,13 +83,13 @@ extern "C" {
unsigned
char
gain
=
default_gain
;
if
(
corr_flags
&
THRESHOLD
)
{
const
float
threshold_0
=
threshold_map
[
0
*
threshold_map_stride_threshold
+
map_cell
*
threshold_map_stride_cell
+
y
*
threshold_map_stride_y
+
x
*
threshold_map_stride_x
];
map_cell
*
threshold_map_stride_cell
+
y
*
threshold_map_stride_y
+
x
*
threshold_map_stride_x
];
const
float
threshold_1
=
threshold_map
[
1
*
threshold_map_stride_threshold
+
map_cell
*
threshold_map_stride_cell
+
y
*
threshold_map_stride_y
+
x
*
threshold_map_stride_x
];
map_cell
*
threshold_map_stride_cell
+
y
*
threshold_map_stride_y
+
x
*
threshold_map_stride_x
];
// could consider making this const using ternaries / tiny function
if
(
raw_gain_val
<=
threshold_0
)
{
gain
=
0
;
...
...
This diff is collapsed.
Click to expand it.
src/calng/kernels/dssc_gpu.cu
+
3
−
3
View file @
8e3a2150
...
...
@@ -12,10 +12,10 @@ extern "C" {
Shape of offset constant: x, y, memory cell
*/
__global__
void
correct
(
const
{{
input_data_dtype
}}
*
data
,
// shape: memory cell, 1, y, x
const
unsigned
short
*
cell_table
,
const
unsigned
short
*
cell_table
,
const
unsigned
char
corr_flags
,
const
float
*
offset_map
,
{{
output_data_dtype
}}
*
output
)
{
const
float
*
offset_map
,
{{
output_data_dtype
}}
*
output
)
{
const
size_t
X
=
{{
pixels_x
}};
const
size_t
Y
=
{{
pixels_y
}};
const
size_t
memory_cells
=
{{
data_memory_cells
}};
...
...
This diff is collapsed.
Click to expand it.
David Hammer
@hammerd
mentioned in commit
3566342d
·
2 years ago
mentioned in commit
3566342d
mentioned in commit 3566342d031db1bb435b6430f100afdbaaa6c4bf
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