Skip to content

Slope storage display#390

Merged
BryonLewis merged 18 commits intomainfrom
slope-storage-display
Feb 27, 2026
Merged

Slope storage display#390
BryonLewis merged 18 commits intomainfrom
slope-storage-display

Conversation

@BryonLewis
Copy link
Collaborator

resolves #389

Stores slopes calculations and displays them in the tooltip when hovered over a pulse:

image

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 26, 2026

Deploying bats-ai with  Cloudflare Pages  Cloudflare Pages

Latest commit: defe1e6
Status: ✅  Deploy successful!
Preview URL: https://c7e6bbf3.bats-ai.pages.dev
Branch Preview URL: https://slope-storage-display.bats-ai.pages.dev

View logs

@BryonLewis BryonLewis requested a review from naglepuff February 26, 2026 17:39
Comment on lines +272 to +277
slope_avg_khz_per_ms: float | None
slope_hi_avg_khz_per_ms: float | None
slope_mid_avg_khz_per_ms: float | None
slope_at_hi_fc_knee_khz_per_ms: float | None
slope_at_fc_khz_per_ms: float | None
slope_at_low_fc_heel_khz_per_ms: float | None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this all of the slopes from batbot? I'm still not exactly sure which slopes they want. I know we talked about this at the meeting today, but I'm somewhat concerned that the requirement might change. In order to prevent data re-ingest, should we just store all of them in the database for now? We can change which ones/how we display them if requirements change

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I stored the six that it could be because the other ones seem like they are unlikely to be the slopes they want.

I'm asking Jason directly what he thinks it should be.

slope_at_hi_fc_knee_khz_per_ms: float | None = Field(None, alias="slope@hi fc:knee.khz/ms")
slope_at_fc_khz_per_ms: float | None = Field(None, alias="slope@fc.khz/ms")
slope_at_low_fc_heel_khz_per_ms: float | None = Field(None, alias="slope@low fc:heel.khz/ms")
slope_at_peak_khz_per_ms: float | None = Field(None, alias="slope@peak.khz/ms")
slope_avg_khz_per_ms: float | None = Field(None, alias="slope[avg].khz/ms")
slope_hi_avg_khz_per_ms: float | None = Field(None, alias="slope/hi[avg].khz/ms")
slope_mid_avg_khz_per_ms: float | None = Field(None, alias="slope/mid[avg].khz/ms")
slope_lo_avg_khz_per_ms: float | None = Field(None, alias="slope/lo[avg].khz/ms")
slope_box_khz_per_ms: float | None = Field(None, alias="slope[box].khz/ms")
slope_hi_box_khz_per_ms: float | None = Field(None, alias="slope/hi[box].khz/ms")
slope_mid_box_khz_per_ms: float | None = Field(None, alias="slope/mid[box].khz/ms")
slope_lo_box_khz_per_ms: float | None = Field(None, alias="slope/lo[box].khz/ms")

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, yeah I think maybe slope_lo_avg_khz_per_ms might be relevant, although I'm not exactly sure what that means. Jason's input will be helpful

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated and stored all values now

Comment on lines +81 to +85
<span
class="text-caption ml-4 text-medium-emphasis"
>
({{ data.slopeAtHiFcKneeKhzPerMs.toFixed(2) }} kHz/ms)
</span>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking we might want proper labels for the slopes. If the slope is average from x1 to x2, it could be like "Slope from Fmax to Knee". If its at a point, it could be "Slope at Knee"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to wait until they see it and give me feedback, this is client side and can be changed easily.

@BryonLewis BryonLewis merged commit 70303a3 into main Feb 27, 2026
6 checks passed
@BryonLewis BryonLewis deleted the slope-storage-display branch February 27, 2026 15:45
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

Successfully merging this pull request may close these issues.

Slope Calculations

2 participants