Beispiel #1
0
# along with this program. If not, see <http://www.gnu.org/licenses/>.

"""

    Functions and classes to handle scan procedures and events.
    
    Properties:
        modules    -    list of available scan events
    
    Each scan function must be implemented as a ScanEvent class (see base.py).
    ScanEvent classes contained in Python scripts within this folder will be
    automatically recognized and added to scan event list.
 
"""

import os
from terapy.scan.base import ScanEvent
import wx
from terapy.core import check_py
from terapy.core import parse_modules

# import scan event classes
curdir = os.path.dirname(__file__)
modules = []
modules = parse_modules(__package__, curdir, ScanEvent)

# search for custom modules
from terapy.core import module_path
if os.path.exists(module_path):
    modules.extend(parse_modules("custom.scan.", module_path, ScanEvent))
Beispiel #2
0
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

"""

    Functions and classes to handle motion controllers and various other devices
    that can be used for scanning something in some way.
    
    Properties:
        modules    -    list of available device drivers

    Each device driver must be implemented as a AxisDevice class (see base.py).
    AxisDevice classes contained in Python scripts within this folder will be
    automatically recognized and added to axis device driver list. 

"""

import os
from terapy.core import parse_modules
from terapy.hardware.axes.base import AxisDevice
from terapy.core import check_py

# import axis device driver classes
curdir = os.path.dirname(__file__)
modules = parse_modules(__package__, curdir, AxisDevice)

# search for custom modules
from terapy.core import module_path
if os.path.exists(module_path):
    modules.extend(parse_modules("custom.hardware.axes.", module_path, AxisDevice))
Beispiel #3
0
"""

    Functions and classes to handle plot canvases and plots.
    
    Properties:
        canvas_modules    -    list of available canvas classes
        plot_modules      -    list of available plot classes

    Each canvas must be implemented as a PlotCanvas class (see base.py).
    Each plot must be implemented as a Plot class (see base.py).
    PlotCanvas/Plot classes contained in Python scripts within this folder will be
    automatically recognized and added to appropriate list.
 
"""

from base import PlotCanvas, Plot
from terapy.core import check_py, parse_modules, module_path
import os

# import canvas and plot classes
curdir = os.path.dirname(__file__)
plot_modules = []
canvas_modules = []
plot_modules = parse_modules(__package__, curdir, Plot)
canvas_modules = parse_modules(__package__, curdir, PlotCanvas)

# search for custom modules
if os.path.exists(module_path):
    plot_modules.extend(parse_modules("custom.plot.", module_path, Plot))
    canvas_modules.extend(parse_modules("custom.canvas.", module_path, PlotCanvas))
Beispiel #4
0
    def GetUnits(self, units):
        """
        
            Return how given physical units are modified by filter bank
            
            Parameters:
                units    -    list of dim+1 units
            
            Output:
                units of coordinates and data after processing (list of quantities) 
        
        """
        # compute units after processing
        for ft in self.filters:
            if ft.is_active:
                units = ft.get_units(units)
        
        for x in units: x._magnitude = 1.0
        return units
        

# import filter classes
curdir = os.path.dirname(__file__)
from terapy.core import parse_modules
modules = parse_modules(__package__, curdir, Filter)

# search for custom modules
from terapy.core import module_path
if os.path.exists(module_path):
    modules.extend(parse_modules("custom.filter.", module_path, Filter))
Beispiel #5
0
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

"""

    Functions and classes to handle input devices.
    
    Properties:
        modules    -    list of available device drivers

    Each device driver must be implemented as a InputDevice class (see base.py).
    InputDevice classes contained in Python scripts within this folder will be
    automatically recognized and added to input device driver list. 

"""

import os
from terapy.hardware.input.base import InputDevice
from terapy.core import check_py
from terapy.core import parse_modules

# import input device driver classes
curdir = os.path.dirname(__file__)
modules = parse_modules(__package__, curdir, InputDevice)

# search for custom modules
from terapy.core import module_path
if os.path.exists(module_path):
    modules.extend(parse_modules("custom.hardware.input.", module_path, InputDevice))