SWC-Advanced-Microscopy / BakingTray

Serial-section automated anatomy extension for ScanImage
https://bakingtray.mouse.vision/
GNU Lesser General Public License v3.0
10 stars 5 forks source link

Update mW at sample displayed by ScanImage when laser changes wavelength #434

Open raacampbell opened 1 year ago

raacampbell commented 1 year ago

4deeabfc6b2ee77782f4b8ca64cd4228b8338750 Relies on the user creating structures:

>> laserPower

laserPower = 

  struct with fields:

                   wavelength_in_nm: 800
                           minPower: 0.0017
                           maxPower: 0.2500
    powerFraction2ModulationVoltLut: [59×2 double]
                       dateMeasured: 7.3876e+05

In a laser_calibration directory under SETTINGS and naming them laserPower_800.mat, laserPower_920.mat, etc.

The displayed power in the beam widget is not currently refreshed when the new settings load. Still need to explore how well that will work. Once we are happy with that, we will need to create a GUI for making these files, as without such a GUI the process will be too annoying for anyone to adopt.

The GUI can just have a table with a line per settings file. A way of deleting lines (and so files) and way of entering a new file.

raacampbell commented 1 year ago

Even easier than the GUI: dfd338c990a62b3bd5a7c93fd7c1010ba559a2cd This quick function generates the laser calibration .mat file

raacampbell commented 1 year ago

This is now working well with changes from Vidrio. The last thing that is not working is that Vidrio maybe can not update the mW in the BEAM CONTROLS window when laser changes wavelength. If so, we could just set laser to a default power whenever wavelength is changed. That will ensure the power always alters and so the value in the GUI does also.

raacampbell commented 1 year ago

It all works as expected now. Last thing is to remove the old crappy way of displaying laser power.

raacampbell commented 1 month ago

Has this been removed?