Allow skipping subcarriers
This is useful for when processing from files which are larger than can be processed in real-time.
This commit is contained in:
parent
638440feff
commit
c19ac69a0e
@ -17,6 +17,7 @@ class Preprocessing(BaseModel):
|
||||
return (self.lowcut, self.highcut)
|
||||
|
||||
bandpass: Bandpass
|
||||
subcarrier_step: int
|
||||
|
||||
|
||||
class MUSIC(BaseModel):
|
||||
@ -67,8 +68,8 @@ class Config(BaseModel):
|
||||
@property
|
||||
def delta_f(self) -> int:
|
||||
if self.frame_format == "HESU":
|
||||
return 78_125
|
||||
return 312_500
|
||||
return 78_125 * self.preprocessing.subcarrier_step
|
||||
return 312_500 * self.preprocessing.subcarrier_step
|
||||
|
||||
@model_validator(mode="after")
|
||||
def channels(self) -> Self:
|
||||
|
||||
@ -34,8 +34,8 @@ class Preprocessor:
|
||||
h,
|
||||
)
|
||||
|
||||
# Skip every other subcarrier
|
||||
# h_hat = h_hat[::2, :, :]
|
||||
# Skip subcarrierss per config
|
||||
h_hat = h_hat[:: config.preprocessing.subcarrier_step, :, :]
|
||||
# logger.info(f"CSI shape: {h_hat.shape}")
|
||||
|
||||
h_hat = np.multiply(h_hat, h_hat.conj() / abs(h_hat.conj()))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user