Skip to content
This repository was archived by the owner on Aug 12, 2024. It is now read-only.

Commit f442cfe

Browse files
author
keimpema
committed
The default values for fft_size_delaycor caused the correlation to fail when
fft_size_correlation < 256 git-svn-id: svn+ssh://jop91.astron.nl/auto/home/jive_cvs/SOFTC/svn/trunk/sfxc@1710 5736e3ea-d426-0410-8aaf-93e336ac3372
1 parent 5eda5fd commit f442cfe

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/control_parameters.cc

+9-8
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,17 @@ initialise(const char *ctrl_file, const char *vex_file,
168168
ctrl["window_function"] = "HANN";
169169
}
170170
// Set the fft sizes
171-
if (ctrl["fft_size_delaycor"] == Json::Value())
172-
ctrl["fft_size_delaycor"] = 256;
173-
174171
if (ctrl["fft_size_correlation"] == Json::Value()){
175-
if (ctrl["multi_phase_center"].asBool())
176-
ctrl["fft_size_correlation"] = 4096;
177-
else
178-
ctrl["fft_size_correlation"] = std::max(fft_size_delaycor(), number_channels());
179-
}
172+
int min_size = ctrl["multi_phase_center"].asBool() ? 4096 : 256;
180173

174+
if (ctrl["fft_size_delaycor"] != Json::Value())
175+
min_size = std::max(min_size, ctrl["fft_size_delaycor"].asInt());
176+
177+
ctrl["fft_size_correlation"] = std::max(min_size, number_channels());
178+
}
179+
if (ctrl["fft_size_delaycor"] == Json::Value())
180+
ctrl["fft_size_delaycor"] = std::min(256, ctrl["fft_size_correlation"].asInt());
181+
181182
// Set the sub integartion time
182183
if(ctrl["sub_integr_time"] == Json::Value()){
183184
double integr_time_usec = round(integration_time().get_time_usec());

0 commit comments

Comments
 (0)