AllenInstitute / MIES

Multichannel Igor Electrophysiology Suite
https://alleninstitute.github.io/MIES/user.html
Other
22 stars 6 forks source link

RTE: Entering gain of "0" on DAEphys panel results in internal gain of "inf" #1773

Open MichaelHuth opened 1 year ago

MichaelHuth commented 1 year ago

In https://github.com/AllenInstitute/MIES/blob/3409060a378fa81f46bb175907562f0bdf646d28/Packages/MIES/MIES_SweepSaving.ipf#L172

the gain wave is created. For a GUI gain of 0, we get an "inf" entry.

This is not further checked and written at https://github.com/AllenInstitute/MIES/blob/3409060a378fa81f46bb175907562f0bdf646d28/Packages/MIES/MIES_DAC-Hardware.ipf#L2265 into the configuration string and results in an RTE at: https://github.com/AllenInstitute/MIES/blob/3409060a378fa81f46bb175907562f0bdf646d28/Packages/MIES/MIES_DAC-Hardware.ipf#L2175

t-b commented 1 year ago

That is the AD gain right? And the ADC is unassociated? If both yes, this is indeed a bug. The reason is that we do check for finite and non-zero AD/DA gains, but only do that for associated headstages via DAP_CheckHeadstage.

t-b commented 1 year ago

Introduce DAP_CheckChannel and move all checks which should be done for assoc/unassoc to the new function from DAP_CheckHeadstage.