find_best_frametype#

gwpy.io.datafind.find_best_frametype(
channel: str | Channel,
start: SupportsToGps,
end: SupportsToGps,
*,
allow_tape: bool = True,
**kwargs,
) str[source]#
gwpy.io.datafind.find_best_frametype(
channel: Iterable[ChannelLike],
start: SupportsToGps,
end: SupportsToGps,
*,
allow_tape: bool = True,
**kwargs,
) dict[ChannelLike, str]

Intelligently select the best frametype from which to read this channel.

Parameters:
channelstr, Channel

the channel to be found

startLIGOTimeGPS, float, str

GPS start time of period of interest, any input parseable by to_gps is fine

endLIGOTimeGPS, float, str

GPS end time of period of interest, any input parseable by to_gps is fine

allow_tapebool, optional

do not test types whose frame files are stored on tape (not on spinning disk)

kwargs

Other keyword arguments are passed to find_frametype.

Returns:
frametypestr

the best matching frametype for the channel in the [start, end) interval

Raises:
ValueError

If no valid frametypes are found.

See also

find_frametype

For details of how available frametypes are matched.

Examples

>>> from gwpy.io.datafind import find_best_frametype
>>> find_best_frametype('L1:GDS-CALIB_STRAIN', 1126259460, 1126259464)
'L1_HOFT_C00'