Purpose

Given the name of a position in one of the LRIS configurable
stages (e.g., grating, slitmask, filter), return the position
number in which the named element resides. If no such element
is found, returns -1.

Usage

name2pos <keyword> <value>

Arguments

keyword = name of the keyword to check
value = keyword value to translate into a position number

Output

To stdout

Restrictions

Keyword must be configurable

Exit values

-1 = keyword is not configurable
0 = normal completion
1 = no corresponding match on keyword

Example

1) Given the following grating configuration

mirror = 1
1200/7500 = 2
150/7500 = 3
300/5000 = 4
600/7500 = 5

To return the position in which the 300/5000 grating lives

name2pos graname 300/5000
The returned value is 4 and the exit status is 0.