Skip to content

Commit

Permalink
minor bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kylechampley committed Sep 15, 2024
1 parent 9b37b7e commit 4ba1a7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/file_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ FILE* read_header_leave_open(ImageHeader* h)
fread(cdata, sizeof(char), (size_t)ft_num_vals[i], fptr);
//this is something like: slope = 2.3346E-005 '\13' offset = 0.00000E000
sscanf(cdata, "%s %s %f %s %s %f", cslope, cequals, &h->slope, coffset, cequals, &h->offset);
if (strcmpi(cslope, "slope") != 0)
if (strcmp(cslope, "slope") != 0)
h->slope = 0.0;

if (h->bigEndian)
Expand Down
2 changes: 2 additions & 0 deletions src/leap_preprocessing_algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,12 +988,14 @@ def optimize(self, x=None, set_parameters=False):
self.leapct.set_centerCol(res.x[1])
self.leapct.set_sod(res.x[2])
self.leapct.set_sdd(res.x[2]+res.x[3])
"""
if np.abs(res.x[4]) < 0.1:
res.x[4] = 0.0
if np.abs(res.x[6]) < 0.1:
res.x[6] = 0.0
if np.abs(res.x[5]) < 0.05:
res.x[5] = 0.0
#"""
if res.x[4] != 0.0 or res.x[5] != 0.0 or res.x[6] != 0.0:
A = R.from_euler('xyz', [res.x[4], res.x[5], res.x[6]], degrees=True).as_matrix()
self.leapct.convert_to_modularbeam()
Expand Down

0 comments on commit 4ba1a7f

Please sign in to comment.