portugueslab / stytra

A modular package to control stimulation and track behaviour
http://www.portugueslab.com/stytra/
GNU General Public License v3.0
41 stars 26 forks source link

Fixed inconsistent behavior on calibration #2

Closed mark-dawn closed 6 years ago

mark-dawn commented 6 years ago

This is a bugfix for inconsistent behavior of the data on the GUI and the experiment. Step to reproduce: set the physical size of the experiment without bringing up the calibration interface. Bringing up the interface won't even fix this completely, as you need to change the spinbox at least once with the interface open.

The fix adds a different method to calibrator instances set_pixel_scale, that allows the ROI interface to set pixel sizes without rendering the calibrator. The ROI interface also calls the set_physical_scale to insure that the final ratio of pixel to mm is always consistent.