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

Updated for biorbd 1.11.0 #98

Merged
merged 4 commits into from
Apr 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed mamba
pariterre authored Apr 3, 2024
commit 05c17de18879518b048a97ffe8ba0c145d4e9b53
1 change: 0 additions & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -34,7 +34,6 @@ jobs:

- name: Print mamba info
run: |
mamba config --show
mamba info
mamba list


Unchanged files with check annotations Beta

self.n_max_events = 100
self.last_event_index = -1
self.events: list[dict[str:RectangleOnSlider, str:int, str:str]] = [] # events [marker/frame/event_name]

Check warning on line 334 in bioviz/__init__.py

Codecov / codecov/patch

bioviz/__init__.py#L334

Added line #L334 was not covered by tests
self.active_analyses: AnalysePanel | None = None
self.column_stretch = 0
self.ax_passive_forces.set_facecolor(background_color)
self.ax_passive_forces.set_title("Passive forces")
self.ax_passive_forces.set_ylabel("Passive forces coeff")
self.ax_passive_forces.set_ylim((0, 1))

Check warning on line 93 in bioviz/analyses/muscle_analyses.py

Codecov / codecov/patch

bioviz/analyses/muscle_analyses.py#L93

Added line #L93 was not covered by tests
# Add active forces
self.canvas_active_forces = FigureCanvasQTAgg(plt.figure(facecolor=background_color))
self.ax_active_forces.set_facecolor(background_color)
self.ax_active_forces.set_title("Active forces")
self.ax_active_forces.set_ylabel("Active forces coeff")
self.ax_active_forces.set_ylim((0, 1))

Check warning on line 104 in bioviz/analyses/muscle_analyses.py

Codecov / codecov/patch

bioviz/analyses/muscle_analyses.py#L104

Added line #L104 was not covered by tests
self.active_forces_slider = QSlider()
active_forces_layout.addWidget(self.active_forces_slider)
self.active_forces_slider.setPalette(self.main_window.palette_active)
if mus.type() != biorbd.IDEALIZED_ACTUATOR:
active_forces[i, m] = biorbd.HillType(mus).FlCE(emg)
else:
active_forces[i, m] = emg.activation()

Check warning on line 231 in bioviz/analyses/muscle_analyses.py

Codecov / codecov/patch

bioviz/analyses/muscle_analyses.py#L231

Added line #L231 was not covered by tests
return x_axis, length, moment_arm, passive_forces, active_forces
def __update_specific_plot(self, canvas, ax, x, y, skip=False, autoscale_y=True):

Check warning on line 235 in bioviz/analyses/muscle_analyses.py

Codecov / codecov/patch

bioviz/analyses/muscle_analyses.py#L235

Added line #L235 was not covered by tests
# Plot all active muscles
number_of_active = 0
for m in range(self.n_mus):
# If there is no data skip relim and vertical bar adjustment
if number_of_active != 0:
# relim so the plot looks nice
if not autoscale_y:
y_lim = ax.get_ylim()

Check warning on line 253 in bioviz/analyses/muscle_analyses.py

Codecov / codecov/patch

bioviz/analyses/muscle_analyses.py#L252-L253

Added lines #L252 - L253 were not covered by tests
ax.relim()
ax.autoscale(enable=True)
if not autoscale_y:
ax.set_ylim(y_lim)

Check warning on line 257 in bioviz/analyses/muscle_analyses.py

Codecov / codecov/patch

bioviz/analyses/muscle_analyses.py#L256-L257

Added lines #L256 - L257 were not covered by tests
# Adjust axis label (give a generic name)
if self.animation_checkbox.isChecked():
def _get_data_from_eigen(self, Q=None, compute_kin=True):
self.data = []
allJCS = self.m.allGlobalJCS(Q, compute_kin)

Check warning on line 284 in bioviz/interfaces_collection.py

Codecov / codecov/patch

bioviz/interfaces_collection.py#L284

Added line #L284 was not covered by tests
for jcs in allJCS:
self.data.append(jcs.to_array())