Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ os:
- linux
- osx
julia:
- 0.5
- 0.6
notifications:
email: false
Expand Down
3 changes: 2 additions & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ AxisArrays
IntervalSets
Unitful
MappedArrays
Compat 0.18
ImagineFormat
DataStructures
Binary file added examples/t.ai
Binary file not shown.
Binary file added examples/t.di
Binary file not shown.
55 changes: 55 additions & 0 deletions examples/t.imagine
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
IMAGINE
[general]
header version=7
app version=2.0, build (Jul 5 2017, 10:40:58)
date and time=2017-07-05T11:13:58
byte order=l
rig=ocpi-2

[misc params]
stimulus file content=
comment=
ai data file=t.ai
di data file=t.di
image data file=d:t.cam
command file=t.json
piezo=start position: NA;stop position: NA;output scan rate: 50000;bidirection: 0

[ai]
nscans=-1
channel list=0 2
label list=axial piezo monitor$camera1 analog monitor
scan rate=50000
min sample=-32768
max sample=32767
min input=-10
max input=10

[di]
di nscans=-1
di channel list=24 25 26 27 28 29 30 31
di label list=camera1 frame monitor$camera2 frame monitor$laser monitor$unused$unused$unused$unused$unused
di scan rate=50000

[camera]
original image depth=16
saved image depth=16
image width=2060
image height=2048
number of frames requested=650
nStacks=10
idle time between stacks=NA
pre amp gain=
gain=0
exposure time=0.011 s
vertical shift speed=
vertical clock vol amp=-1
readout rate=
pixel order=x y z
frame index offset=0
frames per stack=65
pixel data type=uint16
camera=edge.main
um per pixel=-1
binning=hbin:1;vbin:1;hstart:1;hend:2060;vstart:1;vend:2048
angle from horizontal (deg)=-1
43 changes: 43 additions & 0 deletions examples/t.json

Large diffs are not rendered by default.

59 changes: 59 additions & 0 deletions rigs/ocpi1.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
push!(RIGS, "ocpi-1")
#Mappings from DAQ channel to friendlier default names
const ocpi1_mappings = Dict("AO0"=>"axial piezo",
"AO1"=>"analogout1",
"AI0"=>"axial piezo monitor",
"AI2"=>"analogin1",
"AI3"=>"analogin2",
"AI4"=>"analogin3",
"AI5"=>"analogin4",
"AI6"=>"analogin5",
"AI7"=>"analogin6",
"AI8"=>"analogin7",
"AI9"=>"analogin8",
"AI10"=>"analogin9",
"AI11"=>"analogin10",
"AI12"=>"analogin11",
"AI13"=>"analogin12",
"AI14"=>"analogin13",
"AI15"=>"analogin14",
"P0.0"=>"stimulus1",
"P0.1"=>"stimulus2",
"P0.2"=>"stimulus3",
"P0.3"=>"stimulus4",
"P0.4"=>"488nm laser shutter",
"P0.5"=>"camera1",
"P0.6"=>"stimulus5",
"P0.7"=>"camera1 frame monitor")

DEFAULT_DAQCHANS_TO_NAMES["ocpi-1"] = ocpi1_mappings
DEFAULT_NAMES_TO_DAQCHANS["ocpi-1"] = map(reverse, ocpi1_mappings)

const ocpi1_aochans = map(x->"AO$(x)", 0:1)
const ocpi1_aichans = map(x->"AI$(x)", vcat([0;], [2:15...])) #currently AI1 is unused
const ocpi1_dochans = map(x->"P0.$(x)", 0:6)
const ocpi1_dichans = ["P0.7";]
const ocpi1_pos_ctrl_chans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-1"][x], ["axial piezo"])
const ocpi1_pos_mon_chans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-1"][x], ["axial piezo monitor"])
const ocpi1_cam_ctrl_chans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-1"][x], ["camera1"])
const ocpi1_cam_mon_chans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-1"][x], ["camera1 frame monitor"])
const ocpi1_laschans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-1"][x], ["488nm laser shutter"])
const ocpi1_stimchans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-1"][x], ["stimulus$x" for x = 1:5])
const ocpi1_fixed_names = ["axial piezo", "axial piezo monitor", "488nm laser shutter", "camera1", "camera1 frame monitor"]
const ocpi1_fixed_daqchans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-1"][x], ocpi1_fixed_names)

AO_CHANS["ocpi-1"] = OrderedSet(ocpi1_aochans)
AI_CHANS["ocpi-1"] = OrderedSet(ocpi1_aichans)
DO_CHANS["ocpi-1"] = OrderedSet(ocpi1_dochans)
DI_CHANS["ocpi-1"] = OrderedSet(ocpi1_dichans)
POS_CONTROL_CHANS["ocpi-1"] = ocpi1_pos_ctrl_chans
POS_MONITOR_CHANS["ocpi-1"] = ocpi1_pos_mon_chans
CAM_CONTROL_CHANS["ocpi-1"] = ocpi1_cam_ctrl_chans
CAM_MONITOR_CHANS["ocpi-1"] = ocpi1_cam_mon_chans
LAS_CONTROL_CHANS["ocpi-1"] = ocpi1_laschans
STIM_CHANS["ocpi-1"] =OrderedSet(ocpi1_stimchans)
FIXED_NAMES["ocpi-1"] = ocpi1_fixed_names
FIXED_DAQ_CHANS["ocpi-1"] = ocpi1_fixed_daqchans

RIG_CHIP_SIZES["ocpi-1"] = PCO_EDGE_5_5_CHIP_SIZE
RIG_FRAMERATE_FUNCS["ocpi-1"] = PCO_EDGE_5_5_FRAMERATE_FUNC
102 changes: 102 additions & 0 deletions rigs/ocpi2.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
push!(RIGS, "ocpi-2")

const ocpi2_mappings = Dict("AO0"=>"axial piezo",
"AO1"=>"horizontal piezo",
"AO2"=>"analogout3",
"AO3"=>"analogout4",
"AI0"=>"axial piezo monitor",
"AI1"=>"horizontal piezo monitor",
"AI2"=>"analogin1",
"AI3"=>"analogin2",
"AI4"=>"analogin3",
"AI5"=>"analogin4",
"AI6"=>"analogin5",
"AI7"=>"analogin6",
"AI8"=>"analogin7",
"AI9"=>"analogin8",
"AI10"=>"analogin9",
"AI11"=>"analogin10",
"AI12"=>"analogin11",
"AI13"=>"analogin12",
"AI14"=>"analogin13",
"AI15"=>"analogin14",
"AI16"=>"analogin15",
"AI17"=>"analogin16",
"AI18"=>"analogin17",
"AI19"=>"analogin18",
"AI20"=>"analogin19",
"AI21"=>"analogin20",
"AI22"=>"analogin21",
"AI23"=>"analogin22",
"AI24"=>"analogin23",
"AI25"=>"analogin24",
"AI26"=>"analogin25",
"AI27"=>"analogin26",
"AI28"=>"analogin27",
"AI29"=>"analogin28",
"AI30"=>"analogin29",
"AI31"=>"analogin30",
"P0.0"=>"stimulus1",
"P0.1"=>"stimulus2",
"P0.2"=>"stimulus3",
"P0.3"=>"stimulus4",
"P0.4"=>"all lasers",
"P0.5"=>"camera1",
"P0.6"=>"camera2",
# "P0.7"=>"reserved",
"P0.8"=>"405nm laser",
"P0.9"=>"445nm laser",
"P0.10"=>"488nm laser",
"P0.11"=>"514nm laser",
"P0.12"=>"561nm laser",
"P0.13"=>"stimulus5",
"P0.14"=>"stimulus6",
"P0.15"=>"stimulus7",
"P0.16"=>"stimulus8",
"P0.17"=>"stimulus9",
"P0.18"=>"stimulus10",
"P0.19"=>"stimulus11",
"P0.20"=>"stimulus12",
"P0.21"=>"stimulus13",
"P0.22"=>"stimulus14",
"P0.23"=>"stimulus15",
"P0.24"=>"camera1 frame monitor",
"P0.25"=>"camera2 frame monitor",
"P0.26"=>"diginput1",
"P0.27"=>"diginput2",
"P0.28"=>"diginput3",
"P0.29"=>"diginput4",
"P0.30"=>"diginput5",
"P0.31"=>"diginput6",)

DEFAULT_DAQCHANS_TO_NAMES["ocpi-2"] = ocpi2_mappings
DEFAULT_NAMES_TO_DAQCHANS["ocpi-2"] = map(reverse, ocpi2_mappings)

const ocpi2_aochans = map(x->"AO$(x)", 0:3)
const ocpi2_aichans = map(x->"AI$(x)", 0:31)
const ocpi2_dochans = map(x->"P0.$(x)", vcat([0:6...], [8:23...]))
const ocpi2_dichans = map(x->"P0.$(x)", 24:31)
const ocpi2_pos_ctrl_chans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-2"][x], ["axial piezo"; "horizontal piezo"])
const ocpi2_pos_mon_chans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-2"][x], ["axial piezo monitor"; "horizontal piezo monitor"])
const ocpi2_cam_ctrl_chans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-2"][x], ["camera1"; "camera2"])
const ocpi2_cam_mon_chans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-2"][x], ["camera1 frame monitor"; "camera2 frame monitor"])
const ocpi2_laschans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-2"][x], ["405nm laser"; "445nm laser"; "488nm laser"; "514nm laser"; "561nm laser"; "all lasers"])
const ocpi2_stimchans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-2"][x], ["stimulus$x" for x = 1:15])
const ocpi2_fixed_names = ["axial piezo", "axial piezo monitor", "horizontal piezo", "horizontal piezo monitor", "camera1", "camera1 frame monitor", "camera2", "camera2 frame monitor", "405nm laser", "445nm laser", "488nm laser", "514nm laser", "561nm laser"]
const ocpi2_fixed_daqchans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-2"][x], ocpi2_fixed_names)

AO_CHANS["ocpi-2"] = OrderedSet(ocpi2_aochans)
AI_CHANS["ocpi-2"] = OrderedSet(ocpi2_aichans)
DO_CHANS["ocpi-2"] = OrderedSet(ocpi2_dochans)
DI_CHANS["ocpi-2"] = OrderedSet(ocpi2_dichans)
POS_CONTROL_CHANS["ocpi-2"] = ocpi2_pos_ctrl_chans
POS_MONITOR_CHANS["ocpi-2"] = ocpi2_pos_mon_chans
CAM_CONTROL_CHANS["ocpi-2"] = ocpi2_cam_ctrl_chans
CAM_MONITOR_CHANS["ocpi-2"] = ocpi2_cam_mon_chans
LAS_CONTROL_CHANS["ocpi-2"] = ocpi2_laschans
STIM_CHANS["ocpi-2"] =OrderedSet(ocpi2_stimchans)
FIXED_NAMES["ocpi-2"] = ocpi2_fixed_names
FIXED_DAQ_CHANS["ocpi-2"] = ocpi2_fixed_daqchans

RIG_CHIP_SIZES["ocpi-2"] = PCO_EDGE_4_2_CHIP_SIZE
RIG_FRAMERATE_FUNCS["ocpi-2"] = PCO_EDGE_4_2_FRAMERATE_FUNC
104 changes: 104 additions & 0 deletions rigs/ocpi_lsk.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
push!(RIGS, "ocpi-lsk")

#Much like OCPI2, but with missing channels for missing hardware
const ocpi_lsk_mappings = Dict("AO0"=>"axial piezo",
# "AO1"=>"reserved",
"AO2"=>"analogout3",
"AO3"=>"analogout4",
"AI0"=>"axial piezo monitor",
# "AI1"=>"reserved",
"AI2"=>"analogin1",
"AI3"=>"analogin2",
"AI4"=>"analogin3",
"AI5"=>"analogin4",
"AI6"=>"analogin5",
"AI7"=>"analogin6",
"AI8"=>"analogin7",
"AI9"=>"analogin8",
"AI10"=>"analogin9",
"AI11"=>"analogin10",
"AI12"=>"analogin11",
"AI13"=>"analogin12",
"AI14"=>"analogin13",
"AI15"=>"analogin14",
"AI16"=>"analogin15",
"AI17"=>"analogin16",
"AI18"=>"analogin17",
"AI19"=>"analogin18",
"AI20"=>"analogin19",
"AI21"=>"analogin20",
"AI22"=>"analogin21",
"AI23"=>"analogin22",
"AI24"=>"analogin23",
"AI25"=>"analogin24",
"AI26"=>"analogin25",
"AI27"=>"analogin26",
"AI28"=>"analogin27",
"AI29"=>"analogin28",
"AI30"=>"analogin29",
"AI31"=>"analogin30",
"P0.0"=>"stimulus1",
"P0.1"=>"stimulus2",
"P0.2"=>"stimulus3",
"P0.3"=>"stimulus4",
"P0.4"=>"all lasers",
"P0.5"=>"camera1",
# "P0.6"=>"reserved",
# "P0.7"=>"reserved",
# "P0.8"=>"reserved",
# "P0.9"=>"reserved",
# "P0.10"=>"reserved",
# "P0.11"=>"reserved",
# "P0.12"=>"reserved",
"P0.13"=>"stimulus5",
"P0.14"=>"stimulus6",
"P0.15"=>"stimulus7",
"P0.16"=>"stimulus8",
"P0.17"=>"stimulus9",
"P0.18"=>"stimulus10",
"P0.19"=>"stimulus11",
"P0.20"=>"stimulus12",
"P0.21"=>"stimulus13",
"P0.22"=>"stimulus14",
"P0.23"=>"stimulus15",
"P0.24"=>"camera1 frame monitor",
# "P0.25"=>"reserved",
"P0.26"=>"diginput1",
"P0.27"=>"diginput2",
"P0.28"=>"diginput3",
"P0.29"=>"diginput4",
"P0.30"=>"diginput5",
"P0.31"=>"diginput6",)

DEFAULT_DAQCHANS_TO_NAMES["ocpi-lsk"] = ocpi_lsk_mappings
DEFAULT_NAMES_TO_DAQCHANS["ocpi-lsk"] = map(reverse, ocpi_lsk_mappings)

const ocpi_lsk_pos_ctrl_chans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-lsk"][x], ["axial piezo"])
const ocpi_lsk_aochans = map(x->"AO$(x)", [0;2;3])
const ocpi_lsk_aichans = map(x->"AI$(x)", vcat([0;], [2:15...])) #currently AI1 is unused
const ocpi_lsk_dochans = map(x->"P0.$(x)", vcat([0:5...], [13:23...]))
const ocpi_lsk_dichans = map(x->"P0.$(x)", vcat([24;], [26:31...]))
const ocpi_lsk_pos_mon_chans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-lsk"][x], ["axial piezo monitor"])
const ocpi_lsk_cam_ctrl_chans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-lsk"][x], ["camera1"])
const ocpi_lsk_cam_mon_chans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-lsk"][x], ["camera1 frame monitor"])
const ocpi_lsk_laschans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-lsk"][x], ["all lasers"])
const ocpi_lsk_stimchans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-lsk"][x], ["stimulus$x" for x = 1:15])
const ocpi_lsk_fixed_names = ["axial piezo", "axial piezo monitor", "all lasers", "camera1", "camera1 frame monitor"]
const ocpi_lsk_fixed_daqchans = map(x->DEFAULT_NAMES_TO_DAQCHANS["ocpi-lsk"][x], ocpi_lsk_fixed_names)

AO_CHANS["ocpi-lsk"] = OrderedSet(ocpi_lsk_aochans)
AI_CHANS["ocpi-lsk"] = OrderedSet(ocpi_lsk_aichans)
DO_CHANS["ocpi-lsk"] = OrderedSet(ocpi_lsk_dochans)
DI_CHANS["ocpi-lsk"] = OrderedSet(ocpi_lsk_dichans)
POS_CONTROL_CHANS["ocpi-lsk"] = ocpi_lsk_pos_ctrl_chans
POS_MONITOR_CHANS["ocpi-lsk"] = ocpi_lsk_pos_mon_chans
CAM_CONTROL_CHANS["ocpi-lsk"] = ocpi_lsk_cam_ctrl_chans
CAM_MONITOR_CHANS["ocpi-lsk"] = ocpi_lsk_cam_mon_chans
LAS_CONTROL_CHANS["ocpi-lsk"] = ocpi_lsk_laschans
STIM_CHANS["ocpi-lsk"] =OrderedSet(ocpi_lsk_stimchans)
FIXED_NAMES["ocpi-lsk"] = ocpi_lsk_fixed_names
FIXED_DAQ_CHANS["ocpi-lsk"] = ocpi_lsk_fixed_daqchans

#TODO: check these
#RIG_CHIP_SIZES["ocpi-lsk"] = PCO_EDGE_5_5_CHIP_SIZE
#RIG_FRAMERATE_FUNCS["ocpi-lsk"] = PCO_EDGE_5_5_FRAMERATE_FUNC
Loading