How to trim down a log file?

Try this:

mavlogdump.py --condition "XKF1.TimeUS > 127000000 and XKF1.TimeUS < 147000000" source.bin --parms --quiet --meta --output destination.bin

It will preserve the parameters and be quiet

For more information do:

mavlogdump.py --help

EDIT: To be on the safe side you need a pymavlink version newer than Feb 2024. Previous versions had a bug.