https://github.com/agencyenterprise/neurotechdevkit/issues/134
This PR adds the get_steady_state_result_2d method to the SteadyStateResult3D class to be able to convert the SteadyStateResult3D output of a 3-D simulation to a SteadyStateResult2D that just encapsulates the slice of interest.
Changes
The get_steady_state_result_2d method with optional arguments of slice_axis and slice_position (the slice_axis and slice_position property of the 3D result is used when none is given) is added to the SteadyStateResult3D class in _results.py. The method _validate_slice_args is also added to SteadyStateResult3D to check the slice being made. The SteadyStateResult2D object returned by the get_steady_state_result_2d method has the target and sources removed (should be changed to the correctly sliced target and sources in https://github.com/agencyenterprise/neurotechdevkit/issues/148); warnings for missing target/sources are added to the rendering and metrics of SteadyStateResult2D. Moved definition of SliceAxis enum from _base.py to _utils.py, so the get_steady_state_result_2d method can be typed.
Behavior
The new behavior is the generation of a 2D steady-state result object from a 3D steady-state result object by the get_steady_state_result_2d method of the SteadyStateResult3D class. This can be tested by making a 3D steady-state result and calling the method to generate a 2D slice of that result.
Introduction
https://github.com/agencyenterprise/neurotechdevkit/issues/134 This PR adds the
get_steady_state_result_2d
method to theSteadyStateResult3D
class to be able to convert theSteadyStateResult3D
output of a 3-D simulation to aSteadyStateResult2D
that just encapsulates the slice of interest.Changes
The
get_steady_state_result_2d
method with optional arguments ofslice_axis
andslice_position
(theslice_axis
andslice_position
property of the 3D result is used when none is given) is added to theSteadyStateResult3D
class in_results.py
. The method_validate_slice_args
is also added toSteadyStateResult3D
to check the slice being made. TheSteadyStateResult2D
object returned by theget_steady_state_result_2d
method has the target and sources removed (should be changed to the correctly sliced target and sources in https://github.com/agencyenterprise/neurotechdevkit/issues/148); warnings for missing target/sources are added to the rendering and metrics ofSteadyStateResult2D
. Moved definition of SliceAxis enum from_base.py
to_utils.py
, so theget_steady_state_result_2d
method can be typed.Behavior
The new behavior is the generation of a 2D steady-state result object from a 3D steady-state result object by the
get_steady_state_result_2d
method of theSteadyStateResult3D
class. This can be tested by making a 3D steady-state result and calling the method to generate a 2D slice of that result.