QGram#
- class gwpy.signal.qtransform.QGram( )[source]#
Bases:
objectStore tile energies over an irregularly gridded plane.
- Parameters:
Methods Summary
interpolate([tres, fres, logf, outseg])Interpolate this
QGramover a regularly-gridded spectrogram.table([snrthresh])Represent this
QPlaneas anEventTable.Methods Documentation
- interpolate(
- tres: float | None | str = '<default>',
- fres: float | None | str = '<default>',
- *,
- logf: bool = False,
- outseg: Segment | None = None,
Interpolate this
QGramover a regularly-gridded spectrogram.- Parameters:
- tres
float Desired time resolution (seconds) of output
Spectrogram, default isabs(outseg) / 1000.- fres
float,int,None Desired frequency resolution (Hertz) of output
Spectrogram, or, iflogf=True, the number of frequency samples; giveNoneto skip this step and return the original resolution, default is 0.5 Hz or 500 frequency samples.- logf
bool Boolean switch to enable (
True) or disable (False) use of log-sampled frequencies in the outputSpectrogram.- outseg
Segment GPS
[start, stop)segment for outputSpectrogram, default is the full duration of the input.
- tres
- Returns:
- out
Spectrogram Output
Spectrogramof normalised Q energy.
- out
See also
scipy.interpolateThis method uses
InterpolatedUnivariateSplineto cast all frequency rows to a common time-axis, and theninterp2dto apply the desired frequency resolution across the band.
Notes
This method will return a
Spectrogramof dtypefloat32ifnormis given, andfloat64otherwise.To optimize plot rendering with
pcolormesh, the outputSpectrogramcan be given a log-sampled frequency axis by passinglogf=Trueat runtime. Thefresargument is then the number of points on the frequency axis. Note, this is incompatible withimshow.It is also highly recommended to use the
outsegkeyword argument when only a small window around a given GPS time is of interest.
- table(snrthresh: float = 5.5) EventTable[source]#
Represent this
QPlaneas anEventTable.- Parameters:
- snrthresh
float Lower inclusive threshold on individual tile SNR to keep in the table, default: 5.5.
- snrthresh
- Returns:
- out
EventTable A table of time-frequency tiles on this
QPlane.
- out
Notes
Only tiles with signal energy greater than or equal to
snrthresh ** 2 / 2will be stored in the outputEventTable.