Skip to content

Commit

Permalink
fix channel slice
Browse files Browse the repository at this point in the history
  • Loading branch information
luiztauffer committed Apr 30, 2024
1 parent 9c415fc commit bb637c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class RecordingContext(BaseModel):
write_recording: bool = Field(default=False, description='Write recording')
stub_test: bool = Field(default=False, description='Stub test')
stub_test_duration_sec: float = Field(default=300, description='Stub test duration in seconds')
stub_test_channels: str = Field(default="1, 32", description='Stub test comma-separated range of channels')
stub_test_channels: str = Field(default="0, 31", description='Stub test comma-separated range of channels')


class JobKwargs(BaseModel):
Expand Down
3 changes: 2 additions & 1 deletion common/processor_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def run_pipeline(context: PipelineFullContext):
recording = recording.frame_slice(start_frame=0, end_frame=n_frames)
# Limit the number of channels to the stub test range
channel_ids = recording.channel_ids
stub_test_channels_ids = [channel_ids[int(a)] for a in context.recording_context.stub_test_channels.split(',')]
start, end = context.recording_context.stub_test_channels.split(',')
stub_test_channels_ids = [channel_ids[a] for a in range(int(start), int(end))]
recording = recording.channel_slice(channel_ids=stub_test_channels_ids)

logger.info(recording)
Expand Down

0 comments on commit bb637c6

Please sign in to comment.