james-trayford / strauss

Sonification Tools and Resources for Analysis Using Sound Synthesis
Apache License 2.0
33 stars 4 forks source link

Time limit percentiles #20

Open rosedshepherd opened 4 months ago

rosedshepherd commented 4 months ago

Hi James,

I have been sonifying some light curves using the Events source class. I set the time limits from 0 to 101 so that all of the notes would be able to ring out. The resulting sonification had all of the data played out in the first few seconds and then a long gap at the end (see waveform). Screenshot from 2024-05-02 14-45-38 The time data that I am using has a maximum value of ~2240 days, so the large value means that 1% of the time array is also large, causing gap at the end. Normalising the time array by subtracting the minimum time fixes the problem, but it would be great if this could be accounted for in the code!

james-trayford commented 4 months ago

Hi @rosedshepherd , thanks for pointing this out! This is not the desired behaviour and comes about because we extend by a fraction of the absolute value, and not a fraction of the the max-min range as would make more sense, see pull request: https://github.com/james-trayford/strauss/pull/21. This should mean that value ranges a long way from 0 will not get extended by these very large amounts (e.g. light curves in MJD)

james-trayford commented 4 months ago

once the pull request gets merged the problem should be fixed.