@@ -270,19 +270,26 @@ def _read_id_struct(fid, tag, shape, rlims):
270270 )
271271
272272
273- def _read_dig_point_struct (fid , tag , shape , rlims ):
273+ def _read_dig_point_struct (fid , tag , shape , rlims , * , string = False ):
274274 """Read dig point struct tag."""
275275 kind = int (np .frombuffer (fid .read (4 ), dtype = ">i4" ).item ())
276276 kind = _dig_kind_named .get (kind , kind )
277277 ident = int (np .frombuffer (fid .read (4 ), dtype = ">i4" ).item ())
278278 if kind == FIFF .FIFFV_POINT_CARDINAL :
279279 ident = _dig_cardinal_named .get (ident , ident )
280- return dict (
281- kind = kind ,
282- ident = ident ,
283- r = np .frombuffer (fid .read (12 ), dtype = ">f4" ),
284- coord_frame = FIFF .FIFFV_COORD_UNKNOWN ,
285- )
280+ n = 1 if not string else int (np .frombuffer (fid .read (4 ), dtype = ">i4" ).item ())
281+ out = [
282+ dict (
283+ kind = kind ,
284+ ident = ident ,
285+ r = np .frombuffer (fid .read (12 ), dtype = ">f4" ),
286+ coord_frame = FIFF .FIFFV_COORD_UNKNOWN ,
287+ )
288+ for _ in range (n )
289+ ]
290+ if not string :
291+ out = out [0 ]
292+ return out
286293
287294
288295def _read_coord_trans_struct (fid , tag , shape , rlims ):
@@ -378,18 +385,21 @@ def _read_julian(fid, tag, shape, rlims):
378385 FIFF .FIFFT_COMPLEX_DOUBLE : _read_complex_double ,
379386 FIFF .FIFFT_ID_STRUCT : _read_id_struct ,
380387 FIFF .FIFFT_DIG_POINT_STRUCT : _read_dig_point_struct ,
388+ FIFF .FIFFT_DIG_STRING_STRUCT : partial (_read_dig_point_struct , string = True ),
381389 FIFF .FIFFT_COORD_TRANS_STRUCT : _read_coord_trans_struct ,
382390 FIFF .FIFFT_CH_INFO_STRUCT : _read_ch_info_struct ,
383391 FIFF .FIFFT_OLD_PACK : _read_old_pack ,
384392 FIFF .FIFFT_DIR_ENTRY_STRUCT : _read_dir_entry_struct ,
385393 FIFF .FIFFT_JULIAN : _read_julian ,
394+ FIFF .FIFFT_VOID : lambda fid , tag , shape , rlims : None ,
386395}
387396_call_dict_names = {
388397 FIFF .FIFFT_STRING : "str" ,
389398 FIFF .FIFFT_COMPLEX_FLOAT : "c8" ,
390399 FIFF .FIFFT_COMPLEX_DOUBLE : "c16" ,
391400 FIFF .FIFFT_ID_STRUCT : "ids" ,
392401 FIFF .FIFFT_DIG_POINT_STRUCT : "dps" ,
402+ FIFF .FIFFT_DIG_STRING_STRUCT : "dss" ,
393403 FIFF .FIFFT_COORD_TRANS_STRUCT : "cts" ,
394404 FIFF .FIFFT_CH_INFO_STRUCT : "cis" ,
395405 FIFF .FIFFT_OLD_PACK : "op_" ,
0 commit comments