Skip to content

EOO: Apply pilot gain/tanh after IDFT.#8

Merged
peterbmarks merged 1 commit intomainfrom
ms-eoo-gain-after-idft
Mar 17, 2026
Merged

EOO: Apply pilot gain/tanh after IDFT.#8
peterbmarks merged 1 commit intomainfrom
ms-eoo-gain-after-idft

Conversation

@tmiw
Copy link
Copy Markdown
Collaborator

@tmiw tmiw commented Mar 17, 2026

Updates EOO TX to apply pilot gain/tanh after executing IDFT. Previously this was done before IDFT, which didn't match up with the reference Python implementation.

Relevant Python code below:

    def set_eoo_bits(self, eoo_bits):
        Ns = self.Ns; Ncp = self.Ncp; M = self.M; Nc = self.Nc; Nmf = int((Ns+1)*(M+Ncp))

        eoo_syms = eoo_bits[::2] + 1j*eoo_bits[1::2]
        eoo_syms = torch.reshape(eoo_syms,(1,Ns-1,Nc))
        
        eoo_tx = torch.matmul(eoo_syms,self.Winv)
        if self.Ncp:
            eoo_tx_cp = torch.zeros((1,Ns-1,self.M+Ncp),dtype=torch.complex64)
            eoo_tx_cp[:,:,Ncp:] = eoo_tx
            eoo_tx_cp[:,:,:Ncp] = eoo_tx_cp[:,:,-Ncp:]
            eoo_tx = torch.reshape(eoo_tx_cp,(1,(Ns-1)*(self.M+Ncp)))*self.pilot_gain
            if self.bottleneck == 3:
                eoo_tx = torch.tanh(torch.abs(eoo_tx)) * torch.exp(1j*torch.angle(eoo_tx))
            self.eoo[0,2*(M+Ncp):Nmf] = eoo_tx

@drowe67 @peterbmarks

@tmiw
Copy link
Copy Markdown
Collaborator Author

tmiw commented Mar 17, 2026

I'm going to quickly build ms-rade-nopy from freedv-gui with this PR and see if the reporting tests all pass there.

@drowe67 drowe67 mentioned this pull request Mar 17, 2026
@drowe67
Copy link
Copy Markdown
Collaborator

drowe67 commented Mar 17, 2026

@peterbmarks both @tmiw & I are OK to merge this. If you are busy just let us know and either one of us can hit the green button.

@peterbmarks peterbmarks merged commit 712f2f6 into main Mar 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants