added spectrogram method to Spectrum
This commit is contained in:
@@ -5,7 +5,7 @@ import warnings
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from functools import cached_property
|
from functools import cached_property
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Callable, Generic, Iterator, Sequence, TypeVar, overload
|
from typing import Callable, Generic, Iterable, Iterator, Sequence, TypeVar, overload
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
@@ -161,6 +161,9 @@ class Spectrum(np.ndarray):
|
|||||||
"""
|
"""
|
||||||
return pulse.g12(self, axis)[..., self.wl_order]
|
return pulse.g12(self, axis)[..., self.wl_order]
|
||||||
|
|
||||||
|
def spectrogram(self, delays: Iterable[float], gate_width: float = 2e-13) -> np.ndarray:
|
||||||
|
return pulse.spectrogram(self.t, delays, self.time_amp, gate_width)
|
||||||
|
|
||||||
freq_int = afreq_int
|
freq_int = afreq_int
|
||||||
freq_amp = afreq_amp
|
freq_amp = afreq_amp
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user