Skip to content

Commit

Permalink
--correct_time_offset now has an indep argument to --time_offset, to …
Browse files Browse the repository at this point in the history
…allow adjustment for various time shifts
  • Loading branch information
drowe67 committed Mar 3, 2025
1 parent 3063d04 commit 20cf162
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
parser.add_argument('--auxdata', action='store_true', help='inject auxillary data symbol')
parser.add_argument('--txbpf', action='store_true', help='inject auxillary data symbol')
parser.add_argument('--pilots2', action='store_true', help='insert pilot symbols inside z vectors, replacing data symbols')
parser.add_argument('--correct_time_offset', action='store_true', help='correct phase shift caused by --time_offset (default off)')
parser.add_argument('--correct_time_offset', type=int, default=0, help='correct phase shift caused by --correct_time_offset in samples (default off)')
args = parser.parse_args()

if len(args.h_file):
Expand Down
5 changes: 2 additions & 3 deletions radae/radae.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,10 +709,9 @@ def forward(self, features, H, G=None):

# genie based phase adjustment for time shift
if self.correct_time_offset:
print(rx_sym.shape)

print(self.correct_time_offset)
# Use vector multiply to create a shape (batch,Nc) 2D tensor
phase_offset = -self.time_offset*torch.reshape(self.w,(1,self.Nc))
phase_offset = -self.correct_time_offset*torch.reshape(self.w,(1,self.Nc))
phase_offset = torch.reshape(phase_offset,(num_batches,self.Nc,1))

# change to (batch,Nc,timestep), as all time steps get the same phase offset
Expand Down

0 comments on commit 20cf162

Please sign in to comment.