neuralset.extractors.meta.CroppedExtractor

class neuralset.extractors.meta.CroppedExtractor(*, event_types: str | tuple[str, ...] = 'Event', aggregation: Literal['single', 'sum', 'mean', 'first', 'middle', 'last', 'cat', 'stack', 'trigger'] = 'single', allow_missing: bool = False, frequency: Literal['native'] = 'native', extractor: BaseExtractor, offset: float = 0, duration: Annotated[float, Gt(gt=0)] | None = None)[source][source]

Crop a extractor to a given offset and duration.

Parameters:
  • extractor (BaseExtractor) – The extractor to crop.

  • offset (float) – The offset (in seconds) from the start of the event to begin the crop.

  • duration (PositiveFloat | None) – The duration (in seconds) of the crop. If None, the crop extends to the end of the event.

  • frequency (Literal["native"]) – The frequency of the cropped extractor. Must be “native”. Never used