v1.0.4 is a large release with numerous improvements and a lot of important bug fixes, timed to coincide with the publication of Zapit in eLife. Highlights include a cleaner and more robust stimulus config structure (per-trial power values are no longer clobbered on save), far better handling of non-linear laser calibration curves (including sigmoid curves associated with EOMs and AOMs), centred scanner calibration points, smoother camera acquisition, improved ramp-down behaviour, and refusal to load malformed stimulus config files rather than failing silently. The stim config behaves more smoothly. Unit tests have also been overhauled.
None of these are breaking changes — existing stimulus config files, settings files, and API calls continue to work as before. The full list of changes follows.
- Ephys waveforms should now have a better shape and be produced correctly. BUT the higher laser power is produced assuming the power curve is linear and does not take max control voltage into account. OK for lower powers/fewer positions with Obis for testing.
- Non-linear laser calibration curves now more robust and also have the option of a sigmoid curve to cope with EOMs.
- MAJOR: Cleaner structure for the stimulus config. Remove redundant places where the same information as stored but information only read from one of these. Stim config editor does not wipe cases where user has implemented different, say, power values for
each trial. They are maintained as they should be. - Background code changes now allow the blanking signal to be optionally also played out as a clocked digital waveform on
p0.0, in addition to AO3. This paves the way to freeing AO3 for controlling a second laser's power. Currently this feature is for development use only and must be enabled at the command line viahZP.stimConfig.useClockedDO = true(off by default) once a stimulus config file has been loaded. See Issue 163 - Switch camera reads to peekdata, which should be smoother and was probably the origin of Issue 126.
- User is warned if the hardware lacks sufficient laser power to service any of their stimulus conditions.
- If a config file contains one or more configs with too many points: the total blanking time needed will result in stim locations with less than two samples over which the laser is on. Then the file is not loaded at al and a warning is produced. In practice this means a limit of about 55 data points per condition. So that's a lot and we will probably run out of laser power first.
- Malformed stimulus config files with duplicate or missing configs are not loaded.
- Stimulus configs loaded via the API now update the GUI.
- Unit tests overhauled and updated.
- BUGFIX: Scanner calibration points are now centered. Previously they were offset.
- BUGFIX: Correctly subtract background image when running getLaserPosAccuracy. This uses a different threshold. Also correct bug that was failing to feed that image to this function. Also correct bug that was causing laser to be on when background frame was recorded.
- BUGFIX: No longer spawns opens an empty figure window on startup.
- BUGFIX: Stim config editor is no longer unresponsive at times. Issue 58
- BUGFIX: Laser turns off correctly where
obj.stimConfig.offRampDownDuration_ms < 1 - BUGFIX: Ramp-down now works when ramp down duration is not an integer multiple of the waveform duration. Note that rampdown will be slightly longer than expected in these cases.
- BUGFIX: Fix corner case that could cause incorrect Task type to be used.
- BUGFIX: Warn if stim cycle is over >0.5 Hz off the intended rate.
- BUGFIX: Update checker now works correctly (was calling the wrong method).
- BUGFIX: TCP client correctly reads when Zapit is stimulating.
- BUGFIX: Fix to linear laser power conversion equation: it was only right for lasers
that go down to zero. - BUGFIX: Masking light could turn off at start rather than end of rampdown.
- BUGFIX: Stimulus config GUI maker was unable to re-save loaded stim configs.