Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions PSL/sciencelab.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ def __runInitSequence__(self,**kwargs):
self.__print__( b,poly)
self.aboutArray.append([b]+['%.3e'%v for v in poly])
polyDict[a[:3]].append(poly)


#Load calibration data (slopes and offsets) for ADC channels
inl_slope_intercept=struct.unpack('2f',inl_slope_intercept)
Expand Down Expand Up @@ -367,7 +366,7 @@ def capture1(self,ch,ns,tg,*args,**kwargs):
tg Timegap between samples in microseconds
============== ============================================================================================

.. figure:: ../images/capture1.png
.. figure:: images/capture1.png
:width: 11cm
:align: center
:alt: alternate text
Expand Down Expand Up @@ -404,7 +403,7 @@ def capture2(self,ns,tg,TraceOneRemap='CH1'):
TraceOneRemap Choose the analog input for channel 1. It is connected to CH1 by default. Channel 2 always reads CH2.
============== =======================================================================================================

.. figure:: ../images/capture2.png
.. figure:: images/capture2.png
:width: 11cm
:align: center
:alt: alternate text
Expand Down Expand Up @@ -457,7 +456,7 @@ def capture4(self,ns,tg,TraceOneRemap='CH1'):
TraceOneRemap Choose the analog input for channel 1. It is connected to CH1 by default. Channel 2 always reads CH2.
============== ======================================================================================================

.. figure:: ../images/capture4.png
.. figure:: images/capture4.png
:width: 11cm
:align: center
:alt: alternate text
Expand Down Expand Up @@ -763,7 +762,7 @@ def capture_traces(self,num,samples,tg,channel_one_input='CH1',CH123SA=0,**kwarg

.. _adc_example:

.. figure:: ../images/transient.png
.. figure:: images/transient.png
:width: 11cm
:align: center
:alt: alternate text
Expand Down Expand Up @@ -2584,6 +2583,7 @@ def capacitance_via_RC_discharge(self):
RC = self.__capture_capacitance__(samples,int(T/samples))[3][1]
return RC/10e3
else:
self.__print__('cap out of range %f %f'%(T,cap))
return 0
except Exception as e:
self.__print__(e)
Expand Down Expand Up @@ -3872,6 +3872,7 @@ def servo4(self,a1,a2,a3,a4):
"""
Operate Four servo motors independently using SQR1, SQR2, SQR3, SQR4.
tested with SG-90 9G servos.
For high current servos, please use a different power source, and a level convertor for the PWm output signals(if needed)

.. tabularcolumns:: |p{3cm}|p{11cm}|

Expand Down Expand Up @@ -3971,6 +3972,7 @@ def estimateDistance(self):
except Exception as ex:
self.raiseException(ex, "Communication Error , Function : "+inspect.currentframe().f_code.co_name)

"""
def TemperatureAndHumidity(self):
'''
init AM2302.
Expand All @@ -3984,6 +3986,7 @@ def TemperatureAndHumidity(self):
except Exception as ex:
self.raiseException(ex, "Communication Error , Function : "+inspect.currentframe().f_code.co_name)
self.digital_channels_in_buffer=1
"""

def opticalArray(self,SS,delay,channel = 'CH3',**kwargs):
'''
Expand Down Expand Up @@ -4081,5 +4084,5 @@ def raiseException(self,ex, msg):
I.get_average_voltage('CH1')
""")
#I=connect(verbose = True)
#print (I.get_capacitance())
#for a in range(20):print (I.get_capacitance())
#I=connect(verbose=True,load_calibration=False)