File tree Expand file tree Collapse file tree 4 files changed +3
-5
lines changed Expand file tree Collapse file tree 4 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ class ScalarType(StrEnum):
3232    COMPLEX64  =  "complex64" 
3333    COMPLEX128  =  "complex128" 
3434    COMPLEX256  =  "complex256" 
35-     HEADERS_V3  =  "r1920 "   # Raw number of BITS, must be a multiple of 8  
35+     BYTES240  =  "V240 "   # fixed-width 240-byte string, used for raw v0/1/2 trace headers  
3636
3737
3838class  StructuredField (CamelCaseStrictModel ):
Original file line number Diff line number Diff line change @@ -64,5 +64,5 @@ class ZarrFormat(IntEnum):
6464    ScalarType .COMPLEX64 : complex (np .nan , np .nan ),
6565    ScalarType .COMPLEX128 : complex (np .nan , np .nan ),
6666    ScalarType .COMPLEX256 : complex (np .nan , np .nan ),
67-     ScalarType .HEADERS_V3 : b"\x00 "  *  240 ,
67+     ScalarType .BYTES240 : b"\x00 "  *  240 ,
6868}
Original file line number Diff line number Diff line change @@ -380,7 +380,7 @@ def enhanced_add_variables() -> None:
380380            name = "raw_headers" ,
381381            long_name = "Raw Headers" ,
382382            dimensions = mdio_template ._dim_names [:- 1 ],  # All dimensions except vertical 
383-             data_type = ScalarType .HEADERS_V3 ,
383+             data_type = ScalarType .BYTES240 ,
384384            compressor = Blosc (cname = BloscCname .zstd ),
385385            coordinates = None ,  # No coordinates as specified 
386386            metadata = VariableMetadata (chunk_grid = chunk_metadata ),
Original file line number Diff line number Diff line change @@ -78,8 +78,6 @@ def to_structured_type(data_type: np_dtype) -> StructuredType:
7878def  to_numpy_dtype (data_type : ScalarType  |  StructuredType ) ->  np_dtype :
7979    """Get the numpy dtype for a variable.""" 
8080    if  isinstance (data_type , ScalarType ):
81-         if  data_type  ==  ScalarType .HEADERS_V3 :
82-             return  np_dtype ("|V240" )
8381        return  np_dtype (data_type .value )
8482    if  isinstance (data_type , StructuredType ):
8583        return  np_dtype ([(f .name , f .format .value ) for  f  in  data_type .fields ])
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments