pearl-anglescan-tracker.ipf File Reference
`#include "pearl-area-profiles"`
`#include "pearl-area-import"`
`#include "pearl-scienta-preprocess"`
`#include "pearl-anglescan-process"`
`#include <New Polar Graphs>`

Go to the source code of this file.

## Functions

static variable | AfterCompiledHook ()
| initialize package data once when the procedure is first loaded More...
static variable | init_package ()
static variable | save_prefs ()
| save persistent package data to the preferences file. More...
static variable | load_prefs ()
| load persistent package data from the preferences file. More...
static variable | IgorQuitHook (string app)
| disconnect EPICS channels before Igor quits. More...
variable | ast_setup ()
| set up data structures, display graph, and try to connect to analyser. More...
variable | ast_prepare (variable theta_offset=defaultValue, variable tilt_offset=defaultValue, variable phi_offset=defaultValue)
| prepare for new measurement and clear the data buffer. More...
variable | ast_set_processing (string reduction_func, string reduction_params)
| set the data processing parameters More...
variable | ast_add_image (wave image, variable theta, variable tilt, variable phi)
| process and add a detector image to the tracker scan. More...
variable | ast_export (dfref folder, string nickname, variable xpdplot=defaultValue)
| export tracker data to a separate, independent data set. More...
variable | ast_import (string nickname)
| import tracker data from an existing angle scan dataset. More...
variable | ast_update_detector (variable theta, variable tilt, variable phi, variable range)
| update the current position indicator. More...
variable | ast_close ()
| stop tracker, close graph, release data structures. More...
static variable | setup_data ()
static variable | extend_data (variable num_slices)
| extend the data buffer for the next polar scan More...
static variable | setup_detector ()
static variable | add_image_data (wave image, variable theta, variable tilt, variable phi)
| reduce a detector image and add the result to the data buffer. More...
static variable | process_image_data ()
| process the data buffer to generate the tracker dataset. More...
static variable | update_detector (variable theta, variable tilt, variable phi, variable range)
| update the current position indicator. More...
static variable | setup_graph ()
| create the graph window. More...
static variable | update_data_graph ()
static variable | update_detector_graph ()
static variable | epics_connect ()
| connect the angle scan tracker to EPICS More...
static variable | epics_disconnect_chid (string chid_var_name)
static variable | epics_disconnect ()
static variable | ast_window_hook (WMWinHookStruct *s)
| window hook More...
variable | ast_callback_data (variable chan)
| callback function for new analyser data from EPICS. More...
variable | ast_callback_detector (variable chan)
| callback function for new detector state from EPICS. More...
variable | ast_callback_manip (variable chan)
| callback function for new manipulator position from EPICS. More...
static variable | bp_capture (WMButtonAction *ba)
static variable | toggle_capture ()
static variable | update_capture ()
static variable | pmp_data (WMPopupAction *pa)
static variable | pmp_data_mouseup (WMPopupAction *pa)
static variable | export_tracker_data ()
| export tracker data (with prompt) More...
static variable | import_tracker_data ()
| import tracker data (with prompt) More...
static variable | save_tracker_data ()
| save tracker data to file (with prompt) More...
static variable | load_tracker_data ()
| import tracker data from file (with prompt) More...
static variable | pmp_parameters (WMPopupAction *pa)
static variable | pmp_parameters_mouseup (WMPopupAction *pa)
static variable | edit_reduction_params ()
static variable | edit_offsets ()

## Variables

| version
static const string | package_path = "root:packages:pearl_anglescan_tracker:"
| data folder path More...
static const string | prefs_objects = "projection;theta_offset;tilt_offset;phi_offset;reduction_func;reduction_params"
| semicolon-separated list of persistent variable, string, and wave names More...

## Function Documentation

## add_image_data()

static variable add_image_data | ( | wave | image,
|  | variable | theta,
|  | variable | tilt,
|  | variable | phi
| ) |  |

static

reduce a detector image and add the result to the data buffer.

Parameters

  image | detector image with correct X (energy) and Y (angle) scaling
  theta | polar angle of manipulator
  tilt | tilt angle of manipulator
  phi | azimuthal angle of manipulator

the manipulator angles are corrected by the preset offsets internally.

Definition at line 453 of file pearl-anglescan-tracker.ipf.

## AfterCompiledHook()

static variable AfterCompiledHook | ( |  | ) |

static

initialize package data once when the procedure is first loaded

Definition at line 73 of file pearl-anglescan-tracker.ipf.

## ast_add_image()

variable ast_add_image | ( | wave | image,
|  | variable | theta,
|  | variable | tilt,
|  | variable | phi
| ) |  |

process and add a detector image to the tracker scan.

Parameters

  image | detector image with correct X (energy) and Y (angle) scaling
  theta | polar angle of manipulator
  tilt | tilt angle of manipulator
  phi | azimuthal angle of manipulator

the manipulator angles are corrected by the preset offsets internally.

Definition at line 285 of file pearl-anglescan-tracker.ipf.

## ast_callback_data()

variable ast_callback_data | ( | variable | chan | ) |

callback function for new analyser data from EPICS.

Definition at line 851 of file pearl-anglescan-tracker.ipf.

## ast_callback_detector()

variable ast_callback_detector | ( | variable | chan | ) |

callback function for new detector state from EPICS.

save the manipulator position at the beginning of image acquisition. it is used by ast_callback_data().

Definition at line 956 of file pearl-anglescan-tracker.ipf.

## ast_callback_manip()

variable ast_callback_manip | ( | variable | chan | ) |

callback function for new manipulator position from EPICS.

Definition at line 985 of file pearl-anglescan-tracker.ipf.

## ast_close()

variable ast_close | ( |  | ) |

stop tracker, close graph, release data structures.

Definition at line 360 of file pearl-anglescan-tracker.ipf.

## ast_export()

variable ast_export | ( | dfref | folder,
|  | string | nickname,
|  | variable | xpdplot = `defaultValue`
| ) |  |

export tracker data to a separate, independent data set.

the exported data can then be used for further processing. the data is exported to the current data folder, or root if XPDplot compatibility is requested.

Parameters

  folder | destination folder path
  nickname | name prefix for waves

  xpdplot

  xpdplot compatibility, see make_hemi_grid() for details
  - 0 (default)
  - 1 create additional waves and notebook required by XPDplot

Definition at line 307 of file pearl-anglescan-tracker.ipf.

## ast_import()

variable ast_import | ( | string | nickname | ) |

import tracker data from an existing angle scan dataset.

Parameters

  nickname | name prefix for waves. data must be in current data folder.

Definition at line 329 of file pearl-anglescan-tracker.ipf.

## ast_prepare()

variable ast_prepare | ( | variable | theta_offset = `defaultValue`,
|  | variable | tilt_offset = `defaultValue`,
|  | variable | phi_offset = `defaultValue`
| ) |  |

prepare for new measurement and clear the data buffer.

optionally, set new manipulator offsets. the offsets are the manipulator readback coordinates where the sample surface is oriented in normal emission, and the handle of the sample plate points horizontally to the left (9 o'clock).

Parameters

  theta_offset | set new theta offset. default: no change.
  tilt_offset | set new tilt offset. default: no change.
  phi_offset | set new phi offset. default: no change.

Definition at line 211 of file pearl-anglescan-tracker.ipf.

## ast_set_processing()

variable ast_set_processing | ( | string | reduction_func,
|  | string | reduction_params
| ) |  |

set the data processing parameters

the parameters will be effective for subsequent measurements only. previously acquired data is not affected. the processing parameters are saved with the preferences.

Parameters

  reduction_func | name of custom reduction function, e.g. "int_linbg_reduction". any user-defined function with the same signature as adh5_default_reduction() is allowed.
  reduction_params | parameter string for the reduction function. the format depends on the actual function. for int_linbg_reduction, e.g., "Lcrop=0.1;Hcrop=0.1;Lsize=0.2;Hsize=0.2;Cpos=0.5;Csize=0.4".

Definition at line 261 of file pearl-anglescan-tracker.ipf.

## ast_setup()

variable ast_setup | ( |  | ) |

set up data structures, display graph, and try to connect to analyser.

Definition at line 194 of file pearl-anglescan-tracker.ipf.

## ast_update_detector()

variable ast_update_detector | ( | variable | theta,
|  | variable | tilt,
|  | variable | phi,
|  | variable | range
| ) |  |

update the current position indicator.

Parameters

  theta | polar angle of manipulator
  tilt | tilt angle of manipulator
  phi | azimuthal angle of manipulator
  range | angle range (60 or 45)

the manipulator angles are corrected by the preset offsets internally.

Definition at line 349 of file pearl-anglescan-tracker.ipf.

## ast_window_hook()

static variable ast_window_hook | ( | WMWinHookStruct * | s | ) |

static

window hook

disconnects from EPICS when the window is closed.

Definition at line 836 of file pearl-anglescan-tracker.ipf.

## bp_capture()

static variable bp_capture | ( | WMButtonAction * | ba | ) |

static

Definition at line 1018 of file pearl-anglescan-tracker.ipf.

## edit_offsets()

static variable edit_offsets | ( |  | ) |

static

Definition at line 1239 of file pearl-anglescan-tracker.ipf.

## edit_reduction_params()

static variable edit_reduction_params | ( |  | ) |

static

Definition at line 1223 of file pearl-anglescan-tracker.ipf.

## epics_connect()

static variable epics_connect | ( |  | ) |

static

connect the angle scan tracker to EPICS

the tracker uses channels of the analyser and the manipulator.

if the EPICS XOP is not loaded, the function does nothing. if channels are not available, the function exits with an error code after a timeout of 5 seconds. the Igor run-time error status is reset to suppress the error dialog.

Returns
  zero if successful, non-zero if an error occurred

Todo:
  the X03DA channel names are hard-coded.

Definition at line 680 of file pearl-anglescan-tracker.ipf.

## epics_disconnect()

static variable epics_disconnect | ( |  | ) |

static

Definition at line 806 of file pearl-anglescan-tracker.ipf.

## epics_disconnect_chid()

static variable epics_disconnect_chid | ( | string | chid_var_name | ) |

static

Definition at line 792 of file pearl-anglescan-tracker.ipf.

## export_tracker_data()

static variable export_tracker_data | ( |  | ) |

static

export tracker data (with prompt)

Definition at line 1100 of file pearl-anglescan-tracker.ipf.

## extend_data()

static variable extend_data | ( | variable | num_slices | ) |

static

extend the data buffer for the next polar scan

call this function if the buffer is full.

Parameters

  num_slices | number of slices that the measurement contains

Definition at line 402 of file pearl-anglescan-tracker.ipf.

## IgorQuitHook()

static variable IgorQuitHook | ( | string | app | ) |

static

disconnect EPICS channels before Igor quits.

Definition at line 188 of file pearl-anglescan-tracker.ipf.

## import_tracker_data()

static variable import_tracker_data | ( |  | ) |

static

import tracker data (with prompt)

Definition at line 1130 of file pearl-anglescan-tracker.ipf.

## init_package()

static variable init_package | ( |  | ) |

static

Definition at line 98 of file pearl-anglescan-tracker.ipf.

## load_prefs()

static variable load_prefs | ( |  | ) |

static

load persistent package data from the preferences file.

the preferences file is an Igor packed experiment file in a special preferences folder.

this function is called automatically when the procedure is first compiled, or whenever the user clicks the corresponding button.

Definition at line 163 of file pearl-anglescan-tracker.ipf.

## load_tracker_data()

static variable load_tracker_data | ( |  | ) |

static

import tracker data from file (with prompt)

Definition at line 1170 of file pearl-anglescan-tracker.ipf.

## pmp_data()

static variable pmp_data | ( | WMPopupAction * | pa | ) |

static

Definition at line 1066 of file pearl-anglescan-tracker.ipf.

## pmp_data_mouseup()

static variable pmp_data_mouseup | ( | WMPopupAction * | pa | ) |

static

Definition at line 1080 of file pearl-anglescan-tracker.ipf.

## pmp_parameters()

static variable pmp_parameters | ( | WMPopupAction * | pa | ) |

static

Definition at line 1189 of file pearl-anglescan-tracker.ipf.

## pmp_parameters_mouseup()

static variable pmp_parameters_mouseup | ( | WMPopupAction * | pa | ) |

static

Definition at line 1203 of file pearl-anglescan-tracker.ipf.

## process_image_data()

static variable process_image_data | ( |  | ) |

static

process the data buffer to generate the tracker dataset.

Definition at line 507 of file pearl-anglescan-tracker.ipf.

## save_prefs()

static variable save_prefs | ( |  | ) |

static

save persistent package data to the preferences file.

this function is called when the user clicks the corresponding button.

Definition at line 139 of file pearl-anglescan-tracker.ipf.

## save_tracker_data()

static variable save_tracker_data | ( |  | ) |

static

save tracker data to file (with prompt)

Definition at line 1159 of file pearl-anglescan-tracker.ipf.

## setup_data()

static variable setup_data | ( |  | ) |

static

Definition at line 372 of file pearl-anglescan-tracker.ipf.

## setup_detector()

static variable setup_detector | ( |  | ) |

static

Definition at line 434 of file pearl-anglescan-tracker.ipf.

## setup_graph()

static variable setup_graph | ( |  | ) |

static

create the graph window.

Definition at line 594 of file pearl-anglescan-tracker.ipf.

## toggle_capture()

static variable toggle_capture | ( |  | ) |

static

Definition at line 1032 of file pearl-anglescan-tracker.ipf.

## update_capture()

static variable update_capture | ( |  | ) |

static

Definition at line 1050 of file pearl-anglescan-tracker.ipf.

## update_data_graph()

static variable update_data_graph | ( |  | ) |

static

Definition at line 645 of file pearl-anglescan-tracker.ipf.

## update_detector()

static variable update_detector | ( | variable | theta,
|  | variable | tilt,
|  | variable | phi,
|  | variable | range
| ) |  |

static

update the current position indicator.

Parameters

  theta | polar angle of manipulator
  tilt | tilt angle of manipulator
  phi | azimuthal angle of manipulator
  range | angle range (60 or 45)

the manipulator angles are corrected by the preset offsets internally.

Definition at line 559 of file pearl-anglescan-tracker.ipf.

## update_detector_graph()

static variable update_detector_graph | ( |  | ) |

static

Definition at line 657 of file pearl-anglescan-tracker.ipf.

## Variable Documentation

## package_path

const string package_path = "root:packages:pearl_anglescan_tracker:"

static

data folder path

Definition at line 68 of file pearl-anglescan-tracker.ipf.

## prefs_objects

const string prefs_objects = "projection;theta_offset;tilt_offset;phi_offset;reduction_func;reduction_params"

static

semicolon-separated list of persistent variable, string, and wave names

Definition at line 70 of file pearl-anglescan-tracker.ipf.

## version

version

Initial value:
= 1.6
static const string package_name = "pearl_anglescan_tracker"
package_name
static const string package_name
package name is used as data folder name
Definition: pearl-anglescan-panel.ipf:45

Definition at line 5 of file pearl-anglescan-tracker.ipf.