Skip to content

Commit 20cf162

Browse files
committed
--correct_time_offset now has an indep argument to --time_offset, to allow adjustment for various time shifts
1 parent 3063d04 commit 20cf162

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

inference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
parser.add_argument('--auxdata', action='store_true', help='inject auxillary data symbol')
7979
parser.add_argument('--txbpf', action='store_true', help='inject auxillary data symbol')
8080
parser.add_argument('--pilots2', action='store_true', help='insert pilot symbols inside z vectors, replacing data symbols')
81-
parser.add_argument('--correct_time_offset', action='store_true', help='correct phase shift caused by --time_offset (default off)')
81+
parser.add_argument('--correct_time_offset', type=int, default=0, help='correct phase shift caused by --correct_time_offset in samples (default off)')
8282
args = parser.parse_args()
8383

8484
if len(args.h_file):

radae/radae.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -709,10 +709,9 @@ def forward(self, features, H, G=None):
709709

710710
# genie based phase adjustment for time shift
711711
if self.correct_time_offset:
712-
print(rx_sym.shape)
713-
712+
print(self.correct_time_offset)
714713
# Use vector multiply to create a shape (batch,Nc) 2D tensor
715-
phase_offset = -self.time_offset*torch.reshape(self.w,(1,self.Nc))
714+
phase_offset = -self.correct_time_offset*torch.reshape(self.w,(1,self.Nc))
716715
phase_offset = torch.reshape(phase_offset,(num_batches,self.Nc,1))
717716

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

0 commit comments

Comments
 (0)