Skip to content

Fix the case where only one SFT needs to be selected in a SFTCatalog timeslice

Evan Goetz requested to merge evan-goetz/lalsuite:fix-timeslice into master

Description

When using the function XLALSFTCatalogTimeslice(), if the user is trying to select a single SFT out of the catalog, the function will return nothing because the current logic does not allow a single SFT (i.e., the case where iStart == iEnd). The simple solution is to change < to <= in the logic to support this functionality.

The inner function XLALFindTimesliceBounds() will return iStart=1 and iEnd=0 if no SFTs are found in the catalog with the range of timestamps specified.

API Changes and Justification

Backwards Compatible Changes

  • This change introduces no API changes
  • This change adds new API calls

Backwards Incompatible Changes

  • This change modifies an existing API
  • This change removes an existing API

If any of the Backwards Incompatible check boxes are ticked please provide a justification why this change is necessary and why it needs to be done in a backwards incompatible way.

Review Status

This has not yet been reviewed. @karl-wette or @david-keitel would be natural review candidates.

Merge request reports