-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing how the predefined targt options can be used
- Loading branch information
1 parent
c9bb9c9
commit 22b9b30
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Scenario 2 predefined target | ||
==================================== | ||
!!! note | ||
NDK and its examples are under constant development, more information | ||
and content will be added to this example soon! | ||
This example demonstrates how to use one of the predefined targets of | ||
scenario 2. | ||
""" | ||
# %% | ||
# The list of supported targets is: | ||
import neurotechdevkit as ndk | ||
|
||
scenario_2_2d_targets = ( | ||
ndk.scenarios.built_in.Scenario2_2D.PREDEFINED_TARGET_OPTIONS.keys() | ||
) | ||
scenario_2_3d_targets = ( | ||
ndk.scenarios.built_in.Scenario2_3D.PREDEFINED_TARGET_OPTIONS.keys() | ||
) | ||
print("2D predefined targets: \n\t", ", ".join(scenario_2_2d_targets), "\n\n") | ||
print("3D predefined targets: \n\t", ", ".join(scenario_2_3d_targets), "\n\n") | ||
|
||
# %% | ||
# Using one of the predefined targets is as simple as: | ||
scenario = ndk.built_in.Scenario2_2D() | ||
target_options = ndk.scenarios.built_in.Scenario2_2D.PREDEFINED_TARGET_OPTIONS | ||
scenario.target = target_options["posterior-cingulate-cortex"] | ||
scenario.make_grid() | ||
|
||
scenario.render_layout() | ||
|
||
# %% | ||
# The same can be done for the 3D: | ||
scenario_3d = ndk.built_in.Scenario2_3D() | ||
target_options = ndk.scenarios.built_in.Scenario2_3D.PREDEFINED_TARGET_OPTIONS | ||
scenario_3d.target = target_options["left-temporal-lobe"] | ||
scenario_3d.make_grid() | ||
|
||
scenario_3d.render_layout() | ||
# %% |