mtiller / recon

Web and network friendly simulation data formats
MIT License
8 stars 4 forks source link

Better Handling of Transforms #17

Closed xogeny closed 10 years ago

xogeny commented 10 years ago

We need a scheme for defining transforms that are performed on aliases.

The obvious legacy case is flipping the sign (vs. the base signal). Even "richer" would be to scale things by some constant. This would expand the applications of such transforms from simple sign flipping (e.g. a = -b) to linear relations (e.g. V = R _i, assuming R was bound or a constant and not a variable). If we do linear scaling, we might as well support affine transformations (e.g. y = m_x+b).

But all this is centered around numeric types. Another application would be things like applying a "not" operation to a base boolean signal.

What I propose to do, as part of this ticket, is to introduce a "transform" field for all aliases. This field will be a string that contains a transform definition. To begin with, I propose only two transforms:

xogeny commented 10 years ago

Note, in the future, we could expand the set of transforms. This is just the initial set where I see real applications.