Skip to content

Transition index seems incorrect? #39

Open

Description

@dsvensson

I added transStart to the csv logs and tried to plot the raw data and it doesn't seem to line up with the falloff-point. Here's the transStart from OSLTT in green compared to fall-off point from my code as red:

Image Image Image Image

Hope I haven't missed something trivial. The only weirdness (without blaming the classification itself) I noticed was this:

samples = averagedSamples.Skip(period).ToArray(); //Moving average spoils the first 10 samples so currently removing them.

But that would only account for 10 samples drift.

Activity

  1. andymanic commented on Sep 26, 2025

    @andymanic
    Contributor

    Ran a quick test and I'm getting as near as possible to the transition start on the data I've got anyway. Can you send me the raw data you're using so I can test it here?

  2. dsvensson commented on Sep 26, 2025

    @dsvensson
    Author

    Here's the data behind above graphs:
    OSLTT-LIGHT-001-RAW-OSLTT.csv
    OSLTT-LIGHT-001-PROCESSED-OSLTT.csv

    The last one has the two extra columns compared to release:

    • TransIndex = ProcessData::processInputLagData's transStart
    • TransValue = samples[transStart]
  3. andymanic commented on Sep 26, 2025

    @andymanic
    Contributor

    Image Had a further look and had it output the smoothed data, and it is spot on using that reference. This image is the second transition in your file, and visually the transition starts at point 386, which is exactly where the code picked for it. It's just the moving average filter shifting the data slightly.

  4. dsvensson commented on Sep 26, 2025

    @dsvensson
    Author

    Yeah, but that one is very close in my graph as well - I too classify filtered, just present it raw, I classify that one as 391. How does the others fare?

    So my attached images are at offsets:

    • 113 (OSLTT 69)
    • 391 (OSLTT 386)
    • 256 (OSLTT 224)
    • 160 (OSLTT 104)
  5. andymanic commented on Sep 26, 2025

    @andymanic
    Contributor

    Gotcha. It's getting late here so I'll have a proper look over the weekend, but my current guesstimate is that because the light level is so low (it's a 14 bit number so goes up to ~16000), and the processing code has a couple of hardcoded variables for essentially the sensitivity it's pinging too early on this data set. I'll have a better look when I'm a little more awake and see what I can do.

  6. andymanic commented on Sep 27, 2025

    @andymanic
    Contributor

    Hi there, I've had a look and I was right, especially for falling transitions the processing code was a little too sensitive when running at such a relatively low brightness. I've pushed a fix that helps get it as close to spot on as I can for now.

  7. dsvensson commented on Sep 27, 2025

    @dsvensson
    Author

    Great, you probably also want to add the period number of samples you skip here:

    samples = averagedSamples.Skip(period).ToArray(); //Moving average spoils the first 10 samples so currently removing them.

    ...to the transStart later on. A few microseconds lower lag otherwise right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions