Skip to content

File splitting not working correctly with JBM

When using JBM in the tx: key of a condition, the file splitting may need some fixes/adaptation. This is the test config I used:

BS1534-1a.yml

Depending on different values in preprocessing_2, I get different results:

For repeat_signal: false and concatenate_input being either true or false, everything seems fine.

For repeat_signal: true and concatenate_input: false, the splitting does not seem to match the signal lengths, see screenshot below. A part of the first run of the signal seems to overlap into the repetition. This might be due to the JBM processing itself that can increase signal length.

Screenshot 2025-02-04 at 14.19.58.png

For repeat_signal: true and concatenate_input: true, the scripts crash with:

multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/miniforge/base/envs/ivas-proc-scripts/lib/python3.13/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
                    ~~~~^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniforge/base/envs/ivas-proc-scripts/lib/python3.13/multiprocessing/pool.py", line 51, in starmapstar
    return list(itertools.starmap(args[0], args[1]))
  File "/Users/knj/Documents/IVAS/ivas-processing-scripts/ivas_processing_scripts/processing/processing.py", line 572, in process_item
    p.process(input, output, input_meta, item_logger)
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/knj/Documents/IVAS/ivas-processing-scripts/ivas_processing_scripts/processing/processing_splitting_scaling.py", line 94, in process
    ) = self.revert_preamble_concatenation(
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        x, fs, in_file, out_file, meta_arrays, False, logger
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/Users/knj/Documents/IVAS/ivas-processing-scripts/ivas_processing_scripts/processing/processing_splitting_scaling.py", line 229, in revert_preamble_concatenation
    file_splits, meta_splits, new_splits = concat_teardown(
                                           ~~~~~~~~~~~~~~~^
        x,
        ^^
    ...<7 lines>...
        logger,
        ^^^^^^^
    )
    ^
  File "/Users/knj/Documents/IVAS/ivas-processing-scripts/ivas_processing_scripts/processing/processing.py", line 250, in concat_teardown
    split_start = (float(splits[i]) + 1) / float(fs)
                         ~~~~~~^^^
IndexError: list index out of range
"""