deepextractor.api ================= .. py:module:: deepextractor.api .. autoapi-nested-parse:: Top-level convenience functions for DeepExtractor inference. For one-shot use. For repeated inference on many signals, instantiate :class:`DeepExtractorModel` directly to amortise the model load cost. Module Contents --------------- .. py:function:: reconstruct(noisy_input: numpy.ndarray, checkpoint: str = 'DeepExtractor_257', checkpoint_filename: str = CHECKPOINT_BILBY, checkpoint_dir: str | None = None, device: str | None = None, scaler_path: str | None = None) -> numpy.ndarray Extract the transient signal from a noisy gravitational-wave strain. Loads a DeepExtractor model, runs inference, and returns the reconstructed signal. For repeated calls, prefer instantiating :class:`DeepExtractorModel` directly to avoid reloading weights on each call. :param noisy_input: 1-D array of shape ``(T,)`` or 2-D batch of shape ``(N, T)``. :type noisy_input: np.ndarray :param checkpoint: Model name. Default ``"DeepExtractor_257"``. :type checkpoint: str :param checkpoint_filename: Checkpoint filename. Defaults to the bilby-noise checkpoint. :type checkpoint_filename: str :param checkpoint_dir: Local checkpoint directory. Falls back to HuggingFace Hub if None. :type checkpoint_dir: str | None :param device: Torch device string. Auto-detected if None. :type device: str | None :param scaler_path: Path to scaler .pkl. Uses bundled asset if None. :type scaler_path: str | None :returns: Reconstructed signal, same shape as ``noisy_input``. :rtype: np.ndarray .. py:data:: extract