MCPcopy
hub / github.com/mne-tools/mne-python / write_string

Function write_string

mne/_fiff/write.py:131–139  ·  view source on GitHub ↗

Write a string tag.

(fid, kind, data)

Source from the content-addressed store, hash-verified

129
130
131def write_string(fid, kind, data):
132 """Write a string tag."""
133 try:
134 str_data = str(data).encode("latin1")
135 except UnicodeEncodeError:
136 str_data = str(data).encode("latin1", errors="xmlcharrefreplace")
137 data_size = len(str_data) # therefore compute size here
138 if data_size > 0:
139 _write(fid, str_data, kind, data_size, FIFF.FIFFT_STRING, ">S")
140
141
142def write_name_list(fid, kind, data):

Callers 15

_save_partFunction · 0.85
_write_bem_solution_fifFunction · 0.85
_write_morph_map_Function · 0.85
_write_annotationsFunction · 0.85
_write_covFunction · 0.85
_write_evokedsFunction · 0.85
_write_forward_solutionFunction · 0.85
write_forward_meas_infoFunction · 0.85
_write_source_spacesFunction · 0.85
_write_one_source_spaceFunction · 0.85
_write_icaFunction · 0.85
write_meas_infoFunction · 0.85

Calls 1

_writeFunction · 0.85

Tested by

no test coverage detected