Skip to content

P/improve test watertank#352

Merged
ebrahimebrahim merged 24 commits into
mainfrom
p/improve-test-watertank
Jun 30, 2025
Merged

P/improve test watertank#352
ebrahimebrahim merged 24 commits into
mainfrom
p/improve-test-watertank

Conversation

@peterhollender

@peterhollender peterhollender commented Jun 26, 2025

Copy link
Copy Markdown
Contributor

Makes changes to the io module to improve communication with hardware.

  • Standardizes pin-mapping on transmit modules
  • Corrects for pulse length truncation when using long pulses
  • Fixes bugs in test_watertank.py
  • Fixes bugs with status and communication setup
  • Incorporates sequencing and messaging interface to firmware

Closes #349
Closes #354

@peterhollender peterhollender left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looks good. We'll want confirmation from @alkagan that no further changes are needed to support communication to the Slicer extension

Comment thread .gitignore

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

test_watertank was saving files to the root directory. Switched it to put them in a logs directory, so adding that to the .gitignore

Comment thread db_dvc.dvc

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Adds new transducer definitions with the proper pin-mapping. We can skip this add update dvc in a separate PR if needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We fixed up the way "mode" and "trigger_mode" were used across io. Now everything uses trigger_mode and it is converted to an integer at a low level

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looks like the team added some extra scripts. I'll ultimately want to clean up notebooks, but its probably OK for the moment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the main test script we're using. It's been significantly improved.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

important changes to make sequencing work

"TriggerPulseCount": pulse_count,
"TriggerPulseWidthUsec": pulse_width,
"TriggerPulseTrainInterval": pulse_train_interval,
"TriggerPulseTrainInterval": pulse_train_interval * 1000000,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In the long run, we should rename this to "TriggerPulseTrainIntervalUsec", but that will also require a firmware update. See #353

if cycles > (MAX_REPEAT+1):
# Use elastic repeat
pulse_duration_samples = cycles * self.bf_clk / profile_index.frequency
pulse_duration_samples = self.bf_clk * ((cycles / profile_index.frequency) + ELASTIC_MODE_PULSE_LENGTH_ADJUST)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I hate magic numbers, so created #351 to investigate this further.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Channel reversing is contained here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

convenience functions

@ebrahimebrahim ebrahimebrahim force-pushed the p/improve-test-watertank branch from 2e31095 to f6ae4dd Compare June 30, 2025 20:32
@ebrahimebrahim ebrahimebrahim enabled auto-merge (squash) June 30, 2025 20:34

@ebrahimebrahim ebrahimebrahim left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🎉

@ebrahimebrahim ebrahimebrahim merged commit d0da081 into main Jun 30, 2025
9 checks passed
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.

Channel order is reversed in transmit modules LIFUInterface.set_solution doesn't pass trigger_mode

3 participants