/usr/share/pyshared/neuroshare/AnalogEntity.py is in python-neuroshare 0.8.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | from Entity import Entity
class AnalogEntity(Entity):
def __init__(self, nsfile, eid, info):
super(AnalogEntity,self).__init__(eid, nsfile, info)
@property
def sample_rate(self):
return self._info['SampleRate']
@property
def min_value(self):
return self._info['MinVal']
@property
def max_value(self):
return self._info['MaxVal']
@property
def resolution(self):
return self._info['Resolution']
@property
def units(self):
return self._info['Units']
@property
def location_x(self):
return self._info['LocationX']
@property
def location_y(self):
return self._info['LocationY']
@property
def location_z(self):
return self._info['LocationZ']
@property
def location_user(self):
return self._info['LocationUser']
@property
def high_freq_corner(self):
return self._info['HighFreqOrder']
@property
def high_freq_order(self):
return self._info['HighFreqOrder']
@property
def high_filter_type(self):
return self._info['HighFilterType']
@property
def low_freq_corner(self):
return self._info['LowFreqOrder']
@property
def low_freq_order(self):
return self._info['LowFreqOrder']
@property
def low_filter_type(self):
return self._info['LowFilterType']
@property
def probe_info(self):
return self._info['ProbeInfo']
def get_data (self, index=0, count=-1):
if count < 0:
count = self.item_count
lib = self.file.library
data = lib._get_analog_data (self, index, count)
return data
|