Skip to content

feat: add columns for anti bias intervention to trials table and qc plot - #53

Merged
arjunsridhar12345 merged 11 commits into
devfrom
52-add-columns-for-anti-bias-intervention-to-trials-table
Aug 6, 2026
Merged

feat: add columns for anti bias intervention to trials table and qc plot#53
arjunsridhar12345 merged 11 commits into
devfrom
52-add-columns-for-anti-bias-intervention-to-trials-table

Conversation

@arjunsridhar12345

@arjunsridhar12345 arjunsridhar12345 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Attempts to close #52. Tries to add anti bias intervention columns to the trials table, and add tick marks to the side bias plot for anti bias intervention

@arjunsridhar12345
arjunsridhar12345 marked this pull request as ready for review July 30, 2026 01:12
plotted = True
if anti_bias_left_water is not None:
left = np.where(np.asarray(anti_bias_left_water, dtype=bool))[0]
ax.vlines(left, -1.0, -0.9, color="cyan", linewidth=1, label="Anti-bias water (L)")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

should we do the conventional right is red and blue is left for these marks?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

tried to address in cd288b5

@alexpiet

Copy link
Copy Markdown

Can you post an example plot and trials table?

@arjunsridhar12345

Copy link
Copy Markdown
Collaborator Author

Can you post an example plot and trials table?

image

864253_2026-07-17_19-28-27_trial_table.csv

Used this session: 864253_2026-07-17_19-28-27. Seems like anti_bias_left_water and anti_bias_right_water have all False values, and anti_bias_lickspout_movement has all 0 values. I think though this session had bias intervention. Will try to look more to see if there's any issues

@alexpiet

Copy link
Copy Markdown

Probably unrelated to this PR, but why on trial 21 did the lickspout y1,y2 values increase by .2, and then decrease again? @micahwoodard @arjunsridhar12345

@alexpiet

alexpiet commented Aug 4, 2026

Copy link
Copy Markdown
  • One additional request, add tick marks to the second row (lickspout position) for automatic and manual lick spout movements. The automatic lickspout movement ticks will be the same logic as those in the first row (anti-bias lickspout move), and the manual movements will be any movements that are NOT anti-bias lickspout movements.
  • It appears the example session DID have an anti-bias lickspout movement, but its not showing up in the QC plot. From the raw data (SoftwareEvents/ManipulatorBiasTracker.json)
{"name":"ManipulatorBiasTracker","timestamp":2063835.1488,"timestamp_source":"harp","frame_index":null,"frame_timestamp":null,"data":-0.05,"data_type":"number","data_type_hint":null}

I didn't check the raw hardware logs

  • looks like the anti-bias water is not being plotted correctly.

  • Micah says the example session used here is missing metadata. More recent data might have this fixed. Arjun should regenerate with more recent data (should be fixed for data collected after @micahwoodard ?)

@micahwoodard

Copy link
Copy Markdown

#47 (comment)

@alexpiet alexpiet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See comments

@arjunsridhar12345

Copy link
Copy Markdown
Collaborator Author

ok I think I found one with some anti bias, looking at this session: 864253_2026-07-29_11-50-18

image

I'll try and cleanup the plot, the legend is blocking stuff and add these below that we talked about:

One additional request, add tick marks to the second row (lickspout position) for automatic and manual lick spout movements. The automatic lickspout movement ticks will be the same logic as those in the first row (anti-bias lickspout move), and the manual movements will be any movements that are NOT anti-bias lickspout movements.

@arjunsridhar12345

Copy link
Copy Markdown
Collaborator Author

do the colors and size seem ok here? tried to modify it and add the ticks to the lickspout position plot

image

@alexpiet

alexpiet commented Aug 6, 2026

Copy link
Copy Markdown

@arjunsridhar12345 This is looking good. One modification. Can you put the markers for the lickspout near the side bias = 0 horizontal line. Make the markers that move the lickspout to the left (like in this example) as arrows under-neath the y=0 line and make them triangles that point downwards. Make the markers that move the lickspout to the right as arrows above the y=0 line and make them triangles that point upwards.

Here is an example ( I didn't remove the old markers, but you should)
Screenshot 2026-08-06 at 12 51 45 PM

EDIT:
Can you make the markers for movements to the left blue, and make the markers for movements to the right red? (ignoring the green I used in my example)

@alexpiet

alexpiet commented Aug 6, 2026

Copy link
Copy Markdown

Can you also color the auto-water markers in the 3rd row a dark blue if they are anti-bias intervention autowater?

@arjunsridhar12345

Copy link
Copy Markdown
Collaborator Author

how does this look?

image

@alexpiet alexpiet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

looks great, thanks

@arjunsridhar12345
arjunsridhar12345 merged commit 1408e67 into dev Aug 6, 2026
@arjunsridhar12345
arjunsridhar12345 deleted the 52-add-columns-for-anti-bias-intervention-to-trials-table branch August 6, 2026 23:25
arjunsridhar12345 added a commit that referenced this pull request Aug 6, 2026
* feat: update the columns in the trials table from the acquisition software (#63)

* feat: add additional columns from acquisition

* test: update tests

* docs: update trial table docs with changelog and updates

* feat: add columns for anti bias intervention to trials table and qc plot (#53)

* feat: add anti-bias intervention to trial table and qc plot

* test: update tests

* docs: update trial table doc

* chore: fix linting

* fix: restore changes lost in merge conflict

* refactor: use convention red for right and blue for left

* feat: add ticks for anti bias in lickspout plot

* feat: add ticks to side bias plots and adjust color
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.

3 participants