Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added note explaining visual flicker for U10 data in minsicope #336

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions OpenEphys.Onix1/ConfigureUclaMiniscopeV4Camera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ internal static void ConfigureDeserializer(DeviceContext device)
DS90UB9x.Initialize933SerDesLink(device, DS90UB9xMode.Raw12BitLowFrequency);

var deserializer = new I2CRegisterContext(device, DS90UB9x.DES_ADDR);

uint i2cAlias = UclaMiniscopeV4.AtMegaAddress << 1;
deserializer.WriteByte((uint)DS90UB9xDeserializerI2CRegister.SlaveID1, i2cAlias);
deserializer.WriteByte((uint)DS90UB9xDeserializerI2CRegister.SlaveAlias1, i2cAlias);
Expand All @@ -213,14 +213,10 @@ internal static void ConfigureSerializer(DeviceContext device)

internal static void ConfigureCameraSystem(DeviceContext device, UclaMiniscopeV4FramesPerSecond frameRate, bool interleaveLed)
{
const int WaitUntilPllSettles = 200;

// set up Python480
var atMega = new I2CRegisterContext(device, UclaMiniscopeV4.AtMegaAddress);
WriteCameraRegister(atMega, 16, 3); // Turn on PLL
//Thread.Sleep(WaitUntilPllSettles); //This sometimes has good effects, sometimes adverse, we just might want to redo this entire section (see issue #331 )
WriteCameraRegister(atMega, 32, 0x7007); // Turn on clock management
//Thread.Sleep(WaitUntilPllSettles);
WriteCameraRegister(atMega, 199, 666); // Defines granularity (unit = 1/PLL clock) of exposure and reset_length
WriteCameraRegister(atMega, 200, 3300); // Set frame rate to 30 Hz
WriteCameraRegister(atMega, 201, 3000); // Set Exposure
Expand Down
13 changes: 7 additions & 6 deletions OpenEphys.Onix1/UclaMiniscopeV4CameraData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ public class UclaMiniscopeV4CameraData : Source<UclaMiniscopeV4CameraFrame>
/// Gets or sets the data type used to represent pixel intensity values.
/// </summary>
/// <remarks>
/// The UCLA Miniscope V4 uses a 10-bit image sensor. To capture images that use the full
/// ADC resolution, this value can be set to <see cref="UclaMiniscopeV4ImageDepth.U10"/>.
/// This comes at the cost of limited codec support and larger file sizes. If <see
/// cref="UclaMiniscopeV4ImageDepth.U8"/> is selected, the two least significant bits of
/// each pixel sample will be discarded, which greatly increases codec options and reduces
/// file sizes.
/// The UCLA Miniscope V4 uses a 10-bit image sensor. To capture images that use the full ADC
/// resolution, this value can be set to <see cref="UclaMiniscopeV4ImageDepth.U10"/>. This comes at
/// the cost of limited codec support and larger file sizes. If <see
/// cref="UclaMiniscopeV4ImageDepth.U8"/> is selected, the two least significant bits of each pixel
/// sample will be discarded, which greatly increases codec options and reduces file sizes. Further,
/// we have noticed that Bonsai introduces flickering in the real-time video visualizer when using
/// 10-bit data. These artifacts are not present in the data itself, only in the real-time visualizer.
/// </remarks>
[Description("The bit-depth used to represent pixel intensity values.")]
[Category(DeviceFactory.ConfigurationCategory)]
Expand Down