Files in the top-level directory from the latest check-in
- Catalog
- Data
- DataGood
- Figures
- Matlab
- Muse
- Software
- LDVlicense.txt
- README
- README.md
Ed Zaron
Department of Civil and Environmental Engineering
Portland State University
503-725-2435
ezaron@pdx.edu
https://hachi.cee.pdx.edu/fossil/LDVmouse
(1) Prerequisites:
- Some knowledge and comfort using the command-line interface
on a Gnu/Linux system is essential.
- Install tcl, tk, blt, and tcllib. It is helpful to know the syntax of
tcl, but learning the basics of the language is not difficult and should
not be necessary to use this software.
- Install the x11 program called xinput, if it does not
already exist on your system.
- You will need superuser privileges to access the mouse device.
(2) I have used the LDVmouse software on laptops running Ubuntu,
Fedora, and Puppy Linux, and a Chromebook running Linux
via Crouton. These machines are all capable of reading the device
node where the raw mouse output appears, but they have slightly different
names for the files under /dev/input. Unfortunately, modern versions of
Apple OS X do not appear to populate /dev/input files with data from the
USB interface, and I have not been successful using them for mouse input.
(3) You may test the software using a regular computer mouse. You do not
need to test with the laser-Doppler mouse sensor.
(4) Test the 'xinput' program. Try 'xinput --list' and see if your mouse
is visible. Use 'xinput --list-props <N>' to see if your version of
'xinput' will provide you with the device node associated with the
mouse. Replace <N> with the device id of your mouse obtained from
the 'xinput --list' command. If the program does not show you a
filename like /dev/input, you may still be able to 'cat' the output
of various device nodes until you find the one that has mouse data.
(5) Look at the makefile under ./Software/. Try to build the 'evhz' program.
make all
sudo ./evhz
Experiment with the './evhz' program to determine your mouse
polling rate, the maximum rate at which the mouse is sampled. This is
usually 1 kHz, but some machines only support 250 Hz. I think the Linux
kernel can be re-compiled to set this rate, but I have no experience
actually doing so.
(6) Experiment with using the 'modprobe' command to change the mouse polling rate:
sudo modprobe -r usbhid && sudo modprobe usbhid mousepoll=1
and THEN UNPLUG AND RE-PLUG IN THE MOUSE.
See https://wiki.archlinux.org/index.php/Mouse_Polling_Rate for other settings.
Run the ./evhz program before and after issuing the modprobe command to
see if the polling rate was changed as expected.
(7) See the ./Software/LDVconf.tcl script for hints on locating the mouse
device. Set the device name, polling rate, and data collection
parameters in the file LDV.conf.
IMPORTANT NOTE: On some machines the mouse device node (a pseudo-file usually
located under /dev/input) will change after unplugging and re-plugging-in the
mouse.
(8) Once you have properly identified your mouse device and set parameters in
LDV.conf, you can run the LDVtransect.tcl or LDVts.tcl scripts to collect
data. The easiest way to run these is with
sudo tclsh
which will run the tcl interpreter with root privileges, allowing you
to access the device node as needed. At the tclsh prompt you would run
the data collection program, e.g.,
source LDVtransect.tcl
The output data will be written to a file in the Data directory. I usually
keep raw data files under Data, but then make copies to a new location, e.g.,
DataGood, since they sometimes require minor editing to make them usable
by a plotting program.
- The purpose of the LDVtransect.tcl program is to collect a series of time-averaged
velocity data (the program computes the mean, variance, and cross-covariance of the
velocity measurements). You might use this program to collect, say, 5-minute averages
of velocity data at 1-mm increments in a transect across the soap film.
- The purpose of the LDVts.tcl program is to collect a single time series of
velocity. You would use this program if you want to collect, say, 10-minutes of data
reported at 1-kHz from one spot in the soap film.
(9) These programs respond to key presses to begin a data collection session.
They also request some descriptive text to include in the file header.
Please have a look at the files when you are ready to run. You are also welcome
phone or email me and I can walk you through the program usage.
(10) The plotting scripts under ./Matlab/ are very simple. Take a look at Fig1.m and Fig2.m which
will graph sample data included under ./Data.
(11) Good luck!