Package: pyqmix
Qmix pump and valve interfaceThis Python package wraps the Cetoni Qmix pump and valve interface DLLs using
CFFI. Supports both Python 2 and 3.Table of ContentsQuick installation instructionsGustometer SetupOperate pumps via pyqmix-web(no installation required)Install Python and pyqmixOperate pumps via pyqmix(requires installation)Best PracticesCitationQuick installation instructionsIf you already installed the Cetoni QmixSDK, created a device configuration via QmixElements, and are familiar with Python, you may simply installpyqmixviacondafromconda-forge. To create a newcondaenvironment forpyqmix, namednemesys, runconda create -n nemesys -c conda-forge pyqmixfrom the command line. This is the recommended installation procedure, because it ensures the installation ofpyqmixand all of its dependencies will not alter any existingcondaenvironment.To installpyqmixinto anexistingcondaenvironment, runconda install -c conda-forge pyqmixHowever, we suggest you always create a new, dedicated environment instead.Of course, you may also installpyqmixvia good ol'pip:pip install pyqmixIf you have no idea what this is all about, we suggest you follow the procedures described below.Gustometer SetupFind the CD and license codeOpen the paper-folder you received from CETONI. In the folder you will find a license key and a CD with:Software: QmixElements and QmixSDKQmixElements Manual in Doc/Software, which specifies system requirements and how to install the softwarePrepare your computerSet up system requirements on your computer as described in the documentation. Refer to QmixElements manual:Disable standby or sleep modeDisable power saving for USB ports in the power options of the Control PanelInstall QmixElementsInsert the CD from CETONI in your computer.Start the QmixElements_Setup_v###.exe application file as administratorDuring installation, accept to install VCI (VCI Driver)In case you get a Windows Security Warning -> Trust software from HMS Technology Center Ravensburg GmbH.Install QmixSDKInstall the QmixSDK you received on the CD from CETONI. pyqmix is tested to work with QmixSDK versions 20180626 and later. If your version of QmixSDK is older than that, please contact Cetoni to retrieve an updated version.Restart the computerConnect the pump system to the computerConnect the base module to computerConnect power supply to base moduleConnect the base module to the computer via the supplied USB cable.Create a Device ConfigurationOpen QmixElementsActivate LicenseEdit -> Activate Licence -> [enter License Key] -> click OK. The License key is found by the CD in the folder provided by CETONI.Create the actual Device ConfigurationDevice -> Create Configurations -> you are then asked:Would you like to update your local device database devices.db with a new one?. If you have a devices.db file on the installation CD from CETONI, then click theYesbutton and browse for the file.From the device list drag all the items you want to configure to the ‘Device Configuration’ which is the large empty black area to the left of the QmixElements software. You do not need to configure the base module.Save configurationFile -> save.Right-click on the first item in the Device Configuration (the one furthest to the left), select ‘Configure’ and follow the instructions. Repeat the procedure for each item in the Device Configuration.Save configuration at the end.Operate pumps via pyqmix-webThe user-visible part of pyqmix-web runs in the web browser. You need a modern browser to run the application. Recent versions of Chrome, Firefox, and Safari work well; Microsoft Internet Explorer is not supported.Download the latest pyqmix-web release fromhttps://github.com/psyfood/pyqmix-web/releases(you will want to get the.exefile).Run the.exefileInstall Python and pyqmixInstall Anaconda PythonInstall the Anaconda Python distribution if it is not installed already. You can download it fromhttps://www.anaconda.com/download/. Get the "Python 3.x" version.During setup, skip the installation of Microsoft VSCodeOtherwise just accept the default settingsCreate a new Python environmentCreate a newcondaPython environment callednemesysand install the required packages into this environment.Click the Windows button / Open the “Start” menuOpen the Anaconda Prompt. This will open a command line window which is correctly set up to use your Anaconda Python installation.Create thenemesysPython environment and installpyqmixas well as theSpyderdevelopment environment:Type:conda create -n nemesys python=3 pyqmix spyderOperate pumps via pyqmixOpen and run scriptsOpen the Anaconda Prompt as described above.Activate thenemesysenvironmentType:activate nemesysStart the Spyder development environment:Type:spyderOpen theexample scripts, run and modify them.Have fun!Best PracticesThe setup of the pump system and best practices are described in our paper (see reference below).
Additionally, we suggest the following procedures the improve reliability and ease of use:Make sure output tubes are of equal length to ensure that the stimulus onset is identical for all pumps.Ensure that tube cuts are clean and straight, perpendicular to the tube. This can be achieved by using so-called tube-cutters.The 50 mL glass syringes fit really tightly into the syringe holders.Especially when new, it might have to push relatively hard to actually insert the syringe into the holder. This will get easier over time, as the syringe and holders “grind in”.Glass syringes might break if too much pressure is exerted. Ensure that the syringes are attached tightly to using the the syringe holders and syringe piston holders, but don’t tighten the syringe holder too much as it can smash the syringe glass cylinder.Remove air bubbles. We developed a new procedure that is implemented in pyqmix-web and will guide the user through the process.CitationIf you use this software, please cite our publication:Andersen, Camilla Arndal, Alfine, Lorenzo, Ohla, Kathrin, & Höchenberger, Richard. (in press). A new gustometer: Template for the construction of a portable and modular stimulator for taste and lingual touch.Behavior Research Methods. doi: 10.3758/s13428-018-1145-1Apre-printis available from Zenodo.Version 2021.1.2The DLL search improvement introduced in 2021.1 is now working correctly for
Python 3.6 and 3.7, too.Version 2021.1Improve automated DLL search path configuration; the DLLs should be loadable
out-of-the-box in more situations now, including on systems running Python
3.8 and newer.Switch back to usingpywin32instead ofpypiwin32.Version 2019.1Handle non-existent configuration directoryVersion 2018.12.13Update installation instructionsAutomated testing using Travis now also runs on Python 2.7 (only tested
Python 3 before)switch_valve_when_donekeyword argument is now available for all pumping
operationsDepend onpypiwin32instead ofpywin32Version 2018.11.07Report correct version number when installed from wheel.Version 2018.11.05Updates to documentationHandle the case when a user requests to delete a non-existing configuration file.Update packages requirements to includepywin32.We now build universal wheels for both Python 2 and 3.Add support for Travis continuous integration tests on GitHub.Version 2018.10.08aFunctionally identical to version 2018.10.08, but with additional docstrings for the config module.Version 2018.10.08This release includes all the changes listed below.2018-10-06Assume default location of Qmix configuration files (to avoid full path).2018-10-04Renameswitch_valve_when_finishedkeyword argument toswitch_valve_when_doneto matchwait_until_donewordingAddswitch_valve_when_finishedkeyword argument toQmixPump.aspirate()methodWait until the pumps have actually started operating before checking
whether pumping has finished when using thewait_until_donekwarg.Implywait_until_done=Truewhenswitch_valve_when_done=Truekeyword argument is specified.Improve auto-discovery of Qmix SDK DLLs2018-09-13Renameblocking_waitkeyword argument towait_until_done2018-08-09AddQmixPump.fill()andempty()methodsQmixPumpmethods now raise on invalid volume and flow rate
parametersPackage specifications have been moved fromsetup.pytosetup.cfgFix bug when determining valid valve positions2018-08-07Fix reathedocs build2018-08-02Addconfigmodule topyqmix.__all__Remove Qmix SDK header directory config optionAdd convenience methodQmixPump.set_syringe_params_by_type()to set syringe parameters by specifying a syringe typeSet default flow and volume units when instantiation aQmixPump2018-08-01Support latest Qmix SDKDo not restore pump drive position counter by defaultAdd convenience methodQmixPump.set_syringe_params_by_type()to set syringe parameters by specifying a syringe type2018-05-25Support for a configuration fileDon't do a blocking wait when calibrating pumps by defaultMore example scriptsAdd support for several new Qmix SDK functions2018-02-21QmixBusgainedauto_openandauto_startinit parametersQmixPumpgainedauto_enableinit parameter2017-10-09Convertconfig.pymodule to sub-packageAdd pump configurations to the newconfig.pumpsmoduleAddpump.init_pump()convenience function for pump setupAddpump.fill_syringes()andpump.empty_syringesconvenience functions2017-10-05Addconfig.pymodule2017-10-04Add valvepositionsetter. The new property replaces thecurrent_positionproperty ofQmixValveandQmixExternalValve.Split monolithicinterface.pyinto device-specific submodules