Only write relevant metadata
The current _write_metadata() method writes all attributes set on self to the measurement file, including big time arrays or other pre-computed (potentially very long) arrays.
We should manually write these metadata, choosing only the relevant ones.