12.07.2015 Views

spec - Local Sector 7 web page

spec - Local Sector 7 web page

spec - Local Sector 7 web page

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

chg_offset(motor, user_angle) — Sets the offset between the dial angle and theuser angle, using the current dial position and the argument user_angle formotor motor according to the relation user_angle = offset + sign × dial_anglewhere sign is ±1 and is set in the config file. Returns nonzero if not configuredfor motor .Resets to command level if any motors are moving.set_lim(motor, low, high) — Sets the low and high limits of motor number motor .low and high are in dial units. It does not actually matter in which order thelimits are given. Returns nonzero if not configured for motor or if the protectionflags prevent the user from changing the limits on this motor. Resets tocommand level if any motors are moving.Data Handling and Analysis Functions<strong>spec</strong> can store data in up to 256 independent data arrays called groups. Each groupis configured (see below) to have a particular number of data elements per point. Forexample, each point in a group could have elements for H , K , L ,and detector counts.Alternatively, each point could have just one element and be used to hold dataobtained from an MCA.Groups are configured using the data_grp() function. A group can have up to 2048elements per point. The maximum number of points in a group is determined by theproduct of the number of elements per point and the number of points. That productcan be no more than 65,536, and may be slightly less depending on how the numberof elements divides into 2048. The maximum number of points for all groups is262,144. (These limits are arbitrary and are set to control the size of static dataarrays and auxiliary files. If requested, CSS can make the limits larger.)¡When starting <strong>spec</strong> for the first time or with the (fresh) flag, one data group(group 0) is configured for 4096 points, with each point consisting of two elements.When leaving <strong>spec</strong>,the current data group configuration and data points are saved.<strong>spec</strong> has several functions to manipulate the internal data. These functions allowunary and binary arithmetic operations, math functions and analysis operations tobe performed on all the elements of a group or among elements in different groups.In the functions described below, ifanelement number is negative, the element numberis obtained by adding the number of elements per point in the group to the negativeelement number. F§ ¢ ¥¡ ¤ ¢¤¢¡ £¢£¢¡£ ¤ ¥£ ¢¤¢¡ £ ¢¤¢¡¢ ££ ¡£¥¤second to last, etc.All functions reset to command level if an invalid group, point or element is given asan argument. Functions that don’t need to return anything in particular return zero.106 REFERENCE MANUAL INTERIM WORK-IN-PROGRESS (8/16/01) NOT FOR GENERAL DISTRIBUTION

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!