events_data=events_path,
               event_id=event_id,
               empty_room=bids_path_er,
               verbose=False)
write_meg_calibration(cal_path, bids_path=bids_path, verbose=False)
write_meg_crosstalk(ct_path, bids_path=bids_path, verbose=False)

# Write anatomical scan
# We pass the MRI landmark coordinates, which will later be required for
# automated defacing
mri_landmarks = mne.channels.make_dig_montage(
    lpa=[66.08580, 51.33362, 46.52982],
    nasion=[41.87363, 32.24694, 74.55314],
    rpa=[17.23812, 53.08294, 47.01789],
    coord_frame='mri_voxel')
bids_path.datatype = 'anat'
write_anat(image=t1w_path,
           bids_path=bids_path,
           landmarks=mri_landmarks,
           verbose=False)

# %%
# Basic anonymization
# -------------------
# Now we're ready to anonymize the dataset!

anonymize_dataset(bids_root_in=bids_root, bids_root_out=bids_root_anon)

# %%
# That's it! Let's have a look at directory structure of the anonymized
# dataset.