Git Product home page Git Product logo

miniscope-daq-qt-software's Introduction

DEPRECATION NOTICE

This software is reaching its end of life, and we are in the process of consolidating and rearchitecting miniscope IO software as an SDK with minimal I/O functionality for all miniscopes - miniscope-io and a yet-to-be-started GUI built on top of that.

This software will receive one final major update to bring it to Qt6 and allow it to be reproducibly built so that current users can maintain it and we can handle minimal patches in the short term. We do not have a firm deprecation timeline yet, but will update this notice with at least 6 months notice before formally dropping support.

These issues are tracking the update:

Miniscope-DAQ-QT-Software

[Miniscope V4 Wiki] [Miniscope DAQ Software Wiki] [Miniscope DAQ Firmware Wiki] [Miniscope Wire-Free DAQ Wiki] [Miniscope-LFOV Wiki][2021 Virtual Miniscope Workshop Recording]

Neural and behavior control and recording software for the UCLA Miniscope Project

Make sure to click Watch and Star in the upper right corner of this page to get updates on new features and releases.

This backwards compatible Miniscope DAQ software is an upgrade and replacement to our previous DAQ software. It is written completely in QT, using C++ for the backend and QT Quick (QML and Java) for the front end. This software supports all current and previous Miniscopes but requires the most up-to-date version of the Miniscope DAQ Firmware.

All information can be found on the Miniscope DAQ Software Wiki page.

Along with this repository holding the software's source code, you can get built release versions of the software on the Releases Page.

miniscope-daq-qt-software's People

Contributors

daharoni avatar phildong avatar sneakers-the-rat avatar ximion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

miniscope-daq-qt-software's Issues

"Dropped Frames"?

Hey!

I just successfully compiled and ran the new software suite with my Miniscope v3 and old acquisition board. I will try to post another issue here in a little bit that lists all the packages that are needed for a clean Ubuntu 20.04 install. (In my 19.10, I had some trouble figuring out which qml-* things I needed.) Anyway, it looks great! I like the extra-long press Record and Stop buttons!

I notice something strange, however. As soon as I start running, my "Dropped Frames" counter starts growing, at maybe ~10 frames per second. But it's negative (rather than positive as in the sample image I see on the wiki) - any idea what's going on with that?

thanks!
caleb

Recording 20 FPS in v3

Hello,

Option to record with 20 FPS in miniscope v3 was removed. This was the default option I used for recordings and I wonder if the 20 FPS could be brought back? I believe it was removed in commit 2f17c7b

Best,
Prez

[Feature request] Histogram

It would be very useful to plot the real-time histogram of the miniscope image.
This would allow the modification of the acquisition parameters to span the dynamic range.

Reproducible/Cross-Platform Builds

Tracking issue for making reproducible builds and ideally cross platform builds.

Work will be done in https://github.com/Aharoni-Lab/Miniscope-DAQ-QT-Software/tree/feature-repro-build

Overview

Currently the build has unspecified dependencies (hardcoded paths to opencv in particular) and so we would like to standardize the build and deploy process for CI/CD. We would also like to target multiple operating systems (i think all with x64 arch?).

TODO

To do that, I think we need to

  • Use multiple github actions runner images for windows, linux, mac: https://github.com/actions/runner-images#available-images
  • Make dockerfiles for each that include proper versions of
    • Python
    • OpenCV
    • Qt5
  • Modify the qmake project with platform-specific dependencies/configuration options
  • Configure build action on push to main to make
    • versioned
    • releases

Need to know:

  • If we need to make any modifications to the source to accomodate differences in OS support, @phildong mentions differences between directshow and v4l2 in support for setting some camera properties.
    • In V4L2 this is dependent on the particular driver used for the miniscopes, so need to figure out which that is.

Prior work

Repos

Issues

Intended to close:

add linux support?

In theory it should be fairly straight-forward to build on linux. In fact there already seem to be some success! (#32).
So just want to put this issue here to track collective effort to make the DAQ software work on linux, and potentially have official support for linux.

Specifically it would be nice to have:

  • documentation and example .pro files to help building from source on linux.
  • linux binaries included in future releases.

dlc-live error: "Cannot import './Scripts/DLCwrapper'..."

Trying to get the dlc-live tracking working. I have the environment path set correct (C:/Users/user/Anaconda3/envs/dlc-live/) and I believe the model path correct (.../train/pose_cfg.yaml). On running the miniscope software I get the error:

image

Any ideas?

Adding an FLIR camera to acquisition

I'd like to add an FLIR camera (specifically, a Blackfly S USB3) to the devices list but not certain how to go about this.
Here's the camera in device manager:
image
How do I modify the device file correctly to add this device?

V4 Miniscope retrieve frame failed

miniscope V4

We can't receive V4 miniscope signals, as shown above. The warning shows "V4 Miniscope retrieve frame failed". Is there anything wrong with the DAQ board or the user configutation?

Thanks!

.exe file for Miniscope DAQ Software V1.1 release

Hi. I just downloaded the latest update for the Miniscope DAQ software to work with the Miniscope V4. I don't see the .exe file in the zip. Am I missing something?

Thanks in advance for your help!

Behaviour video window is not full size

Hi miniscope team,

I am using the v4 scope with the 1.02 software version and I have the following issue: the behaviour stream doesn't show all of the frame, and the window is very small (see screenshot attached)
The issue also happens when using the 1.0 version. I also tried with version 1.1 but the software crashes as soon as the behaviour steam comes up.
We've had no issue when using the same DAQ, scope and config file on a different rig with version 1.0 so I am a bit confused.

Best,
Lucie
image

Miniscope V4 data structure documentation?

Hey,

I am working on a project to convert Miniscope data to NWB format.
The configuration file that I received ("metaData.json") contains a "deviceType" parameter which is "Miniscope_V3".
After looking at the data structure that is described for V3 here is different from what I have:

  • C6-J588/ (main folder)
    • 15_03_28/ (subfolder corresponding to the recording time, there are multiple subfolders like this)
      • Miniscope/ (subfolder containing the microscope video stream)
        • 0.avi (file containing the microscope video)
        • metaData.json (file containing the metadata for the microscope device)
        • timeStamps.csv (file containing the timing of this video stream)
      • BehavCam_2/ (subfolder containing the behavioral video stream)
        • 0.avi (file containing the bevavioral video)
        • metaData.json (file containing the metadata for the behavioral camera)
        • timeStamps.csv (file containing the timing of this video stream)
      • metaData.json (file containing metadata for the recording, such as the start time)

I'm confused now which version of Miniscope it is.
Is the Miniscope V4 data structure is documented somewhere that I missed?

Update to Qt6

The current source is based on Qt 5.12 which was released in 2018 and has been long since EoL.

Need to upgrade to Qt6, which is relatively straightforward, if tedious: https://doc.qt.io/qt-6/portingguide.html

Running software with years outdated libraries is a security risk :(

Hardcoded dataDirectory values in all userConfigs/*.json files

All userConfigs/*.json files contain hard-coded paths such as
C:/Users/dbaha/Documents/Data and C:/Users/DBAharoni/Documents/Data
These paths contain Windows 10 user name unique to developers PCs
and therfore are invalid for most of the users.
Moreover Windows 10 does not allow directory creation in C:\Users easily
because this is well, inappropriate.

Switching DAQ to the externally triggerable state externally?

Hello! Thanks you very much for your work! I am trying to implement the miniscope recordings via the external software (Labview), however I have the problem of not receiving the frame signal from the DAQ when I send the external start of the recording trigger signal. I guess this is because DAQ should be in the externally triggerable state that one can activate from the Miniscope QT software. I wonder is there some USB command that switches DAQ into this state, so I could reproduce the same command in Labview (and start to receiving frame signal upon the external triggering of the recording)? So far I found that the only USB command that is sent during toggling from QT software is resetting led to 0. Thanks!

Save external TTLs for synchronisation?

Hello,
I was wondering whether it is possible to save external TTLs for synchronisation with this software and miniscope/DAQ box version 3.2 (e.g. via digital I/O port J3)?
Many thanks in advance!

Behavioural frame rate is stuck on high value (160FPS)

We have a camera from The Imaging Source that we successfully used before for recordings with v4 scopes. But now the value of the FPS is insanely high (160 FPS, see screenshot attached), which is filling the frame buffer and then causing frames to drop. We encountered this on both version 1_10 and version 1_11.
We are a bit at lost as to why the frame rate is so high as there's no FPS setting in the config file for the behavioural camera, and in the behaviorCams.json file the frame rate for this device is 30 FPS. When using other streaming softwares (IC Capture + Camera Control from the Adaptive Motor Control lab), we can get the camera to record at more normal rates like 30 or 60 FPS.
Has anyone on your team encountered this bug? Any pointers on what is to blame here?

Thanks!
Lucie

camera_framerate_bug

[Feature Request] Delta F/F during recording

Hello,

Forgive me if this is already implemented and I can't find it, but is it possible to add delta F/F functionality during recording? This would be particularly helpful for identifying active cells during imaging.

Thank you for your time,
Brandon

LED labview interface

Hi, by default not all attributes seem to be available for modification in the windows driver - can e.g. the led (led0) be modified? It seems clear that this is possible, but I'm unsure how to interface the (unless I'm mistaken) I2C interface. I'm using LabView to enumerate and view the modifiable attributes, please let me know if that's an issue.

Do I have to modify/rebuild the firmware to be able to enumerate the attribute of the USB device?

Thanks a lot for your amazing work!

Edit: moved to firmware branch

Why is recorded video fixed 60 fps?

When recording video by miniscope v4 and miniscope-DAQ, recorded video is fixed at 60 fps.
If frameRate is 20 in a user configuration file, I think the recorded video is wanted to save with the same fps.
However, it is currently saved with 60 fps.
So, when it is displayed by a video player (VLC etc...), it is played faster than real.

Would you please tell me why the recorded video is fixed at 60 fps?
Thanks!

ref:
https://docs.opencv.org/4.1.0/dd/d9e/classcv_1_1VideoWriter.html#a0901c353cd5ea05bba455317dab81130

videoWriter[names[i]]->open(tempStr.toUtf8().constData(),
dataCompressionFourCC[names[i]], 60,
cv::Size(ROI[names[i]][2], ROI[names[i]][3]), isColor); // color should be set to false?

videoWriter[names[i]]->open(tempStr.toUtf8().constData(),
dataCompressionFourCC[names[i]], 60,
cv::Size(frameBuffer[names[i]][0].cols, frameBuffer[names[i]][0].rows), isColor); // color should be set to false?

Issue compiling in windows

Hi,
I am using QT creator v5 and I am having an issue compiling, in which I get the following error:

:-1: error: No rule to make target '../../../../OneDrive/Documents/opencv/build/include/opencv2/stitching/detail/exposure_compensate.hpp', needed by 'release/backend.o'. Stop.

I believe my .pro file is setup correctly as follows:

    # Path to your openCV .lib file(s)
    LIBS += -LC:/Users/holdb/OneDrive/Documents/opencv/build/x64/vc15/lib -lopencv_world440
    
    # Path to openCV header files
     INCLUDEPATH += C:/Users/holdb/OneDrive/Documents/opencv/build/include
     INCLUDEPATH += C:/Users/holdb/OneDrive/Documents/opencv/build/include/opencv 

    # For Python
    INCLUDEPATH += C:/Users/holdb/anaconda3/envs/python38/include
    LIBS += -LC:/Users/holdb/anaconda3/envs/python38/libs -lpython38

     # For numpy
    INCLUDEPATH += LC:/Users/holdb/anaconda3/envs/python38/Lib/site-packages/numpy/core/include

Any suggestions?

Might be worth mentioning I was getting a DIFFERENT 'no rule to make target' error when I was using QT creator v7, so it's possible this is a version issue?

V3 Miniscope retrieve frame failed

Hello,

I have an issue receiving images with a V3 Miniscope. I can change the excitation LED intensity and the DAQ seems to work properly (3 LEDs are on) but I always end up with this on my dell workstation

image

The weird part is that it works well and in a stable way on another dell desktop machine.
I suspected a USB issue but according to the device manager it is 3.0 and working

image

On the old software it would crash immediately after issuing the 'grab frame error' message few second after attempting to connect

I'm sure of the device ID as other ID issue an error message right away.

Edit: I manage to test it with a shorter cable, ~45cm/1.5ft, but to no success on this particular workstation

V3 saving issue/ windowScale

We're attempting to transition to using the new software, and we're having a possible compatibility problem with our V3 scopes, specifically regarding saving videos and the windowScale variable in config.

If we attempt to set windowScale to 1 (on our assumption that we want the scale of our window to be 1/1), the scope will connect normally and the live video feed displays perfectly, but any recordings we attempt to save are empty (0kb), or if we use Set Frame to crop the recording area, it will save a video, but with the frame apparently wrapped incorrectly, such that the output is diagonal stripe-y nonsense.

If we set windowScale to 0.75, everything works essentially normally. Based on the comments in the Config, this shouldn't effect the scale of the saved video, which would make this an acceptable solution, but it is kind of perplexing nevertheless.

For what it's worth, we attempted to troubleshoot this with our V4 scope also, and setting windowscale to 1 doesn't seem to cause any problems.

Ultimately, our intent here is to get confirmation that using windowScale = 0.75 on our V3 scopes is a workable solution, and isn't going to inadvertently crop or downsample our recording area?

Add the ability to type in the numerical value of the LED intensity

It would be helpful to be able to type in the LED intensity as an alternate option to using the slider.
Would it also be able to add the ability to set the LED intensity in the config file, so that the intensity could be coded to be consistent between sessions on the same mouse?

BNO problem

Hi, with your open source code, our miniscopeV4 is working. Thank you very much.
But there are some problems. When miniscopeV4 is runing, one image corruption will make the BNO invalid, bnobuffer of PC software gets all 0. The video stream can recover from the image corruption because of isochronous mode. BNO data never recover from the image corruption, we don't know why, maybe the USB data protocol of BNO is blocked. Restarting the USB data protocol of BNO maybe is helpful to solve the problem, even though I don't know how to do it.
I think that the connector(U.FL-R-SMT) is too close to the L5(inductance of coaxial cable, near U.FL-R-SMT). With more time of using the camera, L5 make more heat๏ผŒ the conector has more chances of loose connection problem which leads to the image corruption. That's the possible reason why the BNO of camra starts normal and does't work a few minutes later. Direct soldering of coaxial cables without U.FL-R-SMT maybe is an option. We are not sure now.More tests are needed.
Best wishes!

minicam with daq v3.3

I recently acquired minicams, miniscope daq v3.3, and miniscopes.

I am having trouble getting the Miniscope Daq QT Software to successfully load the Minicam-Mono-XGA.

I select the behaviorCams JSON file and run then image 2 below pops up. However, when I press record nothing happens, the timer starts but no frames are visible. Is there a link or suggestion on how to proceed? Thank you very much, sorry for the rudimentary issue.

image
image

Modifying device files for resolution and frame rate

Until I get my FLIR camera to work with acquisition software, I'm working with a Logitech Brio.

I've tried modifying the device config file for webcams to include 1920x1080 resolution.

Whenever I try to run this resolution the software crashes.

Also, when I adjust the framerate in the behaviorCams.json it still runs at 30 FPS in the software. And the avi output runs a 30 FPS movie at 60 FPS (independent whether the device file states 30 or 60).

Autofocus & Timelapse

I am working on a project that requires imaging over a long period of time. I need to take a photo every hour. Before the photo is taken the computer needs to refocus because the sample may change or move slightly over time. Do you have and tips, ideas, or resources for implementing these features?

Thanks!

Large amount of corrupt IMU data

I noticed that there is a filter to check whether or not BNO data is corrupt before it is processed:

if (bnoBuffer[f*5+4] < 0.05) { // Checks to see if norm of quat differs from 1 by 0.05

This issue seems to persist in the Miniscope V4 Bonsai Package I'm working on. Its root cause seems to be some type of synchronization issue in firmware or currupt I2C packets over the SERDES back channel. I do see a large degree of toggling of quaternion elements correct values but wrong array positions, which strongly suggests a synchronization issue:

image

Do you think I'm experiencing the same behavior as the DAQ-QT software or are you using some type of qauternion_ready flag that I'm missing? If this is the current nominal behavior, is there a route to fix this? In bonsai, the proper way to handle such a thing (aside from fixing the actual data stream issue) would be to filter it using a downstream node, but it seems a bit weird that the default stream emitted by the Miniscope v4 would be in large part corrupt.

Python issues compiling in Linux

I am getting errors when compiling on Ubuntu 20.04 concerning Python.h not found for behaviortracker and behaviortrackerworker.
Some sleuthing around the web leads me to believe that I am missing some python libraries.
I have python3-dev and numpy installed. Does behaviortracker require additional python libraries?

LED not updating for v3 miniscope

I'm using a v3 scope with v1.01 acquisition software (native Windows 10) and the LED does not seem to turn on when I connect it to the software. It's also affected by changing the LED power slider. But it does work with the old non-QT software. Any clue what's happening?

Framerate from config file isn't used

No matter what I set in the config file, the starting framerate always seems to be 30 Hz for the miniscope.

The top of the imaging window shows ~30 FPS and that's also seems to be the real rate but the menu shows what is given in the confi. When I change it in the menu with the +/- button I move from the one set in the config file, not from 30.

This is the case on three different PCs I tried

Without the exe file located in the main directory

Hi, I visited the releases page of this repository and download the newest version of the software. When i unzip the compiled package, i didn't found the .exe file located in the main directory. Am I miss some key steps or didn't install any software?
Thanks!

Add the ability to change/add metadata labels in the user config file.

It would be great to have ability to change and add metadata labels in the user config file.

This would enable the researcher to change the metadata labels to the ones they are currently using in their database, and to add additional directories that match the standardized data structure for their analysis pipeline.

For example, in the current build (0.163):
I tried changing "animalName" to "animal_ID" and it ignores it in the directory structure and shows "animalName" : ""
in the metaData.json file.
I tried adding new metadata to the list in the userConfig.json and the directory structure and metaData.jason ignored them as well.

Check file.open() return value when software attempts opens device config file.

file.setFileName("./deviceConfigs/miniscopes.json");

I'm debugging in Visual studio which uses a different build location, and the software is non-functional because the relative position between the config file and the executable is fixed (see line referenced above). This is not great, but the software should probably at least check the return code of file.open rather than just proceeding with an empty json object and then crashing.

MiniLFOV not functional with current DAQ software

Setting up the imaging on a new computer and hoping to get the MiniLFOV working with the latest DAQ software. It looks like the videoDevices.json file that contains the information for the scope, "Siminiscope_1024X768", looks like an outdated version.

I've tried changing the values to match the outdated software version Changliang gave me that runs properly ("v1_10_Python"), but just changing the device information in the .json didn't help fix it. It crashes after config selection. Are there other files that need to be changed in order to get the scope working?

Gain isn't correctly initialized from config file

When I set gain in the configuration file to "Low" or "High", when I initialize Miniscope recording the correct gain value is presented in text by the acquisition software. However, the actual gain that seems to be initialized is "Medium", revealed by toggling between gains (If I start at High, manually toggle the gain using the software to Medium/Low, and then toggle back up to High, the video is much brighter than the starting point).

Any thoughts on this?

LED doesn't turn on for the first frame for triggered recordings

This is a minor complaint but it looks like it takes a frame or two for the LED to turn on once the recording has been triggered by an external source, so the first frame is black. Currently I can work around this by manually turning on the LED via the GUI slider after enabling external triggering.

Software synchronize with other DAQ

Great job for your miniscope development. I have other customized behavior recording system that can be triggered by both keyboard shorcut and python/websocket. How to synchronize this behavior recording system with the Miniscope DAQ software. I knew Miniscope DAQ provides hardware triggers, how about software trigger (even small latency is tolerable).

Visual C++ errors on running

On some Windows 10 computers, running the program results in some errors. Specifically,

The code execution cannot proceed because MSVCP140.dll was not found

This is followed by the error

The code execution cannot proceed because VCRUNTIME140.dll was not found

Installing this software eliminates the error messages, but then the program quits right after it launches.

I have no way of predicting whether this error will occur on a given Windows 10 22H2 computer. It seems to be random.

Qt application errors in application output

Hello, I was able to get the QT application built, but I'm getting some error outputs that I don't quite understand while I try running my application natively in QT. I'm wondering if you might know where to point me in resolving these errors. I was originally using a different compiler and version of opencv than the deployed release, but even after changing to using opencv 4.4.0 and mscv 2017, the same errors continue to occur. I suspect some cmake funny business is afoot but I'm unsure. The application output from run to exit is shown below.

note: I tested the miniscope using the example user config and it worked on the 1.0 build but not on mine.

[ERROR:0] global c:\users\ianjones\opencv\sources\modules\videoio\src\cap.cpp (563) cv::VideoWriter::open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.4.0) c:\users\ianjones\opencv\sources\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): test.avi in function 'cv::icvExtractPattern'


Codec "MJPG" supported for color
Codec "MJ2C" supported for color
Codec "XVID" supported for color
Codec "FFV1" supported for color
Codec "DX50" supported for color
Codec "FLV1" supported for color
[ERROR:0] global c:\users\ianjones\opencv\sources\modules\videoio\src\cap.cpp (563) cv::VideoWriter::open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.4.0) c:\users\ianjones\opencv\sources\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): test.avi in function 'cv::icvExtractPattern'


Codec "I420" supported for color
Codec "MPEG" supported for color
Codec "mp4v" supported for color
[ERROR:0] global c:\users\ianjones\opencv\sources\modules\videoio\src\cap.cpp (563) cv::VideoWriter::open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.4.0) c:\users\ianjones\opencv\sources\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): test.avi in function 'cv::icvExtractPattern'


[ERROR:0] global c:\users\ianjones\opencv\sources\modules\videoio\src\cap.cpp (563) cv::VideoWriter::open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.4.0) c:\users\ianjones\opencv\sources\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): test.avi in function 'cv::icvExtractPattern'


Codec "ASV1" supported for color
Codec "GREY" supported for color
qrc:/main.qml:271:13: QML TextArea: Binding loop detected for property "implicitWidth"
qrc:/main.qml:279:29: QML Rectangle: Possible anchor loop detected on fill.
file:///C:/Qt/5.14.2/msvc2017_64/qml/QtQuick/Dialogs/DefaultFileDialog.qml:102:33: QML Settings: Failed to initialize QSettings instance. Status code is: 1
file:///C:/Qt/5.14.2/msvc2017_64/qml/QtQuick/Dialogs/DefaultFileDialog.qml:102:33: QML Settings: The following application identifiers have not been set: QVector("organizationName", "organizationDomain")
Model size of -161 is less than 0
Model size of -14 is less than 0
qml: Canceled
TYPE ""
TYPE ""
TYPE ""
TYPE ""
TYPE ""
TYPE ""
TYPE ""
TYPE ""
TYPE ""
TYPE ""
TYPE ""
TYPE ""
TYPE ""
TYPE ""
TYPE ""
TYPE ""
TYPE ""
TYPE ""
TYPE ""
TYPE ""
DNSOSNDAIOASDNO QJsonObject({"COMMENT_compression":"A Lossly compression CODEC is generally fine for behavior video data. We like to use MJPG or XVID. When you start the software it will tell you all supported CODECs on your computer.","COMMENT_deviceType":"Supported types include 'WebCam', 'WebCam-320x240','WebCam-640x480','WebCam-1280x720'.","COMMENT_deviceType2":"If your behavior camera supports other resolutions you want to use you can add a new entry for it in deviceConfigs/videoDevices.json","ROI":{"height":480,"leftEdge":0,"note3":"Edge values are zero indexed","notes":"This defines the bounding box of the portion of the video that is saved to disk","topEdge":0,"width":640},"cameraCalibrationFileLocation":"","compression":"MJPG","deviceID":0,"deviceName":"cameraDeviceName","deviceType":"WebCam-640x480","framesPerFile":1000,"showSaturation":true,"windowScale":0.5,"windowX":800,"windowY":600})
qrc:/TreeViewerJSON.qml:68:13: Unable to assign [undefined] to QString
qrc:/TreeViewerJSON.qml:23:13: Unable to assign [undefined] to QString
qrc:/TreeViewerJSON.qml:68:13: Unable to assign [undefined] to QString
qrc:/TreeViewerJSON.qml:23:13: Unable to assign [undefined] to QString
qrc:/TreeViewerJSON.qml:68:13: Unable to assign [undefined] to QString
qrc:/TreeViewerJSON.qml:23:13: Unable to assign [undefined] to QString
qrc:/TreeViewerJSON.qml:68:13: Unable to assign [undefined] to QString
qrc:/TreeViewerJSON.qml:23:13: Unable to assign [undefined] to QString
qrc:/TreeViewerJSON.qml:68:13: Unable to assign [undefined] to QString
qrc:/TreeViewerJSON.qml:23:13: Unable to assign [undefined] to QString
DNSOSNDAIOASDNO QJsonObject({"ROI":{"height":480,"leftEdge":0,"note3":"Edge values are zero indexed","notes":"This defines the bounding box of the portion of the video that is saved to disk","topEdge":0,"width":640},"cameraCalibrationFileLocation":"","compression":"MJPG","deviceID":0,"deviceName":"cameraDeviceName","deviceType":"WebCam-640x480","framesPerFile":1000,"showSaturation":true,"windowScale":0.5,"windowX":800,"windowY":600})
qrc:/ControlPanel.qml:9: TypeError: Cannot read property 'height' of null
qrc:/ControlPanel.qml:8: TypeError: Cannot read property 'width' of null
Screen size is  1920  x  1080
qrc:/ControlPanel.qml:212:37: Unable to assign [undefined] to QString
qrc:/ControlPanel.qml:212:37: Unable to assign [undefined] to QString
qrc:/ControlPanel.qml:212:37: Unable to assign [undefined] to QString
qrc:/ControlPanel.qml:212:37: Unable to assign [undefined] to QString
qrc:/ControlPanel.qml:212:37: Unable to assign [undefined] to QString
qrc:/ControlPanel.qml:212:37: Unable to assign [undefined] to QString
qrc:/TraceDisplayWindow.qml:11: TypeError: Cannot read property 'height' of null
qrc:/TraceDisplayWindow.qml:10: TypeError: Cannot read property 'width' of null
QJsonObject({"ROI":{"height":600,"leftEdge":0,"note3":"Edge values are zero indexed","notes":"This defines the bounding box of the portion of the video that is saved to disk","topEdge":0,"width":600},"compression":"FFV1","deviceID":1,"deviceName":"miniscopeDeviceName","deviceType":"Miniscope_V4_BNO","ewl":50,"frameRate":"20FPS","framesPerFile":1000,"gain":"Low","headOrientation":{"enabled":true,"filterBadData":true},"led0":10,"showSaturation":true,"windowScale":0.75,"windowX":800,"windowY":100})
Camera 1
Not able to connect and open  "miniscopeDeviceName"
[ERROR:0] global c:\users\ianjones\opencv\sources\modules\videoio\src\cap.cpp (161) cv::VideoCapture::open VIDEOIO(MSMF): raised unknown C++ exception!


[ERROR:0] global c:\users\ianjones\opencv\sources\modules\videoio\src\cap.cpp (161) cv::VideoCapture::open VIDEOIO(CV_IMAGES): raised unknown C++ exception!


[ERROR:0] global c:\users\ianjones\opencv\sources\modules\videoio\src\cap.cpp (161) cv::VideoCapture::open VIDEOIO(CV_MJPEG): raised unknown C++ exception!


QJsonObject({"ROI":{"height":480,"leftEdge":0,"note3":"Edge values are zero indexed","notes":"This defines the bounding box of the portion of the video that is saved to disk","topEdge":0,"width":640},"cameraCalibrationFileLocation":"","compression":"MJPG","deviceID":0,"deviceName":"cameraDeviceName","deviceType":"WebCam-640x480","framesPerFile":1000,"showSaturation":true,"windowScale":0.5,"windowX":800,"windowY":600})
Camera 0
Not able to connect and open  "cameraDeviceName"
"miniscopeDeviceName" "FFV1" 827737670
"cameraDeviceName" "MJPG" 1196444237
[ERROR:0] global c:\users\ianjones\opencv\sources\modules\videoio\src\cap.cpp (161) cv::VideoCapture::open VIDEOIO(MSMF): raised unknown C++ exception!


[ERROR:0] global c:\users\ianjones\opencv\sources\modules\videoio\src\cap.cpp (161) cv::VideoCapture::open VIDEOIO(CV_IMAGES): raised unknown C++ exception!


[ERROR:0] global c:\users\ianjones\opencv\sources\modules\videoio\src\cap.cpp (161) cv::VideoCapture::open VIDEOIO(CV_MJPEG): raised unknown C++ exception!


0 0 0
QOpenGLShader::compile(Vertex): ERROR: 3:14: 'assign' : implicit conversion between types not allowed in ES 2.0 
ERROR: 3:14: 'assign' : implicit conversion between types not allowed in ES 2.0 
ERROR: 3:14: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'const int' and a right operand of type 'highp float' (or there is no acceptable conversion)
ERROR: 3:14: 'assign' : implicit conversion between types not allowed in ES 2.0 
ERROR: 3:14: 'assign' : implicit conversion between types not allowed in ES 2.0 
ERROR: 3:14: '/' : wrong operand types no operation '/' exists that takes a left-hand operand of type 'const int' and a right operand of type 'uniform highp float' (or there is no acceptable conversion)
ERROR: 3:14: 'assign' : implicit conversion between types not allowed in ES 2.0 
ERROR: 3:14: '=' :  cannot convert from 'const int' to 'highp float'


*** Problematic Vertex shader source code ***
#version 110
#define lowp
#define mediump
#define highp
#line 1
attribute vec2 a_position;

uniform vec3 u_color;
varying vec3 v_color;

uniform vec2 u_pan;
uniform vec2 u_scale;
uniform vec2 u_magnify;

uniform float u_time;
uniform float u_windowSize;

void main() {
    float scrollBarPos = 2 * mod(u_time,u_windowSize)/u_windowSize - 1; // From -1 to 1

    vec2 pos = a_position;
    pos.x = scrollBarPos;
    pos.x = u_scale.x * (u_magnify.x * pos.x + u_pan.x);
    gl_Position = vec4(pos, 0.0, 1.0);
    v_color = u_color;
}

***
QOpenGLShader::compile(Fragment): ERROR: 4:23: 'colormap_gnu_plot' : no matching overloaded function found - implicit conversion not allowed 
ERROR: 4:22: 'assign' :  cannot convert from 'const mediump float' to 'FragColor 4-component vector of mediump float'


*** Problematic Fragment shader source code ***
#version 110
#ifdef GL_KHR_blend_equation_advanced
#extension GL_ARB_fragment_coord_conventions : enable
#extension GL_KHR_blend_equation_advanced : enable
#endif
#define lowp
#define mediump
#define highp
#line 1
varying vec4 v_color;
varying float v_index;

vec4 colormap_parula(float x);

float colormap_f1(int formula, float x);
vec4 colormap_gnu_plot(float x, int red_type, int green_type, int blue_type);

float colormap_red(float x);
float colormap_green(float x);
float colormap_blue(float x);
vec4 colormap_jet(float x);

void main() {
    gl_FragColor = v_color;
    if (gl_FragColor.g == -1.0 && gl_FragColor.b == -1.0) {
        // Use parula colormap_parula
        gl_FragColor = colormap_parula(gl_FragColor.r);
    }
    else if (gl_FragColor.g == -2.0 && gl_FragColor.b == -2.0) {
        // Use parula colormap_parula
        gl_FragColor = colormap_gnu_plot(gl_FragColor.r, 33.0, 13.0, 10.0);
    }
    else if (gl_FragColor.g == -3.0 && gl_FragColor.b == -3.0) {
        // Use parula colormap_parula
        gl_FragColor = colormap_jet(gl_FragColor.r);
    }
    if (((fract(v_index) > .00001) && (fract(v_index) < .99999)) || v_index > 2.0)
        gl_FragColor.a = 0.0;

}


vec4 colormap_parula(float x) {
    if (x < 0.0) {
        return vec4(0.0, 0.0, 0.0, 0.0);
    } else if (1.0 < x) {
        return vec4(0.0, 0.0, 0.0, 0.0);
    }
    if (x < 3.1250000000000000e-02) {
        float dx = x - 1.5625000000000000e-02;
        return ((vec4(-1.4151576683620706e+02,  2.4271369358056621e+01,  4.5510373586485706e+01, 1.0) * dx
               + vec4( 0.0000000000000000e+00,  0.0000000000000000e+00,  0.0000000000000000e+00, 1.0)) * dx
               + vec4( 2.6007355728658488e-01,  1.4968553250962457e+00,  3.0913652594248364e+00, 1.0)) * dx
               + vec4( 2.0810000000000001e-01,  1.6630000000000000e-01,  5.2920000000000000e-01, 1.0);
    } else if (x < 4.6875000000000000e-02) {
        float dx = x - 3.1250000000000000e-02;
        return ((vec4(-5.1390461057291191e+01,  1.2211762733842230e+01, -1.2843448884986955e+01, 1.0) * dx
               + vec4(-6.6335515704472066e+00,  1.1377204386589042e+00,  2.1332987618665173e+00, 1.0)) * dx
               + vec4( 1.5642431399834725e-01,  1.5146322069502911e+00,  3.1246980525790007e+00, 1.0)) * dx
               + vec4( 2.1162380952380999e-01,  1.8978095238095199e-01,  5.7767619047619101e-01, 1.0);
    } else if (x < 6.2500000000000000e-02) {
        float dx = x - 4.6875000000000000e-02;
        return ((vec4(-1.4725107464858192e+02,  1.3014608277362621e+01,  5.8634219534912217e+00, 1.0) * dx
               + vec4(-9.0424794325077311e+00,  1.7101468168077587e+00,  1.5312620953827538e+00, 1.0)) * dx
               + vec4(-8.8513670422823654e-02,  1.5591301328169576e+00,  3.1819568159735203e+00, 1.0)) * dx
               + vec4( 2.1225238095238100e-01,  2.1377142857142900e-01,  6.2697142857142896e-01, 1.0);
    } else if (x < 7.8125000000000000e-02) {
        float dx = x - 6.2500000000000000e-02;
        return ((vec4(-2.1469400225321081e+02, -1.4338005366630648e+01, -4.1817857976177763e+01, 1.0) * dx
               + vec4(-1.5944873556660008e+01,  2.3202065798091316e+00,  1.8061099994526548e+00, 1.0)) * dx
               + vec4(-4.7894106087856969e-01,  1.6221044046390967e+00,  3.2341032549553237e+00, 1.0)) * dx
               + vec4( 2.0810000000000001e-01,  2.3860000000000001e-01,  6.7708571428571396e-01, 1.0);
    } else if (x < 9.3750000000000000e-02) {
        float dx = x - 7.8125000000000000e-02;
        return ((vec4(-2.8846495443400278e+02,  2.0037550842697090e+02,  1.1771734328417965e+02, 1.0) * dx
               + vec4(-2.6008654912279265e+01,  1.6481125782483199e+00, -1.5410209318067788e-01, 1.0)) * dx
               + vec4(-1.1344649432057459e+00,  1.6841093914837442e+00,  3.2599158784908235e+00, 1.0)) * dx
               + vec4( 1.9590476190476200e-01,  2.6445714285714300e-01,  7.2789999999999999e-01, 1.0);
    } else if (x < 1.0937500000000000e-01) {
        float dx = x - 9.3750000000000000e-02;
        return ((vec4(-5.4509738001026233e+02,  5.1696771659011155e+01, -6.5374637230314454e+02, 1.0) * dx
               + vec4(-3.9530449651373146e+01,  1.1040714535762580e+01,  5.3638983732652425e+00, 1.0)) * dx
               + vec4(-2.1585134520128149e+00,  1.8823723151401646e+00,  3.3413189453671448e+00, 1.0)) * dx
               + vec4( 1.7072857142857101e-01,  2.9193809523809500e-01,  7.7924761904761897e-01, 1.0);
    } else if (x < 1.2500000000000000e-01) {
        float dx = x - 1.0937500000000000e-01;
        return ((vec4( 2.3639968744743715e+03, -8.1036503315845437e+02, -8.1573269216733058e+02, 1.0) * dx
               + vec4(-6.5081889339354191e+01,  1.3464000707278728e+01, -2.5280462828444659e+01, 1.0)) * dx
               + vec4(-3.7930812487429293e+00,  2.2652584908126849e+00,  3.0301226257549660e+00, 1.0)) * dx
               + vec4( 1.2527142857142901e-01,  3.2424285714285700e-01,  8.3027142857142899e-01, 1.0);
    } else if (x < 1.4062500000000000e-01) {
        float dx = x - 1.2500000000000000e-01;
        return ((vec4( 1.4125902630655582e+03,  2.5375056097507152e+02,  9.0826266478267496e+02, 1.0) * dx
               + vec4( 4.5730464151631985e+01, -2.4521860222023822e+01, -6.3517932773788282e+01, 1.0)) * dx
               + vec4(-4.0954472673010889e+00,  2.0924794358947931e+00,  1.6426476944700765e+00, 1.0)) * dx
               + vec4( 5.9133333333333399e-02,  3.5983333333333301e-01,  8.6833333333333296e-01, 1.0);
    } else if (x < 1.5625000000000000e-01) {
        float dx = x - 1.4062500000000000e-01;
        return ((vec4(-1.9850459267366693e+03,  1.4738473211499172e+02,  2.4976683303608979e+02, 1.0) * dx
               + vec4( 1.1194563273283002e+02, -1.2627302676317344e+01, -2.0943120362100398e+01, 1.0)) * dx
               + vec4(-1.6317582534813697e+00,  1.5120237656082123e+00,  3.2294373922181602e-01, 1.0)) * dx
               + vec4( 1.1695238095238101e-02,  3.8750952380952403e-01,  8.8195714285714299e-01, 1.0);
    } else if (x < 1.7187500000000000e-01) {
        float dx = x - 1.5625000000000000e-01;
        return ((vec4(-1.3211246088080517e+02,  6.1731462945951478e+01,  9.6199145930320853e+01, 1.0) * dx
               + vec4( 1.8896604917048652e+01, -5.7186433584271068e+00, -9.2353000635336890e+00, 1.0)) * dx
               + vec4( 4.1265170979798449e-01,  1.2253683588153301e+00, -1.4859407992871662e-01, 1.0)) * dx
               + vec4( 5.9571428571428596e-03,  4.0861428571428599e-01,  8.8284285714285704e-01, 1.0);
    } else if (x < 1.8750000000000000e-01) {
        float dx = x - 1.7187500000000000e-01;
        return ((vec4(-2.4276114402580023e+02,  1.8878292291818184e+01,  5.4500811814199913e+01, 1.0) * dx
               + vec4( 1.2703833313260910e+01, -2.8249810328356313e+00, -4.7259650980498993e+00, 1.0)) * dx
               + vec4( 9.0640855714657143e-01,  1.0918742277018498e+00, -3.6673884807846019e-01, 1.0)) * dx
               + vec4( 1.6514285714285700e-02,  4.2659999999999998e-01,  8.7863333333333304e-01, 1.0);
    } else if (x < 2.0312500000000000e-01) {
        float dx = x - 1.8750000000000000e-01;
        return ((vec4(-2.4875702015890445e+02,  2.7531596458333780e+01,  1.1605149669749400e+01, 1.0) * dx
               + vec4( 1.3244046870515243e+00, -1.9400610816566539e+00, -2.1712395442592785e+00, 1.0)) * dx
               + vec4( 1.1255997759014531e+00,  1.0174204446629080e+00, -4.7450767061454108e-01, 1.0)) * dx
               + vec4( 3.2852380952381001e-02,  4.4304285714285702e-01,  8.7195714285714299e-01, 1.0);
    } else if (x < 2.1875000000000000e-01) {
        float dx = x - 2.0312500000000000e-01;
        return ((vec4( 6.6879357994795782e+01,  3.3156266362545779e+00,  3.1398894268734253e+01, 1.0) * dx
               + vec4(-1.0336080632897122e+01, -6.4951749767225808e-01, -1.6272481534897754e+00, 1.0)) * dx
               + vec4( 9.8479233924761567e-01,  9.7695827936089374e-01, -5.3385904089187008e-01, 1.0)) * dx
               + vec4( 4.9814285714285700e-02,  4.5857142857142902e-01,  8.6405714285714297e-01, 1.0);
    } else if (x < 2.3437500000000000e-01) {
        float dx = x - 2.1875000000000000e-01;
        return ((vec4(-3.7807546774099214e+00,  2.9110963663947160e+01,  2.0085673255558202e+01, 1.0) * dx
               + vec4(-7.2011107268910699e+00, -4.9409749909782474e-01, -1.5542498464285720e-01, 1.0)) * dx
               + vec4( 7.1077372425092522e-01,  9.5908929503636120e-01, -5.6171330867519242e-01, 1.0)) * dx
               + vec4( 6.2933333333333299e-02,  4.7369047619047600e-01,  8.5543809523809500e-01, 1.0);
    } else if (x < 2.5000000000000000e-01) {
        float dx = x - 2.3437500000000000e-01;
        return ((vec4(-1.8052110713761824e+01,  7.5676044216235097e+00,  2.6820241280346455e+01, 1.0) * dx
               + vec4(-7.3783336023946600e+00,  8.7047892264969851e-01,  7.8609094921143352e-01, 1.0)) * dx
               + vec4( 4.8296990660583561e-01,  9.6497025477935916e-01, -5.5185915297880839e-01, 1.0)) * dx
               + vec4( 7.2266666666666701e-02,  4.8866666666666703e-01,  8.4670000000000001e-01, 1.0);
    } else if (x < 2.6562500000000000e-01) {
        float dx = x - 2.5000000000000000e-01;
        return ((vec4(-8.5042116753280467e+01,  3.9234694840689350e+01,  6.3623990194130904e+01, 1.0) * dx
               + vec4(-8.2245262921022455e+00,  1.2252103799133005e+00,  2.0432897592276738e+00, 1.0)) * dx
               + vec4( 2.3917522075432149e-01,  9.9771540013190607e-01, -5.0765007940944740e-01, 1.0)) * dx
               + vec4( 7.7942857142857203e-02,  5.0398571428571404e-01,  8.3837142857142899e-01, 1.0);
    } else if (x < 2.8125000000000000e-01) {
        float dx = x - 2.6562500000000000e-01;
        return ((vec4(-4.4981860368289709e+01,  3.5222378119677195e+01,  1.8276940800992332e+01, 1.0) * dx
               + vec4(-1.2210875514912267e+01,  3.0643367005706139e+00,  5.0256642995775600e+00, 1.0)) * dx
               + vec4(-8.0127932480280273e-02,  1.0647395732644671e+00, -3.9719767224061564e-01, 1.0)) * dx
               + vec4( 7.9347619047619000e-02,  5.2002380952381000e-01,  8.3118095238095202e-01, 1.0);
    } else if (x < 2.9687500000000000e-01) {
        float dx = x - 2.8125000000000000e-01;
        return ((vec4( 8.8958586797831074e+01, -6.4031864461777545e+01, -5.4343639113056135e+01, 1.0) * dx
               + vec4(-1.4319400219675847e+01,  4.7153856749304826e+00,  5.8823958996240755e+00, 1.0)) * dx
               + vec4(-4.9466349083321959e-01,  1.1862977353816719e+00, -2.2675923162809006e-01, 1.0)) * dx
               + vec4( 7.4942857142857103e-02,  5.3754285714285699e-01,  8.2627142857142899e-01, 1.0);
    } else if (x < 3.1250000000000000e-01) {
        float dx = x - 2.9687500000000000e-01;
        return ((vec4( 2.3465669412937996e+02, -7.4943148843863256e+01, -1.7040059387215410e+02, 1.0) * dx
               + vec4(-1.0149466463527515e+01,  1.7138920282846606e+00,  3.3350378161995691e+00, 1.0)) * dx
               + vec4(-8.7698953275827207e-01,  1.2867551994944084e+00, -8.2736829818345611e-02, 1.0)) * dx
               + vec4( 6.4057142857142799e-02,  5.5698571428571397e-01,  8.2395714285714305e-01, 1.0);
    } else if (x < 3.2812500000000000e-01) {
        float dx = x - 3.1250000000000000e-01;
        return ((vec4( 3.5054309382746595e+02, -7.5598816353949772e+01, -5.9224118732067950e+01, 1.0) * dx
               + vec4( 8.5006607378717081e-01, -1.7990680737714295e+00, -4.6524900215576546e+00, 1.0)) * dx
               + vec4(-1.0222926638479650e+00,  1.2854243237836778e+00, -1.0332202052706571e-01, 1.0)) * dx
               + vec4( 4.8771428571428597e-02,  5.7722380952381003e-01,  8.2282857142857202e-01, 1.0);
    } else if (x < 3.4375000000000000e-01) {
        float dx = x - 3.2812500000000000e-01;
        return ((vec4(-1.3511844086782639e+02,  2.1571557117596814e+01,  6.5912402293741552e+00, 1.0) * dx
               + vec4( 1.7281773596949638e+01, -5.3427625903628249e+00, -7.4286205871233397e+00, 1.0)) * dx
               + vec4(-7.3898266899270237e-01,  1.1738332196565799e+00, -2.9208937378770627e-01, 1.0)) * dx
               + vec4( 3.4342857142857203e-02,  5.9658095238095199e-01,  8.1985238095238100e-0
1, 1.0);
    } else if (x < 3.5937500000000000e-01) {
        float dx = x - 3.4375000000000000e-01;
        return ((vec4(-1.6458788273706924e+02,  1.0533768835542057e+01,  3.0362548290707878e+01, 1.0) * dx
               + vec4( 1.0948096681270275e+01, -4.3315958504754741e+00, -7.1196562013714262e+00, 1.0)) * dx
               + vec4(-2.9789094589551629e-01,  1.0226713690184817e+00, -5.1940619860793691e-01, 1.0)) * dx
               + vec4( 2.6499999999999999e-02,  6.1370000000000002e-01,  8.1350000000000000e-01, 1.0);
    } else if (x < 3.7500000000000000e-01) {
        float dx = x - 3.5937500000000000e-01;
        return ((vec4(-1.0406115199344315e+02,  1.9929786587720105e+01,  3.6734795179105028e+01, 1.0) * dx
               + vec4( 3.2330396779701545e+00, -3.8378254363094402e+00, -5.6964117502444944e+00, 1.0)) * dx
               + vec4(-7.6310690282384588e-02,  8.9502416141246732e-01, -7.1965726035193567e-01, 1.0)) * dx
               + vec4( 2.3890476190476202e-02,  6.2866190476190498e-01,  8.0376190476190501e-01, 1.0);
    } else if (x < 3.9062500000000000e-01) {
        float dx = x - 3.7500000000000000e-01;
        return ((vec4( 2.3255546213942225e+02,  1.8349599099637384e+01,  1.7433813849989207e+01, 1.0) * dx
               + vec4(-1.6448268217224928e+00, -2.9036166900100602e+00, -3.9744682262239461e+00, 1.0)) * dx
               + vec4(-5.1494864403514876e-02,  7.8968912818872505e-01, -8.7076475998425507e-01, 1.0)) * dx
               + vec4( 2.3090476190476199e-02,  6.4178571428571396e-01,  7.9126666666666701e-01, 1.0);
    } else if (x < 4.0625000000000000e-01) {
        float dx = x - 3.9062500000000000e-01;
        return ((vec4( 1.5126193200717549e+02,  2.0267550346934740e+01,  2.0857035135376179e+01, 1.0) * dx
               + vec4( 9.2562104660629245e+00, -2.0434792322145579e+00, -3.1572582020057021e+00, 1.0)) * dx
               + vec4( 6.7433005039304356e-02,  7.1239075440396538e-01, -9.8219798542534331e-01, 1.0)) * dx
               + vec4( 2.2771428571428599e-02,  6.5348571428571400e-01,  7.7675714285714303e-01, 1.0);
    } else if (x < 4.2187500000000000e-01) {
        float dx = x - 4.0625000000000000e-01;
        return ((vec4( 1.0861181935568159e+02, -5.7969433444380156e+00,  3.9956456082908054e+00, 1.0) * dx
               + vec4( 1.6346613528899276e+01, -1.0934378097019919e+00, -2.1795846800349437e+00, 1.0)) * dx
               + vec4( 4.6747712996058871e-01,  6.6337642562401933e-01, -1.0655861554572283e+00, 1.0)) * dx
               + vec4( 2.6661904761904800e-02,  6.6419523809523795e-01,  7.6071904761904796e-01, 1.0);
    } else if (x < 4.3750000000000000e-01) {
        float dx = x - 4.2187500000000000e-01;
        return ((vec4(-3.0484063800132168e+02,  1.4154965887634640e+01, -3.1353889969814710e+00, 1.0) * dx
               + vec4( 2.1437792561196851e+01, -1.3651695289725239e+00, -1.9922887921463122e+00, 1.0)) * dx
               + vec4( 1.0578584751183406e+00,  6.2496068595722998e-01, -1.1307716784600605e+00, 1.0)) * dx
               + vec4( 3.8371428571428598e-02,  6.7427142857142897e-01,  7.4355238095238096e-01, 1.0);
    } else if (x < 4.5312500000000000e-01) {
        float dx = x - 4.3750000000000000e-01;
        return ((vec4( 1.9732370744832981e+01, -3.3873392535419122e+00, -5.1854420010455629e+00, 1.0) * dx
               + vec4( 7.1483876548848961e+00, -7.0165550298965007e-01, -2.1392601513798186e+00, 1.0)) * dx
               + vec4( 1.5045175409946179e+00,  5.9266654483282100e-01, -1.1953271307026563e+00, 1.0)) * dx
               + vec4( 5.8971428571428598e-02,  6.8375714285714295e-01,  7.2538571428571397e-01, 1.0);
    } else if (x < 4.6875000000000000e-01) {
        float dx = x - 4.5312500000000000e-01;
        return ((vec4(-5.2460806882781675e+01, -6.0560887320505685e-01,  1.3890718905419471e+01, 1.0) * dx
               + vec4( 8.0733425335489422e+00, -8.6043703049942721e-01, -2.3823277451788294e+00, 1.0)) * dx
               + vec4( 1.7423570751888966e+00,  5.6825884899705426e-01, -1.2659769415863851e+00, 1.0)) * dx
               + vec4( 8.4300000000000000e-02,  6.9283333333333297e-01,  7.0616666666666705e-01, 1.0);
    } else if (x < 4.8437500000000000e-01) {
        float dx = x - 4.6875000000000000e-01;
        return ((vec4( 1.0354971072183483e+01,  5.8097747460711062e+00, -5.4384621916749820e+00, 1.0) * dx
               + vec4( 5.6142422109185510e+00, -8.8882494643091425e-01, -1.7312002964872917e+00, 1.0)) * dx
               + vec4( 1.9562255868212013e+00,  5.4092663060751767e-01, -1.3302508172374183e+00, 1.0)) * dx
               + vec4( 1.1329523809523800e-01,  7.0150000000000001e-01,  6.8585714285714305e-01, 1.0);
    } else if (x < 5.0000000000000000e-01) {
        float dx = x - 4.8437500000000000e-01;
        return ((vec4(-1.3925172644537971e+01, -8.9021377300786071e+00, -4.6199177582688593e+00, 1.0) * dx
               + vec4( 6.0996314799271518e+00, -6.1649175520883115e-01, -1.9861282117220564e+00, 1.0)) * dx
               + vec4( 2.1392548632406654e+00,  5.1740605714439658e-01, -1.3883340751781894e+00, 1.0)) * dx
               + vec4( 1.4527142857142900e-01,  7.0975714285714298e-01,  6.6462857142857201e-01, 1.0);
    } else if (x < 5.1562500000000000e-01) {
        float dx = x - 5.0000000000000000e-01;
        return ((vec4( 3.1614367125520630e+01, -1.1395280968671647e+01,  2.1421523701702025e+01, 1.0) * dx
               + vec4( 5.4468890122144344e+00, -1.0337794613062659e+00, -2.2026868566409092e+00, 1.0)) * dx
               + vec4( 2.3196692459303776e+00,  4.9162056938634824e-01, -1.4537843106213608e+00, 1.0)) * dx
               + vec4( 1.8013333333333301e-01,  7.1765714285714299e-01,  6.4243333333333297e-01, 1.0);
    } else if (x < 5.3125000000000000e-01) {
        float dx = x - 5.1562500000000000e-01;
        return ((vec4(-3.7634010143333590e+01,  2.0544616050328934e+00,  1.3219372364175872e+00, 1.0) * dx
               + vec4( 6.9288124712232140e+00, -1.5679332567127493e+00, -1.1985529331236269e+00, 1.0)) * dx
               + vec4( 2.5130395816090907e+00,  4.5096880816730112e-01, -1.5069286823364316e+00, 1.0)) * dx
               + vec4( 2.1782857142857101e-01,  7.2504285714285699e-01,  6.1926190476190501e-01, 1.0);
    } else if (x < 5.4687500000000000e-01) {
        float dx = x - 5.3125000000000000e-01;
        return ((vec4( 1.2815768685879013e+01, -1.4298832118473902e+01,  3.9450879734146490e+01, 1.0) * dx
               + vec4( 5.1647182457544520e+00, -1.4716303689768324e+00, -1.1365871251665525e+00, 1.0)) * dx
               + vec4( 2.7020009990618670e+00,  4.0347562651590141e-01, -1.5434152457472157e+00, 1.0)) * dx
               + vec4( 2.5864285714285701e-01,  7.3171428571428598e-01,  5.9542857142857097e-01, 1.0);
    } else if (x < 5.6250000000000000e-01) {
        float dx = x - 5.4687500000000000e-01;
        return ((vec4(-7.8540912219456771e+01, -1.8509114083431125e+01,  3.3113477160250433e+01, 1.0) * dx
               + vec4( 5.7654574029050307e+00, -2.1418881245302965e+00,  7.1267286237156402e-01, 1.0)) * dx
               + vec4( 2.8727849935721714e+00,  3.4701440005485251e-01, -1.5500389061033872e+00, 1.0)) * dx
               + vec4( 3.0217142857142898e-01,  7.3760476190476199e-01,  5.7118571428571396e-01, 1.0);
    } else if (x < 5.7812500000000000e-01) {
        float dx = x - 5.6250000000000000e-01;
        return ((vec4(-5.8163891236508938e+01,  9.6920884524980497e+00,  3.0320583052976861e+01, 1.0) * dx
               + vec4( 2.0838521426179946e+00, -3.0095028471911305e+00,  2.2648671042583031e+00, 1.0)) * dx
               + vec4( 2.9954304552209687e+00,  2.6652391612170523e-01, -1.5035148441247956e+00, 1.0)) * dx
               + vec4( 3.4816666666666701e-01,  7.4243333333333295e-01,  5.4726666666666701e-01, 1.0);
    } else if (x < 5.9375000000000000e-01) {
        float dx = x - 5.7812500000000000e-01;
        return ((vec4(-6.4543256167712116e+01, -2.8636353652780144e-01,  2.8905906284068501e+00, 1.0) * dx
               + vec4(-6.4258025909336181e-01, -2.5551862009802844e+00,  3.6861444348665935e+00, 1.0)) * dx
               + vec4( 3.0179503284010409e+00,  1.7957564974402687e-01, -1.4105302888259692e+00,
 1.0)) * dx
               + vec4( 3.9525714285714297e-01,  7.4590000000000001e-01,  5.2444285714285699e-01, 1.0);
    } else if (x < 6.0937500000000000e-01) {
        float dx = x - 5.9375000000000000e-01;
        return ((vec4(-2.4450284092939786e+01,  1.3922851408411924e+01, -1.6916850328844372e+01, 1.0) * dx
               + vec4(-3.6680453919548675e+00, -2.5686094917550251e+00,  3.8216408705731646e+00, 1.0)) * dx
               + vec4( 2.9505968026034126e+00,  9.9516342045037676e-02, -1.2932211434284731e+00, 1.0)) * dx
               + vec4( 4.4200952380952402e-01,  7.4808095238095196e-01,  5.0331428571428605e-01, 1.0);
    } else if (x < 6.2500000000000000e-01) {
        float dx = x - 6.0937500000000000e-01;
        return ((vec4( 1.2547821111311350e+01,  1.5748329330961459e+01, -1.7611303598786566e+01, 1.0) * dx
               + vec4(-4.8141524588114200e+00, -1.9159758319857161e+00,  3.0286635114085847e+00, 1.0)) * dx
               + vec4( 2.8180624611851890e+00,  2.9444696361588602e-02, -1.1861851374600081e+00, 1.0)) * dx
               + vec4( 4.8712380952380901e-01,  7.4906190476190504e-01,  4.8397619047619100e-01, 1.0);
    } else if (x < 6.4062500000000000e-01) {
        float dx = x - 6.2500000000000000e-01;
        return ((vec4( 9.2115329809656430e+00, -3.2661877796437579e+00, -1.2675733711774058e+00, 1.0) * dx
               + vec4(-4.2259733442187004e+00, -1.1777728945968977e+00,  2.2031336552154643e+00, 1.0)) * dx
               + vec4( 2.6768104955128438e+00, -1.8895127491264742e-02, -1.1044383067315073e+00, 1.0)) * dx
               + vec4( 5.3002857142857096e-01,  7.4911428571428595e-01,  4.6611428571428598e-01, 1.0);
    } else if (x < 6.5625000000000000e-01) {
        float dx = x - 6.4062500000000000e-01;
        return ((vec4( 1.4269589821681299e+01,  7.3028598827757278e+00, -8.5260219639800940e+00, 1.0) * dx
               + vec4(-3.7941827357359359e+00, -1.3308754467676989e+00,  2.1437161534415234e+00, 1.0)) * dx
               + vec4( 2.5514955567635522e+00, -5.8092757825086563e-02, -1.0365187784712420e+00, 1.0)) * dx
               + vec4( 5.7085714285714295e-01,  7.4851904761904797e-01,  4.4939047619047601e-01, 1.0);
    } else if (x < 6.7187500000000000e-01) {
        float dx = x - 6.5625000000000000e-01;
        return ((vec4( 8.6083934467238432e+00,  2.6914824850885094e-01, -1.7057138772896455e+01, 1.0) * dx
               + vec4(-3.1252957128446250e+00, -9.8855388976258662e-01,  1.7440588738799565e+00, 1.0)) * dx
               + vec4( 2.4433787060044811e+00, -9.4333841208372265e-02, -9.7577229366934382e-01, 1.0)) * dx
               + vec4( 6.0985238095238103e-01,  7.4731428571428604e-01,  4.3368571428571401e-01, 1.0);
    } else if (x < 6.8750000000000000e-01) {
        float dx = x - 6.7187500000000000e-01;
        return ((vec4( 8.7188554392023345e+00,  1.7834947123447904e+01, -1.8886229447019101e+00, 1.0) * dx
               + vec4(-2.7217772700294449e+00, -9.7593756561373424e-01,  9.4450549390043514e-01, 1.0)) * dx
               + vec4( 2.3520181906470738e+00, -1.2502902019862727e-01, -9.3376347542277516e-01, 1.0)) * dx
               + vec4( 6.4729999999999999e-01,  7.4560000000000004e-01,  4.1880000000000001e-01, 1.0);
    } else if (x < 7.0312500000000000e-01) {
        float dx = x - 6.8750000000000000e-01;
        return ((vec4( 8.9449847961700044e+00, -2.1676746266635202e+01, -4.0993789718798466e+00, 1.0) * dx
               + vec4(-2.3130809213168355e+00, -1.3992441920211368e-01,  8.5597629336753311e-01, 1.0)) * dx
               + vec4( 2.2733485314072883e+00, -1.4246436371137491e-01, -9.0563094749671313e-01, 1.0)) * dx
               + vec4( 6.8341904761904804e-01,  7.4347619047619096e-01,  4.0443333333333298e-01, 1.0);
    } else if (x < 7.1875000000000000e-01) {
        float dx = x - 7.0312500000000000e-01;
        return ((vec4( 1.1674919661892304e+01,  2.3933066515154213e+01, -1.1673175453308831e+01, 1.0) * dx
               + vec4(-1.8937847589963666e+00, -1.1560219004506387e+00,  6.6381790406066532e-01, 1.0)) * dx
               + vec4( 2.2076162551523946e+00, -1.6271352495594915e-01, -8.8188416316189755e-01, 1.0)) * dx
               + vec4( 7.1840952380952405e-01,  7.4113333333333298e-01,  3.9047619047618998e-01, 1.0);
    } else if (x < 7.3437500000000000e-01) {
        float dx = x - 7.1875000000000000e-01;
        return ((vec4(-4.4641682053710623e+00,  2.0910706819426692e+00,  4.6048045942407727e+00, 1.0) * dx
               + vec4(-1.3465228998451648e+00, -3.4159407552784897e-02,  1.1663780468681384e-01, 1.0)) * dx
               + vec4( 2.1569864479829954e+00, -1.8131010789350266e-01, -8.6968954271271826e-01, 1.0)) * dx
               + vec4( 7.5248571428571398e-01,  7.3839999999999995e-01,  3.7681428571428599e-01, 1.0);
    } else if (x < 7.5000000000000000e-01) {
        float dx = x - 7.3437500000000000e-01;
        return ((vec4( 1.2423276968973711e+01, -6.0829492432479162e+00, -2.1725700066572116e+01, 1.0) * dx
               + vec4(-1.5557807844719334e+00,  6.3859530663277708e-02,  3.3248802004185007e-01, 1.0)) * dx
               + vec4( 2.1116379529155407e+00, -1.8084604346990121e-01, -8.6267195170133282e-01, 1.0)) * dx
               + vec4( 7.8584285714285695e-01,  7.3556666666666704e-01,  3.6327142857142902e-01, 1.0);
    } else if (x < 7.6562500000000000e-01) {
        float dx = x - 7.5000000000000000e-01;
        return ((vec4( 3.4549460436900552e+00,  2.2240726291601970e+01, -7.5799471847609725e+00, 1.0) * dx
               + vec4(-9.7343967655129060e-01, -2.2127871511396835e-01, -6.8590417057871789e-01, 1.0)) * dx
               + vec4( 2.0721188832120530e+00, -1.8330571822694325e-01, -8.6819407905347146e-01, 1.0)) * dx
               + vec4( 8.1850476190476196e-01,  7.3273333333333301e-01,  3.4979047619047599e-01, 1.0);
    } else if (x < 7.8125000000000000e-01) {
        float dx = x - 7.6562500000000000e-01;
        return ((vec4( 8.7094721894791203e+00,  1.3239510743088688e+01, -2.2852796908624047e+01, 1.0) * dx
               + vec4(-8.1148908075331927e-01,  8.2125532980487381e-01, -1.0412141948643885e+00, 1.0)) * dx
               + vec4( 2.0442293713791684e+00, -1.7393108362239784e-01, -8.9518030351351996e-01, 1.0)) * dx
               + vec4( 8.5065714285714300e-01,  7.2989999999999999e-01,  3.3602857142857101e-01, 1.0);
    } else if (x < 7.9687500000000000e-01) {
        float dx = x - 7.8125000000000000e-01;
        return ((vec4(-1.2078434801289291e+01,  4.3390183117236198e+01, -3.9570693752303733e+01, 1.0) * dx
               + vec4(-4.0323257187148548e-01,  1.4418573958871561e+00, -2.1124390499561407e+00, 1.0)) * dx
               + vec4( 2.0252493455569058e+00, -1.3856994728345987e-01, -9.4445613546384066e-01, 1.0)) * dx
               + vec4( 8.8243333333333296e-01,  7.2743333333333304e-01,  3.2169999999999999e-01, 1.0);
    } else if (x < 8.1250000000000000e-01) {
        float dx = x - 7.9687500000000000e-01;
        return ((vec4(-1.2824532984374384e+01,  1.1653781393088177e+02, -1.1096774236821523e+02, 1.0) * dx
               + vec4(-9.6940920318192092e-01,  3.4757722295076028e+00, -3.9673153195953783e+00, 1.0)) * dx
               + vec4( 2.0038018178216963e+00, -6.1731984386666772e-02, -1.0394522974880831e+00, 1.0)) * dx
               + vec4( 9.1393333333333304e-01,  7.2578571428571403e-01,  3.0627619047619098e-01, 1.0);
    } else if (x < 8.2812500000000000e-01) {
        float dx = x - 8.1250000000000000e-01;
        return ((vec4(-3.5855044278532131e+02,  2.7064903734930277e+02, -8.0792089155266083e+01, 1.0) * dx
               + vec4(-1.5705591868244702e+00,  8.9384822575176859e+00, -9.1689282431054675e+00, 1.0)) * dx
               + vec4( 1.9641148117278464e+00,  1.3224074197310332e-01, -1.2447061031552840e+00, 1.0)) * dx
               + vec4( 9.4495714285714305e-01,  7.2611428571428605e-01,  2.8864285714285698e-01, 1.0);
    } else if (x < 8.4375000000000000e-01) {
        float dx = x - 8.2812500000000000e-01;
        return ((vec4(-3.8174017206443654e+02, -1.9549693475620506e+02,  4.4911575613188438e+02, 1.0) * dx
               + vec4(-1.8377611192386407e+01,  2.1625155883266252e+01, -1.2956057422258565e+01, 1.0)) * dx
               + vec4( 1.6524246495526764e+00,  6.0979758792285232e-01, -1.5904090041765968e+00, 1.0)) * dx
               + vec4( 9.7389523809523804e-01,  7.3139523809523799e-01,  2.6664761904761902e-01, 1.0);
    } else if (x < 8.5937500000000000e-01) {
        float dx = x - 8.4375000000000000e-01;
        return ((vec4( 4.3248438818547703e+02, -2.7134838403902307e+02,  3.3204036056432756e+01, 1.0) * dx
               + vec4(-3.6271681757906869e+01,  1.2461237066569140e+01,  8.0962436464235150e+00, 1.0)) * dx
               + vec4( 7.9852944720434427e-01,  1.1423974777640304e+00, -1.6663435944240195e+00, 1.0)) * dx
               + vec4( 9.9377142857142897e-01,  7.4545714285714304e-01,  2.4034761904761900e-01, 1.0);
    } else if (x < 8.7500000000000000e-01) {
        float dx = x - 8.5937500000000000e-01;
        return ((vec4( 1.7847934313241271e+02, -6.1117386114828536e+00, -1.0882439559595376e+02, 1.0) * dx
               + vec4(-1.5998976061712632e+01, -2.5821843526006538e-01,  9.6526828365688004e+00, 1.0)) * dx
               + vec4(-1.8199581227210410e-02,  1.3330696438782346e+00, -1.3890166181272647e+00, 1.0)) * dx
               + vec4( 9.9904285714285701e-01,  7.6531428571428595e-01,  2.1641428571428600e-01, 1.0);
    } else if (x < 8.9062500000000000e-01) {
        float dx = x - 8.7500000000000000e-01;
        return ((vec4( 1.0065469642774150e+02,  1.1181852770679304e+01, -4.2302948910418884e+01, 1.0) * dx
               + vec4(-7.6327568523807861e+00, -5.4470618267332416e-01,  4.5515392930084682e+00, 1.0)) * dx
               + vec4(-3.8744540800992006e-01,  1.3205239467230254e+00, -1.1670756473526198e+00, 1.0)) * dx
               + vec4( 9.9553333333333305e-01,  7.8605714285714301e-01,  1.9665238095238100e-01, 1.0);
    } else if (x < 9.0625000000000000e-01) {
        float dx = x - 8.9062500000000000e-01;
        return ((vec4( 5.1792385442186948e+01,  1.3813127528788970e+01, -4.7771351619749993e+01, 1.0) * dx
               + vec4(-2.9145679573304033e+00, -2.0556834047731776e-02,  2.5685885628325829e+00, 1.0)) * dx
               + vec4(-5.5224735816165738e-01,  1.3116917120867588e+00, -1.0558236496051034e+00, 1.0)) * dx
               + vec4( 9.8799999999999999e-01,  8.0659999999999998e-01,  1.7936666666666701e-01, 1.0);
    } else if (x < 9.2187500000000000e-01) {
        float dx = x - 9.0625000000000000e-01;
        return ((vec4( 1.1035785704157649e+02,  5.2154589495154021e+01, -3.9990387467675163e+01, 1.0) * dx
               + vec4(-4.8679988972789023e-01,  6.2693351886425119e-01,  3.2930645565680206e-01, 1.0)) * dx
               + vec4(-6.0539373077194325e-01,  1.3211663477870170e+00, -1.0105440399412067e+00, 1.0)) * dx
               + vec4( 9.7885714285714298e-01,  8.2714285714285696e-01,  1.6331428571428599e-01, 1.0);
    } else if (x < 9.3750000000000000e-01) {
        float dx = x - 9.2187500000000000e-01;
        return ((vec4( 4.6043843534396274e+01,  2.0987943062129727e+01, -2.3203479461840441e+01, 1.0) * dx
               + vec4( 4.6862246590960082e+00,  3.0716799014495959e+00, -1.5452429568904713e+00, 1.0)) * dx
               + vec4(-5.3977771875056635e-01,  1.3789571824794209e+00, -1.0295430477729828e+00, 1.0)) * dx
               + vec4( 9.6970000000000001e-01,  8.4813809523809502e-01,  1.4745238095238100e-01, 1.0);
    } else if (x < 9.5312500000000000e-01) {
        float dx = x - 9.3750000000000000e-01;
        return ((vec4( 6.1233625963980650e+01,  2.8669866827404956e+01,  2.4201791029260814e+01, 1.0) * dx
               + vec4( 6.8445298247708335e+00,  4.0554897324869268e+00, -2.6329060566642419e+00, 1.0)) * dx
               + vec4(-3.5960967994014698e-01,  1.4903192080096790e+00, -1.0948266261097752e+00, 1.0)) * dx
               + vec4( 9.6258571428571404e-01,  8.7051428571428602e-01,  1.3089999999999999e-01, 1.0);
    } else if (x < 9.6875000000000000e-01) {
        float dx = x - 9.5312500000000000e-01;
        return ((vec4( 4.1070719275903762e+01,  5.3910277236601019e+00,  2.0019172487757277e+01, 1.0) * dx
               + vec4( 9.7148560418324266e+00
,  5.3993897400215340e+00, -1.4984471021676413e+00, 1.0)) * dx
               + vec4(-1.0086927577447102e-01,  1.6380516997676238e+00, -1.1593790192165234e+00, 1.0)) * dx
               + vec4( 9.5887142857142904e-01,  8.9490000000000003e-01,  1.1324285714285701e-01, 1.0);
    } else if (x < 9.8437500000000000e-01) {
        float dx = x - 9.6875000000000000e-01;
        return ((vec4(-5.3250445924665847e+01, -1.6529749150400146e+01, -1.4422423336140781e+02, 1.0) * dx
               + vec4( 1.1640046007890415e+01,  5.6520941645681013e+00, -5.6004839180401900e-01, 1.0)) * dx
               + vec4( 2.3280106875244833e-01,  1.8107311357768368e+00, -1.1915430113098306e+00, 1.0)) * dx
               + vec4( 9.5982380952380997e-01,  9.2183333333333295e-01,  9.4838095238095305e-02, 1.0);
    } else if (x < 1.0000000000000000e+00) {
        float dx = x - 9.8437500000000000e-01;
        return ((vec4(-1.9507053557699635e+02, -1.0404825969371934e+02,  1.5617193238656020e+02, 1.0) * dx
               + vec4( 9.1439313551717039e+00,  4.8772621731430945e+00, -7.3205593306200099e+00, 1.0)) * dx
               + vec4( 5.5755071505029385e-01,  1.9752523285535741e+00, -1.3146775069727061e+00, 1.0)) * dx
               + vec4( 9.6609999999999996e-01,  9.5144285714285703e-01,  7.5533333333333300e-02, 1.0);
    } else {
        float dx = x - 1.0000000000000000e+00;
        return ((vec4( 0.0000000000000000e+00,  3.4202936336155174e+00,  3.0625241907655076e+00, 1.0) * dx
               + vec4( 0.0000000000000000e+00,  0.0000000000000000e+00,  0.0000000000000000e+00, 1.0)) * dx
               + vec4( 0.0000000000000000e+00,  0.0000000000000000e+00,  0.0000000000000000e+00, 1.0)) * dx
               + vec4( 9.7629999999999995e-01,  9.8309999999999997e-01,  5.3800000000000001e-02, 1.0);
    }
}

float colormap_f1(int formula, float x) {
    float DEG2RAD = 3.1415926535897932384 / 180.0;
    if (formula < 0) {
        x = 1.0 - x;
        formula = -formula;
    }
    float d = 0.0;
    if (formula == 0) {
        return 0.0;
    } else if (formula == 1) {
        return 0.5;
    } else if (formula == 2) {
        return 1.0;
    } else if (formula == 3) {
        d = x;
    } else if (formula == 4) {
        d = x * x;
    } else if (formula == 5) {
        d = x * x * x;
    } else if (formula == 6) {
        d = x * x * x * x;
    } else if (formula == 7) {
        d = sqrt(x);
    } else if (formula == 8) {
        d = sqrt(sqrt(x));
    } else if (formula == 9) {
        d = sin(90.0 * x * DEG2RAD);
    } else if (formula == 10) {
        d = cos(90.0 * x * DEG2RAD);
    } else if (formula == 11) {
        d = abs(x - 0.5);
    } else if (formula == 12) {
        d = (2.0 * x - 1.0) * (2.0 * x - 1.0);
    } else if (formula == 13) {
        d = sin(180.0 * x * DEG2RAD);
    } else if (formula == 14) {
        d = abs(cos(180.0 * x * DEG2RAD));
    } else if (formula == 15) {
        d = sin(360.0 * x * DEG2RAD);
    } else if (formula == 16) {
        d = cos(360.0 * x * DEG2RAD);
    } else if (formula == 17) {
        d = abs(sin(360.0 * x * DEG2RAD));
    } else if (formula == 18) {
        d = abs(cos(360.0e0 * x * DEG2RAD));
    } else if (formula == 19) {
        d = abs(sin(720.0e0 * x * DEG2RAD));
    } else if (formula == 20) {
        d = abs(cos(720.0e0 * x * DEG2RAD));
    } else if (formula == 21) {
        d = 3.0e0 * x;
    } else if (formula == 22) {
        d = 3.0e0 * x - 1.0e0;
    } else if (formula == 23) {
        d = 3.0e0 * x - 2.0e0;
    } else if (formula == 24) {
        d = abs(3.0e0 * x - 1.0e0);
    } else if (formula == 25) {
        d = abs(3.0e0 * x - 2.0e0);
    } else if (formula == 26) {
        d = 1.5e0 * x - 0.5e0;
    } else if (formula == 27) {
        d = 1.5e0 * x - 1.0e0;
    } else if (formula == 28) {
        d = abs(1.5e0 * x - 0.5e0);
    } else if (formula == 29) {
        d = abs(1.5e0 * x - 1.0e0);
    } else if (formula == 30) {
        if (x <= 0.25e0) {
            return 0.0;
        } else if (x >= 0.57) {
            return 1.0;
        } else {
            d = x / 0.32 - 0.78125;
        }
    } else if (formula == 31) {
        if (x <= 0.42) {
            return 0.0;
        } else if (x >= 0.92) {
            return d = 1.0;
        } else {
            d = 2.0 * x - 0.84;
        }
    } else if (formula == 32) {
        if (x <= 0.42) {
            d = x * 4.0;
        } else {
            if (x <= 0.92e0) {
                d = -2.0 * x + 1.84;
            } else {
                d = x / 0.08 - 11.5;
            }
        }
    } else if (formula == 33) {
        d = abs(2.0 * x - 0.5);
    } else if (formula == 34) {
        d = 2.0 * x;
    } else if (formula == 35) {
        d = 2.0 * x - 0.5;
    } else if (formula == 36) {
        d = 2.0 * x - 1.0;
    }
    if (d <= 0.0) {
        return 0.0;
    } else if (d >= 1.0) {
        return 1.0;
    } else {
        return d;
    }
}

vec4 colormap_gnu_plot(float x, int red_type, int green_type, int blue_type) {
    return vec4(colormap_f1(red_type, x), colormap_f1(green_type, x), colormap_f1(blue_type, x), 1.0);
}

float colormap_red(float x) {
    if (x < 0.7) {
        return 4.0 * x - 1.5;
    } else {
        return -4.0 * x + 4.5;
    }
}

float colormap_green(float x) {
    if (x < 0.5) {
        return 4.0 * x - 0.5;
    } else {
        return -4.0 * x + 3.5;
    }
}

float colormap_blue(float x) {
    if (x < 0.3) {
       return 4.0 * x + 0.5;
    } else {
       return -4.0 * x + 2.5;
    }
}

vec4 colormap_jet(float x) {
    float r = clamp(colormap_red(x), 0.0, 1.0);
    float g = clamp(colormap_green(x), 0.0, 1.0);
    float b = clamp(colormap_blue(x), 0.0, 1.0);
    return vec4(r, g, b, 1.0);
}

***
QOpenGLShader::compile(Vertex): ERROR: 3:14: 'assign' : implicit conversion between types not allowed in ES 2.0 
ERROR: 3:14: 'assign' : implicit conversion between types not allowed in ES 2.0 
ERROR: 3:14: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'const int' and a right operand of type 'highp float' (or there is no acceptable conversion)
ERROR: 3:14: 'assign' : implicit conversion between types not allowed in ES 2.0 
ERROR: 3:14: 'assign' : implicit conversion between types not allowed in ES 2.0 
ERROR: 3:14: '/' : wrong operand types no operation '/' exists that takes a left-hand operand of type 'const int' and a right operand of type 'uniform highp float' (or there is no acceptable conversion)
ERROR: 3:14: 'assign' : implicit conversion between types not allowed in ES 2.0 
ERROR: 3:14: '=' :  cannot convert from 'const int' to 'highp float'


*** Problematic Vertex shader source code ***
#version 110
#define lowp
#define mediump
#define highp
#line 1
attribute vec2 a_position;

uniform vec3 u_color;
varying vec3 v_color;

uniform vec2 u_pan;
uniform vec2 u_scale;
uniform vec2 u_magnify;

uniform float u_time;
uniform float u_windowSize;

void main() {
    float scrollBarPos = 2 * mod(u_time,u_windowSize)/u_windowSize - 1; // From -1 to 1

    vec2 pos = a_position;
    pos.x = scrollBarPos;
    pos.x = u_scale.x * (u_magnify.x * pos.x + u_pan.x);
    gl_Position = vec4(pos, 0.0, 1.0);
    v_color = u_color;
}

***
QOpenGLShaderProgram::uniformLocation(u_pan): shader program is not linked
QOpenGLShaderProgram::uniformLocation(u_scale): shader program is not linked
QOpenGLShaderProgram::uniformLocation(u_magnify): shader program is not linked
QOpenGLShaderProgram::uniformLocation(u_color): shader program is not linked
QOpenGLShaderProgram::uniformLocation(u_windowSize): shader program is not linked
QOpenGLShaderProgram::uniformLocation(u_time): shader program is not linked
QOpenGLShader::compile(Vertex): ERROR: 3:14: 'assign' : implicit conversion between types not allowed in ES 2.0 
ERROR: 3:14: 'assign' : implicit conversion between types not allowed in ES 2.0 
ERROR: 3:14: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'const int' and a right operand of type 'highp float' (or there is no acceptable conversion)
ERROR: 3:14: 'assign' : implicit conversion between types not allowed in ES 2.0 
ERROR: 3:14: 'assign' : implicit conversion between types not allowed in ES 2.0 
ERROR: 3:14: '/' : wrong operand types no operation '/' exists that takes a left-hand operand of type 'const int' and a right operand of type 'uniform highp float' (or there is no acceptable conversion)
ERROR: 3:14: 'assign' : implicit conversion between types not allowed in ES 2.0 
ERROR: 3:14: '=' :  cannot convert from 'const int' to 'highp float'


*** Problematic Vertex shader source code ***
#version 110
#define lowp
#define mediump
#define highp
#line 1
attribute vec2 a_position;

uniform vec3 u_color;
varying vec3 v_color;

uniform vec2 u_pan;
uniform vec2 u_scale;
uniform vec2 u_magnify;

uniform float u_time;
uniform float u_windowSize;

void main() {
    float scrollBarPos = 2 * mod(u_time,u_windowSize)/u_windowSize - 1; // From -1 to 1

    vec2 pos = a_position;
    pos.x = scrollBarPos;
    pos.x = u_scale.x * (u_magnify.x * pos.x + u_pan.x);
    gl_Position = vec4(pos, 0.0, 1.0);
    v_color = u_color;
}

Embedded python issues

Hello all,

I would like to modify the QT software, but I've been struggling to build it due to issues with the files with embedded python. I switched all the directories in the .pro file to my own, shown below, and I don't get any errors that the header cannot be found, but none of the python included function references are said to be defined. I know in 3.8 that I have to specify to GCC that I want to use the embedded config of python, but that doesn't seem to be a thing in 3.7. Any ideas on what's happening?

Below is my project file:

Thanks,
Ian

QT += qml quick widgets
CONFIG += c++11

QT += 3dcore

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Refer to the documentation for the
# deprecated API to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

#DEFINES += DEBUG
#DEFINES += USE_USB
DEFINES += USE_PYTHON

# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
        backend.cpp \
        behaviorcam.cpp \
        behaviortracker.cpp \
        behaviortrackerworker.cpp \
        controlpanel.cpp \
        datasaver.cpp \
        main.cpp \
        miniscope.cpp \
        newquickview.cpp \
        tracedisplay.cpp \
        videodevice.cpp \
        videodisplay.cpp \
        videostreamocv.cpp

RESOURCES += qml.qrc

# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =

# Additional import path used to resolve QML modules just for Qt Quick Designer
QML_DESIGNER_IMPORT_PATH =

# Add Icon
RC_ICONS = miniscope_icon.ico

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

HEADERS += \
    backend.h \
    behaviorcam.h \
    behaviortracker.h \
    behaviortrackerworker.h \
    controlpanel.h \
    datasaver.h \
    miniscope.h \
    newquickview.h \
    tracedisplay.h \
    videodevice.h \
    videodisplay.h \
    videostreamocv.h

DISTFILES += \
    ../Python/DLCwrapper.py \
    ../Scripts/DLCwrapper.py \
    ../deviceConfigs/behaviorCams.json \
    ../deviceConfigs/miniscopes.json \
    ../deviceConfigs/userConfigProps.json \
    ../deviceConfigs/videoDevices.json

win32 {
    # Path to your openCV .lib file(s) TODO
    #LIBS += -LC:/opencv-4.4.0/build/lib/Release -lopencv_world440
    LIBS += -LC:/opencv/build/x64/vc15/lib -lopencv_world453

#    LIBS += -LC:/opencv-4.4.0/build/lib/Debug -lopencv_world440d

    # Path to openCV header files TODO
    INCLUDEPATH += C:/opencv/build/include

    # Do we need DEPENDPATH ????
#    #DEPENDPATH +=

    # For libusb
#    LIBS += -LC:/libusb-1.0.24/VS2017/MS64/dll/ -llibusb-1.0
#    INCLUDEPATH += C:/libusb-1.0.24/include/libusb-1.0

#    LIBS += -LC:/libusb-1.0.23/MS64/dll/ -llibusb-1.0
#    INCLUDEPATH += C:/libusb-1.0.23/include/libusb-1.0

    # For Python TODO
    INCLUDEPATH += C:/Users/ianjones/Anaconda3/envs/py3.7/include
#    LIBS += -LC:/Python38/libs -lpython38 TODO possibly done

    #INCLUDEPATH += C:/Users/dbaha/.conda/envs/basepy37/include
    # LIBS += -LC:/Users/dbaha/.conda/envs/basepy37/libs -lpython37 TODO
    LIBS += -LC:/Users/ianjones/Anaconda3/envs/py3.7/libs -lpython37

    # For numpy TODO
    #INCLUDEPATH += C:/Users/dbaha/.conda/envs/basepy37/Lib/site-packages/numpy/core/include
    INCLUDEPATH += C:/Users/ianjones/Anaconda3/envs/py3.7/Lib/site-packages/numpy/core/include

} else {
    CONFIG += link_pkgconfig
    PKGCONFIG += opencv4
}

# Move user and device configs to build directory
copydata.commands = $(COPY_DIR) \"$$shell_path($$PWD\\..\\deviceConfigs)\" \"$$shell_path($$OUT_PWD\\release\\deviceConfigs)\"
copydata2.commands = $(COPY_DIR) \"$$shell_path($$PWD\\..\\userConfigs)\" \"$$shell_path($$OUT_PWD\\release\\userConfigs)\"
copydata3.commands = $(COPY_DIR) \"$$shell_path($$PWD\\..\\Scripts)\" \"$$shell_path($$OUT_PWD\\release\\Scripts)\"
first.depends = $(first) copydata copydata2 copydata3
export(first.depends)
export(copydata.commands)
export(copydata2.commands)
export(copydata3.commands)

QMAKE_EXTRA_TARGETS += first copydata copydata2 copydata3

Errors reading json metaData files in Python Pandas

I am attempting to convert the json files to dataframes in Python using Pandas in order to read them into my databases as tables.
For pandas to read the json as a table it must be formatted with "[ ]" around the items so as to be read as a list.
Example:

{
    "compression": ["GREY"],
    "deviceDirectory": ["/home/m3coordinator/Videos/Dr_Miniscope/Codec_Tests/testGREY/2020_07_14/14_57_38/Miniscope"],
    "deviceID": [2],
    "deviceName": ["Miniscope"],
    "deviceType": ["Miniscope_V3"],
    "frameRate": ["30FPS"],
    "framesPerFile": [1000],
    "gain": ["Low"],
    "led0": [30]
}

Is it possible to have the json files write out like this by default, or is there another reason to not include the "[ ]"?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.