SIRF icon indicating copy to clipboard operation
SIRF copied to clipboard

Extends SIRF data algebra possible operands to numpy arrays

Open evgueni-ovtchinnikov opened this issue 1 month ago • 4 comments

Changes in this pull request

Testing performed

Related issues

fixes #1357

Checklist before requesting a review

  • [ ] I have performed a self-review of my code
  • [ ] I have added docstrings/doxygen in line with the guidance in the developer guide
  • [ ] I have implemented unit tests that cover any new or modified functionality
  • [ ] The code builds and runs on my machine
  • [ ] CHANGES.md has been updated with any functionality change

Contribution Notes

Please read and adhere to the contribution guidelines.

Please tick the following:

  • [x] The content of this Pull Request (the Contribution) is intentionally submitted for inclusion in SIRF (the Work) under the terms and conditions of the Apache-2.0 License.

evgueni-ovtchinnikov avatar Nov 17 '25 17:11 evgueni-ovtchinnikov

Actually, get_uniform_copy cannot be any faster as it calls clone to make a copy and then fills it with the specified value:

    def get_uniform_copy(self, value=1.0):
        '''Initialises an instance of DataContainer based on the template'''
        y = self.clone() # SIRF uses `DiscretisedDensity.clone()` to make a copy of `self` data
        y.fill(value)
        return y

evgueni-ovtchinnikov avatar Nov 18 '25 17:11 evgueni-ovtchinnikov

ah. :-)

KrisThielemans avatar Nov 18 '25 18:11 KrisThielemans

unrelated HDF5 linking error

KrisThielemans avatar Nov 18 '25 18:11 KrisThielemans

I'll test with MaGeZ as soon as I can.

paskino avatar Nov 20 '25 10:11 paskino