new features: data reduction, angle scan panel

- new data reduction interface for more efficient multi-peak fitting.
  the new interface breaks compatibility with pre-2.0 data reduction
  functions. user-defined functions must be adapted to the new
  interface.
- new angle scan processing panel for interactive data analysis.
This commit is contained in:
2018-02-06 11:39:57 +01:00
parent e1f1aa9636
commit fda49c3195
171 changed files with 7539 additions and 2554 deletions

View File

@ -436,7 +436,7 @@ static function setup_detector()
setdatafolder $(package_path)
make /n=31 /o detector_angle, detector_pol, detector_az, detector_rad
setscale /i x -30, 30, "°", detector_angle, detector_pol, detector_az, detector_rad
setscale /i x -30, 30, "<EFBFBD>", detector_angle, detector_pol, detector_az, detector_rad
detector_angle = x
setdatafolder saveDF
@ -468,9 +468,14 @@ static function add_image_data(image, theta, tilt, phi)
svar red_params = reduction_params
funcref adh5_default_reduction red_func = $red_func_name
variable nx = dimsize(image, 0)
make /n=(nx) /free profile1, profile2
string loc_params = red_params
red_func(image, profile1, profile2, loc_params)
wave /wave red_results = red_func(image, loc_params)
if (numpnts(red_results) < 1)
setdatafolder saveDF
return 0
endif
wave profile1 = red_results[0]
nx = numpnts(profile1)
// write the result to the buffer
@ -573,7 +578,7 @@ static function update_detector(theta, tilt, phi, range)
//m_phi *= -1 // checked 140702
wave detector_angle, detector_pol, detector_az, detector_rad
setscale /i x -range/2, +range/2, "°", detector_angle
setscale /i x -range/2, +range/2, "<EFBFBD>", detector_angle
detector_angle = x
convert_angles_ttpa2polar(m_theta, m_tilt, m_phi, detector_angle, detector_pol, detector_az)