# mne.preprocessing.maxwell\_filter\_prepare\_emptyroom

**URL:** <https://mne.discourse.group/t/mne-preprocessing-maxwell-filter-prepare-emptyroom/9108>\
**Category:** Support & Discussions\
**Tags:** preprocessing, maxwell-filter\
**Created:** [July 23, 2024, 4:14pm UTC](https://mne.discourse.group/t/mne-preprocessing-maxwell-filter-prepare-emptyroom/9108 "2024-07-23T16:14:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ethanberi](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/ethanberi/32/3487_2.png) [@ethanberi](https://mne.discourse.group/u/ethanberi)\
**Post date:** [July 23, 2024, 4:14pm UTC](https://mne.discourse.group/t/mne-preprocessing-maxwell-filter-prepare-emptyroom/9108/1 "2024-07-23T16:14:16Z")

</div>

Hi all,

I am attempting to run this function to prepare my emptyroom recording but am receiving some odd errors. The documentation shows that this function requires a raw\_er instance and a raw instance from the experimental recording. When I enter the parameters I get an error regarding “too many positional arguments” but when I run it without a “raw” instance I get an error stating that the “keyword argument “raw” is required”. How do I make the instance of raw a keyword argument rather than a positional argument, so as to inject the head transformations from the experimental recordings into that of the emptyroom?

Thanks!

Ethan

---

<div class="post-metadata">

**Author:** ![ethanberi](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/ethanberi/32/3487_2.png) [@ethanberi](https://mne.discourse.group/u/ethanberi)\
**Post date:** [July 23, 2024, 4:29pm UTC](https://mne.discourse.group/t/mne-preprocessing-maxwell-filter-prepare-emptyroom/9108/2 "2024-07-23T16:29:52Z")

</div>

Hi all - problem solved.

I was not setting the raw instance equal to raw as a keyword argument. I fixed this issue by entering the parameter for ‘raw’ as raw=raw.

---

<div class="post-metadata">

**Author:** ![mscheltienne](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/mscheltienne/32/827_2.png) [@mscheltienne](https://mne.discourse.group/u/mscheltienne)\
**Post date:** [July 24, 2024, 6:26am UTC](https://mne.discourse.group/t/mne-preprocessing-maxwell-filter-prepare-emptyroom/9108/3 "2024-07-24T06:26:14Z")

</div>

See this post for an explanation on keyword-only arguments: [apply head position to empty room - #10 by richard](https://mne.discourse.group/t/apply-head-position-to-empty-room/8988/10)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [July 31, 2024, 6:27am UTC](https://mne.discourse.group/t/mne-preprocessing-maxwell-filter-prepare-emptyroom/9108/4 "2024-07-31T06:27:11Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
