pints icon indicating copy to clipboard operation
pints copied to clipboard

Transformed rectangular boundaries

Open MichaelClerx opened this issue 2 years ago • 5 comments

It should be possible to add a check in Transformation.convert_boundaries()

  • are the boundaries rectangular? isinstance(boundaries, pints.RectangularBoundaries)
  • is the transformation elementwise? self.elementwise() If so, a new RectangularBoundaries can be returned instead of a wrapped boundaries object.
a = transform.to_search(boundaries.lower())
b = transform.to_search(boundaries.upper())
lower = np.minimum(a, b)
upper = np.maximum(a, b)
return pints.RectangularBoundaries(lower, upper)

MichaelClerx avatar Aug 14 '22 13:08 MichaelClerx

Would that make sense @chonlei ? Or am I missing something?

MichaelClerx avatar Aug 14 '22 13:08 MichaelClerx

I guess you will be spacing in the q-space whilst the current implementation is sampling in the p-space and convert to q.

chonlei avatar Aug 15 '22 03:08 chonlei

Veeeeery good point

MichaelClerx avatar Aug 15 '22 08:08 MichaelClerx

Might be desirable in some cases. Might not be. Either way not consistent with other transformations... OK. Closing this!

MichaelClerx avatar Aug 15 '22 08:08 MichaelClerx

Still need this! We can work around the sample() method.

MichaelClerx avatar Aug 25 '22 13:08 MichaelClerx