En esta release:
Animaciones Mejoradas 🏃💨
Problema 🤔
El estado de las animaciones era un grave problema y resolverlo era un pendiente. Antes no era posible maximizar la ventana o usar las herramientas de control sin que las animaciones se bloquearan o se redujeran los frames entre otros problemas.
Solución 💡
Para solucionar esto, investigué sobre la librería PyQtGraph, una librería gráfica optimizada para el dibujado en tiempo real. Luego se integró para el procesamiento de las animaciones, reemplazando a Matplotlib en esta área. Para esto se tuvo que reconstruir desde cero el sistema de animaciones, pasando de las animaciones automáticas de Matplotlib a unas manuales pero con muchas ventajas. Además, para mejorar la modularización del programa se creó el archivo animation.py donde se describen las distintas clases que componen estas animaciones y permiten el control de las mismas.
- Mejora en la estabilidad en la animación. ¡Hasta 30 fps! 😎🔥
- Mejora en los controles de animación. Ahora podemos modificar la velocidad y la cantidad de muestras en la gráfica. 🕹
- Permite panear y escalar la gráfica rápidamente. 🔄
- Podemos adquirir más datos sobre la gráfica. Ahora se muestran los frames por segundo, las muestras totales y la cantidad de muestras en pantalla. 📊
- Consejos dinámicos. El programa detecta bajo rendimiento y aconseja como solucionarlo. 🤓💬
- Gracias a su optimización podemos aumentar los límites de los ajustes logrando simular señales de hasta ¡10 kHz! 😲🔝
- Y, lo más importante, facilita el desarrollo. 😁👍
Matplotlib se mantendrá como la librería encargada de la simulación estática, mientras que PyQtGraph lo hará para las animaciones.
Controles de Animación 🕹
Se agregan controles para el manejo de la simulación animada:
- Anti-aliasing
- Ajuste automático de la vista.
- Control de velocidad.
- Control de cantidad de muestras.
Guardado persistente de ajustes ⚙
Al aplicar los ajustes estos serán guardados para su posterior carga al iniciar
SigMA .
El guardado se realiza en un archivo "settingSIGMA.json" en el directorio del programa.
Refactorización del programa 🏗
Se mejoró el código para optimización en la ejecución y en el desarrollo.
Además:
- Optimización mejorada.
- Se corrige error en el cálculo del ancho de banda.
- Se soluciona congelamiento de la ventana al maximizar.
- Se corrigen datos erróneos en el manual interno.
- Muuuchos cambios menores.
English 🇬🇧
More info...
In this release:
Improved Animations 🏃💨
Issue 🤔
The state of the animations was a serious problem, and solving it was a pending issue. Previously, it was not possible to maximize the window or use the control tools without the animations crashing or frames dropping, among other problems.
I explored for solutions and I ran into the PyQtGraph library, a graphics library optimized for real-time drawing.Solution 💡
Matplotlib has a terrible real-time response, so it was essential to replace it at the animation processing. To do this, the animation system had to be rebuilt from scratch. This meant switching from Matplotlib's automatic animations to manual ones. In addition, to improve the modularization of the program, the file animation.py was created with the different classes that compose these animations and allow its control.
TL;DR PyQtGraph provides:
- Improved animation stability - up to 30 fps! 😎🔥
- Improved animation controls. Now we can modify the speed and number of samples in the graph. 🕹
- Allows to pan and scale the graph quickly. 🔄
- We can acquire more data on the graph. Frames per second, total samples and number of samples on screen are now displayed. 📊
- Dynamic hints. The program detects low performance and advises how to fix it. 🤓💬
- Thanks to its optimization, we can increase the limits of the settings achieving to simulate signals up to 10 kHz! 😲🔝
- And, most importantly, it facilitates development. 😁👍
Matplotlib will remain as the library in charge of static simulation, while PyQtGraph will be in charge of animations.Animation Controls 🕹
Controls for handling animated simulation are added:
- Anti-aliasing.
- Automatic viewport adjustment.
- Speed control.
- Sample count control.
Storing of settings ⚙
When applying settings, they will be saved for later loading at startup.
SigMA.
The saving is done in a file "settingSIGMA.json" in the program directory.Program refactoring 🏗
The code was improved for optimization in execution and development.
In addition:
- Improved optimization.
- Fixed error in bandwidth calculation.
- Fixed window freezing when maximizing.
- Fixed erroneous data in the internal manual.
- Many minor changes.