Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ifp debug in PFA by changing ifft to fft #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions IO/phase_history/cphd/convert_to_cphd.m
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ function convert_to_cphdx( input_ph_filename, output_cphd_file, varargin )
cphd_fid = fopen(output_cphd_file,'w','b'); % All CPHD must be big-endian
xml_string = sicdstruct2xml(cphd_meta, 'file_type', format, 'inc_class_attributes', false);
fh_struct = write_cphd_fileheader(cphd_fid, cphd_meta, format, numel(xml_string));
fwrite(cphd_fid,sprintf('\f\n'),'char');
fwrite(cphd_fid,sprintf('%s\f\n',xml_string),'char');

% Vector-based metadata is actually positioned before CPHD data in the
Expand Down Expand Up @@ -301,4 +300,4 @@ function write_cphd_vbmeta(cphd_fid, cphd_meta, nbdata)

% //////////////////////////////////////////
% /// CLASSIFICATION: UNCLASSIFIED ///
% //////////////////////////////////////////
% //////////////////////////////////////////
4 changes: 2 additions & 2 deletions Processing/IFP/PFA/pfa_fft_zeropad_1d.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

zeropad(start_index + (1:size(data,1)),:) = data; % Insert data into zeropad
zeropad = ifftshift(zeropad, 1); % Move DC (center point) to index 1
data = fftshift(ifft(zeropad,[],1),1); % Actual FFT
data = fftshift(fft(zeropad,[],1),1); % Actual FFT

end

% //////////////////////////////////////////
% /// CLASSIFICATION: UNCLASSIFIED ///
% //////////////////////////////////////////
% //////////////////////////////////////////