Comments (2)
Hi Nina,
thank you for giving PyRates a try and for bringing this to my attention!
Indeed, it is not supported at the moment to save non-state variables as output variables.
The issue with supporting non-state variables is that it leads to compatibility issues with external differential equation solving tools such as scipy.integrate.solve_ivp
. These tools require a function that returns only a state-vector which has the same dimensionality as the differential equation system that governs the dynamics.
I have been thinking of a way to include this feature, but have not yet found a way to do it without substantial drawbacks.
At the moment, there are two work-arounds you could use:
(I) Store whatever state-variable you use your wrap function on as an output and manually apply the wrap function after the simulation.
OR
(II) Add an observer state variable to your model that tracks the dynamics of your variable of interest with a small low-pass filtering time constant. If you have a variable wrap
, you could include d/dt wrap_obs = (wrap-wrap_obs)/tau_obs
, where tau_obs
is smaller than any other time constant in your system.
Let me know if I can help any further!
from pyrates.
Hi,
Ok, thank you for the information. I have been using the first option you mentioned, but as I saw the option to wrap angle theta in sinus function in your exemplary YAML model definition for Kuramoto oscillator, I thought I have missed something.
Thank you also for a quick response!
Best,
Nina
from pyrates.
Related Issues (20)
- Allow additional (modulating) source nodes in edges HOT 3
- Add variable setter method to CircuitIR HOT 1
- Add to_file/from_file methods HOT 4
- Found test problem caused by changes of working directory in backend HOT 4
- Removing parts of pyrates from sys.modules in the backend causes troubles in other parts of the pipeline HOT 3
- Improving user friendliness and stability of PyRates HOT 2
- Add possibility to CircuitTemplate.apply() method to change constants HOT 3
- Enable purely scalar network models by disabling vectorization HOT 2
- Implement logging
- Trouble reproducing Jansen-Rit model dynamics in current version HOT 8
- Unexpected behavior of a zero-weighted edge with delay HOT 6
- Inheriting from an operator more than once causes operator key errors HOT 1
- Remove unnecessary indexing operations and variable definitions from equation file HOT 1
- error running jansenrit.py (jrc.compile) on MacOS HOT 3
- issues when running the example codes HOT 2
- Continuous data generation HOT 3
- Rework delay-coupling implementations HOT 3
- error while using delay DE HOT 4
- issue with time-varying edge variables when multiple nodes are used HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyrates.