TheDeanLab / navigate

navigate - open source light-sheet microscope controls
https://thedeanlab.github.io/navigate/
Other
23 stars 6 forks source link

Sensor Mode: Normal Scan or Light-Sheet Mode #38

Closed codeCollision4 closed 2 years ago

codeCollision4 commented 2 years ago

Sensor Mode: Normal Scan or Light-Sheet Mode if Sensor Mode == Normal Scan Nothing

if Sensor Mode == Light-Sheet Mode Readout Direction = Top to Bottom, Bottom to Top, or Bidirectional. Drop down menu. Number of Pixels = Cycle box.

Originally posted by @AdvancedImagingUTSW in https://github.com/AdvancedImagingUTSW/ASLM/issues/3#issuecomment-996266144

codeCollision4 commented 2 years ago

I think it is time that we built out a sub-controller for this panel on the GUI. Couple details: The camera modes: Sensor mode: Normal or Light-Sheet Readout Direction, should be below sensor mode. If sensor mode == normal, readout direction should be blank and read only. If sensor mode == light-sheet, readout direction should default to “top to bottom”, but have the option to also be “bottom to top”, and should not be read only. Dual view modes - Get rid of. Split pixel number. Should be “Number of pixels”. And the widget should be a spinbox. Should behave similar to the readout direction. Empty if sensor mode == normal, and read only. Default to 10 if sensor mode == light-sheet. Framerate Info. We will populate this with calculations based upon the exposure time, readout time, etc. Region of Interest Settings: Default ROI Values. Should be retrieved from the camera to determine the camera sensor size. With our camera, the Hamamatsu Flash 4.0, these values are listed below. They should be able to be retrieved from the camera instance as self.camera.x_pixels and self.camera.y_pixels Left = 1 Right = 2048. Top = 1 Bottom = 2048 Number of Pixels. Calculates the number of pixels based upon the ROI settings. X = Right - Left -1 Y = Bottom - Top - 1 FOV Calculate the size of the field of view based upon the actual pixel size, the region of interest, and the magnification. Much of this work has already been done, and the values are programmed into our configuration yaml file. If we are in the low-res mode (self.experiment.MicroscopeState[‘resolution_mode’] == ’low), then you get the pixel size from the configuration file (self.experiment.ZoomParameters[‘low_res_zoom_pizel_size’]). Also requires knowing the zoom…. Currently this is also in the experiment file under MicroscopeState. If we are in the high-res mode, then there is only one zoom. ROI Center. Allows us to choose the center of the region of interest. Default should be the self.camera.x_pixels/2 for both. Then of course, we need to develop the event calls. If we populate it with a dummy function, I can put in the proper calls to the camera API. image (2)

codeCollision4 commented 2 years ago

I have a question about the framerate info portion of this view.

Do you know what you want the labels to be and what calculations they need?

AdvancedImagingUTSW commented 2 years ago

Just populate it with a dummy float variable and tell me where to calculate it and feed it in

Kevin Dean Assistant Professor, and Director of the Microscopy Innovation Lab Lyda Hill Department of Bioinformatics UT Southwestern Medical Center 6000 Harry Hines Blvd, NL5.116A Dallas, TX 75390.

Sent from my iPhone.

On Mar 17, 2022, at 3:14 PM, Dax Collison @.***> wrote:

 EXTERNAL MAIL

I have a few questions about the framerate info portion of this view.

Do you know what you want the labels to be and what calculations they need?

— Reply to this email directly, view it on GitHubhttps://github.com/AdvancedImagingUTSW/ASLM/issues/38#issuecomment-1071354251, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKETUTIOD55PAR3ZQBLTV4LVAOHBVANCNFSM5NBZOL5Q. You are receiving this because you were mentioned.Message ID: @.***> CAUTION: This email originated from outside UTSW. Please be cautious of links or attachments, and validate the sender's email address before replying.


UT Southwestern

Medical Center

The future of medicine, today.

codeCollision4 commented 2 years ago

Got it finished. Widgets now populate with default values from the config/experiment file

To calculate: search for Kevin in ASLM_Configuration_Controller To feed: search for Kevin in ASLM_Controller To display: search for Kevin in camera_setting_controller

Some other questions mostly about updating:

When will the sensor size change? When will the Left, Right, Top, Bottom widgets need to be changed? I have the default values pulling in from the config file currently.

When do the framerate widgets need to be updated? I have provided the framework for calculating and feeding above, just need to know when they will be changing.

When do the FOV widgets need to be updated?

When do the ROI Center widgets need to be updated?

AdvancedImagingUTSW commented 2 years ago

Sorry for being slow.

The sensor will only change size when the user tells it to do so through the GUI (presumably).

The user can specify what the left, right, top, and bottom widgets should be. This will then change the ROI to the rectangle encompassed by those 4 data points.

We will calculate the framerate according to the exposure time and sensor size. We will calculate this anytime these two values are changed.

The FOV widgets will only be updated when the camera sensor size changes. It is simply number of pixels * pixel size.

The ROI center widgets will be updated whenever someone changes the left, top, right, ... values.

AdvancedImagingUTSW commented 2 years ago

Notes here, after working with @annie-xd-wang on the API for the camera.

We can remove the Center ROI and Center ROI @ buttons in the camera settings tab.

Replace the Region of Interest Settings with 2 boxes. One for ROI Width, and the other for ROI Height. Probably makes the Number of Pixels display redundant too :)

AdvancedImagingUTSW commented 2 years ago

Perhaps we could repurpose one of these to include the binning settings on the camera in the future. Not a priority now since we always acquire at 1x binning, for 99% of the cases.

codeCollision4 commented 2 years ago

For the two boxes do you just want two input fields that are labeled each ROI Width and Height? Or do you want a big frame that will hold multiple fields? And do you want to keep FOV and ROI Center fields/frames? Also where do you want the binning field and do you want it in its own frame?

image

Here is what I have it updated too currently:

image

Update: This has been commited 05667ef

AdvancedImagingUTSW commented 2 years ago

@codeCollision4 - I think that looks great. Thank you.

codeCollision4 commented 2 years ago

Closing this for now as I believe the main function is finished. We can open a separate more specific issue in the future if needed.

AdvancedImagingUTSW commented 2 years ago

Actually... This is what we are working on now.