Comments (9)
After some more thought, this is not so similar to the PR I linked above. They were concerned with tracking a filter placed in front of a photodetector, whereas here we are looking at illumination attached to a microscope. Here is my suggested approach:
- Create a
LightSource
device class. Its main responsibility is to report information on the current illumination source.- Should have a
describe()
method that returns a string describing the currently active light source(s) - Should have a
sigLightChanged
signal that is emitted when illumination changes. - Does not implement any actual light control; this will be handled by subclasses.
- Should have a
- Create an
LEDLightSource
class (subclass ofLightSource
)- Connects to a separate
DAQGeneric
device that controls the TTL lines connected to the LED(s). - Provides methods like
listLightSources()
andenableLightSource()
. - The list of available LEDs is provided by the user in the device configuration file
- Connects to a separate
- Provide a mechanism for "attaching" a light source to a
Microscope
device- Add a line to the
Microscope
device configuration that specifies whichLightSource
device it will use - Add a method to the
Microscope
class that provides access to the attachedLightSource
- Add a line to the
- When images are collected on a camera, they should include information about the light source
- The
Camera
device class in acq4/devices/Camera/Camera.py has agetScopeState
method that is used to provide metadata about the microscope it is connected to. - The same class has an
objectiveChanged
method that reacts when the microscope objective has changed and records the new state of the microscope. Use this as a template for collecting information about the light source as well.
- The
from acq4.
Hey Luke...Not sure if I should ask questions here, or in an email...but here they are:
In the LightSource device class, what should the describe() method return? What should the description look like? An indication of what channels are hooked up? What each channel connects to? The current ON/OFF status?
In the LEDLightSource class:
What should the listLightSources() return? What is the difference between this and the LightSource.describe() method?
Is the enableLightSource() a method to connect to the NI DAQ board? Or should that be used for the actual on/off controls?
Should the list of available LED's just indicate the DAQ channel? Or do they have names beyond that..."LED Alpha", for example?
from acq4.
Let's say we have 3 lamps. The configuration for this might include a DAQGeneric
device that defines the DIO ports used to control the LEDs and a LEDLightSource
device that defines the properties of the lamps and provides a nice interface for the microscope to control / interrogate the lamps:
LEDChannels:
driver: 'DAQGeneric'
channels:
M490L4:
device: 'DAQ'
channel: '/Dev1/line0'
type: 'do'
M530L4:
device: 'DAQ'
channel: '/Dev1/line2'
type: 'do'
IR1:
device: 'DAQ'
channel: '/Dev1/line3'
type: 'do'
LEDs:
driver: 'LEDLightSource'
leds:
blue:
channel: 'LEDChannels', 'M490L4'
model: 'Thorlabs M490L4'
wavelength: 490*nm
power: 50*mW
green:
channel: 'LEDChannels', 'M530L4'
model: 'Thorlabs M530L4'
wavelength: 530*nm
infrared:
channel: 'LEDChannels', 'IR1'
wavelength: 850*nm
Microscope:
driver: 'Microscope'
lightSources: ['LEDs']
I imagine LightSource.describe()
returning something like a list of dicts, where each dict contains information about an LED that is illuminated:
[
{'name': 'blue', 'model': 'Thorlabs M490L4', 'wavelength': 490e-9, 'power': 50e-3}
{'name': 'infrared', 'wavelength': 850e-9}
]
We could also have a describeAll()
method that returns this information for all lamps, regardless of their state. The sigLightChanged
signal could then send two values--the name of the lamp and a boolean value giving its current state like ('blue', True)
. The output of describe()
should end up written in the image file metadata exactly as the objective lens is currently recorded.
from acq4.
Luke...thanks for the clarification/direction. I should have something ready for you to look at in the next couple of days.
Dave
from acq4.
Hey Luke...
Another question, about the last item on the list up above: When it comes to using the "objectiveChanged" method in the Camera class as a template, do I want have an "IlluminationChanged" method separately? Or should I add the grabbing of the illumination state into the ObjectiveChanged method? Meaning, do you want to be alerted every time the illumination changes, or only get the illumination state when something else happens?
I think this is the last portion of this to get sorted out. What is the best way for me to do some testing of this stuff....because I'm certain there's going to be a fair amount of debugging/troubleshooting that will need to happen before its working correctly. Are you around next week? Are you going to SfN?
from acq4.
I suggest having separate objectiveChanged
and illuminationChanged
methods, and we definitely need the latter method to be called every time there is a change in illumination state.
We can probably test this entirely at your desktop. There are fake camera and DAQ classes (check acq4/config/example/devices.cfg to see how to configure these). I think that will be enough?
from acq4.
Sounds good. Thanks for the assistance. I may come grab you sometime on Monday to help things started up on my desktop so I can do the troubleshooting here.
from acq4.
Hey Luke...sorry for the delay in getting back to you, but I got side-tracked on some other things. So I tried doing the "mock" settings in the devices.cfg to do the testing at my desktop, but I'm not sure if I've got things set up correctly. Any chance of you looking at it either this afternoon or tomorrow? Thanks...
from acq4.
from acq4.
Related Issues (19)
- Record target positions, surface depth in multipatch module HOT 1
- Record image transform for every frame in a recording.
- Allow saving MosaicEditor state to file HOT 1
- Camera module z-stack does not work with cameras HOT 1
- Locking manipulator from multipatch module should disable rotary controller
- Resetting stage coordinate system causes pipette calibrations to become invalid
- MosaicEditor image features
- Make manipulator search configuration more intuitive
- LED control on XKey Pad
- Add reseal button to multipatch module HOT 1
- Module for assessing connectivity in multipatch experiments
- LIMS upload for multipatch pipeline
- Multipatch module
- Camera module should save background frames and levels/LUT with images
- Record pipette positions in Multipatch module
- Race condition in Camera.getScopeState()
- Multipatch log should provide basic information about logged devices
- Using MultiPatch log files in MosaicEditor
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 acq4.