Skip to content

Commit

Permalink
Merge branch 'master' into peak_fitting_unit_test_HB2B_1060
Browse files Browse the repository at this point in the history
  • Loading branch information
Fahima-Islam authored Feb 14, 2020
2 parents 0ddb051 + 35b9adf commit 692ae3b
Show file tree
Hide file tree
Showing 85 changed files with 7,688 additions and 4,144 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ cache:

matrix:
include:
- os: linux
env: CONDA=2.7
#- os: linux
# env: CONDA=3.6
- env: CONDA=2.7
- env: CONDA=3.6

before_install:
- |
Expand Down
Binary file modified data/HB2B_1017_NoMask_Gold.h5
Binary file not shown.
Binary file modified data/HB2B_1017_Pixels_Gold.h5
Binary file not shown.
2 changes: 1 addition & 1 deletion data/HB2B_CAL_Si333.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Status": 3, "error_Rot_z": -1.0, "error_Shift_z": -1.0, "error_Rot_x": -1.0, "error_Rot_y": -1.0, "error_Shift_x": 0.0001, "Shift_z": 0.0, "Shift_x": 7.903208284128856e-05, "Shift_y": 0.0, "error_Lambda": 0.0001, "Rot_z": 0.0, "Rot_y": 0.0, "Rot_x": 0.0, "error_Shift_y": -1.0, "Lambda": 1.456274820626443}
{"Status": 3, "error_Rot_z": -1.0, "error_Shift_z": -1.0, "error_Rot_x": -1.0, "error_Rot_y": -1.0, "error_Shift_x": 0.0001, "Shift_z": 0.0, "Shift_x": 0.000343639741127, "Shift_y": 0.0, "error_Lambda": 0.0001, "Rot_z": 0.0, "Rot_y": 0.0, "Rot_x": 0.0, "error_Shift_y": -1.0, "Lambda": 1.4499332864}
4 changes: 2 additions & 2 deletions data/XRay_Definition_1K.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
arm = 0.985
rows = 1024
columns = 1024
pixel_size_x = 0.0003
pixel_size_y = 0.0003
pixel_size_x = 0.00029296875
pixel_size_y = 0.00029296875
135 changes: 0 additions & 135 deletions prototypes/load_split_subruns_numpy.py

This file was deleted.

130 changes: 0 additions & 130 deletions prototypes/temp/convert_hzb_data.py

This file was deleted.

9 changes: 5 additions & 4 deletions pyrs/calibration/peakfit_calibration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Migrated from /HFIR/HB2B/shared/Quick_Calibration.py
# Original can be found at ./Quick_Calibration_v3.py
# Renamed from ./prototypes/calibration/Quick_Calibration_Class.py
from __future__ import (absolute_import, division, print_function) # python3 compatibility
import numpy as np
import time
import json
Expand Down Expand Up @@ -303,7 +304,7 @@ def FitDetector(self, fun, x0, jac='3-point', bounds=[], method='trf', ftol=1e-0
s_sq = (residual**2).sum()/(len(residual)-len(x0))
pcov = pcov * s_sq
else:
pcov = np.inf
pcov = np.diag([np.inf]*len(pfit))

error = [0.0] * len(pfit)
for i in range(len(pfit)):
Expand All @@ -312,7 +313,7 @@ def FitDetector(self, fun, x0, jac='3-point', bounds=[], method='trf', ftol=1e-0
except ValueError:
error[i] = (0.00)

print [pfit, np.array(error), success]
print([pfit, np.array(error), success])
return [pfit, np.array(error), success]

else:
Expand Down Expand Up @@ -528,7 +529,7 @@ def peak_alignment_single(self, x, roi_vec_set=None, ConstrainPosition=False, Re
paramVec = np.copy(self._calib)
paramVec[i_index] = x[0]

print x
print(x)
residual = self.get_alignment_residual(paramVec, roi_vec_set, ConstrainPosition, False, start, stop)

if ReturnScalar:
Expand Down Expand Up @@ -599,7 +600,7 @@ def peaks_alignment_all(self, x, roi_vec_set=None, ConstrainPosition=False,
:return:
"""

print x
print(x)
residual = self.get_alignment_residual(x, roi_vec_set, True, False, start, stop)

if ReturnScalar:
Expand Down
Loading

0 comments on commit 692ae3b

Please sign in to comment.