liquidhandling

package
v0.0.0-...-a011eca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2022 License: BSD-3-Clause, GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XCorrection = 14.38
	YCorrection = 11.24
)

These values correct for the Glison Driver offset and will eventually be removed

Variables

This section is empty.

Functions

This section is empty.

Types

type AdaptorGroup

type AdaptorGroup struct {
	// contains filtered or unexported fields
}

AdaptorGroup simulate a set of adaptors which are physically attached

func NewAdaptorGroup

func NewAdaptorGroup(assembly *wtype.LHHeadAssembly) *AdaptorGroup

NewAdaptorGroup convert a HeadAssembly into an AdaptorGroup for simulation

func (*AdaptorGroup) GetAdaptor

func (self *AdaptorGroup) GetAdaptor(i int) (*AdaptorState, error)

GetAdaptor get an adaptor state

func (*AdaptorGroup) GetAdaptors

func (self *AdaptorGroup) GetAdaptors() []*AdaptorState

func (*AdaptorGroup) GetPosition

func (self *AdaptorGroup) GetPosition() wtype.Coordinates3D

func (*AdaptorGroup) GetRobot

func (self *AdaptorGroup) GetRobot() *RobotState

func (*AdaptorGroup) LoadAdaptor

func (self *AdaptorGroup) LoadAdaptor(pos int, adaptor *AdaptorState)

func (*AdaptorGroup) NumAdaptors

func (self *AdaptorGroup) NumAdaptors() int

CountAdaptors count the adaptors

func (*AdaptorGroup) SetDriveSpeed

func (self *AdaptorGroup) SetDriveSpeed(a wunit.Axis, v wunit.Velocity) error

func (*AdaptorGroup) SetPosition

func (self *AdaptorGroup) SetPosition(p wtype.Coordinates3D) error

func (*AdaptorGroup) SetRobot

func (self *AdaptorGroup) SetRobot(r *RobotState)

type AdaptorState

type AdaptorState struct {
	// contains filtered or unexported fields
}

AdaptorState Represent the physical state and layout of the adaptor

func NewAdaptorState

func NewAdaptorState(name string,
	independent bool,
	channels int,
	channel_offset wtype.Coordinates3D, coneRadius float64,
	params *wtype.LHChannelParameter,
	tipBehaviour wtype.TipLoadingBehaviour) *AdaptorState

func (*AdaptorState) AutoRefillsTipboxes

func (self *AdaptorState) AutoRefillsTipboxes() bool

func (*AdaptorState) GetChannel

func (self *AdaptorState) GetChannel(ch int) *ChannelState

GetChannel

func (*AdaptorState) GetChannelCount

func (self *AdaptorState) GetChannelCount() int

GetChannelCount

func (*AdaptorState) GetGroup

func (self *AdaptorState) GetGroup() *AdaptorGroup

GetGroup

func (*AdaptorState) GetIndex

func (self *AdaptorState) GetIndex() int

func (*AdaptorState) GetName

func (self *AdaptorState) GetName() string

GetName

func (*AdaptorState) GetParamsForChannel

func (self *AdaptorState) GetParamsForChannel(ch int) *wtype.LHChannelParameter

GetParamsForChannel

func (*AdaptorState) GetPosition

func (self *AdaptorState) GetPosition() wtype.Coordinates3D

GetPosition

func (*AdaptorState) GetTipCoordsToLoad

func (self *AdaptorState) GetTipCoordsToLoad(tb *wtype.LHTipbox, num int) ([][]wtype.WellCoords, error)

GetTipsToLoad get which tips would be loaded by the adaptor given the tiploading behaviour returns an error if OverridesLoadTipsCommand is false or there aren't enough tips

func (*AdaptorState) GetTipCount

func (self *AdaptorState) GetTipCount() int

GetTipCount

func (*AdaptorState) IsIndependent

func (self *AdaptorState) IsIndependent() bool

IsIndependent

func (*AdaptorState) OverridesLoadTipsCommand

func (self *AdaptorState) OverridesLoadTipsCommand() bool

func (*AdaptorState) SetGroup

func (self *AdaptorState) SetGroup(g *AdaptorGroup)

SetGroup

func (*AdaptorState) SetOffset

func (self *AdaptorState) SetOffset(p wtype.Coordinates3D)

func (*AdaptorState) SetOverridesLoadTipsCommand

func (self *AdaptorState) SetOverridesLoadTipsCommand(v bool)

func (*AdaptorState) SetPosition

func (self *AdaptorState) SetPosition(p wtype.Coordinates3D) error

func (*AdaptorState) SummarisePositions

func (self *AdaptorState) SummarisePositions(channelsColliding []int) string

SummarisePositions get a human readable description of the X,Y,Z position of the adaptor, as well as which type of tips are loaded on which channels. channelsColliding provides an optional list of channel indexes which have been detected as being involved in a collision, which will also be displayed in the output.

func (*AdaptorState) SummariseTips

func (self *AdaptorState) SummariseTips() string

String summarize the state of the adaptor

type ChannelState

type ChannelState struct {
	// contains filtered or unexported fields
}

ChannelState Represent the physical state of a single channel

func NewChannelState

func NewChannelState(number int, adaptor *AdaptorState, position wtype.Coordinates3D, radius float64) *ChannelState

func (*ChannelState) Aspirate

func (self *ChannelState) Aspirate(volume wunit.Volume) error

Aspirate

func (*ChannelState) Dispense

func (self *ChannelState) Dispense(volume *wunit.Volume) error

Dispense

func (*ChannelState) GetAbsolutePosition

func (self *ChannelState) GetAbsolutePosition() wtype.Coordinates3D

GetAbsolutePosition get the channel's absolute position

func (*ChannelState) GetBounds

func (self *ChannelState) GetBounds(channelClearance float64) wtype.BBox

func (*ChannelState) GetCollisions

func (self *ChannelState) GetCollisions(settings *SimulatorSettings, channelClearance float64) []wtype.LHObject

GetCollisions get collisions with this channel. channelClearance defined a height below the channel/tip to include

func (*ChannelState) GetContents

func (self *ChannelState) GetContents() *wtype.Liquid

GetContents get the contents of the loaded tip, retuns nil if no contents or no tip

func (*ChannelState) GetRadius

func (self *ChannelState) GetRadius() float64

func (*ChannelState) GetRelativePosition

func (self *ChannelState) GetRelativePosition() wtype.Coordinates3D

GetRelativePosition get the channel's position relative to the head

func (*ChannelState) GetTarget

func (self *ChannelState) GetTarget() wtype.LHObject

GetTarget get the LHObject below the adaptor

func (*ChannelState) GetTip

func (self *ChannelState) GetTip() *wtype.LHTip

GetTip get the loaded tip, returns nil if none loaded

func (*ChannelState) HasTip

func (self *ChannelState) HasTip() bool

HasTip is a tip loaded

func (*ChannelState) IsEmpty

func (self *ChannelState) IsEmpty() bool

IsEmpty returns true only if a tip is loaded and contains liquid

func (*ChannelState) LoadTip

func (self *ChannelState) LoadTip(tip *wtype.LHTip)

LoadTip

func (*ChannelState) SetRelativePosition

func (self *ChannelState) SetRelativePosition(v wtype.Coordinates3D)

SetRelativePosition get the channel's position relative to the head

func (*ChannelState) UnloadTip

func (self *ChannelState) UnloadTip() *wtype.LHTip

UnloadTip

type CollisionError

type CollisionError struct {
	// contains filtered or unexported fields
}

CollisionError generated when a physical collision occurs

func NewCollisionError

func NewCollisionError(state *RobotState, channelsColliding map[int][]int, objectsColliding []wtype.LHObject) *CollisionError

NewCollisionError make a new collision

func (*CollisionError) CollisionDescription

func (self *CollisionError) CollisionDescription() string

func (*CollisionError) Error

func (self *CollisionError) Error() string

func (*CollisionError) GetStateAtError

func (self *CollisionError) GetStateAtError() string

func (*CollisionError) Instruction

func (self *CollisionError) Instruction() driver.TerminalRobotInstruction

func (*CollisionError) InstructionDescription

func (self *CollisionError) InstructionDescription() string

func (*CollisionError) InstructionIndex

func (self *CollisionError) InstructionIndex() int

func (*CollisionError) SetInstructionDescription

func (self *CollisionError) SetInstructionDescription(d string)

func (*CollisionError) Severity

func (self *CollisionError) Severity() simulator.ErrorSeverity

type DetailedLHError

type DetailedLHError interface {
	GetStateAtError() string
}

type Frequency

type Frequency int
const (
	WarnNever Frequency = iota
	WarnOnce
	WarnAlways
)

type GenericError

type GenericError struct {
	// contains filtered or unexported fields
}

func (*GenericError) Error

func (self *GenericError) Error() string

func (*GenericError) GetStateAtError

func (self *GenericError) GetStateAtError() string

func (*GenericError) Instruction

func (self *GenericError) Instruction() driver.TerminalRobotInstruction

func (*GenericError) InstructionIndex

func (self *GenericError) InstructionIndex() int

func (*GenericError) Severity

func (self *GenericError) Severity() simulator.ErrorSeverity

type LiquidhandlingError

type LiquidhandlingError interface {
	simulator.SimulationError
	Instruction() driver.TerminalRobotInstruction
	InstructionIndex() int
}

func NewGenericError

func NewGenericError(state *RobotState, severity simulator.ErrorSeverity, message string) LiquidhandlingError

func NewGenericErrorf

func NewGenericErrorf(state *RobotState, severity simulator.ErrorSeverity, format string, a ...interface{}) LiquidhandlingError

func NewTipsNotInWellError

func NewTipsNotInWellError(vlh *VirtualLiquidHandler, description string, channels []int) LiquidhandlingError

type RobotState

type RobotState struct {
	// contains filtered or unexported fields
}

RobotState Represent the physical state of a liquidhandling robot

func NewRobotState

func NewRobotState() *RobotState

func (*RobotState) AddAdaptorGroup

func (self *RobotState) AddAdaptorGroup(a *AdaptorGroup)

AddAdaptorGroup

func (*RobotState) Finalize

func (self *RobotState) Finalize()

Finalize

func (*RobotState) GetAdaptor

func (self *RobotState) GetAdaptor(groupIndex int, adaptorIndex int) (*AdaptorState, error)

func (*RobotState) GetAdaptorGroup

func (self *RobotState) GetAdaptorGroup(num int) (*AdaptorGroup, error)

GetAdaptorGroup

func (*RobotState) GetAdaptors

func (self *RobotState) GetAdaptors() []*AdaptorState

func (*RobotState) GetDeck

func (self *RobotState) GetDeck() *wtype.LHDeck

GetDeck

func (*RobotState) Initialize

func (self *RobotState) Initialize()

Initialize

func (*RobotState) IsFinalized

func (self *RobotState) IsFinalized() bool

IsFinalized

func (*RobotState) IsInitialized

func (self *RobotState) IsInitialized() bool

IsInitialized

func (*RobotState) NumAdaptorGroups

func (self *RobotState) NumAdaptorGroups() int

GetNumberOfAdaptorGroups

func (*RobotState) NumAdaptors

func (self *RobotState) NumAdaptors() int

func (*RobotState) SetDeck

func (self *RobotState) SetDeck(deck *wtype.LHDeck)

SetDeck

func (*RobotState) SummariseAdaptors

func (self *RobotState) SummariseAdaptors(channelsColliding map[int][]int) string

func (*RobotState) SummariseDeck

func (self *RobotState) SummariseDeck() string

func (*RobotState) SummariseState

func (self *RobotState) SummariseState(channelsColliding map[int][]int) string

type SimulatorSettings

type SimulatorSettings struct {
	// contains filtered or unexported fields
}

func DefaultSimulatorSettings

func DefaultSimulatorSettings() *SimulatorSettings

func (*SimulatorSettings) EnableAutoChannelWarning

func (self *SimulatorSettings) EnableAutoChannelWarning(f Frequency)

func (*SimulatorSettings) EnableLiquidTypeWarning

func (self *SimulatorSettings) EnableLiquidTypeWarning(f Frequency)

func (*SimulatorSettings) EnablePipetteSpeedWarning

func (self *SimulatorSettings) EnablePipetteSpeedWarning(f Frequency)

func (*SimulatorSettings) EnableTipLoadingOverride

func (self *SimulatorSettings) EnableTipLoadingOverride(b bool)

func (*SimulatorSettings) EnableTipboxCheck

func (self *SimulatorSettings) EnableTipboxCheck(b bool)

func (*SimulatorSettings) EnableTipboxCollision

func (self *SimulatorSettings) EnableTipboxCollision(b bool)

func (*SimulatorSettings) IsAutoChannelWarningEnabled

func (self *SimulatorSettings) IsAutoChannelWarningEnabled() bool

func (*SimulatorSettings) IsLiquidTypeWarningEnabled

func (self *SimulatorSettings) IsLiquidTypeWarningEnabled() bool

func (*SimulatorSettings) IsPipetteSpeedWarningEnabled

func (self *SimulatorSettings) IsPipetteSpeedWarningEnabled() bool

func (*SimulatorSettings) IsTipLoadingOverrideEnabled

func (self *SimulatorSettings) IsTipLoadingOverrideEnabled() bool

func (*SimulatorSettings) IsTipboxCheckEnabled

func (self *SimulatorSettings) IsTipboxCheckEnabled() bool

func (*SimulatorSettings) IsTipboxCollisionEnabled

func (self *SimulatorSettings) IsTipboxCollisionEnabled() bool

func (*SimulatorSettings) MaxDispenseHeight

func (self *SimulatorSettings) MaxDispenseHeight() float64

func (*SimulatorSettings) SetMaxDispenseHeight

func (self *SimulatorSettings) SetMaxDispenseHeight(f float64)

type TipsNotInWellError

type TipsNotInWellError struct {
	*GenericError
	// contains filtered or unexported fields
}

TipsNotInWellError generated when aspirate is called and there are no tips in a well

func (*TipsNotInWellError) GetStateAtError

func (self *TipsNotInWellError) GetStateAtError() string

type VirtualLiquidHandler

type VirtualLiquidHandler struct {
	// contains filtered or unexported fields
}

Simulate a liquid handler Driver

func NewVirtualLiquidHandler

func NewVirtualLiquidHandler(props *liquidhandling.LHProperties, settings *SimulatorSettings) (*VirtualLiquidHandler, error)

Create a new VirtualLiquidHandler which mimics an LHDriver

func (*VirtualLiquidHandler) AddError

func (self *VirtualLiquidHandler) AddError(message string)

func (*VirtualLiquidHandler) AddErrorf

func (self *VirtualLiquidHandler) AddErrorf(format string, a ...interface{})

func (*VirtualLiquidHandler) AddInfo

func (self *VirtualLiquidHandler) AddInfo(message string)

func (*VirtualLiquidHandler) AddInfof

func (self *VirtualLiquidHandler) AddInfof(format string, a ...interface{})

func (*VirtualLiquidHandler) AddPlateTo

func (self *VirtualLiquidHandler) AddPlateTo(position string, plate interface{}, name string) driver.CommandStatus

AddPlateTo - used

func (*VirtualLiquidHandler) AddWarning

func (self *VirtualLiquidHandler) AddWarning(message string)

func (*VirtualLiquidHandler) AddWarningf

func (self *VirtualLiquidHandler) AddWarningf(format string, a ...interface{})

func (*VirtualLiquidHandler) Aspirate

func (self *VirtualLiquidHandler) Aspirate(volume []float64, overstroke []bool, head int, multi int,
	platetype []string, what []string, llf []bool) driver.CommandStatus

Aspirate - used

func (*VirtualLiquidHandler) Close

Close - notimplement in CRI

func (*VirtualLiquidHandler) CountErrors

func (self *VirtualLiquidHandler) CountErrors() int

CountErrors

func (*VirtualLiquidHandler) Dispense

func (self *VirtualLiquidHandler) Dispense(volume []float64, blowout []bool, head int, multi int,
	platetype []string, what []string, llf []bool) driver.CommandStatus

Dispense - used

func (*VirtualLiquidHandler) DriverType

func (self *VirtualLiquidHandler) DriverType() ([]string, error)

func (*VirtualLiquidHandler) Finalize

func (self *VirtualLiquidHandler) Finalize() driver.CommandStatus

Finalize - used

func (*VirtualLiquidHandler) GetAdaptorState

func (self *VirtualLiquidHandler) GetAdaptorState(adaptor int) (*AdaptorState, error)

GetAdaptorState Currently we only support one adaptor group

func (*VirtualLiquidHandler) GetCapabilities

GetCapabilites - used

func (*VirtualLiquidHandler) GetCurrentPosition

func (self *VirtualLiquidHandler) GetCurrentPosition(head int) (string, driver.CommandStatus)

GetCurrentPosition - unused

func (*VirtualLiquidHandler) GetErrors

func (self *VirtualLiquidHandler) GetErrors() []simulator.SimulationError

GetErrors

func (*VirtualLiquidHandler) GetFirstError

func (self *VirtualLiquidHandler) GetFirstError(minimumSeverity simulator.ErrorSeverity) simulator.SimulationError

GetFirstError get the first error that's at least as bad as minimum severity

func (*VirtualLiquidHandler) GetHeadState

func (self *VirtualLiquidHandler) GetHeadState(head int) (string, driver.CommandStatus)

GetHeadState - unused

func (*VirtualLiquidHandler) GetLastMove

func (self *VirtualLiquidHandler) GetLastMove() string

func (*VirtualLiquidHandler) GetLastTarget

func (self *VirtualLiquidHandler) GetLastTarget() wtype.LHObject

func (*VirtualLiquidHandler) GetObjectAt

func (self *VirtualLiquidHandler) GetObjectAt(slot string) wtype.LHObject

func (*VirtualLiquidHandler) GetOutputFile

func (self *VirtualLiquidHandler) GetOutputFile() ([]byte, driver.CommandStatus)

GetOutputFile - used, but not in instruction stream

func (*VirtualLiquidHandler) GetPositionState

func (self *VirtualLiquidHandler) GetPositionState(position string) (string, driver.CommandStatus)

GetPositionState - unused

func (*VirtualLiquidHandler) GetProperties

func (self *VirtualLiquidHandler) GetProperties() *liquidhandling.LHProperties

func (*VirtualLiquidHandler) GetStatus

func (self *VirtualLiquidHandler) GetStatus() (driver.Status, driver.CommandStatus)

GetStatus - unused

func (*VirtualLiquidHandler) GetWellAt

func (self *VirtualLiquidHandler) GetWellAt(pl wtype.PlateLocation) *wtype.LHWell

GetWellAt return the internal model of the well at the given location, or nil if not found

func (*VirtualLiquidHandler) Go

Go - unused

func (*VirtualLiquidHandler) Initialize

func (self *VirtualLiquidHandler) Initialize() driver.CommandStatus

Initialize - used

func (*VirtualLiquidHandler) LightsOff

func (self *VirtualLiquidHandler) LightsOff() driver.CommandStatus

Lights Off - notimplemented in compositerobotinstruction

func (*VirtualLiquidHandler) LightsOn

func (self *VirtualLiquidHandler) LightsOn() driver.CommandStatus

Lights On - not implemented in compositerobotinstruction

func (*VirtualLiquidHandler) LoadAdaptor

func (self *VirtualLiquidHandler) LoadAdaptor(param int) driver.CommandStatus

LoadAdaptor - notimplemented in CRI

func (*VirtualLiquidHandler) LoadHead

func (self *VirtualLiquidHandler) LoadHead(param int) driver.CommandStatus

LoadHead - unused

func (*VirtualLiquidHandler) LoadTips

func (self *VirtualLiquidHandler) LoadTips(channels []int, head, multi int,
	platetypeS, positionS, well []string) driver.CommandStatus

LoadTips - used

func (*VirtualLiquidHandler) Message

func (self *VirtualLiquidHandler) Message(level int, title, text string, showcancel bool) driver.CommandStatus

Message - unused

func (*VirtualLiquidHandler) Mix

func (self *VirtualLiquidHandler) Mix(head int, volume []float64, platetype []string, cycles []int,
	multi int, what []string, blowout []bool) driver.CommandStatus

Mix - used

func (*VirtualLiquidHandler) Move

func (self *VirtualLiquidHandler) Move(deckpositionS []string, wellcoords []string, reference []int,
	offsetX, offsetY, offsetZ []float64, platetypeS []string,
	head int) driver.CommandStatus

Move command - used

func (*VirtualLiquidHandler) MoveRaw

func (self *VirtualLiquidHandler) MoveRaw(head int, x, y, z float64) driver.CommandStatus

Move raw - not yet implemented in compositerobotinstruction

func (*VirtualLiquidHandler) Open

Open - notimplemented in CRI

func (*VirtualLiquidHandler) RemoveAllPlates

func (self *VirtualLiquidHandler) RemoveAllPlates() driver.CommandStatus

RemoveAllPlates - used

func (*VirtualLiquidHandler) RemovePlateAt

func (self *VirtualLiquidHandler) RemovePlateAt(position string) driver.CommandStatus

RemovePlateAt - unused

func (*VirtualLiquidHandler) ResetPistons

func (self *VirtualLiquidHandler) ResetPistons(head, channel int) driver.CommandStatus

ResetPistons - used

func (*VirtualLiquidHandler) SetDriveSpeed

func (self *VirtualLiquidHandler) SetDriveSpeed(drive string, rate float64) driver.CommandStatus

SetDriveSpeed sets the speed at which the head will move. Drive should be one of "X", "Y", "Z", rate is expressed in mm/s. XXX Bug: it is currently not possible to select which head assembly should be affected currently assume we're talking about group zero

func (*VirtualLiquidHandler) SetPipetteSpeed

func (self *VirtualLiquidHandler) SetPipetteSpeed(head, channel int, rate float64) driver.CommandStatus

SetPipetteSpeed - used

func (*VirtualLiquidHandler) SetPositionState

func (self *VirtualLiquidHandler) SetPositionState(position string, state driver.PositionState) driver.CommandStatus

SetPositionState - unused

func (*VirtualLiquidHandler) Simulate

func (self *VirtualLiquidHandler) Simulate(instructions []liquidhandling.TerminalRobotInstruction) error

Simulate simulate the list of instructions

func (*VirtualLiquidHandler) Stop

Stop - unused

func (*VirtualLiquidHandler) UnloadAdaptor

func (self *VirtualLiquidHandler) UnloadAdaptor(param int) driver.CommandStatus

UnloadAdaptor - notimplemented in CRI

func (*VirtualLiquidHandler) UnloadHead

func (self *VirtualLiquidHandler) UnloadHead(param int) driver.CommandStatus

UnloadHead - unused

func (*VirtualLiquidHandler) UnloadTips

func (self *VirtualLiquidHandler) UnloadTips(channels []int, head, multi int,
	platetype, position, well []string) driver.CommandStatus

UnloadTips - used

func (*VirtualLiquidHandler) UpdateMetaData

UpdateMetaData - used

func (*VirtualLiquidHandler) Wait

Wait - used

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL