From a036d77901cf32b79544f44b83a73b884b88ded4 Mon Sep 17 00:00:00 2001 From: Andrew Leifer Date: Thu, 16 Sep 2010 11:18:41 -0400 Subject: [PATCH] Wrote new protocol generation for flp13 to hit the ventral nerve cord. --- ProtocolGeneration/flp13_protocol.m | 92 +++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 ProtocolGeneration/flp13_protocol.m diff --git a/ProtocolGeneration/flp13_protocol.m b/ProtocolGeneration/flp13_protocol.m new file mode 100644 index 0000000..ed74319 --- /dev/null +++ b/ProtocolGeneration/flp13_protocol.m @@ -0,0 +1,92 @@ +%% Notes +% Tip of HEAD is (0, 0). +% Tail is (99,0) +% +% +% Pictorially: +% (-10,0) (0,0) (10,0) +% Head +% ^ +% / \ +% / \ +% | | +% | | +% | | +% | | +% | | +% | | +% | | +% | | +% | | +% | | +% | | +% | | +% \ / +% \ / +% \/ +% Tail +% (-10,99) (0,99) (10,99) +% +% +% y +% ^ +% | (axis) +% | +% ------------> x +% +% Note also, you can walk off the worm in y (but not in x). + + +clear all; close all; + + +% Header informatoin +filename='flip13_ventral.yml'; +gridHeight=100; +gridWidth=21; %must be odd +%Note: No carriage return at the end of the description +description= sprintf('Heuristic ventral illumination of DD motor neurons.'); + + +%Index notation +X=1; Y=2; + +%Defualt Radii +dRad(X)=5; +dRad(Y)=37; + +%We have to convert from the slider bar manual illumination coordinate convention +%To the protocol illumiantion convention. +annoyingXOffset=-10; +%Neuron centroid & radii +VentralNerveCord(X)=3+annoyingXOffset; +VentralNerveCord(Y)=57; + +%predefine protocol +protocol=cell(0); + +% Protocol = [x1, y1, x2,y2, etc..] + +%VentralNerveCord +protocol{end+1}=rect(VentralNerveCord(X)-dRad(X), VentralNerveCord(Y)-dRad(Y), VentralNerveCord(X)+dRad(X), VentralNerveCord(Y)+dRad(Y) ); + +% %ALM +% protocol{end+1}=rect(ALM(X)-dRad(X), ALM(Y)-dRad(Y), ALM(X)+dRad(X), ALM(Y)+dRad(Y) ); +% +% %PVM +% protocol{end+1}=rect(PVM(X)-dRad(X), PVM(Y)-dRad(Y), PVM(X)+dRad(X), PVM(Y)+dRad(Y) ); +% +% %PLM +% protocol{end+1}=rect(PLM(X)-dRad(X), PLM(Y)-dRad(Y), PLM(X)+dRad(X), PLM(Y)+dRad(Y) ); +% + + +writeProto(filename,description,gridWidth,gridHeight,protocol) + +figure; +for n=1:length(protocol) +plotProtocol(protocol{n},gridHeight,gridWidth) +pause +end + +