Skip to content

Bug preventing using custom cache without state flag #126

@dethodav

Description

@dethodav

When a cache file is provided, but no state flag is specified, the analyzable segments are calculated using this function call:

segs = segments.get_frame_segments(ifo, frametype, datastart, dataend)

Since no frame type is needed when using a cache file, this returns an empty segment list. This then results in a runtime error at the following line:

raise RuntimeError("No analysable segments found")

This can be avoided by providing a state flag to calculate the analyzable segments. However, if one is attempting to analyze user-generated data, a usable state flag may not exist. The ideal behavior when using a cache file (and no state flag) is to use the cache file itself to generate the analyzable segments.

This can be fixed by adding an extra elif statement for this situation, which uses gwpy.io.cache.cache_segments() to calculate the required segments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions