Package dics :: Module filterwheel :: Class filterwheel
[hide private]
[frames] | no frames]

Class filterwheel
source code

mechanism.mechanism --+
                      |
                     filterwheel

Class representing a 4 position filter-wheel type mechanism, based on the generic mechanism class in mechanism.py. It adds attributes for motor steps per rotation and preferred direction of movement. There is optional position feedback checking from grey code microswitches.

Instance Methods [hide private]
  __init__(self, names, cortex, icu_num, axis_num, base_speed, max_speed, acceleration, deceleration, position, steps_per_rev, direction, name='filterwheel')
Initialiser for filterwheel class.
  updateConfig(self, config)
Should be called by the parent instrument object's destructor to enable status information to be saved to file on exit.
  setupWheel(self)
Runs through an 'auto-fettling procedure'.
  getStatus(self)
Returns 0, 1, 2 or 3 if the wheel in position, 0.5, 1.5, 2.5 or 3.5 if between positions.
  goTo(self, filter)
Moves the wheel to the correct position for the given filter number (0, 1, 2 or 3) or filter name (pass a string) .
  moveBy(self, steps, blocking=True)
Moves the filter wheel position by a given number of motor steps.
  moveTo(self, position, blocking=True)
  setPosition(self, new_position=0)
Defines the current mechanism position to be equal to the single integer argument.

Inherited from mechanism.mechanism: getMotorParams, getPosition, setMotorParams


Class Variables [hide private]
statusDict  

Method Details [hide private]

__init__(self, names, cortex, icu_num, axis_num, base_speed, max_speed, acceleration, deceleration, position, steps_per_rev, direction, name='filterwheel')
(Constructor)

source code 

Initialiser for filterwheel class.

Arguments:
    names:         String containing a comma seperated list of
                   names for the filters.
    cortex:        String containing the name of the cortex based
                   ICU daisy chain instance that this mechanism is a
                   part of.
    icuNum:        Which ICU in the chain this mechanism is connected
                   to.
    axisNum:       Which axis of the ICU the mechansism is connected
                   to.
    baseSpeed:     Starting speed (steps/half steps per sec)
    maxSpeed:      Peak speed (steps/half steps per sec)
    acceleration:  Acceleration (steps/half steps per sec^2)
    deceleration:  Deceleration (steps/half steps per sec^2)
    position:      Initial position of the mechanism (steps)
    steps_per_rev: Number of motor steps per revolution of the wheel
    direction:     +1 or -1, specifies the direction for rotation
    name:          Label used for logging purposes.

Overrides: mechanism.mechanism.__init__

updateConfig(self, config)

source code 

Should be called by the parent instrument object's destructor to enable status information to be saved to file on exit.

Takes a ConfigParserRT.SafeConfigParser object as argument.
Overrides: mechanism.mechanism.updateConfig

setupWheel(self)

source code 
Runs through an 'auto-fettling procedure'.

getStatus(self)

source code 
Returns 0, 1, 2 or 3 if the wheel in position, 0.5, 1.5, 2.5 or 3.5 if between positions.

goTo(self, filter)

source code 
Moves the wheel to the correct position for the given filter number (0, 1, 2 or 3) or filter name (pass a string) .

moveBy(self, steps, blocking=True)

source code 
Moves the filter wheel position by a given number of motor steps. Modifies the move to ensure it's in the correct direction and is of magnitude less than a full rotation.
Overrides: mechanism.mechanism.moveBy

moveTo(self, position, blocking=True)

source code 
Overrides: mechanism.mechanism.moveTo

setPosition(self, new_position=0)

source code 
Defines the current mechanism position to be equal to the single integer argument. If no argument is given, the mechanism position is zeroed.
Overrides: mechanism.mechanism.setPosition
(inherited documentation)

Class Variable Details [hide private]

statusDict

Value:
{0: 3.5, 1: 3, 2: 1, 3: 1.5, 4: 0, 5: 2.5, 6: 0.5, 7: 2}