RTE: Entering gain of "0" on DAEphys panel results in internal gain of "inf"
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
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.
Introduce DAP_CheckChannel and move all checks which should be done for assoc/unassoc to the new function from DAP_CheckHeadstage.