[docs]defpacket_processor_factory():camera_generation=cfg.default_cfg["timepix"]["camera_generation"]packet_processors={3:PacketProcessor,4:PacketProcessor_tpx4}ifcamera_generationinpacket_processors.keys():returnpacket_processors[camera_generation]else:raiseValueError(f"No packet processor for camera generation {camera_generation}")