Comments (14)
thanks for looking at this!! I was setting it to 0<value<1 in the param file and it wasn't erroring, but it would automatically have it as 1 on the slider when I started up the program.
from miniscope-daq-qt-software.
Also you tagged the wrong account above, I was later to the game and had to put the 28 onto hsw :(
from miniscope-daq-qt-software.
Whats up @hsw28! Been a while :). At the end of the long Rube Goldberg machine, there is a digital potentiometer which controls the current passing though the LED to determine its brightness. This has 256 taps and therefore there are 256 discrete current/brightness levels. I'm not sure how the 1-100 setting on the QT software is transformed into these 256 levels. I would assume via some reasonable rounding that probably maps 1 -> lowest current step. On the bonsai package, they are brought out directly and so you have access to all of them, in case this is helpful.
[Range(0, 255)]
[Editor(DesignTypes.SliderEditor, typeof(UITypeEditor))]
[Description("LED brightness.")]
public double LEDBrightness { get; set; } = 0;
Edit: I have not verified that the firmware running on the camera actually directly writes these values to the pot, but it would take work not to do that, so I assume it does.
from miniscope-daq-qt-software.
Alright, let's take this discussion offline for the time being as it is beginning to feel like this thread is becoming counter productive.
@sneakers-the-rat, @fnsangiul, @RaymondWJang, and I need to have a discussion in person and then we will respond.
Thanks for raising this issue @hsw28.
from miniscope-daq-qt-software.
Hey @jonnew :) ! Thanks for the info! Depending if they mapped 0 or 1 to 256 maybe I have a little wiggle room, if I can access the lower values.
Any chance you'll be at cosyne this year?
from miniscope-daq-qt-software.
Solution addressed here. None of the solutions explained above are correct for this issue.
from miniscope-daq-qt-software.
so I found where the display values are mapped to the I2C values here:
so for a value of 1, the value that gets written over I2C is
(1 * -2.55) + 255 = 252.45
so you actually do have a bit of headroom on the software side.
So unless we want to go with "you need to resolder a resistor onto your miniscope" as the accepted answer to this solution, this should stay open, since both fixing that and changing the exposure as suggested here are certainly preferable outcomes that should be added to docs. but whatever
from miniscope-daq-qt-software.
It depends on what the user needs. I personally would prefer a lower irradiance by limiting the current of the LED as it would reduce photobleaching over time. Also, the digital potentiometer (datasheet here) only takes integers.
from miniscope-daq-qt-software.
How exactly would lowering the brightness via hardware setting vs the software setting make a difference in photo bleaching?
Also isn't Jonny suggesting we could throttle it up to 255?
from miniscope-daq-qt-software.
You can't change the brightness of the LED via software. Please refer to the LED driver (LTC3218) datasheet:
My suggestion for lowering the LED intensity via hardware is based on this graph. The software option of reducing the exposure doesn't change the amount of irradiance that reaches the brain. It only captures less light in the image sensor. That's why the only sensible option to reduce photobleaching is to reduce the LED intensity.
from miniscope-daq-qt-software.
Presumably the firmware truncates the remainder on the float, thats the part of the code I dont rly get (and why it would be dope to have tests to validate). Still that means there are 2 more clicks to be had of lowered brightness that would be desirable to be able to test before resoldering the scope, since OP says they dont want to have to modify this for one animal. The luminance isnt decreased, but the PWM time is, right? Trying to stay responsive to the issue at hand, and OP hasnt specified a problem with bleaching (but I could be wrong?)
Since we are trying to EOL this software, I would suggest @hsw28 try bonsai as @jonnew suggests, which can write the values directly, and see if that is enough, then since presumably they know about photobleaching, try the gain thing, and then if that still isnt enough then resistor change.
Ideally we would have docs with a FAQ section that describes the tradeoffs @fnsangiul describes between lowering intensity, exposure, and resoldering the resistor as a last resort. Typically if the resolution to an issue is docs, you leave it open until the docs get written. In the meantime, these two issues are an imperfect replacement for that. (Idc really about the closedness of this issue, im just happy we are raising them instead of debugging individually over email lol)
from miniscope-daq-qt-software.
@sneakers-the-rat I don't know how to make more clear that dealing with the potentiometer won't enable an intensity lower than the minimum. You can try if you want but you won't get any useful result. The two possible solutions for this issue are
- Changing the Rset resistor to 100k based on the graph I posted above sourced directly from the LTC3218 datasheet
- Change the exposure time by setting it on the user configuration files of the Miniscope QT software.
Option one makes the overall Miniscope excitation dimmer, which is preferred if you want to minimize photobleaching at the expense of making the Miniscope not usable on dimmer mice. Option two doesn't change at all the excitation power of the Miniscope, it just makes it less efficient by lowering the exposure time of the image sensor. On my end I'll post solution two and close this issue.
from miniscope-daq-qt-software.
Oh, is the led brightness fixed at a hardware level? As in you can't change it once the Miniscope is deployed?
Nonetheless, I think Jonny's point then is that you could lower the exposure time into the pixels via software and thus keep them from saturating. Am I correct? @sneakers-the-rat
from miniscope-daq-qt-software.
Loud and clear on the fact that the LED has a fixed intensity, but the brightness setting does control PWM correct?
What im saying is that the "1" value does not translate to the minimum that the PWM controller can do - setting to 1 sends a value of 252, so the firmware can accept 253 and 254 before turning off at 255, but the software cant send those values because of how the 1-100 range is mapped to 0-255. Aka there is a software bug here orthogonal to the luminance of the LED.
Not sure where the tone is coming from, all im saying is that it would probably be good to try bonsai (which can set the minimum PWM value) and exposure settings first before resoldering the component, since the first two options might meet the needs here and allow the scope to be used with the other animals. I get what youre saying and am not even disagreeing that obvi changing the resistor would decrease intensity and is one way of addressing the issue.
from miniscope-daq-qt-software.
Related Issues (20)
- Gain isn't correctly initialized from config file HOT 3
- MiniLFOV not functional with current DAQ software HOT 1
- dlc-live error: "Cannot import './Scripts/DLCwrapper'..." HOT 1
- Issue compiling in windows HOT 1
- The .exe file can't be excused by python or other external programme? HOT 1
- Software synchronize with other DAQ HOT 3
- Add sync output support for minicams HOT 1
- Visual C++ errors on running HOT 2
- Autofocus & Timelapse
- Miniscope V4 data structure documentation?
- Reproducible/Cross-Platform Builds HOT 9
- Update to Qt6 HOT 1
- minicam with daq v3.3 HOT 4
- collapse/resize params drawer HOT 1
- Miniscope v3 - Cannot preview live images from webcam
- miniscope v4 software crash HOT 1
- TTL fails to trigger recording for Minicam HOT 8
- Miniscope cannot be recognized by our PC HOT 2
- Miniscope-Software abjust
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from miniscope-daq-qt-software.