@@ -745,7 +745,7 @@ def _add_lines_to_axes(self, ax: Axes, x: unyt_array, y: unyt_array) -> None:
745745 return
746746
747747 def get_quantity_from_catalogue_with_mask (
748- self , quantity : str , catalogue : VelociraptorCatalogue ,
748+ self , quantity : str , catalogue : VelociraptorCatalogue
749749 ) -> unyt_array :
750750 """
751751 Get a quantity from the catalogue using the mask.
@@ -755,17 +755,17 @@ def get_quantity_from_catalogue_with_mask(
755755 # We give each dataset a custom name, that gets ruined when masking
756756 # in versions of unyt less than 2.6.0
757757 name = x .name
758-
758+
759759 if self .structure_mask is not None :
760760 # if structure_mask already set, mask and return
761761 x_mask = logical_and (self .global_mask , self .structure_mask )
762762 x = x [x_mask ]
763763 x .name = name
764764 return x
765-
765+
766766 # allow all entries by default
767767 self .structure_mask = ones (x .shape ).astype (bool )
768-
768+
769769 if self .selection_mask is not None :
770770 # Create mask
771771 self .structure_mask = reduce (
@@ -779,24 +779,22 @@ def get_quantity_from_catalogue_with_mask(
779779 )
780780 self .structure_mask = logical_and (
781781 self .structure_mask ,
782- catalogue .structure_type .structuretype
783- == self .select_structure_type ,
782+ catalogue .structure_type .structuretype == self .select_structure_type ,
784783 )
785784 if self .exclude_structure_type is not None :
786785 self .structure_mask = logical_and (
787786 self .structure_mask ,
788- catalogue .structure_type .structuretype
789- != self .exclude_structure_type ,
787+ catalogue .structure_type .structuretype != self .exclude_structure_type ,
790788 )
791-
789+
792790 # combine global and structure masks
793791 x_mask = logical_and (self .global_mask , self .structure_mask )
794792
795793 # apply to the unyt array of values
796794 x = x [x_mask ]
797795 x .name = name
798796 return x
799-
797+
800798 def _make_plot_scatter (
801799 self , catalogue : VelociraptorCatalogue
802800 ) -> Tuple [Figure , Axes ]:
@@ -962,7 +960,7 @@ def _make_plot_cumulative_histogram(
962960 return fig , ax
963961
964962 def make_plot (
965- self , catalogue : VelociraptorCatalogue , directory : str , file_extension : str ,
963+ self , catalogue : VelociraptorCatalogue , directory : str , file_extension : str
966964 ):
967965 """
968966 Federates out data parsing to individual functions based on the
@@ -1048,7 +1046,7 @@ class AutoPlotter(object):
10481046 created_successfully : List [bool ]
10491047 # global mask
10501048 global_mask : Union [None , array ]
1051-
1049+
10521050 def __init__ (
10531051 self ,
10541052 filename : Union [str , List [str ]],
@@ -1113,7 +1111,9 @@ def parse_yaml(self):
11131111
11141112 return
11151113
1116- def link_catalogue (self , catalogue : VelociraptorCatalogue , global_mask_tag : Union [None , str ]):
1114+ def link_catalogue (
1115+ self , catalogue : VelociraptorCatalogue , global_mask_tag : Union [None , str ]
1116+ ):
11171117 """
11181118 Links a catalogue with this object so that the plots
11191119 can actually be created.
0 commit comments