-
Notifications
You must be signed in to change notification settings - Fork 55
feat: Add generators module #435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: Add generators module #435
Conversation
Hi @gpranav162, can you please fix all mypy errors (which are mostly due to missing type annotations)? |
Hi @senthurayyappan, I've fixed all the mypy errors. Please let me know if any further changes are needed! |
raise ValueError(f"Evaluation error: {e}") from e | ||
|
||
|
||
class CustomGenerator(SignalGenerator): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please move this CustomGenerator class to the signal_generators module?
from typing import Any, Optional, Union | ||
|
||
|
||
class SignalGenerator(ABC): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we follow the update(t: float)
pattern?
We'd want SignalGenerators objects to be able to output values for a given value of time
from .base import SignalGenerator | ||
|
||
|
||
class ConstantGenerator(SignalGenerator): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we modify this class to generate a step function instead? The StepGenerator's step time can be set to zero to output a constant value if the user wants a constant output from a signal generator.
I think generating constants this way is less useful
Hey @gpranav162, great work! Can we modify the structure of signal generators to follow our update pattern so that they work well with other components? We want this module to be used for generating setpoints in the future. Here is an example use case (pseudo code):
|
We could also support pre-generating outputs and have an iter pattern with a |
Hi @senthurayyappan, I've made the suggested changes:
Please let me know if there’s anything else you’d like me to update! |
Closes #432