Skip to content

Various improvements

Pierre Paleo requested to merge improvements into master

To do (Pierre)

  • use next friendly power for FFT padding
  • Check setup.py

To be discussed

  • use of astype:
        # numpy.take
        indices_x = np.rint(np.abs(U - np.arange(iul, iuh + 1)) * self.TBLSPCG).astype(
            "int"
        )

--> use because rint returns floats, but I agree it is not beautiful...

  • convolution size is high : uint8 is not enough in function _pswf_convolution_gridding --> old comment, it has no sense since everything is int64 now

  • _compute_sum_legendre: is it worse to keep current efficient code or tu use legendre(i, x) each times in the loop ?

  • Consider using silx.image.tomography.compute_fourier_filter() for filters --> _if we go toward a dependency on silx, I think it could be simpler (the management of filter begin to be a bit dirty on gridrec) (need a function that returns the whole filter, only vectors, and vectorization of the computation of the main_filter)(so silx.image.tomography.compute_fourier_filter() looks perfect) _

  • How to handle padding: something like dwidth_padded = int(pad_ratio * dwidth) ?

  • # TODO HF out ! c'est le [0] in _compute_filtered_sinogram --> add the dc change a lot the image, but adding the highest frequency change nearly nothing, I do not know if has a sense to have an option for this... + filter is not long enough ...

  • FFTW: do also 1D (I)FFT on sinogram --> done

  • Apply black -l100 or black -l120 at the end of the review

  • data type: all in 32 bits (and complex64) --> yes, but we will probably lose precision for non-regression test, but at the end (so soon I think), it has to be done

  • Consider using silx.math.fft.FFT(backend="numpy/pfftw")

Edited by Leon Roussel

Merge request reports