Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
irp
HoloTomoToolbox
Commits
05c6125a
Commit
05c6125a
authored
Oct 09, 2019
by
Leon Merten Lohse
Browse files
rename psd.m to powerSpectralDensity.m
avoids shadowing MATLABs builtin function psd fix
#2
parent
3a6b8cc4
Pipeline
#110658
passed with stage
in 1 minute and 31 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
functions/imageProcessing/analysis/p
sd
.m
→
functions/imageProcessing/analysis/p
owerSpectralDensity
.m
View file @
05c6125a
function
psdVals
=
p
sd
(
array
,
betaWindow
)
function
psdVals
=
p
owerSpectralDensity
(
array
,
betaWindow
)
% P
SD
computes the power-spectral-density (PSD) of a given array.
% P
OWERSPECTRALDENSITY
computes the power-spectral-density (PSD) of a given array.
%
%
% ``psdVals = p
sd
(array, beta_window)``
% ``psdVals = p
owerSpectralDensity
(array, beta_window)``
%
%
% Note that prior to the Fourier transform, the array is weighted with a Kaiser-Bessel window
% Note that prior to the Fourier transform, the array is weighted with a Kaiser-Bessel window
% in order to avoid truncation errors.
% in order to avoid truncation errors.
...
@@ -30,7 +30,7 @@ function psdVals = psd(array, betaWindow)
...
@@ -30,7 +30,7 @@ function psdVals = psd(array, betaWindow)
% im = fspecial('disk', r_disk);
% im = fspecial('disk', r_disk);
% im = padarray(padarray(im, ceil((N-size(im))/2), 0, 'pre'), floor((N-size(im))/2), 0, 'post');
% im = padarray(padarray(im, ceil((N-size(im))/2), 0, 'pre'), floor((N-size(im))/2), 0, 'post');
% figure('name', 'image'); showImage(im)
% figure('name', 'image'); showImage(im)
% figure('name', 'Log(PSD(image))'); showImage(log(p
sd
(im)))
% figure('name', 'Log(PSD(image))'); showImage(log(p
owerSpectralDensity
(im)))
% HoloTomoToolbox
% HoloTomoToolbox
% Copyright (C) 2019 Institut fuer Roentgenphysik, Universitaet Goettingen
% Copyright (C) 2019 Institut fuer Roentgenphysik, Universitaet Goettingen
...
...
functions/phaseRetrieval/utilities/checkFresnelNumber.m
View file @
05c6125a
...
@@ -79,7 +79,7 @@ hologram = cropToCenter(hologram, min(size(hologram))*[1,1]);
...
@@ -79,7 +79,7 @@ hologram = cropToCenter(hologram, min(size(hologram))*[1,1]);
hologram
=
fadeoutImage
(
hologram
);
hologram
=
fadeoutImage
(
hologram
);
% Compute angularly averaged, logarithmic power-spectral-density (PSD)
% Compute angularly averaged, logarithmic power-spectral-density (PSD)
hologramPSDAngularAvg
=
angularAverage
(
p
sd
(
double
(
hologram
)));
hologramPSDAngularAvg
=
angularAverage
(
p
owerSpectralDensity
(
double
(
hologram
)));
% Fourier-frequencies corresponding to the PSD-values, normalized with Fresnel number
% Fourier-frequencies corresponding to the PSD-values, normalized with Fresnel number
fourierFreqs
=
fftfreq
(
size
(
hologram
,
1
));
fourierFreqs
=
fftfreq
(
size
(
hologram
,
1
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment