Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only includes first slide in a critical period #13

Open
ehmatthes opened this issue Feb 8, 2021 · 1 comment
Open

Only includes first slide in a critical period #13

ehmatthes opened this issue Feb 8, 2021 · 1 comment

Comments

@ehmatthes
Copy link
Owner

On 11/1-2/2020, there were two slides. The first was around 19:25 on 11/1, and the second was around 03:00 on 11/2. Only the first of these two slides shows up on the output.

It's probably a simple change to look for additional slides during a critical period.

@ehmatthes
Copy link
Owner Author

Here's get_relevant_slide() in plot_heights.py:

def get_relevant_slide(readings, known_slides):
    """If there's a relevant slide during this set of readings, 
    return that slide.
    Otherwise, return None.
    """
    relevant_slide = None
    for slide in known_slides:
        if readings[0].dt_reading <= slide.dt_slide <= readings[-1].dt_reading:
            print(f"Slide in range: {slide.name} - {slide.dt_slide}")
            relevant_slide = slide
            break

    return relevant_slide

This needs to be modified to get_relevant_slides(), and the caller needs to process the multiple slides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant