File: misc.rst

package info (click to toggle)
neuron 8.2.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 34,760 kB
  • sloc: cpp: 149,571; python: 58,465; ansic: 50,329; sh: 3,510; xml: 213; pascal: 51; makefile: 35; sed: 5
file content (88 lines) | stat: -rwxr-xr-x 2,776 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Style Settings
--------------

.. function:: ivoc_style

    Syntax:
        ``h.ivoc_style("name", "attribute")``

    Description:
        Gives the style attribute to name. Any property listed in the file 
        :file:`$(NEURONHOME)/lib/nrn.defaults` or :file:`$(NEURONHOME)/src/ivoc/ivocmain.c`
        can be changed although it may be that a few of them have already been 
        used by the time the interpreter is invoked. 

    Example:

        .. code-block::
            python

            # 7 decimal places in value field editors. Must be done prior to any panel. 
            h.ivoc_style("*xvalue_format", "%.7g") 
            # large fonts in unix. Takes effect on next panel. 
            h.ivoc_style("*font", "*helvetica-medium-r-normal*--24*") 
            h.ivoc_style("*MenuBar*font", "*helvetica-medium-r-normal*--24*") 
            h.ivoc_style("*MenuItem*font", "*helvetica-medium-r-normal*--24*") 


----

Domain Restrictions for Fields
------------------------------

.. function:: variable_domain

    Syntax:
        ``h.variable_domain("varname", lower_limit, upper_limit)``

    Description:
        Define the domain limits for NEURON variables. Important NEURON 
        variables such as dt, L, diam, and Ra have reasonable default domains. 
        Many parameters defined in model description files also have reasonable domains. 
         
        This function is most useful when a variable makes sense only as a 
        non-negative or positive number. 
         
        One can specify different domains only on a per name basis. Thus there 
        is only one domain specification for L and one for all the instances of 
        IClamp.amp but one can have a different specification 
        for IClamp.amp and VClamp.amp.

    .. note::

        The HOC version also supports a pointer-based specification, but that form does
        not work from Python.

    .. note::

        ``varname`` here would be things like ``t`` or ``diam`` not ``h.t`` or ``h.diam``; i.e.
        omit the ``h.`` prefix.

----

PrintWindowManager Placement
----------------------------

.. function:: pwman_place

    Syntax:
        ``h.pwman_place(left, top)``

        ``h.pwman_place(left, top, 0)``

    Description:
        moves the PrintWindowManager to the indicated location in pixel 
        coordinates where 0,0 is the top left corner of the screen. 
        It is intended that if you build an interface by placing windows 
        near the top and build right then the session you save will 
        be portable to other window managers and other systems with 
        different screen sizes. 
         
        If the third argument is 0, then the window is placed but hidden. 


    .. seealso::
    
        :class:`PWManager`