File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ class Dataset(abc.ABC):
171
171
field_units : dict [AnyFieldKey , Unit ] | None = None
172
172
derived_field_list = requires_index ("derived_field_list" )
173
173
fields = requires_index ("fields" )
174
+ _field_info = None
174
175
conversion_factors : dict [str , float ] | None = None
175
176
# _instantiated represents an instantiation time (since Epoch)
176
177
# the default is a place holder sentinel, falsy value
@@ -654,7 +655,24 @@ def print_stats(self):
654
655
def field_list (self ):
655
656
return self .index .field_list
656
657
658
+ @property
659
+ def field_info (self ):
660
+ if self ._field_info is None :
661
+ self .index
662
+ return self ._field_info
663
+
664
+ @field_info .setter
665
+ def field_info (self , value ):
666
+ self ._field_info = value
667
+
657
668
def create_field_info (self ):
669
+ # create_field_info will be called at the end of instantiating
670
+ # the index object. This will trigger index creation, which will
671
+ # call this function again.
672
+ if self ._instantiated_index is None :
673
+ self .index
674
+ return
675
+
658
676
self .field_dependencies = {}
659
677
self .derived_field_list = []
660
678
self .filtered_particle_types = []
You can’t perform that action at this time.
0 commit comments