Closed ThibeauWouters closed 3 months ago
I think instead of defining a separate class for each of these transforms, we should just introduce an inverse operator that swap in the forward and the inverse
I thought about something like that already, but I wasn't sure if that approach would perhaps be more confusing than just defining a separate class for this, especially since it comes down to a few lines of code...
The function signature can be something instead of using SomeTransform
, we just have InvertTransform(SomeTransform)
, where Inverse
is a function that takes the instance and creates a corresponding inverse instance. I think this should be much more clear and ergonomic.
So basically, in the top level prior.py
, there should be a function like
def InvertTransform(t: Transform) -> Transform
core code...
Going to discard this and start from scratch to incorporate the comments above
There are a few "pre-made" transforms regarding masses, but it would be good to have them in the other direction as well. Adding a few of those now.