update pshell explorer and data import, misc. improvements

FEATURES

- pshell: convert scienta data to true counts
- pre-process: add gauss2_reduction data reduction function
- anglescan: add set_contrast and normalize_strip_phi functions
- explorer: show info about multi-region scans
- documentation: add detailed instructions for angle-scan processing

BUGFIXES

- explorer: fix attributes notebook
- pshell: fix progress bar
- elog: increase the number of accepted attachments
This commit is contained in:
2017-09-21 12:36:30 +02:00
parent 0a436db00b
commit cf1399e59c
137 changed files with 1824 additions and 853 deletions

View File

@ -1495,6 +1495,7 @@ function ad_profiles_set_slice(brick, dim, value)
return 0
end
/// set slice coordinate (slider procedure).
static function slp_slice_position(sa) : SliderControl
STRUCT WMSliderAction &sa
@ -1508,12 +1509,16 @@ static function slp_slice_position(sa) : SliderControl
string control_datafolder = GetUserData(sa.win, "", "control_datafolder")
setdatafolder control_datafolder
string brick_path = GetUserData(sa.win, "", "brick_path")
wave brick = $brick_path
string axis = StringFromList(1, sa.ctrlName, "_")
variable dim = char2num(axis[0]) - char2num("x")
ad_gizmo_set_plane(brick, dim, sa.curval)
ad_profiles_set_slice(brick, dim, sa.curval)
wave /z brick = $brick_path
if (WaveExists(brick))
ad_gizmo_set_plane(brick, dim, sa.curval)
ad_profiles_set_slice(brick, dim, sa.curval)
else
Abort "can't find original wave " + brick_path
endif
endif
break
endswitch
@ -1535,12 +1540,16 @@ static function svp_slice_position(sva) : SetVariableControl
string control_datafolder = GetUserData(sva.win, "", "control_datafolder")
setdatafolder control_datafolder
string brick_path = GetUserData(sva.win, "", "brick_path")
wave brick = $brick_path
string axis = StringFromList(1, sva.ctrlName, "_")
variable dim = char2num(axis[0]) - char2num("x")
ad_gizmo_set_plane(brick, dim, sva.dval)
ad_profiles_set_slice(brick, dim, sva.dval)
wave /z brick = $brick_path
if (WaveExists(brick))
ad_gizmo_set_plane(brick, dim, sva.dval)
ad_profiles_set_slice(brick, dim, sva.dval)
else
Abort "can't find original wave " + brick_path
endif
break
case -1: // control being killed
break
@ -1561,29 +1570,33 @@ static function bp_move_slice(ba) : ButtonControl
string control_datafolder = GetUserData(ba.win, "", "control_datafolder")
setdatafolder control_datafolder
string brick_path = GetUserData(ba.win, "", "brick_path")
wave brick = $brick_path
string axis = StringFromList(1, ba.ctrlName, "_")
string cmd = StringFromList(2, ba.ctrlName, "_")
variable dim = char2num(axis[0]) - char2num("x")
string posvariable = getdatafolder(1) + axis[0] + "_slice_pos"
nvar pos = $(posvariable)
strswitch (cmd)
case "forward":
ad_slicer_start_bg(brick, dim, posvariable, dimdelta(brick, dim))
break
case "back":
ad_slicer_start_bg(brick, dim, posvariable, -dimdelta(brick, dim))
break
case "center":
ad_slicer_stop_bg(posvariable)
bp_move_slice_center(brick, dim, posvariable)
break
case "stop":
ad_slicer_stop_bg(posvariable)
break
endswitch
wave /z brick = $brick_path
if (WaveExists(brick))
strswitch (cmd)
case "forward":
ad_slicer_start_bg(brick, dim, posvariable, dimdelta(brick, dim))
break
case "back":
ad_slicer_start_bg(brick, dim, posvariable, -dimdelta(brick, dim))
break
case "center":
ad_slicer_stop_bg(posvariable)
bp_move_slice_center(brick, dim, posvariable)
break
case "stop":
ad_slicer_stop_bg(posvariable)
break
endswitch
else
ad_slicer_stop_bg(posvariable)
Abort "can't find original wave " + brick_path
endif
break
case -1: // control being killed
break