Skip to content

Commit

Permalink
apps/radar/Ts2Moments/Cmd.cc - removing C code versions, see Iq2Dsr
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-dixon committed Jan 5, 2025
1 parent ef4a565 commit 2445b5a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 70 deletions.
68 changes: 0 additions & 68 deletions codebase/apps/radar/src/Ts2Moments/Cmd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
#include <radar/KdpFilt.hh>
#include <radar/RadarMoments.hh>
#include "Cmd.hh"
#include "c_code/cmd_gap_filter.c"
#include "c_code/cmd_speckle_filter.c"
using namespace std;

////////////////////////////////////////////////////
Expand Down Expand Up @@ -1228,72 +1226,6 @@ void Cmd::_applyGapFilter(int nGates)

}

////////////////////////////////////////////////////////////
// apply C version of gap filter

void Cmd::_applyGapFilterCVersion(int nGates)

{

TaArray<int> cmd_flag_;
int *cmd_flag = cmd_flag_.alloc(nGates);
TaArray<double> cmd_;
double *cmd = cmd_.alloc(nGates);

for (int igate = 0; igate < nGates; igate++) {
cmd_flag[igate] = (int) (_gateData[igate]->flds->cmd_flag + 0.5);
cmd[igate] = _gateData[igate]->flds->cmd;
}

apply_cmd_flag_gap_filter(nGates, cmd, cmd_flag,
_params.cmd_gap_filter_len,
_params.cmd_gap_filter_threshold);

for (int igate = 0; igate < nGates; igate++) {
_gateData[igate]->flds->cmd_flag = cmd_flag[igate];
}

}

////////////////////////////////////////////////////////////
// apply C version of speckle filter

void Cmd::_applySpeckleFilterCVersion(int nGates)

{

int igate, ii;
TaArray<int> cmd_flag_;
int *cmd_flag = cmd_flag_.alloc(nGates);
TaArray<double> cmd_;
double *cmd = cmd_.alloc(nGates);

for (igate = 0; igate < nGates; igate++) {
cmd_flag[igate] = (int) (_gateData[igate]->flds->cmd_flag + 0.5);
cmd[igate] = _gateData[igate]->flds->cmd;
}

int nThresholds = _params.cmd_speckle_filter_thresholds_n;
TaArray<int> runLen_;
int *runLen = runLen_.alloc(nThresholds);
TaArray<double> modThresholds_;
double *modThresholds = modThresholds_.alloc(nThresholds);

for (ii = 0; ii < nThresholds; ii++) {
runLen[ii] = _params._cmd_speckle_filter_thresholds[ii].length;
modThresholds[ii] =
_params._cmd_speckle_filter_thresholds[ii].min_valid_cmd;
}

apply_cmd_speckle_filter(nGates, cmd, cmd_flag,
nThresholds, runLen, modThresholds);

for (igate = 0; igate < nGates; igate++) {
_gateData[igate]->flds->cmd_flag = cmd_flag[igate];
}

}

/////////////////////////////////////////////////////////////
// apply old in-fill filter to CMD flag

Expand Down
2 changes: 0 additions & 2 deletions codebase/apps/radar/src/Ts2Moments/Cmd.hh
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ private:
int nPoints,
vector<InterestMap::ImPoint> &pts);
void _applyGapFilter(int nGates);
void _applyGapFilterCVersion(int nGates);
void _applySpeckleFilterCVersion(int nGates);
void _applyInfillFilter(int nGates);
void _applySpeckleFilter(int nGates);
void _runSpeckleFilter(int nGates, int minRunLen, double modThreshold);
Expand Down

0 comments on commit 2445b5a

Please sign in to comment.