Skip to content

Commit f2eaeb7

Browse files
committed
now aligned with matlab. there is difference from peak calcellation strategy in peak_search()
1 parent 6cad992 commit f2eaeb7

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Matlab/test_CellSearch.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131

3232
cell_info = cell(1, length(test_source_info));
3333
for i = test_sp : test_ep
34-
% if isempty( strfind(test_source_info(i).filename, 'f1890_s1.92_g0_1s') )
35-
% continue;
36-
% end
34+
if isempty( strfind(test_source_info(i).filename, 'dimitri') )
35+
continue;
36+
end
3737
disp(test_source_info(i).filename);
3838
coef_pbch = pbch_filter_coef_gen(test_source_info(i).fs);
3939

src/searcher.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -2268,8 +2268,8 @@ void sampling_ppm_f_search_set_by_pss(
22682268
ivec sum_range(2*num_half_radioframe+1);
22692269
double tmp_peak, tmp_avg_val;
22702270
vec corr_store_tmp_col(pss_period);
2271-
bvec logical_tmp(len_short);
2272-
vec tmp_store(len_short);
2271+
// bvec logical_tmp(len_short);
2272+
// vec tmp_store(len_short);
22732273
for (uint16 j=0; j<num_fo_pss; j++) {
22742274
tmp_max_idx = max_idx_all(j);
22752275
sum_range = itpp_ext::matlab_range(tmp_max_idx-num_half_radioframe, tmp_max_idx+num_half_radioframe);
@@ -2280,9 +2280,9 @@ void sampling_ppm_f_search_set_by_pss(
22802280
tmp_avg_val = (sum(corr_store_tmp_col) - tmp_peak)/((double)pss_period-(2.0*(double)num_half_radioframe+1.0));
22812281
peak_to_avg(j) = tmp_peak/tmp_avg_val;
22822282

2283-
tmp_store = corr_store.get_row(j);
2284-
logical_tmp = tmp_store > (max_peak_all(j)*2/3);
2285-
max_peak_all(j) = sum( tmp_store.get(logical_tmp) );
2283+
// tmp_store = corr_store.get_row(j);
2284+
// logical_tmp = tmp_store > (max_peak_all(j)*2/3);
2285+
// max_peak_all(j) = sum( tmp_store.get(logical_tmp) );
22862286
}
22872287

22882288
ivec sort_idx = sort_index(max_peak_all);
@@ -2357,7 +2357,7 @@ void sampling_ppm_f_search_set_by_pss(
23572357
}
23582358
else {
23592359
peak_val[peak_count] = 0;
2360-
DBG( cout << "Seems not a peak " << corr_seq(j-3, j+3) << " at i=" << i << " j=" << j << "\n"; )
2360+
DBG( cout << "Seems not a peak " << corr_seq(j-3-num_half_radioframe, j+3+num_half_radioframe) << " at i=" << i << " j=" << j << "\n"; )
23612361
}
23622362
peak_idx[peak_count] = peak_location;
23632363
peak_count++;

0 commit comments

Comments
 (0)