File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -252,12 +252,16 @@ def create_scatter(
252252 rotation_center = None
253253 rotation_matrix = None
254254
255- if projection == Projection .EDGE_ON :
256- rotation_center = halo .position .to (particle_data .coordinates .units )
257- rotation_matrix = rotation_matrix_from_vector (halo .L .v , "y" )
258- elif projection == Projection .FACE_ON :
259- rotation_center = halo .position .to (particle_data .coordinates .units )
260- rotation_matrix = rotation_matrix_from_vector (halo .L .v , "z" )
255+ # If the L vector is poorly constrained this will complain,
256+ # but we don't really care.
257+ with np .testing .suppress_warnings () as sup :
258+ sup .filter (RuntimeWarning )
259+ if projection == Projection .EDGE_ON :
260+ rotation_center = halo .position .to (particle_data .coordinates .units )
261+ rotation_matrix = rotation_matrix_from_vector (halo .L .v , "y" )
262+ elif projection == Projection .FACE_ON :
263+ rotation_center = halo .position .to (particle_data .coordinates .units )
264+ rotation_matrix = rotation_matrix_from_vector (halo .L .v , "z" )
261265
262266 if hasattr (particle_data , "smoothing_lengths" ):
263267 backend = "fast"
You can’t perform that action at this time.
0 commit comments