Skip to content

Can i do spectral reconstruction using this package? #137

Open
@nkraicer

Description

@nkraicer

Hi,
I used your old ver of SpectralDiffuserCam
I want to use all of the provided reconstruction methods adding a mask
Is it straight forward to somehow change your rfft_convovle.py with these from spectraldiffusercam?

def Hpower(self, x):
x = np.fft.ifft2(self.H* np.fft.fft2(np.expand_dims(x,-1), axes = (0,1)), axes = (0,1))
x = np.sum(self.mask* self.crop(np.real(x)), 2)
x = self.pad(x)
return x

def Hfor(self, x):
    x = np.fft.ifft2(self.H* np.fft.fft2(x, axes = (0,1)), axes = (0,1))
    x = np.sum(self.mask* self.crop(np.real(x)), 2)
    return x

Any other major changes that should be taken into consideration?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions