Open SKCZHANG opened 4 years ago
Hello @SKCZHANG thanks for pointing out this issue. I think that I've never tested this situation. Is it possible for you to make a pull request with your code changes and also add the Comtrade record as an example? I don't have any Comtrade here with more than one sampling rate to test this. Best regards, Miguel
Where a wrong result come to my cases while multiple sample rate applied. Here the codes can run after some debugs.
Briefly, a logical mistake results
wrong outputs under multiple sample rate. So some changes in functions below.
def dct_samples(self, data) --BEFORE
For each sample rate
--AFTER output['samp'].append(data[0]) # Sample rates output['endsamp'].append(data[1]) # Number of samples
def read_bin_digital(self) && def read_bin_analog(self) --BEFORE nS = self.cfg_data['endsamp']
--AFTER nS = sum(self.cfg_data['endsamp'])
And the core is to get the addition where "# Reading One or Multiple Sample Rates ".
def read(self, cfg_path, dat_path): ......