UCBerkeleySETI / blimpy

Breakthrough Listen I/O Methods for Python
https://blimpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
46 stars 41 forks source link

fil2h5, h52fil, dice, and bl_scrunch can mangle the output file name #251

Closed texadactyl closed 2 years ago

texadactyl commented 2 years ago

In fil2h5, it is possible to mangle the output file name if the input file path has an embedded "fil". In essence, the embedded "fil" will be inadvertently changed to "h5". E.g. "abc.filter.def.fil" --> "abc.h5ter.def.h5" (should be "abc.filter.def.h5"). This was caused by misuse of the string replace function.

Solution: