diff --git a/xrd_simulator/cuda.py b/xrd_simulator/cuda.py index a39e68b..5158fc5 100644 --- a/xrd_simulator/cuda.py +++ b/xrd_simulator/cuda.py @@ -2,7 +2,7 @@ import numpy as np import pandas as pd # Default to False -fw = np +fw = torch # =============================================== @@ -12,11 +12,10 @@ print("CUDA is available and GPUs are found.") gpu = input("Do you want to run in GPU? [y/n]").strip().lower() or 'y' if gpu == 'y': - fw = torch torch.set_default_device('cuda') print("Running in GPU...") else: - fw = np + torch.set_default_device('cpu') print("Running in CPU...") else: print("CUDA is not available.") diff --git a/xrd_simulator/detector.py b/xrd_simulator/detector.py index 7bd2cda..9122f41 100644 --- a/xrd_simulator/detector.py +++ b/xrd_simulator/detector.py @@ -186,7 +186,7 @@ def render(self, # Step 4: Use the new column as a pixel value to be added to each coordinate rendered_frames[result[:,2].int(),result[:,0].int(),result[:,1].int()] = result[:,3] - rendered_frames = self._apply_point_spread_function(rendered_frames) + #rendered_frames = self._apply_point_spread_function(rendered_frames) # Chose numpy if you want to write the frames as tiffs if output_type == 'numpy': diff --git a/xrd_simulator/polycrystal.py b/xrd_simulator/polycrystal.py index 1752156..424492f 100644 --- a/xrd_simulator/polycrystal.py +++ b/xrd_simulator/polycrystal.py @@ -87,6 +87,7 @@ def _diffract(dict): rigid_body_motion.rotation_angle, ) + # We now assemble the tensors with the valid reflections for each grain and phase including time, hkl plane and G vector #Column names of peaks are 'grain_index','phase_number','h','k','l','structure_factors','times','G0_x','G0_y','G0_z') if fw is np: