Commit 1a83e1f22cd by Ashwin Vishnu

Fix a few bugs and docs in fluidlab.objects

parent ce0d0293ee7
......@@ -50,3 +50,4 @@ scripts\Experiments\path_working_exp.txt
.coverage/*
.pytest_cache
.mypy_cache
......@@ -25,6 +25,11 @@ mock_modules(
"u3",
"rpyc",
"rpyc.utils.server",
"labjack",
"pymodbus3",
"pymodbus3.client.sync",
"pymodbus3.pdu",
]
)
......
......@@ -16,6 +16,10 @@ Provides some modules to represent and control devices:
pinchvalve
traverse
rotatingobjects
calib_density_probes
galvanometer
mscti_probes
traverse_lxm32
and two packages to control acquisition boards and Raspberry Pi:
......@@ -26,4 +30,5 @@ and two packages to control acquisition boards and Raspberry Pi:
raspberrypi
position_sensors
"""
"""
Calibration for density measurement (:mod:`fluidlab.objects.calib_density_probes`)
===================================================================================
.. autosummary::
:toctree:
.. autoclass:: Calibration
:members:
:private-members:
"""
import os
import time
......@@ -48,6 +60,7 @@ def prepare_calibration(rho_min=1, rho_max=1.18, nb_solutions=6):
class Calibration:
"""Calibrate density"""
def __init__(self, path_rho, path_temp=None):
self.path_rho = path_rho
......
"""Control a galvanometer with a labjack daq (T7)
=================================================
"""Control a galvanometer with a labjack daq (T7) (:mod:`fluidlab.objects.galvanometer`)
=========================================================================================
.. autosummary::
:toctree:
.. autoclass:: Galva
:members:
"""
......@@ -9,24 +14,21 @@ from __future__ import print_function, division
from labjack import ljm
from fluidlab.instruments.daq.streaming_t7 import T7
from fluidlab.daq.streaming_t7 import T7
serial_numbers = {"horiz": 470012356, "vert": 470012767}
try:
input = raw_input
except NameError:
pass
class Galva:
"""Galvanometer which controls an oscillating mirror to set angles."""
def __init__(self):
self.t7 = T7(identifier=serial_numbers["horiz"])
def set_angle(self, volt):
"""Set angle via labjack."""
ljm.eWriteName(self.t7.handle, "DAC0", volt)
def close(self):
"""Close T7 streaming."""
self.t7.close()
"""
Probes (:mod:`fluidlab.objects.mscti_probes`)
=============================================
"""Probes (:mod:`fluidlab.objects.mscti_probes`)
=================================================
.. autosummary::
:toctree:
.. autoclass:: MSCTIProbe
:members:
:undoc-members:
"""
......@@ -12,7 +19,7 @@ import os
import matplotlib.pyplot as plt
from fluiddyn.io import query
from fluidlab.instruments.daq.daqmx import read_analog
from fluidlab.daq.daqmx import read_analog
import h5py
......
"""
192.168.28.11 - Variateur1
192.168.28.12 - Variateur2
192.168.28.13 - Variateur3
192.168.28.14 - Variateur4
192.168.28.19 - PC pilote Muriel
"""Traverses (:mod:`fluidlab.objects.traverse_lxm32`)
=====================================================
.. currentmodule:: fluidlab.objects.traverse_lxm3
Provides:
.. autoclass:: Traverse
:members:
:undoc-members:
- 192.168.28.11 - Variateur1
- 192.168.28.12 - Variateur2
- 192.168.28.13 - Variateur3
- 192.168.28.14 - Variateur4
- 192.168.28.19 - PC pilote Muriel
"""
......@@ -208,7 +218,7 @@ class Traverse:
-------
_coef_meter_per_rot : float
Value of the calibration
"""
path = os.path.join(
path_dir, make_ip_as_str(self.ip_modbus) + "calibration.txt"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment