Skip to content

Problem with saving and reading certain SFF files #20

@KJ-Waller

Description

@KJ-Waller

Hi Scott,

I'm experiencing some issues with saving SFF files, as some of the SFF files seem to be empty when I read them in Python. There are two ways I have found I can recreate the issue.

First of all, when using SaveData on a spectrogram which does not have a maxFreq value, I get empty spectrograms when reading the SFF file in Python.

C#

(int sampleRate, double[] audio) = WavFile.ReadMono(filename); spec = Spectrogram.Spectrogram(sampleRate, fttSize: 512, sstepSize: 200); spec.Add(audio); spec.SaveData("spectrogram.sff");

Python

sff_spec = sffLib.SpectrogramFile('spectrogram.sff').values

At which point sff_spec is None.

Secondly, I also get the same problem when providing a maxFreq > 7999 in C# when instantiating the spectrogram. Even with setting the maxFreq = 7999, I get some SFF files that still contain no spectrogram data. One such example is this file from the TESS dataset.

Is this a problem with the C# SaveData function or am I doing something wrong saving the SFF files?

Regards,
Kevin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions