From a107404ac2ed44b4a6f23a9bc2a44addef73c708 Mon Sep 17 00:00:00 2001 From: Kris Dreher Date: Mon, 18 Sep 2023 17:42:07 +0200 Subject: [PATCH] Fixed some bugs in the newest main contribution --- simpa/utils/libraries/structure_library/VesselStructure.py | 2 +- .../manual_tests/test_with_experimental_measurements/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/simpa/utils/libraries/structure_library/VesselStructure.py b/simpa/utils/libraries/structure_library/VesselStructure.py index 1d387e2b..2dd96e2a 100644 --- a/simpa/utils/libraries/structure_library/VesselStructure.py +++ b/simpa/utils/libraries/structure_library/VesselStructure.py @@ -71,7 +71,7 @@ def calculate_vessel_samples(self, position, direction, bifurcation_length, radi if samples >= bifurcation_length: vessel_branch_positions1 = position vessel_branch_positions2 = position - angles = np.random.normal(torch.pi / 16, torch.pi / 8, 3) + angles = np.random.normal(np.pi / 16, np.pi / 8, 3) vessel_branch_directions1 = torch.tensor(np.matmul(rotation(angles), direction)).to(self.torch_device) vessel_branch_directions2 = torch.tensor(np.matmul(rotation(-angles), direction)).to(self.torch_device) vessel_branch_radius1 = 1 / math.sqrt(2) * radius diff --git a/simpa_tests/manual_tests/test_with_experimental_measurements/utils.py b/simpa_tests/manual_tests/test_with_experimental_measurements/utils.py index 50bac01b..955c8ca4 100644 --- a/simpa_tests/manual_tests/test_with_experimental_measurements/utils.py +++ b/simpa_tests/manual_tests/test_with_experimental_measurements/utils.py @@ -13,7 +13,7 @@ def read_rxt_file(file_path: str) -> (np.ndarray, np.ndarray, np.ndarray, float) if not os.path.isfile(file_path): raise FileNotFoundError(f"You need to supply the path to a file, not {file_path}") - dataframe = pd.read_csv(file_path, " ", skiprows=1, header=None) + dataframe = pd.read_csv(file_path, sep=" ", skiprows=1, header=None) with open(file_path, "r") as metadata_path: metadata = metadata_path.readline().split("\t")