lalapps_SFTclean output improvements
Description
@karl-wette Here are two three more improvements to lalapps_SFTclean
that would be great to get into the upcoming release.
- implement same comment handling as in
lalapps_splitSFTs
- this is controlled by the same--addComment=[0,1,2]
argument, with the new default2
meaning a comment will be appended to the original. - add
--outSingleSFT
mode- SFTs will be written to a single file per IFO
- now always using a
MultiSFTCatalogView
to loop over SFTs in per-IFO order - using canonical output file names from
XLALOfficialSFTFilename
- in
LALRemoveKnownLinesInMultiSFTVector()
usebasename()
of linesfile to determine detector prefix, allowing to pass absolute filename paths to the app
(But for now I've kept the original logic with single-SFT calls to LALRemoveKnownLinesInMultiSFTVector()
; I'd need to study the internals more carefully to know if it's safe to change to a single call to that one instead.)
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
Test script has been extended to cover the --outSingleSFT
mode.
As commented in the code, there are two assumptions I'm relying on:
-
XLALSFTdataFind()
returning a catalogue with SFTs sorted by increasing GPS-epochs (always true as per documentation) -
LALRemoveKnownLinesInMultiSFTVector()
properly applies only those files with canonic IFO names matching the single-IFO inputSFTs (seems to be its whole point)
Edited by David Keitel