form: FacetsML.html

File FacetsML.html, 166.0 kB (added by debeissat, 1 year ago)
Line 
1 <html xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">
2    <head>
3       <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
4    <script type="text/javascript">
5                     function showOptionContent(selectElement) {
6                         var optionSelectedName = selectElement.options[selectElement.selectedIndex].text;
7                         var divTag = nextSiblingElement(selectElement);
8                         while (divTag.tagName == 'DIV') {
9                             if (divTag.getAttribute('name') == optionSelectedName) {
10                                 divTag.style.display = "";
11                                 //In order not to send their values
12                                 var inputTags = divTag.getElementsByTagName('INPUT');
13                                 for (var i=inputTags.length -1 ; i>-1 ; i--) {
14                                     inputTags[i].style.display = "";
15                                 }
16                             } else {                       
17                                 divTag.style.display = "none";
18                                 //In order not to send their values
19                                 var inputTags = divTag.getElementsByTagName('INPUT');
20                                 for (var i=inputTags.length -1 ; i>-1 ; i--) {
21                                     inputTags[i].style.display = "none";
22                                 }
23                             }
24                             divTag = nextSiblingElement(divTag);
25                         }
26                     }
27                    
28                     function nextSiblingElement(node) {
29                         var node = node.nextSibling;
30                         //skip the text nodes
31                         while (node.nodeType != 1) {
32                             node = node.nextSibling;
33                         }
34                         return node;
35                     }
36                    
37                     function removeOne(removeButton) {
38                         //The element to remove is the next brother element of the addButton
39                         var elementToRemove = removeButton.nextSibling;
40                         elementToRemove.parentNode.removeChild(elementToRemove);
41                         //must remove 1 to the nbelmtsadded attribute of the addButton element
42                         var addButton = removeButton.previousSibling;
43                         //store the last index in the nbelmtsadded attribute of the addButton
44                         nbElementsAdded = parseInt(addButton.getAttribute("nbelmtsadded")) - 1;
45                         addButton.setAttribute("nbelmtsadded",nbElementsAdded);
46                     }
47                    
48                    
49                     function addOne(addButton) {
50                         //The source is the next brother element of the addButton
51                         var source = addButton.nextSibling.nextSibling;
52                         var sourceCloned = source.cloneNode(true);
53                         var nbElementsAdded = parseInt(addButton.getAttribute("nbelmtsadded")) + 1;
54                         //all the index of the input tags under the source must be incremented
55                         var inputTags = sourceCloned.getElementsByTagName('INPUT');
56                         for (var i=inputTags.length - 1 ; i>-1 ; i--) {
57                             //example of the button name : /retina/ganglion-cells/output-type/circular-spiking-array/units
58                             //the element to change is the first [X] after this string which is addButton.name
59                             var inputTagName = inputTags[i].getAttribute("name");
60                             //get the index of the first "[" after the string
61                             var indexOfNumber = inputTagName.indexOf("[",addButton.name.length);
62                             if (indexOfNumber != -1) {
63                                 //add 1 to the index of the last created element in order to create the XPath of the
64                                 //newly created element
65                                 var sourceClonedName = inputTagName.substr(0,indexOfNumber+1) + nbElementsAdded + inputTagName.substr(indexOfNumber+2,inputTagName.length);
66                                 inputTags[i].setAttribute("name",sourceClonedName);
67                             }
68                         }
69                         //store the last index in the nbelmtsadded attribute of the addButton
70                         addButton.setAttribute("nbelmtsadded",nbElementsAdded);
71                         source.parentNode.insertBefore(sourceCloned,source);
72                     }
73                    
74                 </script></head>
75    <body>
76       <div id="form">
77          <form>
78             <namespace prefix="xml" uri="http://www.w3.org/XML/1998/namespace"></namespace>
79             <namespace prefix="" uri="http://neuralensemble.org/FacetsML"></namespace>
80             <namespace prefix="rng" uri="http://relaxng.org/ns/structure/1.0"></namespace>
81             <namespace prefix="a" uri="http://relaxng.org/ns/compatibility/annotations/1.0"></namespace>
82             <namespace prefix="class" uri="http://neuralensemble.org/FacetsML/cellclass"></namespace>
83             <namespace prefix="rand" uri="http://neuralensemble.org/FacetsML/randomNumberGenerator"></namespace>
84             <div>
85                <p style="margin: 1px" name="/network" class="element">network</p>
86                <p style="margin: 1px"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><label for="/network/@timestep" class="attribute">timestep :
87                      </label><input type="text" name="/network/@timestep" class="data"></p>
88                <p style="margin: 1px"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><label for="/network/@min_delay" class="attribute">min_delay :
89                      </label><input type="text" name="/network/@min_delay" class="data"></p>
90                <p style="margin: 1px"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><label for="/network/@max_delay" class="attribute">max_delay :
91                      </label><input type="text" name="/network/@max_delay" class="data"></p><i class="documentation">
92                   <a:documentation xmlns="http://neuralensemble.org/FacetsML" xmlns:class="http://neuralensemble.org/FacetsML/cellclass" xmlns:rand="http://neuralensemble.org/FacetsML/randomNumberGenerator">(ms) simulaton duration</a:documentation></i><p style="margin: 1px"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><label for="/network/@sim_duration" class="attribute">sim_duration :
93                      </label><input type="text" name="/network/@sim_duration" class="data"></p><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><input type="button" value="+ " onclick="addOne(this)" name="/network" nbelmtsadded="1" class="addButton"><input type="button" value="-" onclick="removeOne(this)" name="/network" class="rmvButton"><div class="multiple" style="border: dashed; border-width: 1px">
94                   <div>
95                      <p style="margin: 1px" name="/network/extra[1]" class="element"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>extra
96                      </p>
97                      <p style="margin: 1px"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><label for="/network/extra[1]/@name" class="attribute">name :
98                            </label><input type="text" name="/network/extra[1]/@name" class="data"></p>
99                      <p style="margin: 1px"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><label for="/network/extra[1]/@value" class="attribute">value :
100                            </label><input type="text" name="/network/extra[1]/@value" class="data"></p>
101                   </div>
102                </div>
103                <div>
104                   <p style="margin: 1px" name="/network/rng" class="element"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>rng
105                   </p>
106                   <p style="margin: 1px"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><label for="/network/rng/@name" class="attribute">name :
107                         </label><input type="text" name="/network/rng/@name" class="data"></p>
108                   <p style="margin: 1px"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><label for="/network/rng/@seed" class="attribute">seed :
109                         </label><input type="text" name="/network/rng/@seed" class="data"></p>
110                   <p style="margin: 1px"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><label for="/network/rng/@generator" class="attribute">generator :
111                         </label><select style="height: 20px" name="/network/rng/@generator" sendselect="yes" class="choice">
112                         <option value="NumpyRNG" name="/network/rng/@generator/NumpyRNG" class="choice_option">NumpyRNG</option>
113                         <option value="GSLRNG" name="/network/rng/@generator/GSLRNG" class="choice_option">GSLRNG</option></select></p>
114                </div>
115                <div>
116                   <p style="margin: 1px" name="/network/cells" class="element"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>cells
117                   </p><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><input type="button" value="+ " onclick="addOne(this)" name="/network/cells" nbelmtsadded="1" class="addButton"><input type="button" value="-" onclick="removeOne(this)" name="/network/cells" class="rmvButton"><div class="multiple" style="border: dashed; border-width: 1px">
118                      <div>
119                         <p style="margin: 1px" name="/network/cells/cell[1]" class="element"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>cell
120                         </p>
121                         <p style="margin: 1px"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><label for="/network/cells/cell[1]/@name" class="attribute">name :
122                               </label><input type="text" name="/network/cells/cell[1]/@name" class="data"></p><i class="documentation">
123                            <a:documentation><style>
124                 table {
125                     border: 1px outset;
126                 }
127                 td {
128                     border: 1px inset;
129                 }
130             </style></a:documentation></i><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><select style="height: 20px" onchange="showOptionContent(this)" name="/network/cells/cell[1]" class="choice">
131                            <option value="IF_curr_alpha" name="/network/cells/cell[1]/IF_curr_alpha" class="choice_option">IF_curr_alpha</option>
132                            <option value="IF_curr_exp" name="/network/cells/cell[1]/IF_curr_exp" class="choice_option">IF_curr_exp</option>
133                            <option value="IF_cond_alpha" name="/network/cells/cell[1]/IF_cond_alpha" class="choice_option">IF_cond_alpha</option>
134                            <option value="IF_cond_exp" name="/network/cells/cell[1]/IF_cond_exp" class="choice_option">IF_cond_exp</option>
135                            <option value="IF_cond_exp_sfa_rr" name="/network/cells/cell[1]/IF_cond_exp_sfa_rr" class="choice_option">IF_cond_exp_sfa_rr</option>
136                            <option value="AdaptiveExponentialIF_alpha" name="/network/cells/cell[1]/AdaptiveExponentialIF_alpha" class="choice_option">AdaptiveExponentialIF_alpha</option>
137                            <option value="SpikeSourcePoisson" name="/network/cells/cell[1]/SpikeSourcePoisson" class="choice_option">SpikeSourcePoisson</option>
138                            <option value="SpikeSourceArray" name="/network/cells/cell[1]/SpikeSourceArray" class="choice_option">SpikeSourceArray</option>
139                            <option value="NonStandardCellType" name="/network/cells/cell[1]/NonStandardCellType" class="choice_option">NonStandardCellType</option></select><div name="IF_curr_alpha" style="display: none" class="choice_content">
140                            <div>
141                               <p style="margin: 1px" name="/network/cells/cell[1]/class:IF_curr_alpha" class="element"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>class:IF_curr_alpha
142                               </p><i class="documentation">
143                                  <a:documentation>
144                                                     default_parameters = {
145                                     <table>
146                                        <tr>
147                                           <td>
148                                                                      'v_rest'
149                                           </td>
150                                           <td> -65.0</td>
151                                           <td>Resting membrane potential in mV.</td>
152                                        </tr>
153                                        <tr>
154                                           <td>
155                                                                  'cm'         
156                                           </td>
157                                           <td>   1.0,  </td>
158                                           <td>Capacity of the membrane in nF </td>
159                                        </tr>
160                                        <tr>
161                                           <td>
162                                                                  'tau_m'     
163                                           </td>
164                                           <td>  20.0,  </td>
165                                           <td>Membrane time constant in ms. </td>
166                                        </tr>
167                                        <tr>
168                                           <td>
169                                                                  'tau_refrac'
170                                           </td>
171                                           <td>   0.0,  </td>
172                                           <td>Duration of refractory period in ms. </td>
173                                        </tr>
174                                        <tr>
175                                           <td>
176                                                                  'tau_syn'   
177                                           </td>
178                                           <td>   5.0,  </td>
179                                           <td>Rise time of the synaptic alpha function in ms.</td>
180                                        </tr>
181                                        <tr>
182                                           <td>
183                                                                  'i_offset'   
184                                           </td>
185                                           <td>   0.0,  </td>
186                                           <td>Offset current in nA </td>
187                                        </tr>
188                                        <tr>
189                                           <td>
190                                                                  'v_reset'   
191                                           </td>
192                                           <td> -65.0,  </td>
193                                           <td>Reset potential after a spike in mV. </td>
194                                        </tr>
195                                        <tr>
196                                           <td>
197                                                                  'v_thresh'   
198                                           </td>
199                                           <td> -50.0,  </td>
200                                           <td>Spike threshold in mV. </td>
201                                        </tr>
202                                        <tr>
203                                           <td>
204                                                                  'v_init'     
205                                           </td>
206                                           <td> -65.0,  </td>
207                                           <td>Membrane potential in mV at t = 0 </td>
208                                        </tr>
209                                     </table>
210                                                     }<br></a:documentation></i><i class="optional" style="color: #4963FF">
211                                  <p style="margin: 1px"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><label for="/network/cells/cell[1]/class:IF_curr_alpha/@v_rest" class="attribute">v_rest :
212                                        </label><input type="text" name="/network/cells/cell[1]/class:IF_curr_alpha/@v_rest" class="data"><i class="optional" style="color: #4963FF"><select style="height: 20px" name="/network/cells/cell[1]/class:IF_curr_alpha/@v_rest" sendselect="yes" class="choice">
213                                           <option value="ms" name="/network/cells/cell[1]/class:IF_curr_alpha/@v_rest/ms" class="choice_option">ms</option>
214                                           <option value="s" name="/network/cells/cell[1]/class:IF_curr_alpha/@v_rest/s" class="choice_option">s</option></select></i></p></i><i class="optional" style="color: #4963FF">
215                                  <p style="margin: 1px"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><label for="/network/cells/cell[1]/class:IF_curr_alpha/@cm" class="attribute">cm :
216                                        </label><input type="text" name="/network/cells/cell[1]/class:IF_curr_alpha/@cm" class="data"><i class="optional" style="color: #4963FF"><select style="height: 20px" name="/network/cells/cell[1]/class:IF_curr_alpha/@cm" sendselect="yes" class="choice">
217                                           <option value="nF" name="/network/cells/cell[1]/class:IF_curr_alpha/@cm/nF" class="choice_option">nF</option>
218                                           <option value="mF" name="/network/cells/cell[1]/class:IF_curr_alpha/@cm/mF" class="choice_option">mF</option>
219                                           <option value="F" name="/network/cells/cell[1]/class:IF_curr_alpha/@cm/F" class="choice_option">F</option></select></i></p></i><i class="optional" style="color: #4963FF">
220                                  <p style="margin: 1px"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><label for="/network/cells/cell[1]/class:IF_curr_alpha/@tau_m" class="attribute">tau_m :
221                                        </label><input type="text" name="/network/cells/cell[1]/class:IF_curr_alpha/@tau_m" class="data"><i class="optional" style="color: #4963FF"><select style="height: 20px" name="/network/cells/cell[1]/class:IF_curr_alpha/@tau_m" sendselect="yes" class="choice">
222                                           <option value="ms" name="/network/cells/cell[1]/class:IF_curr_alpha/@tau_m/ms" class="choice_option">ms</option>
223                                           <option value="s" name="/network/cells/cell[1]/class:IF_curr_alpha/@tau_m/s" class="choice_option">s</option></select></i></p></i><i class="optional" style="color: #4963FF">
224                                  <p style="margin: 1px"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><label for="/network/cells/cell[1]/class:IF_curr_alpha/@tau_refrac" class="attribute">tau_refrac :
225                                        </label><input type="text" name="/network/cells/cell[1]/class:IF_curr_alpha/@tau_refrac" class="data"><i class="optional" style="color: #4963FF"><select style="height: 20px" name="/network/cells/cell[1]/class:IF_curr_alpha/@tau_refrac" sendselect="yes" class="choice">
226                                           <option value="ms" name="/network/cells/cell[1]/class:IF_curr_alpha/@tau_refrac/ms" class="choice_option">ms</option>
227                                           <option value="s" name="/network/cells/cell[1]/class:IF_curr_alpha/@tau_refrac/s" class="choice_option">s</option></select></i></p></i><i class="optional" style="color: #4963FF">
228                                  <p style="margin: 1px"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><label for="/network/cells/cell[1]/class:IF_curr_alpha/@tau_syn" class="attribute">tau_syn :
229                                        </label><input type="text" name="/network/cells/cell[1]/class:IF_curr_alpha/@tau_syn" class="data"><i class="optional" style="color: #4963FF"><select style="height: 20px" name="/network/cells/cell[1]/class:IF_curr_alpha/@tau_syn" sendselect="yes" class="choice">
230                                           <option value="ms" name="/network/cells/cell[1]/class:IF_curr_alpha/@tau_syn/ms" class="choice_option">ms</option>
231                                           <option value="s" name="/network/cells/cell[1]/class:IF_curr_alpha/@tau_syn/s" class="choice_option">s</option></select></i></p></i><i class="optional" style="color: #4963FF">
232                                  <p style="margin: 1px"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><label for="/network/cells/cell[1]/class:IF_curr_alpha/@i_offset" class="attribute">i_offset :
233                                        </label><input type="text" name="/network/cells/cell[1]/class:IF_curr_alpha/@i_offset" class="data"><i class="optional" style="color: #4963FF"><select style="height: 20px" name="/network/cells/cell[1]/class:IF_curr_alpha/@i_offset" sendselect="yes" class="choice">
234                                           <option value="nA" name="/network/cells/cell[1]/class:IF_curr_alpha/@i_offset/nA" class="choice_option">nA</option>
235                                           <option value="mA" name="/network/cells/cell[1]/class:IF_curr_alpha/@i_offset/mA" class="choice_option">mA</option>
236                                           <option value="A" name="/network/cells/cell[1]/class:IF_curr_alpha/@i_offset/A" class="choice_option">A</option></select></i></p></i><i class="optional" style="color: #4963FF">
237                                  <p style="margin: 1px"><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="indent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><label for="/network/cells/cell[1]/class:IF_curr_alpha/@v_reset" class="attribute">v_reset :
238                                        </label><input type="text" name="/network/cells/cell[1]/class:IF_curr_alpha/@v_reset" class="data"><i class="optional" style="color: #4963FF"><select style="height: 20px" name="/network/cells/cell[1]/class:IF_curr_alpha/@v_reset" sendselect="yes" class="choice">
239                                           <option value=