<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://cni.su.domains/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Huawu</id>
	<title>CNI Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://cni.su.domains/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Huawu"/>
	<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=Special:Contributions/Huawu"/>
	<updated>2026-04-19T06:26:28Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MediaWiki:Common.css&amp;diff=59440</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MediaWiki:Common.css&amp;diff=59440"/>
		<updated>2026-03-18T21:52:34Z</updated>

		<summary type="html">&lt;p&gt;Huawu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins */&lt;br /&gt;
&lt;br /&gt;
/* Hide &amp;quot;What links here&amp;quot;, &amp;quot;Related changes&amp;quot; in Tools */&lt;br /&gt;
#t-whatlinkshere {&lt;br /&gt;
    display: none !important;&lt;br /&gt;
}&lt;br /&gt;
#t-recentchangeslinked {&lt;br /&gt;
    display: none !important;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Hide &amp;quot;Discussion&amp;quot; tab */&lt;br /&gt;
#ca-talk,&lt;br /&gt;
li#ca-talk,&lt;br /&gt;
.mw-list-item#ca-talk {&lt;br /&gt;
    display: none !important;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MediaWiki:Common.css&amp;diff=59439</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MediaWiki:Common.css&amp;diff=59439"/>
		<updated>2026-03-18T21:50:42Z</updated>

		<summary type="html">&lt;p&gt;Huawu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins */&lt;br /&gt;
&lt;br /&gt;
#t-whatlinkshere {&lt;br /&gt;
    display: none !important;&lt;br /&gt;
}&lt;br /&gt;
#t-recentchangeslinked {&lt;br /&gt;
    display: none !important;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MediaWiki:Common.css&amp;diff=59438</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MediaWiki:Common.css&amp;diff=59438"/>
		<updated>2026-03-18T21:49:47Z</updated>

		<summary type="html">&lt;p&gt;Huawu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins */&lt;br /&gt;
&lt;br /&gt;
#t-recentchangeslinked {&lt;br /&gt;
    display: none !important;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MediaWiki:Common.css&amp;diff=59437</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MediaWiki:Common.css&amp;diff=59437"/>
		<updated>2026-03-18T21:49:09Z</updated>

		<summary type="html">&lt;p&gt;Huawu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins */&lt;br /&gt;
&lt;br /&gt;
#t-relatedchangeslinked {&lt;br /&gt;
    display: none !important;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MediaWiki:Common.css&amp;diff=59436</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MediaWiki:Common.css&amp;diff=59436"/>
		<updated>2026-03-18T21:42:55Z</updated>

		<summary type="html">&lt;p&gt;Huawu: Created page with &amp;quot;/* CSS placed here will be applied to all skins */  #t-relatedchanges {     display: none !important; }&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins */&lt;br /&gt;
&lt;br /&gt;
#t-relatedchanges {&lt;br /&gt;
    display: none !important;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=Getting_Started&amp;diff=59435</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=Getting_Started&amp;diff=59435"/>
		<updated>2026-03-18T21:08:13Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* CNI Standard Operating Procedures and Registration Forms for CLIA-Waived, Point of Care, Urine-Based Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Stanford Center for Cognitive and Neurobiological Imaging (&#039;&#039;&#039;CNI&#039;&#039;&#039;) research facility is designed to reflect the experimental needs of our human neuroimaging community. The core instrument is a research-dedicated 3T MRI scanner.  To support the wide variety of human experimental methods from our community, the scanner is integrated with a range of experimental equipment.  This includes MR compatible visual displays, audio presentation equipment, and an MR-compatible EEG system. There is an MRI simulator to provide subjects, particularly children, with training. Several testing rooms are available in the suite to help people who are collecting surveys, using TMS, or obtaining behavioral measures. See the [[MR Hardware]] page for more details.&lt;br /&gt;
&lt;br /&gt;
If you would like an introductory tour of the facility please email [mailto:laimab@stanford.edu Laima Baltusis] or call her office phone (5-8382).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== User Access/Onboarding &amp;amp; Training ==&lt;br /&gt;
&lt;br /&gt;
The Stanford Center for Cognitive and Neurobiological Imaging (CNI) Committee uses the internationally accepted recommendations from the American College of Radiology in establishing the general rules pertaining to safe operation of research MRI facilities.&lt;br /&gt;
&lt;br /&gt;
All researchers using the CNI MRI facility must complete the CNI onboarding process outlined below.&lt;br /&gt;
&lt;br /&gt;
=== Access/Onboarding ===&lt;br /&gt;
&lt;br /&gt;
As of September 2025 new CNI users must complete the following three step onboarding process.&lt;br /&gt;
*&#039;&#039;&#039;Step 1. &#039;&#039;&#039; The first step of the on-boarding process is to complete the Canvas course: CNI User Training, Link here - (https://canvas.stanford.edu/enroll/DLBL8L) The CNI Canvas course must be completed prior to attending the in-person orientation outlined in the Step 2 below. &lt;br /&gt;
:The Canvas course consists of high level summary of important information related to working at an MRI facility. There is a quiz at the end of each module that needs to be completed before proceeding to the next module. There will be a code provided in the final Canvas module that is required to register for the in-person orientation session.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Step 2. &#039;&#039;&#039; A tour of the facility, and key safety and operations policies will be reviewed at an in-person orientation session. These sessions are typically held every four weeks on Thursdays at 9-10:30AM. &#039;&#039;&#039; The Registration link for the next scheduled session is found in &amp;quot;CNI New User Orientation Session Registration Forms&amp;quot; section below.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Step 3. &#039;&#039;&#039; The final step for on-boarding is completion of a post orientation session assignment. A link to this assignment will be emailed following the in-person session to those who have attended the in-person session. New users are allowed approximately one week to complete this assignment. After completing the assignment, user badges will be added to the CNI access list. Users are contacted during this process only if there is an issue with adding their Stanford badge. Once a user’s badge is added to the CNI access list they will be able to use the Lenel card readers located at all CNI doors and at entrances of Building 420, which are locked during off hours.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New users will also be automatically added to the cni-mrusers@lists.stanford.edu mailing list as well as the Stanford CNI Slack workspace. These are the mailing list and communication channels used by CNI to send technology and administrative updates to CNI users. The mailing list can be subscribed to or unsubscribed to as needed at the Stanford mailman website https://uit.stanford.edu/service/mailinglists/tools , and Slack channel can be administered through the Slack application or website interface https://uit.stanford.edu/service/slack .&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In Summary:&#039;&#039; Access to CNI is a privilege. It is important for users to maintain a healthy respect for the instrumentation as failure to do so can lead to injury, possibly life-threatening.  Users also need to be good citizens and be respectful of others. Finally, users must be able to effectively instruct and manage their research participants, particularly those new to MRI technology.&lt;br /&gt;
&lt;br /&gt;
Any questions regarding the on-boarding process should be directed to the CNI facility manager, Laima Baltusis (email: laimab@stanford.edu) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Access status to CNI is organized into three categories:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &#039;&#039;&#039;Level 1: Safety Trained User&#039;&#039;&#039;. Level 1 investigators may enter the magnet room to assist with scans.  Level 1 investigators must have passed Safety training . They  cannot schedule or operate the scanner.  They must work with Level 2 and 3 investigators. &amp;lt;/li&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &#039;&#039;&#039;Level 2: Apprentice Operator&#039;&#039;&#039;. Level 2 operators may enter the Magnet room to assist setting up the equipment, instructing and positioning volunteer subjects. A Level 2 investigator may only operate the MRI scanner under the supervision of Level 3 personnel.&amp;lt;/li&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &#039;&#039;&#039;Level 3: Operator&#039;&#039;&#039;. Level 3 operators may run the MRI Scanner when CNI staff members are not present and they may supervise Level 1 and Level 2 personnel. Level 3 investigators must have accumulated experience at Level 2, and then have passed a hands-on certification test administered by the CNI Facility Manager. As Level 3 users are mentors and teachers to Level 1 and Level 2 users, the certification exam has been created to demonstrate the ability of the new Level 3 user to instruct other users in correctly setting up and positioning volunteers, setting up and using scanning protocols relevant to their area of research, archiving data. and leaving the scanner ready for the next users. Level 3 operators are given full privileges to the facility and can enter the facility at any time &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note - Users who complete the onboarding process described above are classified as Level 2 users. For those users interested in a promotion to a Level 3 user status, please contact the CNI Facilty Manager via email to make arrangements for a Level 3 certification session.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===CNI New User Orientation Session Registration Forms===&lt;br /&gt;
New user in-person CNI orientation sessions are held on Thursdays 9:00AM to 10:30AM at CNI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The next CNI new user orientation will be on March 19, 2026, 9:00AM to 10:30AM at CNI.&#039;&#039;&#039; CNI is located in the basement of the Psychology Department, 450 Jane Stanford Way, Building 420, Rooms 61-76. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The registration form for the March 19, 2026 session is here - https://docs.google.com/forms/d/e/1FAIpQLSeFxxbvpo4RnJ9o6GmD7sQpoVGvnA5TamVR1nMuOTDbvB9y_g/viewform?usp=header &#039;&#039;&#039; Please notate the date and time of this orientation session in your calendars as upon registering for this session there is no additional confirmation e-mail sent out. Please arrive on time and ring the door bell when you arrive for the orientation session at CNI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Youtube videos of magnet projectiles. These videos will be discussed during the CNI new user orientation sessions.&lt;br /&gt;
(1) https://www.youtube.com/watch?reload=9&amp;amp;v=plvIEf7JsKo&lt;br /&gt;
(2) https://www.youtube.com/watch?v=vIQaGt_fkkw&lt;br /&gt;
The links to these videos will be emailed to attendees in the post orientation session assignment following the in-person session.&lt;br /&gt;
&lt;br /&gt;
===CNI Standard Operating Procedures and Registration Forms for CLIA-Waived, Point of Care, Urine-Based Testing===&lt;br /&gt;
For those groups that are doing Urine-based testing approved in their Stanford IRB the following steps must be completed to be CLIA Certificate of Waiver compliant [https://www.cdc.gov/lab-quality/php/waived-tests/index.html]&lt;br /&gt;
#The PI&#039;s must complete the verification form [https://forms.gle/QGV4CjYg7jnDKZ1h9], which stipulates the following - I am completing this form to verify that my team and I will be performing CLIA-waived urine test at the CNI facility for our IRB protocols. All current and new study personnel will be trained by me to perform urine testing according to the [[Media:CNI_SOPP.pdf|CNI Standard Operating Procedures (SOP)]]. I am responsible for the adherence to the CNI SOP. My team will be providing all necessary materials and supplies needed to the performance of the urine testing. If there is a urine spill during the testing procedures I will be responsible for any cleaning fees that might occur because of the urine spill.&lt;br /&gt;
#All team members of the group must read the [[Media:CNI_-_Urine_Test_-_SOP.pdf | SOP for urine testing at CNI]]&lt;br /&gt;
#All team members of the group must take the quiz for urine testing after reviewing the SOP document [https://forms.gle/6xcwrt3ptszxynmE7]&lt;br /&gt;
&lt;br /&gt;
===Late night scan sessions approval policy===&lt;br /&gt;
&lt;br /&gt;
Research groups scanning at night between 10PM and 7AM must meet with the CNI Facility Manager prior to booking time for such sessions.  The Facility Manager will discuss the logistics of their late night sessions and address all the important safety issues during these scans. Meeting topics will include discussion of the experience level of the scanning team, backup support for technical issues during the scan sessions, and participant support before and after the scan session.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== IRB Approval for Project ==&lt;br /&gt;
Before using the MR scanner, a research group must have IRB approval for the project. Scanning at CNI is not allowed without IRB approval. &lt;br /&gt;
* General information about the procedures and policies related to obtaining IRB approval for research projects conducted at Stanford University is at [http://humansubjects.stanford.edu Human Subjects Research web sites]. &lt;br /&gt;
* There are also detailed [[IRB | instructions for modifying existing IRB protocols]]. &lt;br /&gt;
&lt;br /&gt;
Researchers must provide a copy (pdf) of the IRB approval to the CNI Facility Mananger. Researchers should also provide a copy of all IRB renewal letters as needed during the project duration. The PI for the project must make sure that the protocols list all personnel who will be conducting the MRI research.&lt;br /&gt;
&lt;br /&gt;
== Setting up a CNI account for research studies ==&lt;br /&gt;
&lt;br /&gt;
To start a research study requires setting up a funded grant that will be charged for the scans in the CNI scheduler. To setup a project, Please e-mail the following information to the CNI Facility Manager [mailto:laimab@stanford.edu].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Full project title (ex. Neural Basis of Visual Pattern Appearance)&lt;br /&gt;
&amp;lt;li&amp;gt; Funding source (ex. NIH, NSF)&lt;br /&gt;
&amp;lt;li&amp;gt; PTA assigned to this project&lt;br /&gt;
&amp;lt;li&amp;gt; Grant (PTA) Expiration Date&lt;br /&gt;
&amp;lt;li&amp;gt; IRB approval letter&lt;br /&gt;
&amp;lt;li&amp;gt; Abbreviated project title: one or two word description. (This is the grant name that will be seen in the CNI scheduler).&lt;br /&gt;
&amp;lt;li&amp;gt; A list of researchers (names, e-mails, and SUNetID&#039;s) who will be booking scanning time with this grant.&lt;br /&gt;
&amp;lt;li&amp;gt; Name, e-mail, and SUnetID of the person, who will be receiving the invoice notice for this grant each month. The invoice contains the listing of all the bookings to the grant. This can be either the PI, finance manager for the grant, or any other designated person for these funds. Please note that only one person can be set up in the system to receive the invoice. The invoice e-mail can, however, be forwarded to others to additionally to review if needed.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The CNI Facility Manager will contact the PI (or whoever initiated the account setup request) via email once the account has been set up.&lt;br /&gt;
&lt;br /&gt;
== Scheduling Policies ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Overview:&#039;&#039;&#039; All scanner time is booked via the [https://stanford-cni.calpendo.com CNI on-line scheduling system].  Only researchers who have completed Level 2 training can make bookings.&lt;br /&gt;
&lt;br /&gt;
We ask users to all commit together to only scheduling scan time when they actually have a confirmed need.  Our experience is that the user demand as evidenced in actual paid-for scan time is that only about 50% of regular daytime hours is used on average and it is even less than that for off-peak hours. &lt;br /&gt;
&lt;br /&gt;
The scheduler software does not enforce an as-needed scheduling approach. Rather, we have cancellation policies in place that charge for late cancellations as well as the possibility of restricting advance booking access for users that have an excessive number of cancellations.&lt;br /&gt;
&lt;br /&gt;
The scanner can be booked in increments of 30-minute slots beginning on the hour or 30 minutes into the hour. When booking time, please avoid leaving single 30-minute slots idle between your time and any immediate neighbors. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tiered Advance Booking Policy:&#039;&#039;&#039; Certain time periods in the calendar are reserved (blocked out for booking) based on the amount of time ahead. In brief,&lt;br /&gt;
* &#039;&#039;&#039;Short Term&#039;&#039;&#039; - Tuesday 8AM-12PM and Friday 2PM-6PM are reserved for Short Term bookings and will be available 2 weeks in advance.&lt;br /&gt;
* &#039;&#039;&#039;Mid Term&#039;&#039;&#039; - Monday, Friday, Sunday (whole days except for Friday 2PM-6PM for Short Term reservation) are reserved for Mid Term bookings and will be available 8 weeks in advance.&lt;br /&gt;
* &#039;&#039;&#039;Long Term&#039;&#039;&#039; - Tuesday, Wednesday, Thursday, Saturday (whole days except for Tuesday 8AM-12PM for Short Term reservation) are reserved for Long Term bookings and will be available 16 weeks in advance.&lt;br /&gt;
&lt;br /&gt;
If you have exceptional study requirements that require booking further in advance than the 16-week period, please email your request together with some justification to the CNI facility manager.  We will review and accommodate as possible. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Protocol Development Policy:&#039;&#039;&#039; The CNI provides PIs the option to book a small amount of uncharged scan time under “Protocol Development”.  The purpose of this scan time is to establish and test protocol settings and to ensure any stimulus presentation and scan synchronization are working. The protocol development time used by a PI, or their research assistants should be on the order or 2-5 hours with a maximum of 10 hours for each new grant.  Please note that research studies frequently benefit by using protocol development time occasionally throughout the lifetime of a grant--such as when evaluating a new software implementation of a stimulus task--and so PIs are encouraged to husband their protocol development time carefully. &lt;br /&gt;
&lt;br /&gt;
Under no circumstances are data acquired during protocol development to be used as research product.  Accounting rules require that research data must be derived from time charged against a funded grant. &lt;br /&gt;
&lt;br /&gt;
Protocol development time should be used for establishing specific parameters and validating workflow for already developed technologies.  It should in general not be used for technology development, or any other purpose that would be deemed very investigational in nature.  In rare cases, a researcher may wish to take advantage of technology new to CNI but otherwise proven on other GE MRI systems.  In these instances, PIs should consult with CNI staff if more protocol development time will be permitted. &lt;br /&gt;
&lt;br /&gt;
Protocol development time has lower scheduling priority than funded research time.  As such, users may not book protocol development time more than 48 hours in advance during daytime hours (8am-6pm), and no more than 5 days in advance for off-peak hours.  Users who have received CNI Innovation Grants or Seed Funding are not to use protocol development time for their development.  ALL scan time for the innovation grant purposes is to be booked under the Seed Funding grant. &lt;br /&gt;
&lt;br /&gt;
Available protocol development hours can be tracked with the &amp;quot;Run Reports&amp;quot; tool in the CNI scheduler to prevent overspending grants. The &amp;quot;Run Reports&amp;quot; tool is located at the top of the CNI scheduler page in the &amp;quot;Select an Action&amp;quot; drop-down menu next to the date field. Please contact the CNI Facility Manager if you need help in using this tool.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Late Cancellation Policy:&#039;&#039;&#039; The late cancellation deadline is 2 weeks before the scheduled time. A late cancellation fee (10% of the cancelled time) will be charged unless the cancelled time is (a) replaced by a funded study or (b) a CNI study (scan time reserved by CNI staff).  Principal Investigators should note that cancellation fees may not be allowed against some sponsored projects depending on the sponsor&#039;s restrictions in which case the PI should make sure cancellations fees are booked against an unrestricted account.&lt;br /&gt;
&lt;br /&gt;
To promote lab accountability we exclude all subject-related justifications: subject no-show, subject illness, inability to be scanned (e.g. size, claustrophobia) for waiving the 10% late cancellation fee.  This will result in some late cancellation charges for which the PI had no control, but we expect these occurrences to be relatively infrequent.  We hope that by charging individual labs rather than by distributing the costs amongst all labs, we will increase user accountability.  &lt;br /&gt;
&lt;br /&gt;
We will not charge cancellation fees, nor count as cancellation time should a scan be cancelled due to CNI service center hardware or software malfunction.  In such events, the CNI facility manager should promptly be notified of the malfunction if not already aware. Please note this does not include the malfunction or unavailability of any non-standard hardware, software or materials. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cancellation limits:&#039;&#039;&#039; Booking and cancellation statistics will be compiled each billing cycle (calendar month) for each PI.  If a PI group member cancels a funded study, no matter whether it is a late or early cancellation, any slot that eventually goes without being replaced by another funded or CNI study will add to the total cancellation time allotted to that PI.  If the total canceled time in a billing cycle is more than 20% of the funded time used by that PI, the CNI will review the situation with the PI and adjust future bookings and limit advance booking access if needed.   &lt;br /&gt;
&lt;br /&gt;
Our intent is to discourage overbooking slots before having a confirmed need. For example, we wish to discourage booking time for a Monday from 9-11am several months in advance and then cancelling this slot only to book a time 2-½ weeks in advance for an open slot Monday 1-3pm.  Adjusting the funding source of a slot is not considered a cancellation.&lt;br /&gt;
&lt;br /&gt;
== Billing Policies ==&lt;br /&gt;
Scanner time is compiled from the web-based scheduling system and charged on a monthly basis. The CNI Facility Manager sends e-mail invoices (either to the PI or other designated staff) and usage summaries (to those who have booked time during the month) at the beginning of each month containing all the hours scanned for the previous month and the PTA&#039;s used. All users must verify that the information is correct and send a request for changes by the date indicated in the invoice or usage summary cover letter, whichever has been received. If the CNI Facility Manager has not heard back from a researcher by the designated date, the charges will be considered correct and the grants (PTA&#039;s) will be charged by the end of the month. Information about cancellations for that month will be included in a separate invoice.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rates for scanning effective September 1, 2025 - August 31, 2026 will be:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
8:00AM to 6:00PM weekdays (Monday-Friday) - $534/hour&lt;br /&gt;
&lt;br /&gt;
6:00PM to 8:00PM weekdays (Monday-Friday) - $435/hour&lt;br /&gt;
&lt;br /&gt;
8:00AM to 8:00PM weekends (Saturday-Sunday) - $435/hour&lt;br /&gt;
&lt;br /&gt;
8:00AM to 8:00PM Holidays, Holiday Weekends, Winter Shutdown - $122/hour&lt;br /&gt;
&lt;br /&gt;
8:00PM to 8:00AM any day (Monday-Sunday) - $122/hour&lt;br /&gt;
&lt;br /&gt;
EEG usage has no charge currently (see CNI staff for more info)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Our five-year-budget plan currently includes an annual 3% raise in hourly scan rates beginning September 1 each fiscal year.  We emphasize that this is a plan. Rate adjustments will continue to be reviewed by the Advisory Board and the Research Administration Policy and Compliance staff, and will need to stay within Service Center guidelines.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cancellation Policies&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
See above&lt;br /&gt;
&lt;br /&gt;
== User Etiquette ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Please help us to continue to maintain a safe and productive environment for everyone at CNI by noting following:&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Please show up for scan time that you have booked, and start and stop your scan session on time.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;If your scan is running late please contact the CNI staff to determine the best course of action. Given how busy the scanner is, any overtime may impact the next group.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;Please cancel any time that you will not be able to utilize as soon as possible, so that other researchers can use that time. Please also do not forget to cancel any mock scanner or testing rooms bookings, so that other users can have access to those rooms. &amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;Please book your scans with valid grants.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;Please e-mail IRB approval letters for new and extended studies to the CNI Facility Manager Laima Baltusis (laimab@stanford.edu)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;After your scan please return all supplies and equipment to where they should be so that the MRI suite is ready for the next scanning group to use.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;Every item has its place. Do not leave supplies, equipment, or furniture in arbitrary locations. This causes delays in scanning for the next groups.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;Be careful not to misplace or throw away smaller but important items such as memory foam pads, MRI lenses, and tape dispensers. Keep track of these as you use them and put them away in their labelled boxes.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;The hampers are for linens only. Do not put trash, used ear plugs, used scrubs, or memory foam pads into these containers.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;Do not put MRI lenses into the wrong storage slots. This delays the next group trying to fit a participant with the correct set of lenses. If you are starting to run short on time someone from CNI can help you to finish putting things away.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;If you have plugged in or reconfigured anything to a non-standard configuration, please make sure that you have returned everything to standard configurations.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Do not leave trash, empty coffee cups, water bottles and empty food containers in the control room or reception area for the next users or for CNI staff to clean up.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;After making coffee or tea please make sure that the kitchenette area is clean. Please wipe up any sugar or creamer spills.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;Food consumption is discouraged at CNI. We have eradicated past pest problems (silver fish, cockroaches) with various remedies and would like to continue to be pest free.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;If it is necessary to consume food, all empty food containers must be taken outside to the recycle/trash bins in the outside courtyards.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;Some participants can be messy. As a courtesy to following groups, it is important to tidy up after them.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;Ink stains, coffee stains, and food stains on furniture, counters and floors are difficult to clean. If an accident occurs please let staff know as possible.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To maintain a safe and welcoming environment at CNI please also review and sign the CNI User etiquette form [https://forms.gle/upDcti3PxeKQZNbq6 Etiquette Form].&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=QA&amp;diff=59434</id>
		<title>QA</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=QA&amp;diff=59434"/>
		<updated>2026-03-18T20:55:25Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Subject Motion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quality Assurance (QA) reports are generated for all functional MR data acquired at the CNI. These reports should appear in the file list for an acquisition on Flywheel within an hour after the scan finishes. &lt;br /&gt;
&lt;br /&gt;
=Finding the QA report=&lt;br /&gt;
&lt;br /&gt;
[[File:Flywheel_QA.png|thumb|QA reports appear in the file list for an acquisition on Flywheel.]]&lt;br /&gt;
&lt;br /&gt;
The QA reports take anywhere from a few minutes to an hour to compute, depending on the scan resolution and duration. To view the report, use Flywheel&#039;s built-in viewer to open the motion and spike plots, as well as the global QA values in the json file.&lt;br /&gt;
&lt;br /&gt;
=What&#039;s in the QA report=&lt;br /&gt;
&lt;br /&gt;
==Temporal SNR==&lt;br /&gt;
This is the median tSNR of all brain voxels (as defined by the [https://docs.dipy.org/dev/reference_cmd/dipy_median_otsu.html median_otsu algorithm]). The tSNR is computed after the data have been motion-corrected (details below) and the slow-drift has been removed using a 3rd-order polynomial. Note that tSNR is very sensitive to voxel size, with bigger voxels generally producing higher tSNR. The acceleration factor will also affect tSNR (both inplane acceleration and slice multiplex acceleration), with more acceleration leading to lower tSNR. It is also somewhat sensitive to the TR (with longer TRs producing slightly higher tSNR). So it&#039;s a useful metric for comparison across scans with the same voxel size, TR and acceleration, but not useful for comparing across scans with different parameters.&lt;br /&gt;
&lt;br /&gt;
==Spike count==&lt;br /&gt;
The number of &amp;quot;spikes&amp;quot; detected. The spikes are detected by a simple threshold of the time series z-score plot (details below). The threshold is currently set to 6. This is somewhat arbitrary (and thus why we show the full plots), but we&#039;ve found that spikes of this magnitude are generally indicative of a problem, such as excessive subject motion or scan hardware issues.&lt;br /&gt;
&lt;br /&gt;
==Subject Motion== &lt;br /&gt;
Subject motion is estimated using [https://nipy.org/nipy/api/generated/nipy.algorithms.registration.groupwise_registration.html FmriRealign4d] (without slice-time correction). A plot of the mean displacement, both absolute and relative, is presented. Absolute displacement is the mean displacement relative to the middle frame. Relative displacement is the mean displacement relative to the previous frame. (Mean displacement is computed using [http://www.fmrib.ox.ac.uk/analysis/techrep/tr99mj1/tr99mj1/index.html Mark Jenkinson&#039;s algorithm].)&lt;br /&gt;
&lt;br /&gt;
==Timeseries z-score==&lt;br /&gt;
A plot of the mean signal (in z-score units) from each slice of the brain. This last plot is useful for detecting spikes in your data, and for determining if the spikes are caused by your subject (e.g., motion) or by a possible problem with the scanner (e.g., white-pixel noise). When a subject moves, even a little, you will often see spikes that span several or all slices. But a white-pixel noise problem typically only affects one slice at a time. Note that the first few time points are ignored for the spike plot.&lt;br /&gt;
&lt;br /&gt;
For this plot (as well as the motion plot) you can get the exact value of any datapoint by hovering your mouse over one of the curves. Also note that the frame numbers start at zero rather than one. Some examples of QA reports are shown below.&lt;br /&gt;
&lt;br /&gt;
=Artifacts that you may find=&lt;br /&gt;
==Subject Motion==&lt;br /&gt;
This is by far the dominant cause of spike-like artifacts in most datasets. Even a small relative head displacement can lead to a signal drop and/or increase. Motion usually affects many slices.&lt;br /&gt;
&lt;br /&gt;
==White-pixel noise==&lt;br /&gt;
Spike noise is a common and insidious problem with MR, often caused by a loose screw on the scanner or some small stay piece of metal in the scan room that accumulates energy and then discharges randomly, creating broad-band RF noise at some point during the signal read-out. When this happens, one spot in k-space will have an abnormally  high intensity and show up as a &amp;quot;white pixel&amp;quot;. In the image domain, it will often manifest as an abrupt signal drop in one slice at one time-point (a &#039;spike&#039; in the time series). The problem is particularly acute for EPI scans because of all the gradient blipping during the read-out. &lt;br /&gt;
&lt;br /&gt;
If you see a lot of spike-noise in your data (either motion-induced or from a white-pixel noise problem), there are various tools available to specifically clean up spike-noise artifacts (like AFNI&#039;s 3dDespike). FSL&#039;s Melodic can also be used to remove artifacts in general (see [http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/MELODIC#fsl_regfilt_command-line_program fsl_regfit]). You can also try adding the spikes to your GLM as nuisance regressors. If you see a couple of spikes here and there, you might be able to safely ignore them, as they will not have a big effect on most GLM-type analyses. But even one or two spikes can affect certain kinds of correlation analyses, so for that you will have to be more careful.&lt;br /&gt;
&lt;br /&gt;
=Examples of QA reports=&lt;br /&gt;
A good subject and well-behaved scanner:&lt;br /&gt;
[[Image: qa_good.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
A bad subject and well-behaved scanner:&lt;br /&gt;
[[Image: qa_motion.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
A good subject and spikey scanner:&lt;br /&gt;
[[Image: qa_spikes.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
=Technical Details=&lt;br /&gt;
The QA report generation code is part of the NIMS codebase and is [https://github.com/cni/nims/blob/master/nimsproc/qa_report.py available on Github].&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=QA&amp;diff=59433</id>
		<title>QA</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=QA&amp;diff=59433"/>
		<updated>2026-03-18T20:53:52Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Temporal SNR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quality Assurance (QA) reports are generated for all functional MR data acquired at the CNI. These reports should appear in the file list for an acquisition on Flywheel within an hour after the scan finishes. &lt;br /&gt;
&lt;br /&gt;
=Finding the QA report=&lt;br /&gt;
&lt;br /&gt;
[[File:Flywheel_QA.png|thumb|QA reports appear in the file list for an acquisition on Flywheel.]]&lt;br /&gt;
&lt;br /&gt;
The QA reports take anywhere from a few minutes to an hour to compute, depending on the scan resolution and duration. To view the report, use Flywheel&#039;s built-in viewer to open the motion and spike plots, as well as the global QA values in the json file.&lt;br /&gt;
&lt;br /&gt;
=What&#039;s in the QA report=&lt;br /&gt;
&lt;br /&gt;
==Temporal SNR==&lt;br /&gt;
This is the median tSNR of all brain voxels (as defined by the [https://docs.dipy.org/dev/reference_cmd/dipy_median_otsu.html median_otsu algorithm]). The tSNR is computed after the data have been motion-corrected (details below) and the slow-drift has been removed using a 3rd-order polynomial. Note that tSNR is very sensitive to voxel size, with bigger voxels generally producing higher tSNR. The acceleration factor will also affect tSNR (both inplane acceleration and slice multiplex acceleration), with more acceleration leading to lower tSNR. It is also somewhat sensitive to the TR (with longer TRs producing slightly higher tSNR). So it&#039;s a useful metric for comparison across scans with the same voxel size, TR and acceleration, but not useful for comparing across scans with different parameters.&lt;br /&gt;
&lt;br /&gt;
==Spike count==&lt;br /&gt;
The number of &amp;quot;spikes&amp;quot; detected. The spikes are detected by a simple threshold of the time series z-score plot (details below). The threshold is currently set to 6. This is somewhat arbitrary (and thus why we show the full plots), but we&#039;ve found that spikes of this magnitude are generally indicative of a problem, such as excessive subject motion or scan hardware issues.&lt;br /&gt;
&lt;br /&gt;
==Subject Motion== &lt;br /&gt;
Subject motion is estimated using [http://nipy.org/nipy/stable/api/generated/nipy.algorithms.registration.groupwise_registration.html FmriRealign4d] (without slice-time correction). A plot of the mean displacement, both absolute and relative, is presented. Absolute displacement is the mean displacement relative to the middle frame. Relative displacement is the mean displacement relative to the previous frame. (Mean displacement is computed using [http://www.fmrib.ox.ac.uk/analysis/techrep/tr99mj1/tr99mj1/index.html Mark Jenkinson&#039;s algorithm].)&lt;br /&gt;
&lt;br /&gt;
==Timeseries z-score==&lt;br /&gt;
A plot of the mean signal (in z-score units) from each slice of the brain. This last plot is useful for detecting spikes in your data, and for determining if the spikes are caused by your subject (e.g., motion) or by a possible problem with the scanner (e.g., white-pixel noise). When a subject moves, even a little, you will often see spikes that span several or all slices. But a white-pixel noise problem typically only affects one slice at a time. Note that the first few time points are ignored for the spike plot.&lt;br /&gt;
&lt;br /&gt;
For this plot (as well as the motion plot) you can get the exact value of any datapoint by hovering your mouse over one of the curves. Also note that the frame numbers start at zero rather than one. Some examples of QA reports are shown below.&lt;br /&gt;
&lt;br /&gt;
=Artifacts that you may find=&lt;br /&gt;
==Subject Motion==&lt;br /&gt;
This is by far the dominant cause of spike-like artifacts in most datasets. Even a small relative head displacement can lead to a signal drop and/or increase. Motion usually affects many slices.&lt;br /&gt;
&lt;br /&gt;
==White-pixel noise==&lt;br /&gt;
Spike noise is a common and insidious problem with MR, often caused by a loose screw on the scanner or some small stay piece of metal in the scan room that accumulates energy and then discharges randomly, creating broad-band RF noise at some point during the signal read-out. When this happens, one spot in k-space will have an abnormally  high intensity and show up as a &amp;quot;white pixel&amp;quot;. In the image domain, it will often manifest as an abrupt signal drop in one slice at one time-point (a &#039;spike&#039; in the time series). The problem is particularly acute for EPI scans because of all the gradient blipping during the read-out. &lt;br /&gt;
&lt;br /&gt;
If you see a lot of spike-noise in your data (either motion-induced or from a white-pixel noise problem), there are various tools available to specifically clean up spike-noise artifacts (like AFNI&#039;s 3dDespike). FSL&#039;s Melodic can also be used to remove artifacts in general (see [http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/MELODIC#fsl_regfilt_command-line_program fsl_regfit]). You can also try adding the spikes to your GLM as nuisance regressors. If you see a couple of spikes here and there, you might be able to safely ignore them, as they will not have a big effect on most GLM-type analyses. But even one or two spikes can affect certain kinds of correlation analyses, so for that you will have to be more careful.&lt;br /&gt;
&lt;br /&gt;
=Examples of QA reports=&lt;br /&gt;
A good subject and well-behaved scanner:&lt;br /&gt;
[[Image: qa_good.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
A bad subject and well-behaved scanner:&lt;br /&gt;
[[Image: qa_motion.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
A good subject and spikey scanner:&lt;br /&gt;
[[Image: qa_spikes.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
=Technical Details=&lt;br /&gt;
The QA report generation code is part of the NIMS codebase and is [https://github.com/cni/nims/blob/master/nimsproc/qa_report.py available on Github].&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Protocols&amp;diff=59432</id>
		<title>MR Protocols</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Protocols&amp;diff=59432"/>
		<updated>2026-03-18T20:47:28Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* T1 map + PD map */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page offers advice about how to set up your scan protocols and save the information.  The wiki pages take you through the template protocols we think are most widely used. These protocols can be found on the the scanner console, saved under “CNI/head” within the protocol pool.&lt;br /&gt;
&lt;br /&gt;
Screenshots to remind you about how to set specific MRI protocols can be found on the page [[Setting up protocols page | Setting up protocols]]&lt;br /&gt;
&lt;br /&gt;
= General =&lt;br /&gt;
&lt;br /&gt;
== Setting up an MR scan protocol ==&lt;br /&gt;
A basic MR scan session usually starts with the following scans:&lt;br /&gt;
* &#039;&#039;&#039;Localizer&#039;&#039;&#039; - a 3-plane localizer or &#039;scout&#039; scan meant to find the subject&#039;s head. It is also be used for prescription for the subsequent scans. Doing some sort of localizer is necessary, and the &#039;3planeloc SSFSE&#039; (single shot fast spin echo) is the standard work-horse used by most CNI users.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Anatomical&#039;&#039;&#039; - usually a 3D T1-weighted scan at 0.9mm or 1mm isotropic resolution. It is essential for image alignment and anatomical analysis. More choices of anatomical scans are listed in the Anatomical imaging section.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Higher-order shim&#039;&#039;&#039; - measures the magnetic field inhomogeneity and corrects it with polynomial gradients up to 2nd order. It should be run before fieldmap, fMRI or diffusion scans.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Field map&#039;&#039;&#039; - measures the magnetic field inhomogeneity that cannot be corrected by the shim and saves the inhomogeneity in a field map. It should be run immediately before or after the fMRI scan.&lt;br /&gt;
&lt;br /&gt;
At this point you will want to add a number of &#039;&#039;&#039;functional&#039;&#039;&#039; scans, &#039;&#039;&#039;diffusion&#039;&#039;&#039; scans or other type of scans based on your experiment. In the [[#MRI Protocol Templates | next section]] we describe templates for different categories of MRI protocols. The protocol templates are organized by category.  One set is based on conventional multislice (2D) or 3D methods, a second set is based on the new simultaneous multislice (SMS) protocols (also called mux or multiband), and a third set are some special methods (spectroscopy and qMRI).&lt;br /&gt;
&lt;br /&gt;
You can get help in customizing the parameters from the CNI staff (ask Hua, Adam, or Laima).&lt;br /&gt;
&lt;br /&gt;
== Saving your protocol parameters ==&lt;br /&gt;
=== Save screen-shots ===&lt;br /&gt;
At the GE console, you can save screen shots of the GE interface to show the main parameters that you have set in a protocol. Just get to the screen that you want to save, then press the &#039;Prnt Scrn&#039; button on the keyboard. A little dialog will show up. You can choose to print, which will print on paper to the Laser printer in the control room. However, we strongly suggest that you save some trees and the toxic ink chemicals by saving a digital copy instead. To do this, type ina reasonable name in the filename field (default is &#039;screen&#039;) and hit the &#039;PNG&amp;quot; button. A PNG image will then magically appear in the &#039;screensaves&#039; folder on the linux machine next to the console (cnirt). From there, you can email the images to yourself. Or, even better, create your own personal wiki page here that describes your protocol (just log in with your SUNet ID) and put the images in there. Then, you will always have them available when needed! THis is also a great way to share protocol information with your colleagues.&lt;br /&gt;
=== Get a PDF of all protocol parameters ===&lt;br /&gt;
&lt;br /&gt;
You can get a complete PDF of all your protocol info with a few clicks of the mouse. It&#039;s not quite as easy as a screensave, so we outline the procedure here. Note - There is a change on figure 4 - The pdf file will now appear with some viewing options at the top of the pdf file. By clicking on the 4th option from the right (a square with three parallel lines) the drop down menu will display a &amp;quot;save a copy&amp;quot; option which will result in the pdf being saved in the screensaves folder on the Linux machine (voxel2) next to the scanner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=5&amp;gt;&lt;br /&gt;
Image:Export_protocol_button.png|Click the &amp;quot;Protocol Exchange&amp;quot; button under the Image Management tab.&lt;br /&gt;
Image:ExportMode.png|Select &amp;quot;Export Mode&amp;quot; and click OK in the dialog that comes up.&lt;br /&gt;
Image:ProtocolSelection.png|Find your protocol in the next dialog, drag it to the &amp;quot;Protocol Selection&amp;quot; panel, and make sure it is selected. Then press the &amp;quot;preview&amp;quot; button.&lt;br /&gt;
Image:SavePdf.png|You&#039;ll then see the PDF of your protocol. Right-click anywhere within the pdf and select &amp;quot;Save as...&amp;quot; from the drop-down menu.&lt;br /&gt;
Image:SaveAs.png|Type the path and filename. Be sure that the path is /usr/g/mrraw/screensaves/ so it&#039;ll magically appear in the &amp;quot;screensaves&amp;quot; directory on the linux box.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MRI protocol templates ==&lt;br /&gt;
The CNI has stored example protocols for anatomical, fMRI, diffusion, spectroscopy and quantitative MR scans (named as &amp;quot;CNI Examples&amp;quot;, stored under &amp;quot;CNI / Head&amp;quot;). Depending on the user&#039;s needs, there are several ways to run a scan session. The stored protocols are meant to be used as a &#039;menu&#039; from which you select the sequence that you want, based on your needs. While there are many variations stored there, here we just highlight a couple of the most common versions. A detailed list of all parameters for all scans can be found in the PDF files for each protocol. Some suggested ways of selecting from and set up these scans for your own scan session are described below.&lt;br /&gt;
&lt;br /&gt;
== Moving protocols from CNI to Lucas ==&lt;br /&gt;
If you plan to transfer scan protocols from the CNI to Lucas Center, please contact Hua and follow the steps below:&lt;br /&gt;
&lt;br /&gt;
* Let CNI staff know the (a) name of the protocol(s) to transfer and (b) which Lucas scanner. It would be useful if you could include a list of scans in your protocol too. We will help transfer the protocol files over to Lucas. &lt;br /&gt;
&lt;br /&gt;
* If your protocol contains pulse sequences provided by researchers outside CNI, then please let them know about the transfer so that they can prepare the sequences for you at Lucas. For example, if you run any spectroscopy sequences, then please let [mailto:mgu@stanford.edu Dr Meng Gu] know about the transfer plan. &lt;br /&gt;
&lt;br /&gt;
* Follow up with Lucas staff about setting up peripheral devices, e.g. response box, scanner trigger, visual display, physio recording, etc. The visual display at both Lucas scanners uses a projector and a screen mounted on the head coil. Another thing to keep in mind is that &#039;&#039;&#039;Lucas scanners do not send out scan triggers in the same way as the CNI scanner does&#039;&#039;&#039;, so it’s preferred to let the stimulation program trigger the scanner by writing out a byte through the usb-serial port. Lucas also provides their version of the functional sequences that send out triggers to the computer, if you prefer to let the scanner trigger your stimulation. For more details please seek advice from the Lucas staff. &lt;br /&gt;
&lt;br /&gt;
* The Lucas center has its own instance of Flywheel [http://lucascenter.flywheel.io lucascenter.flywheel.io]. &#039;&#039;&#039;Prior to scanning at Lucas, please be sure to coordinate with Tom Brosnan, or [mailto:lmperry@stanford.edu Michael Perry], to have your group’s accounts and projects configured.&#039;&#039;&#039; Michael can help you make sure your projects have the correct gear rules configured to process your data, which is an important consideration to maintain consistency across the two sites. As a good first approximation you can map existing project gear rules at CNI to your new projects at Lucas. Our goal is to make the same gears available at Lucas as are available at CNI. This is a work in progress.&lt;br /&gt;
&lt;br /&gt;
= Anatomical imaging = &lt;br /&gt;
&lt;br /&gt;
==T1 weighted ==&lt;br /&gt;
All the suggested T1-weighted scans use GE&#039;s &amp;quot;BRAVO&amp;quot; sequence. It is an IR-prep, fast SPGR sequence with parameters tuned to optimize brain tissue contrast. Unless you have good reason to do so, you probably don&#039;t want to play with any parameters other than slice orientation, voxel size, and bandwidth. And for those, most users just pick one of the suggested configurations:&lt;br /&gt;
&lt;br /&gt;
* T1w 1mm ax (3:22): T1-weighted, 1mm^3 voxel size, 3D Bravo, axial slices. A single scan gives good signal-to-noise quality. If you just want a basic, fast, axial T1 weighted scan, go with this.  &lt;br /&gt;
&lt;br /&gt;
* T1w 1mm sag (3:43): T1-weighted, 1mm^3 voxel size, 3D Bravo, sagittal slices. A single scan gives good signal-to-noise quality. This is similar to the 1mm axial, but with sagittal slice orientation. Compared to axial, this orientation is slightly less efficient because you need a full phase FOV, but sagittal slices usually do better than axial with artifacts from large blood vessels (e.g., carotid artifacts land in non-brain regions rather than the temporal lobes) and with fat-shift artifacts, because the shifted scalp signal usually misses the brain while with axial it can sometimes overlap the occipital lobe gray matter, causing tissue segmentation problems.&lt;br /&gt;
&lt;br /&gt;
* T1w 0.9mm sag (4:49) T1-weighted, 0.9mm^3 voxel size, 3D Bravo, sagittal slices. A single scan gives good signal-to-noise quality. As with the above scan, but a little higher spatial resolution. If you can afford to take 5 minutes for a T1 scan, this one is a great choice. This is our work-horse. Note: to get true .9 isotropic voxels, enter &#039;23.04&#039; for the FOV. The scanner GUI will display this as &#039;23.0&#039;, but will store and use the full-precision that you type!&lt;br /&gt;
&lt;br /&gt;
* T1w 0.8mm sag (4:57 X 2): T1-weighted, 0.8mm^3 voxels, 3D Bravo, sagittal slices. Two scans (averaged in post-processing) are advised for good signal-to-noise quality. If you want to get better resolution, do two of these.&lt;br /&gt;
&lt;br /&gt;
* T1w 0.7mm sag (5:41 X 3): T1-weighted, 0.7mm^3 voxels, 3D Bravo, sagittal slices. 3-4 scans (averaged in post-processing) are advised for good signal-to-noise quality. If you can afford the time, and make use of high-quality anatomical images, this is the sequence to use.&lt;br /&gt;
&lt;br /&gt;
== T2 weighted ==&lt;br /&gt;
&lt;br /&gt;
* 3D T2 (5:03): T2-weighted, 0.8mm^3 voxel size, 3D Cube T2, sagittal slices. A single scan gives good signal-to-noise quality. &lt;br /&gt;
&lt;br /&gt;
* 3D T2 FLAIR (6:17): T2-weighted, 1 mm^3 voxel size, 3D Cube T2, sagittal slices. An additional inversion-recovery pulse is applied in the 3D T2 CUBE sequence to suppress the CSF signal in the T2 weighted images.&lt;br /&gt;
&lt;br /&gt;
* 3D T2 PROMO (5:42): T2-weighted, 0.8mm^3 voxel size, 3D Cube T2, sagittal slices. PROMO (PROspective MOtion correction) adjusts the scan parameters during the scan to prospectively correct for patient motion and thus reducing the image artifacts. &lt;br /&gt;
&lt;br /&gt;
== T2w/PDw ==&lt;br /&gt;
&lt;br /&gt;
2D T2w/PDw FSE (4:25): A standard 2D T2-weighted scan. You also get a bonus proton-density scan. Note that the two datasets will be interleaved; you&#039;ll want to separate them in post-processing.&lt;br /&gt;
&lt;br /&gt;
== Technical Notes ==&lt;br /&gt;
&lt;br /&gt;
In general, using a higher pixel bandwidth can help reduce chemical shift effects that push the fat signal from the scalp into the brain.&lt;br /&gt;
&lt;br /&gt;
The 3D Geometry Correction option uses a 3D correction for gradient non-linearity, over the 2D correction that is performed when the option is not checked. By including the slice direction in the correction, the resulting images are closer to geometric truth. The model used to represent gradient nonlinearity is the same as the 2D correction (&amp;quot;gradwarp&amp;quot;) and it uses the same cubic interpolation function as the 2D correction.&lt;br /&gt;
&lt;br /&gt;
= Functional imaging =&lt;br /&gt;
&lt;br /&gt;
== BOLD EPI (Full brain) ==&lt;br /&gt;
&lt;br /&gt;
BOLD EPI 2.9mm 2sec: gradient echo EPI, 2.9mm^3 voxel size, 45 slices (~13 cm), TR/TE 2s/30ms, 2x in-plane acceleration. This sequence gives you full coverage of the brain. The 2x in-plane acceleration reduces the EPI distortion. This is a standard sequence for fMRI scans.&lt;br /&gt;
&lt;br /&gt;
== BOLD EPI (High resolution, partial brain) ==&lt;br /&gt;
&lt;br /&gt;
BOLD EPI 1.8mm 2sec (partial coverage): gradient echo EPI, 1.8mm^3 voxel size, 25 slices (~4.5 cm), TR/TE 2s/30ms, 2x in-plane acceleration. This sequence gives you partial coverage of the brain at a higher resolution. It is a good choice if you are interested in a particular part of the brain.&lt;br /&gt;
&lt;br /&gt;
== Technical Notes ==&lt;br /&gt;
=== CNI&#039;s BOLD EPI Sequence ===&lt;br /&gt;
CNI&#039;s gradient-echo EPI sequence for BOLD fMRI imaging is a modified version of the stock EPI sequence provided by GE. Some useful information about this sequence:&lt;br /&gt;
* The name of the custom PSD is &#039;&#039;&#039;cni_epi&#039;&#039;&#039;.&lt;br /&gt;
* Slice order: The slices are acquired interleaved by default, with odd slices first, then even slices. Be sure to take this into account when doing slice timing correction. You can use the &amp;quot;TriggerTime&amp;quot; field in the DICOM head to confirm the slice acquisition timing. Also note that the time points at which slices are acquired are equally spaced within the TR.&lt;br /&gt;
* Triggering: There is a UserCV to control the acquisition trigger. You can have no special triggering (scan starts when you hit &#039;Scan&#039;), external trigger to start the scan (see [[MR Hardware#Scan Triggers]] for details), or cardiac gating. &lt;br /&gt;
* Image reconstruction size: By default, the images are reconstructed at the native image size instead of being zero-padded up to the next higher power of two. This results in faster recons, smaller files, and no image interpolation, so it is generally preferred. But, if you want power-of-two image sizes, you can change this UserCV to get that behavior.&lt;br /&gt;
* Phase encoding gradient: To use FSL&#039;s TOPUP for EPI distortion correction, you need to acquire a pair of EPI scans with the same prescription except for the reversed phase encoding gradient polarity. There is a UserCV to control the PE polarity (called &amp;quot;pepolar&amp;quot; in GE&#039;s term). In most common cases, the phase encoding gradient is along AP/PA direction, and when pepolar = 0, the encoding goes from posterior to anterior (&amp;quot;j&amp;quot; in BIDS convension), and when pepolar = 1, the encoding goes from anterior to posterior (&amp;quot;j-&amp;quot; in BIDS convension).&lt;br /&gt;
&lt;br /&gt;
=== Optimizing Scan Parameters ===&lt;br /&gt;
If your protocol has multiple long-duration functional scans, you may consider doing additional field map measurements between the functional scans to access any field drift. See the [[Improving EPI]] page for information on fixing some common image problems with EPI images.&lt;br /&gt;
&lt;br /&gt;
There is a field map template protocol within the CNI/Head/CNI Example fMRI: Spiral fieldmap (0:27): 2D spiral, 1.75 x 1.75 x 2mm^3 voxel size. Copy the slice coverage of the BOLD scan. This scan generates a B0 field map in Hz (along with a magnitude image).&lt;br /&gt;
&lt;br /&gt;
The optimal echo time (TE) for BOLD fMRI at 3T is 30ms, where the difference in T2* decay of oxy/deoxy hemoglobin gives the highest contrast in the measured MR signals between the oxy/deoxy-genated blood.&lt;br /&gt;
&lt;br /&gt;
When doing BOLD fMRI, we prefer reading out the data at the optimal echo time quickly. When the TR (the repetition time) is shorter than the longitudinal relaxation time (T1) of the tissue of interest, we want to adjust the flip angle to optimize the SNR by maximizing the magnetization recovery along the z-axis (T1) during successive excitations of the same tissue. The optimal flip-angle is found by the Ernst equation:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;flip-angle = acos(exp(-TR/T1)) &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[Note: this formula will return values in radians, which then need to be converted to degrees. Alternatively, if using Matlab, use the acosd function which will return degrees.]&lt;br /&gt;
&lt;br /&gt;
* A typical T1 value for gray matter is (3T): 1.33 seconds (Kruger, et al, 2001). (At 1.5T, it is closer to 0.9 seconds.) &lt;br /&gt;
&lt;br /&gt;
*Or use the following values for typical TRs at 3T:&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: right&amp;quot;| &#039;&#039;&#039;TR (s):&#039;&#039;&#039;&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 1&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 1.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 2.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 3&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 3.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 4&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 6&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 7&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: right&amp;quot;| &#039;&#039;&#039;flip (deg):&#039;&#039;&#039;&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 61.9&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 71.1&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 77.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 81.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 84.0&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 85.9&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 87.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 88.7&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 89.4&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 89.7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Diffusion weighted imaging =&lt;br /&gt;
&lt;br /&gt;
== DTI ==&lt;br /&gt;
* DTI 2mm b1000 60dir (9:21): 2mm^2 voxel size, 60-70 axial slices, b-value 1000, 60 diffusion directions. &lt;br /&gt;
&lt;br /&gt;
== HARDI ==&lt;br /&gt;
* DTI 2mm b2500 96dir (16:58): 2mm^2 voxel size, 60-70 axial slices, b-value 2500, 96 diffusion directions. &lt;br /&gt;
If you are pressed for time, you can drop the b-value to 2000 and/or reduce the number of directions to 80:&lt;br /&gt;
* DTI 2mm b2000 96dir (16:26): 2mm^2 voxel size, 60-70 axial slices, b-value 2000, 96 diffusion directions. &lt;br /&gt;
* DTI 2mm b2000 80dir (12:37): 2mm^2 voxel size, 60-70 axial slices, b-value 2000, 80 diffusion directions.&lt;br /&gt;
&lt;br /&gt;
== Technical Notes ==&lt;br /&gt;
Diffusion imaging at the CNI uses a modified version of GE&#039;s DW-EPI sequence. The sequence was modified so that for dual-spin-echo scans, the polarity of the second 180 degree pulse is inverted relative to the first 180. This causes off-resonance signal from fat to get defocused and thus help reduce fat-shift artifacts (See Sarlls et. al. Robust fat suppression at 3T in&lt;br /&gt;
high-resolution diffusion-weighted single-shot echo-planar imaging of human brain. MRM 2011, PubMed PMID: [http://www.ncbi.nlm.nih.gov/pubmed/21604298 21604298] and Reese et. al. Reduction of eddy-current-induced distortion in diffusion MRI using a twice-refocused spin echo. MRM 2003, PubMed PMID: [http://www.ncbi.nlm.nih.gov/pubmed/12509835 12509835]).&lt;br /&gt;
&lt;br /&gt;
To decide on an optimal High Angular Resolution Diffusion Imaging (HARDI) acquisition protocol, see:&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/19603409 White and Dale (2009)] Optimal diffusion MRI acquisition for fiber orientation density estimation: an analytic approach. HBM. (Calculated optimal b-values for maximum FOD estimation efficiency with SH expansion orders of L = 2, 4, 6, and 8 to be approximately b = 1,500, 3,000, 4,600, and 6,200 s/mm^2; demonstrated how scanner-specific hardware limitations generally lead to optimal b-values that are slightly lower than the ideal b-values.)&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/18583153 Tournier et al. (2008)] Resolving crossing fibres using constrained spherical deconvolution: validation using diffusion-weighted imaging phantom data. NeuroImage. (For a 45 degrees crossing, the minimum b-value required to resolve the fibre orientations was ... 2000 s/mm^2 for CSD, and 1000 s/mm^2 for super-CSD.)&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/17379540 Tournier et al. (2007)] Robust determination of the fibre orientation distribution in diffusion MRI: non-negativity constrained super-resolved spherical deconvolution. NeuroImage.&lt;br /&gt;
&lt;br /&gt;
HARDI data analysis tools include Camino, dipy, mrTrix etc.&lt;br /&gt;
&lt;br /&gt;
We use a modified version of the stock GE DWI-EPI pulse sequence. The resulting dicoms contain the diffusion parameters in these fields:&lt;br /&gt;
* b-value (in sec/mm^2): 0043 1039 (GEMS_PARMS_01 block, item 1039)&lt;br /&gt;
* gradient direction: [0019 10bb, 0019 10bc, 0019 10bd] (GEMS_ACQU_01 block, items 10bb - 10bd)&lt;br /&gt;
In mrTrix (mapper.cpp), the following code is used to convert the dicom gradient values to the saved gradient directions:&lt;br /&gt;
&lt;br /&gt;
 // M is the image transform&lt;br /&gt;
 M(0,0) = -image.orientation_x[0];&lt;br /&gt;
 M(1,0) = -image.orientation_x[1];&lt;br /&gt;
 M(2,0) =  image.orientation_x[2];&lt;br /&gt;
 M(0,1) = -image.orientation_y[0];&lt;br /&gt;
 M(1,1) = -image.orientation_y[1];&lt;br /&gt;
 M(2,1) =  image.orientation_y[2];&lt;br /&gt;
 M(0,2) = -image.orientation_z[0];&lt;br /&gt;
 M(1,2) = -image.orientation_z[1];&lt;br /&gt;
 M(2,2) =  image.orientation_z[2];&lt;br /&gt;
 M(0,3) = -image.position_vector[0];&lt;br /&gt;
 M(1,3) = -image.position_vector[1];&lt;br /&gt;
 M(2,3) =  image.position_vector[2];&lt;br /&gt;
 M(3,0) = 0.0; M(3,1) = 0.0; M(3,2) = 0.0; M(3,3) = 1.0;&lt;br /&gt;
 H.DW_scheme(s, 0) = M(0,0)*d[0] + M(0,1)*d[1] - M(0,2)*d[2];&lt;br /&gt;
 H.DW_scheme(s, 1) = M(1,0)*d[0] + M(1,1)*d[1] - M(1,2)*d[2];&lt;br /&gt;
 H.DW_scheme(s, 2) = M(2,0)*d[0] + M(2,1)*d[1] - M(2,2)*d[2];&lt;br /&gt;
&lt;br /&gt;
If you get the data from the CNI Neurobiological Image Management System (NIMS), then the b-values and b-vectors have already been extracted for you and are provided along with the NIFTI file containing your data. These three files (the NIFTI, bvals, and bvecs files) can be send directly into most diffusion data analysis packages, such as the Stanford Vita Lab [[https://github.com/vistalab/vistasoft/wiki/Diffusion-weighted-MRI mrDiffusion]] or FSL&#039;s [[http://www.fmrib.ox.ac.uk/fsl/fdt/index.html FDT]]. The b-values file contains a set of numbers (one for each acquired volume) that describe the b-value of the corresponding volume. The b-vecs file contains a triplet of numbers for each acquired volume, describing the diffusion-weighting direction for the corresponding volume. E.g., if you run our 60-direction scan, you will get 6 non-DW volumes followed by 60-DW volumes. Thus, you nifti file will contain 66 volumes. The b-vals file will contain 66 numbers (six 0&#039;s, fllowed by 60 1000&#039;s) and the b-vecs files will contain 66 triplets describing the DW directions for each volume (the triplets for the first 6 non-DW volumes are meaningless and can be ignored).&lt;br /&gt;
&lt;br /&gt;
=Simultaneous Multi-Slice (SMS)=&lt;br /&gt;
The CNI, in collaboration with GE, implemented [http://www.sciencedirect.com/science/article/pii/S1090780713000311 simultaneous multi-slice EPI] (also known as multiband EPI). GE has integrated the SMS EPI into its product software platform, and since CNI&#039;s scanner upgrade to the UHP system, the SMS sequence is available as part of the GE product sequences, called the Hyperband. The Hyperband option is available for both BOLD EPI and diffusion EPI. &lt;br /&gt;
&lt;br /&gt;
Previously CNI has provided the SMS sequence using our research PSD, the one we referred to as the &amp;quot;mux&amp;quot; sequence. We recommend everyone who has been using the &amp;quot;mux&amp;quot; sequence to transition to the Hyperband sequence. For a comparison of features and performances between the &amp;quot;mux&amp;quot; and Hyperband sequence, please see this CNI blog [http://cni.stanford.edu/hyperband-transition/ Hyperband transition]. More information about the legacy &amp;quot;mux&amp;quot; sequence is described on the [[MUX EPI]] page. &lt;br /&gt;
&lt;br /&gt;
== SMS fMRI ==&lt;br /&gt;
The Hyperband sequence uses a calibration process that is integrated in the prescan. It is not necessary to set up a separate calibration scan or account for additional calibration volumes in the EPI time series. The calibration data is not saved in the final images. By default all the volumes in the EPI time series are reconstructed and saved in the final images, so the number of volumes in NIFTI is exactly the same amount as specified in the protocol (in the Multi-Phase page). However, the first few volumes in the time series may have different intensity because the spin magnetization has not yet reached steady state. In the BOLD analysis it may be necessary to discard the first few volumes in order to get to the steady state. Alternatively, there is an option in the Hyperband sequence to allow users to specify a number of dummy volumes, in which case the scanner will not reconstruct the first few volumes, but the scan timing is still the same, i.e. data acquisition starts right after the scan trigger. &lt;br /&gt;
&lt;br /&gt;
=== BOLD EPI ===&lt;br /&gt;
* Hyperband 6, voxel size 2.4mm^3, FOV 21.6cm, number of slices 60, TR 710ms (scan protocol in the Connectome project)&lt;br /&gt;
* Hyperband 6, voxel size 1.8mm^3, FOV 23.0cm, number of slices 81, TR 1386ms&lt;br /&gt;
* Hyperband 8, voxel size 3.0mm^3, FOV 22.2cm, number of slices 48, TR 415ms&lt;br /&gt;
* Hyperband 8, voxel size 2.0mm^3, FOV 22.0cm, number of slices 72, TR 760ms&lt;br /&gt;
&lt;br /&gt;
=== Multi-echo EPI ===&lt;br /&gt;
* Hyperband 3, 2x in-plane acceleration, 3 EPI echoes, voxel size 2.8mm^3, FOV 22.4cm, number of slices 51, TR 1.49s, shortest TE 14.6ms, TE interval 23ms&lt;br /&gt;
&lt;br /&gt;
== SMS DWI ==&lt;br /&gt;
For SMS diffusion scans we generally recommend 2x to 3x slice acceleration, which will bring down the scan time by 2 to 3 times while maintaining the SNR of the diffusion weighted images. Partial Fourier acquisition is usually used to keep the TE as short as possible. The in-plane acceleration in addition to the slice acceleration is not always recommended because even though it can further reduce the EPI distortion but the SNR loss can be harmful for diffusion model fitting.&lt;br /&gt;
&lt;br /&gt;
Diffusion Spectrum Imaging (DSI) ([http://onlinelibrary.wiley.com/doi/10.1002/mrm.20642/full Magn. Reson. Med., 2005, 54: 1377–1386]) and multi-shell diffusion ([http://onlinelibrary.wiley.com/doi/10.1002/mrm.24736/full Magn. Reson. Med., 2013, 69: 1534–1540]) scans can be realized by designing gradient tables that specify direction and amplitude of the b-vectors. We set up a several customized gradient tables that are optimized for DTI, HARDI, 2 or 3-shell diffusion scans. Consult with us if you would like to set up your own diffusion gradient scheme. &lt;br /&gt;
&lt;br /&gt;
=== HARDI ===&lt;br /&gt;
* DTI 80dir 2mm (4:45): SMS factor 3, axial slices, 2mm^3 voxel size, number of slices 69, b-value 2500, 80 diffusion directions, 8 b=0 images &lt;br /&gt;
* DTI 96dir 2mm (5:50): SMS factor 3, axial slices, 2mm^3 voxel size, number of slices 69, b-value 3000, 96 diffusion directions, 10 b=0 images&lt;br /&gt;
&lt;br /&gt;
=== Multi-shell diffusion ===&lt;br /&gt;
* DTI g79/81 b3k 2-shell (4:33+4:40): 2-shell with 10 b=0 images, 75 directions at b=1500, 75 directions at b=3000. SMS factor 4, voxel size 1.5mm^3, number of slices 84 (scan protocol in the Connectome project)&lt;br /&gt;
* DTI g103 b2k 2-shell (4:50): 2-shell with 9 b=0 images, 30 directions at b=700, 64 directions at b=2000. SMS factor 3, 2x in-plane acceleration, voxel size 2mm^3, number of slices 75&lt;br /&gt;
* DTI g150 b3k 3-shell (6:15): 3-shell with 10 b=0 images, 30 direction at b=1000, 45 direction at b=2000, 65 direction at b=3000. SMS factor 3, 2x in-plane acceleration, voxel size 2mm^3, number of slices 63&lt;br /&gt;
&lt;br /&gt;
= Scientific Protocols for Tissue and Chemistry =&lt;br /&gt;
&lt;br /&gt;
== Quantitative MR ==&lt;br /&gt;
These template protocols make quantitative measurements of MR parameters (e.g. T1 in seconds, and proton density (PD) as a fraction of the voxel) of brain tissue.  Some 1 - PD is called the macromolecular tissue volume.&lt;br /&gt;
&lt;br /&gt;
=== T1 map ===&lt;br /&gt;
The SS-SMS T1 scan is a quantitative T1 scan using slice-shuffled inversion-recovery SMS EPI sequence. This scan gives you a T1 measurement at 2mm isotropic resolution in a minimum time. It uses in-plane acceleration therefore it&#039;s not necessary to run a separate pe1 scan for distortion correction unless you have enough time. For processing the NIFTI file from either pe0 or pe1 scan to get the T1 map, you can use [http://github.com/cni/t1fit/blob/master/t1_fitter.py this Python script]. If you acquired both pe0 and pe1, then you can use [http://github.com/cni/t1fit/blob/master/t1fit_unwarp.py this script] to process both NIFTI files to get the T1 map -- this includes an extra step for distortion correction using FSL&#039;s TOPUP before fitting the T1 relaxation. &lt;br /&gt;
&lt;br /&gt;
* SS-SMS T1 pe0 (pe1) (2:03): Gradient echo IR EPI, 2mm^3 voxel size, number of muxed slices 25 (75 unmuxed slices, 15cm), SMS factor 3, 2x in-plane acceleration, TR 3s.&lt;br /&gt;
&lt;br /&gt;
=== T1 map + PD map ===&lt;br /&gt;
The four SPGR scans, together with the four IR EPI scans, are set up for calculating T1 and PD maps using the [http://github.com/mezera/mrQ mrQ analysis package]. If you want a high resolution T1 map, or if you are interested in getting PD in addition to T1, then you should use this group of scans. &lt;br /&gt;
&lt;br /&gt;
* SPGR 1mm 30(4/10/20) deg (5:19 X 4): 3D SPGR, 1mm^3 voxel size, flip angle 30/4/10/20. The first scan should be run with Auto Prescan + Scan, and the following three should be run using Manual Prescan (do not change any parameters) + Scan.&lt;br /&gt;
&lt;br /&gt;
* IR EPI TI=50(400/1200/2400) (1:15 X 4): Gradient echo IR EPI, 1.875 x 1.875 x 4mm^3 voxel size, 2x in-plane acceleration. The first scan should be run with Auto Prescan + Scan, and the following three should be run using Manual Prescan (do not change any parameters) + Scan.&lt;br /&gt;
&lt;br /&gt;
Note that you could also choose to use only the four IR EPI scans to get a quantitative T1 map at a lower resolution. The working principle and model fitting procedure is explained [https://github.com/mathieuboudreau/Gold-Standard-Inversion-Recovery-T1-Mapping here].&lt;br /&gt;
&lt;br /&gt;
== Arterial-Spin Labeling (ASL) ==&lt;br /&gt;
The newest ASL sequence from GE is a pseudo-continuous sequence called 3DASL. By default it is set to create a Cerebral Bloodflow (CBF) volume as a post-processing task (reported in ml/100gm/min). Separate from post-processing, the sequence produces 2 volumes, a perfusion-weighted (PW) volume and a PD volume. The PW volume is created from subtracting the tagged volume from the control volume during the scan sequence.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ASL-specific considerations&#039;&#039;&#039;:&lt;br /&gt;
* &#039;&#039;Post-Label Delay (PLD)&#039;&#039;: default is 2025ms&lt;br /&gt;
** This should be edited to reflect population being studied. Populations with faster heart rates (such as children) should have a shorter post-label delay (e.g. healthy teens can be successfully scanned at 1525ms)&lt;br /&gt;
** PLD is saved as inversion time (TI) in the dicom headers&lt;br /&gt;
* &#039;&#039;Labeling time (LT)&#039;&#039;: default is 1450ms&lt;br /&gt;
* &#039;&#039;Slice thickness&#039;&#039;: default is 4mm&lt;br /&gt;
** minimum is 2mm&lt;br /&gt;
* &#039;&#039;Spiral arms&#039;&#039;: default is 8&lt;br /&gt;
** This is most significant means of adjusting spatial resolution. More arms = better spatial resolution in each slice.&lt;br /&gt;
* &#039;&#039;Prescription&#039;&#039;: The inferior edge of the prescription box must align with the base of the cerebellum.  This ensure the labeling plane (which is just inferior to the prescription box) is aligned to tag the blood passing through the carotid arteries in the neck before entering the brain.&lt;br /&gt;
** It is very important that the subject&#039;s head is aligned straight in the scanner. Tilting can result in poor labeling or artifacts in the PW volume (and subsequently the CBF volume).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Processing ASL Data&#039;&#039;&#039;:&lt;br /&gt;
Analyses can be conducted on the CBF volume or on the  PW volume. The CBF volume already has CBF quantified (naturally) based on the below information. This volume can be spatially normalized and analyzed in a similar way as processed fMRI data.&lt;br /&gt;
&lt;br /&gt;
* Homogeneous blood/brain partition coefficient for water is 0.9 ml/g&lt;br /&gt;
* Labeling inversion efficiency is 80% for a 3T scanner&lt;br /&gt;
* T1 of blood is 1.6s at a 3T scanner&lt;br /&gt;
* Saturation time is 2s&lt;br /&gt;
* Overall efficiency is 0.6&lt;br /&gt;
* The PD volume is used as a reference image&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can quantify CBF yourself from the PW volume if you&#039;d like to use different parameters or would like to perform additional spatial/intensity corrections before CBF quantification.&lt;br /&gt;
&lt;br /&gt;
== Spectroscopy ==&lt;br /&gt;
In-vivo spectroscopy sequences and analysis methods available and used at CNI are described [[GABA spectro | on this CNI spectroscopy page]].&lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
== Device specific processing ==&lt;br /&gt;
The [[GE Processing | GE processing]] includes various steps that can influence the signal-to-noise of your data.  We explain what we have learned about this and how to control it in this page.&lt;br /&gt;
&lt;br /&gt;
== Technical notes ==&lt;br /&gt;
* [[Data_Processing|Some old notes]] from the former CNI staff/users on data processing and resources&lt;br /&gt;
* [[media:Bob_spatialRes_111216.pdf|Slides on spatial resolution]] from CNI tutorial&lt;br /&gt;
* [[MR Signal Equations]]&lt;br /&gt;
&lt;br /&gt;
== Session Running Script ==&lt;br /&gt;
&lt;br /&gt;
We advise you to put together a session running script that outlines set up of the scanner and peripherals and positioning of and communications with the participant. You can find an example [[media:Session_Running_Script.pdf|here]] (courtesy of Nanna Notthoff, Carstensen Lab).&lt;br /&gt;
&lt;br /&gt;
== CNI&#039;s Quality Assurance protocol ==&lt;br /&gt;
Weekly QA scans include: &lt;br /&gt;
# BOLD EPI sequence (analyze mean and variance over time)&lt;br /&gt;
# DW EPI sequence (analyze eddy current distortion stability)&lt;br /&gt;
# Spiral field map (analyze long-term B0 stability)&lt;br /&gt;
All QA scans are done on the fBIRN agar phantom. The phantom is positioned in the same orientation with the same padding each week. The landmark must be set to the same. The Rx should be not touched (use the same stored Rx). We should do HO shim and set the shim VOI to exactly cover the sphere.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Protocols&amp;diff=59431</id>
		<title>MR Protocols</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Protocols&amp;diff=59431"/>
		<updated>2026-03-18T20:44:07Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Technical Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page offers advice about how to set up your scan protocols and save the information.  The wiki pages take you through the template protocols we think are most widely used. These protocols can be found on the the scanner console, saved under “CNI/head” within the protocol pool.&lt;br /&gt;
&lt;br /&gt;
Screenshots to remind you about how to set specific MRI protocols can be found on the page [[Setting up protocols page | Setting up protocols]]&lt;br /&gt;
&lt;br /&gt;
= General =&lt;br /&gt;
&lt;br /&gt;
== Setting up an MR scan protocol ==&lt;br /&gt;
A basic MR scan session usually starts with the following scans:&lt;br /&gt;
* &#039;&#039;&#039;Localizer&#039;&#039;&#039; - a 3-plane localizer or &#039;scout&#039; scan meant to find the subject&#039;s head. It is also be used for prescription for the subsequent scans. Doing some sort of localizer is necessary, and the &#039;3planeloc SSFSE&#039; (single shot fast spin echo) is the standard work-horse used by most CNI users.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Anatomical&#039;&#039;&#039; - usually a 3D T1-weighted scan at 0.9mm or 1mm isotropic resolution. It is essential for image alignment and anatomical analysis. More choices of anatomical scans are listed in the Anatomical imaging section.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Higher-order shim&#039;&#039;&#039; - measures the magnetic field inhomogeneity and corrects it with polynomial gradients up to 2nd order. It should be run before fieldmap, fMRI or diffusion scans.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Field map&#039;&#039;&#039; - measures the magnetic field inhomogeneity that cannot be corrected by the shim and saves the inhomogeneity in a field map. It should be run immediately before or after the fMRI scan.&lt;br /&gt;
&lt;br /&gt;
At this point you will want to add a number of &#039;&#039;&#039;functional&#039;&#039;&#039; scans, &#039;&#039;&#039;diffusion&#039;&#039;&#039; scans or other type of scans based on your experiment. In the [[#MRI Protocol Templates | next section]] we describe templates for different categories of MRI protocols. The protocol templates are organized by category.  One set is based on conventional multislice (2D) or 3D methods, a second set is based on the new simultaneous multislice (SMS) protocols (also called mux or multiband), and a third set are some special methods (spectroscopy and qMRI).&lt;br /&gt;
&lt;br /&gt;
You can get help in customizing the parameters from the CNI staff (ask Hua, Adam, or Laima).&lt;br /&gt;
&lt;br /&gt;
== Saving your protocol parameters ==&lt;br /&gt;
=== Save screen-shots ===&lt;br /&gt;
At the GE console, you can save screen shots of the GE interface to show the main parameters that you have set in a protocol. Just get to the screen that you want to save, then press the &#039;Prnt Scrn&#039; button on the keyboard. A little dialog will show up. You can choose to print, which will print on paper to the Laser printer in the control room. However, we strongly suggest that you save some trees and the toxic ink chemicals by saving a digital copy instead. To do this, type ina reasonable name in the filename field (default is &#039;screen&#039;) and hit the &#039;PNG&amp;quot; button. A PNG image will then magically appear in the &#039;screensaves&#039; folder on the linux machine next to the console (cnirt). From there, you can email the images to yourself. Or, even better, create your own personal wiki page here that describes your protocol (just log in with your SUNet ID) and put the images in there. Then, you will always have them available when needed! THis is also a great way to share protocol information with your colleagues.&lt;br /&gt;
=== Get a PDF of all protocol parameters ===&lt;br /&gt;
&lt;br /&gt;
You can get a complete PDF of all your protocol info with a few clicks of the mouse. It&#039;s not quite as easy as a screensave, so we outline the procedure here. Note - There is a change on figure 4 - The pdf file will now appear with some viewing options at the top of the pdf file. By clicking on the 4th option from the right (a square with three parallel lines) the drop down menu will display a &amp;quot;save a copy&amp;quot; option which will result in the pdf being saved in the screensaves folder on the Linux machine (voxel2) next to the scanner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=5&amp;gt;&lt;br /&gt;
Image:Export_protocol_button.png|Click the &amp;quot;Protocol Exchange&amp;quot; button under the Image Management tab.&lt;br /&gt;
Image:ExportMode.png|Select &amp;quot;Export Mode&amp;quot; and click OK in the dialog that comes up.&lt;br /&gt;
Image:ProtocolSelection.png|Find your protocol in the next dialog, drag it to the &amp;quot;Protocol Selection&amp;quot; panel, and make sure it is selected. Then press the &amp;quot;preview&amp;quot; button.&lt;br /&gt;
Image:SavePdf.png|You&#039;ll then see the PDF of your protocol. Right-click anywhere within the pdf and select &amp;quot;Save as...&amp;quot; from the drop-down menu.&lt;br /&gt;
Image:SaveAs.png|Type the path and filename. Be sure that the path is /usr/g/mrraw/screensaves/ so it&#039;ll magically appear in the &amp;quot;screensaves&amp;quot; directory on the linux box.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MRI protocol templates ==&lt;br /&gt;
The CNI has stored example protocols for anatomical, fMRI, diffusion, spectroscopy and quantitative MR scans (named as &amp;quot;CNI Examples&amp;quot;, stored under &amp;quot;CNI / Head&amp;quot;). Depending on the user&#039;s needs, there are several ways to run a scan session. The stored protocols are meant to be used as a &#039;menu&#039; from which you select the sequence that you want, based on your needs. While there are many variations stored there, here we just highlight a couple of the most common versions. A detailed list of all parameters for all scans can be found in the PDF files for each protocol. Some suggested ways of selecting from and set up these scans for your own scan session are described below.&lt;br /&gt;
&lt;br /&gt;
== Moving protocols from CNI to Lucas ==&lt;br /&gt;
If you plan to transfer scan protocols from the CNI to Lucas Center, please contact Hua and follow the steps below:&lt;br /&gt;
&lt;br /&gt;
* Let CNI staff know the (a) name of the protocol(s) to transfer and (b) which Lucas scanner. It would be useful if you could include a list of scans in your protocol too. We will help transfer the protocol files over to Lucas. &lt;br /&gt;
&lt;br /&gt;
* If your protocol contains pulse sequences provided by researchers outside CNI, then please let them know about the transfer so that they can prepare the sequences for you at Lucas. For example, if you run any spectroscopy sequences, then please let [mailto:mgu@stanford.edu Dr Meng Gu] know about the transfer plan. &lt;br /&gt;
&lt;br /&gt;
* Follow up with Lucas staff about setting up peripheral devices, e.g. response box, scanner trigger, visual display, physio recording, etc. The visual display at both Lucas scanners uses a projector and a screen mounted on the head coil. Another thing to keep in mind is that &#039;&#039;&#039;Lucas scanners do not send out scan triggers in the same way as the CNI scanner does&#039;&#039;&#039;, so it’s preferred to let the stimulation program trigger the scanner by writing out a byte through the usb-serial port. Lucas also provides their version of the functional sequences that send out triggers to the computer, if you prefer to let the scanner trigger your stimulation. For more details please seek advice from the Lucas staff. &lt;br /&gt;
&lt;br /&gt;
* The Lucas center has its own instance of Flywheel [http://lucascenter.flywheel.io lucascenter.flywheel.io]. &#039;&#039;&#039;Prior to scanning at Lucas, please be sure to coordinate with Tom Brosnan, or [mailto:lmperry@stanford.edu Michael Perry], to have your group’s accounts and projects configured.&#039;&#039;&#039; Michael can help you make sure your projects have the correct gear rules configured to process your data, which is an important consideration to maintain consistency across the two sites. As a good first approximation you can map existing project gear rules at CNI to your new projects at Lucas. Our goal is to make the same gears available at Lucas as are available at CNI. This is a work in progress.&lt;br /&gt;
&lt;br /&gt;
= Anatomical imaging = &lt;br /&gt;
&lt;br /&gt;
==T1 weighted ==&lt;br /&gt;
All the suggested T1-weighted scans use GE&#039;s &amp;quot;BRAVO&amp;quot; sequence. It is an IR-prep, fast SPGR sequence with parameters tuned to optimize brain tissue contrast. Unless you have good reason to do so, you probably don&#039;t want to play with any parameters other than slice orientation, voxel size, and bandwidth. And for those, most users just pick one of the suggested configurations:&lt;br /&gt;
&lt;br /&gt;
* T1w 1mm ax (3:22): T1-weighted, 1mm^3 voxel size, 3D Bravo, axial slices. A single scan gives good signal-to-noise quality. If you just want a basic, fast, axial T1 weighted scan, go with this.  &lt;br /&gt;
&lt;br /&gt;
* T1w 1mm sag (3:43): T1-weighted, 1mm^3 voxel size, 3D Bravo, sagittal slices. A single scan gives good signal-to-noise quality. This is similar to the 1mm axial, but with sagittal slice orientation. Compared to axial, this orientation is slightly less efficient because you need a full phase FOV, but sagittal slices usually do better than axial with artifacts from large blood vessels (e.g., carotid artifacts land in non-brain regions rather than the temporal lobes) and with fat-shift artifacts, because the shifted scalp signal usually misses the brain while with axial it can sometimes overlap the occipital lobe gray matter, causing tissue segmentation problems.&lt;br /&gt;
&lt;br /&gt;
* T1w 0.9mm sag (4:49) T1-weighted, 0.9mm^3 voxel size, 3D Bravo, sagittal slices. A single scan gives good signal-to-noise quality. As with the above scan, but a little higher spatial resolution. If you can afford to take 5 minutes for a T1 scan, this one is a great choice. This is our work-horse. Note: to get true .9 isotropic voxels, enter &#039;23.04&#039; for the FOV. The scanner GUI will display this as &#039;23.0&#039;, but will store and use the full-precision that you type!&lt;br /&gt;
&lt;br /&gt;
* T1w 0.8mm sag (4:57 X 2): T1-weighted, 0.8mm^3 voxels, 3D Bravo, sagittal slices. Two scans (averaged in post-processing) are advised for good signal-to-noise quality. If you want to get better resolution, do two of these.&lt;br /&gt;
&lt;br /&gt;
* T1w 0.7mm sag (5:41 X 3): T1-weighted, 0.7mm^3 voxels, 3D Bravo, sagittal slices. 3-4 scans (averaged in post-processing) are advised for good signal-to-noise quality. If you can afford the time, and make use of high-quality anatomical images, this is the sequence to use.&lt;br /&gt;
&lt;br /&gt;
== T2 weighted ==&lt;br /&gt;
&lt;br /&gt;
* 3D T2 (5:03): T2-weighted, 0.8mm^3 voxel size, 3D Cube T2, sagittal slices. A single scan gives good signal-to-noise quality. &lt;br /&gt;
&lt;br /&gt;
* 3D T2 FLAIR (6:17): T2-weighted, 1 mm^3 voxel size, 3D Cube T2, sagittal slices. An additional inversion-recovery pulse is applied in the 3D T2 CUBE sequence to suppress the CSF signal in the T2 weighted images.&lt;br /&gt;
&lt;br /&gt;
* 3D T2 PROMO (5:42): T2-weighted, 0.8mm^3 voxel size, 3D Cube T2, sagittal slices. PROMO (PROspective MOtion correction) adjusts the scan parameters during the scan to prospectively correct for patient motion and thus reducing the image artifacts. &lt;br /&gt;
&lt;br /&gt;
== T2w/PDw ==&lt;br /&gt;
&lt;br /&gt;
2D T2w/PDw FSE (4:25): A standard 2D T2-weighted scan. You also get a bonus proton-density scan. Note that the two datasets will be interleaved; you&#039;ll want to separate them in post-processing.&lt;br /&gt;
&lt;br /&gt;
== Technical Notes ==&lt;br /&gt;
&lt;br /&gt;
In general, using a higher pixel bandwidth can help reduce chemical shift effects that push the fat signal from the scalp into the brain.&lt;br /&gt;
&lt;br /&gt;
The 3D Geometry Correction option uses a 3D correction for gradient non-linearity, over the 2D correction that is performed when the option is not checked. By including the slice direction in the correction, the resulting images are closer to geometric truth. The model used to represent gradient nonlinearity is the same as the 2D correction (&amp;quot;gradwarp&amp;quot;) and it uses the same cubic interpolation function as the 2D correction.&lt;br /&gt;
&lt;br /&gt;
= Functional imaging =&lt;br /&gt;
&lt;br /&gt;
== BOLD EPI (Full brain) ==&lt;br /&gt;
&lt;br /&gt;
BOLD EPI 2.9mm 2sec: gradient echo EPI, 2.9mm^3 voxel size, 45 slices (~13 cm), TR/TE 2s/30ms, 2x in-plane acceleration. This sequence gives you full coverage of the brain. The 2x in-plane acceleration reduces the EPI distortion. This is a standard sequence for fMRI scans.&lt;br /&gt;
&lt;br /&gt;
== BOLD EPI (High resolution, partial brain) ==&lt;br /&gt;
&lt;br /&gt;
BOLD EPI 1.8mm 2sec (partial coverage): gradient echo EPI, 1.8mm^3 voxel size, 25 slices (~4.5 cm), TR/TE 2s/30ms, 2x in-plane acceleration. This sequence gives you partial coverage of the brain at a higher resolution. It is a good choice if you are interested in a particular part of the brain.&lt;br /&gt;
&lt;br /&gt;
== Technical Notes ==&lt;br /&gt;
=== CNI&#039;s BOLD EPI Sequence ===&lt;br /&gt;
CNI&#039;s gradient-echo EPI sequence for BOLD fMRI imaging is a modified version of the stock EPI sequence provided by GE. Some useful information about this sequence:&lt;br /&gt;
* The name of the custom PSD is &#039;&#039;&#039;cni_epi&#039;&#039;&#039;.&lt;br /&gt;
* Slice order: The slices are acquired interleaved by default, with odd slices first, then even slices. Be sure to take this into account when doing slice timing correction. You can use the &amp;quot;TriggerTime&amp;quot; field in the DICOM head to confirm the slice acquisition timing. Also note that the time points at which slices are acquired are equally spaced within the TR.&lt;br /&gt;
* Triggering: There is a UserCV to control the acquisition trigger. You can have no special triggering (scan starts when you hit &#039;Scan&#039;), external trigger to start the scan (see [[MR Hardware#Scan Triggers]] for details), or cardiac gating. &lt;br /&gt;
* Image reconstruction size: By default, the images are reconstructed at the native image size instead of being zero-padded up to the next higher power of two. This results in faster recons, smaller files, and no image interpolation, so it is generally preferred. But, if you want power-of-two image sizes, you can change this UserCV to get that behavior.&lt;br /&gt;
* Phase encoding gradient: To use FSL&#039;s TOPUP for EPI distortion correction, you need to acquire a pair of EPI scans with the same prescription except for the reversed phase encoding gradient polarity. There is a UserCV to control the PE polarity (called &amp;quot;pepolar&amp;quot; in GE&#039;s term). In most common cases, the phase encoding gradient is along AP/PA direction, and when pepolar = 0, the encoding goes from posterior to anterior (&amp;quot;j&amp;quot; in BIDS convension), and when pepolar = 1, the encoding goes from anterior to posterior (&amp;quot;j-&amp;quot; in BIDS convension).&lt;br /&gt;
&lt;br /&gt;
=== Optimizing Scan Parameters ===&lt;br /&gt;
If your protocol has multiple long-duration functional scans, you may consider doing additional field map measurements between the functional scans to access any field drift. See the [[Improving EPI]] page for information on fixing some common image problems with EPI images.&lt;br /&gt;
&lt;br /&gt;
There is a field map template protocol within the CNI/Head/CNI Example fMRI: Spiral fieldmap (0:27): 2D spiral, 1.75 x 1.75 x 2mm^3 voxel size. Copy the slice coverage of the BOLD scan. This scan generates a B0 field map in Hz (along with a magnitude image).&lt;br /&gt;
&lt;br /&gt;
The optimal echo time (TE) for BOLD fMRI at 3T is 30ms, where the difference in T2* decay of oxy/deoxy hemoglobin gives the highest contrast in the measured MR signals between the oxy/deoxy-genated blood.&lt;br /&gt;
&lt;br /&gt;
When doing BOLD fMRI, we prefer reading out the data at the optimal echo time quickly. When the TR (the repetition time) is shorter than the longitudinal relaxation time (T1) of the tissue of interest, we want to adjust the flip angle to optimize the SNR by maximizing the magnetization recovery along the z-axis (T1) during successive excitations of the same tissue. The optimal flip-angle is found by the Ernst equation:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;flip-angle = acos(exp(-TR/T1)) &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[Note: this formula will return values in radians, which then need to be converted to degrees. Alternatively, if using Matlab, use the acosd function which will return degrees.]&lt;br /&gt;
&lt;br /&gt;
* A typical T1 value for gray matter is (3T): 1.33 seconds (Kruger, et al, 2001). (At 1.5T, it is closer to 0.9 seconds.) &lt;br /&gt;
&lt;br /&gt;
*Or use the following values for typical TRs at 3T:&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: right&amp;quot;| &#039;&#039;&#039;TR (s):&#039;&#039;&#039;&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 1&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 1.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 2.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 3&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 3.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 4&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 6&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 7&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: right&amp;quot;| &#039;&#039;&#039;flip (deg):&#039;&#039;&#039;&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 61.9&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 71.1&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 77.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 81.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 84.0&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 85.9&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 87.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 88.7&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 89.4&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 89.7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Diffusion weighted imaging =&lt;br /&gt;
&lt;br /&gt;
== DTI ==&lt;br /&gt;
* DTI 2mm b1000 60dir (9:21): 2mm^2 voxel size, 60-70 axial slices, b-value 1000, 60 diffusion directions. &lt;br /&gt;
&lt;br /&gt;
== HARDI ==&lt;br /&gt;
* DTI 2mm b2500 96dir (16:58): 2mm^2 voxel size, 60-70 axial slices, b-value 2500, 96 diffusion directions. &lt;br /&gt;
If you are pressed for time, you can drop the b-value to 2000 and/or reduce the number of directions to 80:&lt;br /&gt;
* DTI 2mm b2000 96dir (16:26): 2mm^2 voxel size, 60-70 axial slices, b-value 2000, 96 diffusion directions. &lt;br /&gt;
* DTI 2mm b2000 80dir (12:37): 2mm^2 voxel size, 60-70 axial slices, b-value 2000, 80 diffusion directions.&lt;br /&gt;
&lt;br /&gt;
== Technical Notes ==&lt;br /&gt;
Diffusion imaging at the CNI uses a modified version of GE&#039;s DW-EPI sequence. The sequence was modified so that for dual-spin-echo scans, the polarity of the second 180 degree pulse is inverted relative to the first 180. This causes off-resonance signal from fat to get defocused and thus help reduce fat-shift artifacts (See Sarlls et. al. Robust fat suppression at 3T in&lt;br /&gt;
high-resolution diffusion-weighted single-shot echo-planar imaging of human brain. MRM 2011, PubMed PMID: [http://www.ncbi.nlm.nih.gov/pubmed/21604298 21604298] and Reese et. al. Reduction of eddy-current-induced distortion in diffusion MRI using a twice-refocused spin echo. MRM 2003, PubMed PMID: [http://www.ncbi.nlm.nih.gov/pubmed/12509835 12509835]).&lt;br /&gt;
&lt;br /&gt;
To decide on an optimal High Angular Resolution Diffusion Imaging (HARDI) acquisition protocol, see:&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/19603409 White and Dale (2009)] Optimal diffusion MRI acquisition for fiber orientation density estimation: an analytic approach. HBM. (Calculated optimal b-values for maximum FOD estimation efficiency with SH expansion orders of L = 2, 4, 6, and 8 to be approximately b = 1,500, 3,000, 4,600, and 6,200 s/mm^2; demonstrated how scanner-specific hardware limitations generally lead to optimal b-values that are slightly lower than the ideal b-values.)&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/18583153 Tournier et al. (2008)] Resolving crossing fibres using constrained spherical deconvolution: validation using diffusion-weighted imaging phantom data. NeuroImage. (For a 45 degrees crossing, the minimum b-value required to resolve the fibre orientations was ... 2000 s/mm^2 for CSD, and 1000 s/mm^2 for super-CSD.)&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/17379540 Tournier et al. (2007)] Robust determination of the fibre orientation distribution in diffusion MRI: non-negativity constrained super-resolved spherical deconvolution. NeuroImage.&lt;br /&gt;
&lt;br /&gt;
HARDI data analysis tools include Camino, dipy, mrTrix etc.&lt;br /&gt;
&lt;br /&gt;
We use a modified version of the stock GE DWI-EPI pulse sequence. The resulting dicoms contain the diffusion parameters in these fields:&lt;br /&gt;
* b-value (in sec/mm^2): 0043 1039 (GEMS_PARMS_01 block, item 1039)&lt;br /&gt;
* gradient direction: [0019 10bb, 0019 10bc, 0019 10bd] (GEMS_ACQU_01 block, items 10bb - 10bd)&lt;br /&gt;
In mrTrix (mapper.cpp), the following code is used to convert the dicom gradient values to the saved gradient directions:&lt;br /&gt;
&lt;br /&gt;
 // M is the image transform&lt;br /&gt;
 M(0,0) = -image.orientation_x[0];&lt;br /&gt;
 M(1,0) = -image.orientation_x[1];&lt;br /&gt;
 M(2,0) =  image.orientation_x[2];&lt;br /&gt;
 M(0,1) = -image.orientation_y[0];&lt;br /&gt;
 M(1,1) = -image.orientation_y[1];&lt;br /&gt;
 M(2,1) =  image.orientation_y[2];&lt;br /&gt;
 M(0,2) = -image.orientation_z[0];&lt;br /&gt;
 M(1,2) = -image.orientation_z[1];&lt;br /&gt;
 M(2,2) =  image.orientation_z[2];&lt;br /&gt;
 M(0,3) = -image.position_vector[0];&lt;br /&gt;
 M(1,3) = -image.position_vector[1];&lt;br /&gt;
 M(2,3) =  image.position_vector[2];&lt;br /&gt;
 M(3,0) = 0.0; M(3,1) = 0.0; M(3,2) = 0.0; M(3,3) = 1.0;&lt;br /&gt;
 H.DW_scheme(s, 0) = M(0,0)*d[0] + M(0,1)*d[1] - M(0,2)*d[2];&lt;br /&gt;
 H.DW_scheme(s, 1) = M(1,0)*d[0] + M(1,1)*d[1] - M(1,2)*d[2];&lt;br /&gt;
 H.DW_scheme(s, 2) = M(2,0)*d[0] + M(2,1)*d[1] - M(2,2)*d[2];&lt;br /&gt;
&lt;br /&gt;
If you get the data from the CNI Neurobiological Image Management System (NIMS), then the b-values and b-vectors have already been extracted for you and are provided along with the NIFTI file containing your data. These three files (the NIFTI, bvals, and bvecs files) can be send directly into most diffusion data analysis packages, such as the Stanford Vita Lab [[https://github.com/vistalab/vistasoft/wiki/Diffusion-weighted-MRI mrDiffusion]] or FSL&#039;s [[http://www.fmrib.ox.ac.uk/fsl/fdt/index.html FDT]]. The b-values file contains a set of numbers (one for each acquired volume) that describe the b-value of the corresponding volume. The b-vecs file contains a triplet of numbers for each acquired volume, describing the diffusion-weighting direction for the corresponding volume. E.g., if you run our 60-direction scan, you will get 6 non-DW volumes followed by 60-DW volumes. Thus, you nifti file will contain 66 volumes. The b-vals file will contain 66 numbers (six 0&#039;s, fllowed by 60 1000&#039;s) and the b-vecs files will contain 66 triplets describing the DW directions for each volume (the triplets for the first 6 non-DW volumes are meaningless and can be ignored).&lt;br /&gt;
&lt;br /&gt;
=Simultaneous Multi-Slice (SMS)=&lt;br /&gt;
The CNI, in collaboration with GE, implemented [http://www.sciencedirect.com/science/article/pii/S1090780713000311 simultaneous multi-slice EPI] (also known as multiband EPI). GE has integrated the SMS EPI into its product software platform, and since CNI&#039;s scanner upgrade to the UHP system, the SMS sequence is available as part of the GE product sequences, called the Hyperband. The Hyperband option is available for both BOLD EPI and diffusion EPI. &lt;br /&gt;
&lt;br /&gt;
Previously CNI has provided the SMS sequence using our research PSD, the one we referred to as the &amp;quot;mux&amp;quot; sequence. We recommend everyone who has been using the &amp;quot;mux&amp;quot; sequence to transition to the Hyperband sequence. For a comparison of features and performances between the &amp;quot;mux&amp;quot; and Hyperband sequence, please see this CNI blog [http://cni.stanford.edu/hyperband-transition/ Hyperband transition]. More information about the legacy &amp;quot;mux&amp;quot; sequence is described on the [[MUX EPI]] page. &lt;br /&gt;
&lt;br /&gt;
== SMS fMRI ==&lt;br /&gt;
The Hyperband sequence uses a calibration process that is integrated in the prescan. It is not necessary to set up a separate calibration scan or account for additional calibration volumes in the EPI time series. The calibration data is not saved in the final images. By default all the volumes in the EPI time series are reconstructed and saved in the final images, so the number of volumes in NIFTI is exactly the same amount as specified in the protocol (in the Multi-Phase page). However, the first few volumes in the time series may have different intensity because the spin magnetization has not yet reached steady state. In the BOLD analysis it may be necessary to discard the first few volumes in order to get to the steady state. Alternatively, there is an option in the Hyperband sequence to allow users to specify a number of dummy volumes, in which case the scanner will not reconstruct the first few volumes, but the scan timing is still the same, i.e. data acquisition starts right after the scan trigger. &lt;br /&gt;
&lt;br /&gt;
=== BOLD EPI ===&lt;br /&gt;
* Hyperband 6, voxel size 2.4mm^3, FOV 21.6cm, number of slices 60, TR 710ms (scan protocol in the Connectome project)&lt;br /&gt;
* Hyperband 6, voxel size 1.8mm^3, FOV 23.0cm, number of slices 81, TR 1386ms&lt;br /&gt;
* Hyperband 8, voxel size 3.0mm^3, FOV 22.2cm, number of slices 48, TR 415ms&lt;br /&gt;
* Hyperband 8, voxel size 2.0mm^3, FOV 22.0cm, number of slices 72, TR 760ms&lt;br /&gt;
&lt;br /&gt;
=== Multi-echo EPI ===&lt;br /&gt;
* Hyperband 3, 2x in-plane acceleration, 3 EPI echoes, voxel size 2.8mm^3, FOV 22.4cm, number of slices 51, TR 1.49s, shortest TE 14.6ms, TE interval 23ms&lt;br /&gt;
&lt;br /&gt;
== SMS DWI ==&lt;br /&gt;
For SMS diffusion scans we generally recommend 2x to 3x slice acceleration, which will bring down the scan time by 2 to 3 times while maintaining the SNR of the diffusion weighted images. Partial Fourier acquisition is usually used to keep the TE as short as possible. The in-plane acceleration in addition to the slice acceleration is not always recommended because even though it can further reduce the EPI distortion but the SNR loss can be harmful for diffusion model fitting.&lt;br /&gt;
&lt;br /&gt;
Diffusion Spectrum Imaging (DSI) ([http://onlinelibrary.wiley.com/doi/10.1002/mrm.20642/full Magn. Reson. Med., 2005, 54: 1377–1386]) and multi-shell diffusion ([http://onlinelibrary.wiley.com/doi/10.1002/mrm.24736/full Magn. Reson. Med., 2013, 69: 1534–1540]) scans can be realized by designing gradient tables that specify direction and amplitude of the b-vectors. We set up a several customized gradient tables that are optimized for DTI, HARDI, 2 or 3-shell diffusion scans. Consult with us if you would like to set up your own diffusion gradient scheme. &lt;br /&gt;
&lt;br /&gt;
=== HARDI ===&lt;br /&gt;
* DTI 80dir 2mm (4:45): SMS factor 3, axial slices, 2mm^3 voxel size, number of slices 69, b-value 2500, 80 diffusion directions, 8 b=0 images &lt;br /&gt;
* DTI 96dir 2mm (5:50): SMS factor 3, axial slices, 2mm^3 voxel size, number of slices 69, b-value 3000, 96 diffusion directions, 10 b=0 images&lt;br /&gt;
&lt;br /&gt;
=== Multi-shell diffusion ===&lt;br /&gt;
* DTI g79/81 b3k 2-shell (4:33+4:40): 2-shell with 10 b=0 images, 75 directions at b=1500, 75 directions at b=3000. SMS factor 4, voxel size 1.5mm^3, number of slices 84 (scan protocol in the Connectome project)&lt;br /&gt;
* DTI g103 b2k 2-shell (4:50): 2-shell with 9 b=0 images, 30 directions at b=700, 64 directions at b=2000. SMS factor 3, 2x in-plane acceleration, voxel size 2mm^3, number of slices 75&lt;br /&gt;
* DTI g150 b3k 3-shell (6:15): 3-shell with 10 b=0 images, 30 direction at b=1000, 45 direction at b=2000, 65 direction at b=3000. SMS factor 3, 2x in-plane acceleration, voxel size 2mm^3, number of slices 63&lt;br /&gt;
&lt;br /&gt;
= Scientific Protocols for Tissue and Chemistry =&lt;br /&gt;
&lt;br /&gt;
== Quantitative MR ==&lt;br /&gt;
These template protocols make quantitative measurements of MR parameters (e.g. T1 in seconds, and proton density (PD) as a fraction of the voxel) of brain tissue.  Some 1 - PD is called the macromolecular tissue volume.&lt;br /&gt;
&lt;br /&gt;
=== T1 map ===&lt;br /&gt;
The SS-SMS T1 scan is a quantitative T1 scan using slice-shuffled inversion-recovery SMS EPI sequence. This scan gives you a T1 measurement at 2mm isotropic resolution in a minimum time. It uses in-plane acceleration therefore it&#039;s not necessary to run a separate pe1 scan for distortion correction unless you have enough time. For processing the NIFTI file from either pe0 or pe1 scan to get the T1 map, you can use [http://github.com/cni/t1fit/blob/master/t1_fitter.py this Python script]. If you acquired both pe0 and pe1, then you can use [http://github.com/cni/t1fit/blob/master/t1fit_unwarp.py this script] to process both NIFTI files to get the T1 map -- this includes an extra step for distortion correction using FSL&#039;s TOPUP before fitting the T1 relaxation. &lt;br /&gt;
&lt;br /&gt;
* SS-SMS T1 pe0 (pe1) (2:03): Gradient echo IR EPI, 2mm^3 voxel size, number of muxed slices 25 (75 unmuxed slices, 15cm), SMS factor 3, 2x in-plane acceleration, TR 3s.&lt;br /&gt;
&lt;br /&gt;
=== T1 map + PD map ===&lt;br /&gt;
The four SPGR scans, together with the four IR EPI scans, are set up for calculating T1 and PD maps using the [http://github.com/mezera/mrQ mrQ analysis package]. If you want a high resolution T1 map, or if you are interested in getting PD in addition to T1, then you should use this group of scans. &lt;br /&gt;
&lt;br /&gt;
* SPGR 1mm 30(4/10/20) deg (5:19 X 4): 3D SPGR, 1mm^3 voxel size, flip angle 30/4/10/20. The first scan should be run with Auto Prescan + Scan, and the following three should be run using Manual Prescan (do not change any parameters) + Scan.&lt;br /&gt;
&lt;br /&gt;
* IR EPI TI=50(400/1200/2400) (1:15 X 4): Gradient echo IR EPI, 1.875 x 1.875 x 4mm^3 voxel size, 2x in-plane acceleration. The first scan should be run with Auto Prescan + Scan, and the following three should be run using Manual Prescan (do not change any parameters) + Scan.&lt;br /&gt;
&lt;br /&gt;
Note that you could also choose to use only the four IR EPI scans to get a quantitative T1 map at a lower resolution. The working principle and model fitting procedure is explained [http://www-mrsrl.stanford.edu/~jbarral/t1map.html here].&lt;br /&gt;
&lt;br /&gt;
== Arterial-Spin Labeling (ASL) ==&lt;br /&gt;
The newest ASL sequence from GE is a pseudo-continuous sequence called 3DASL. By default it is set to create a Cerebral Bloodflow (CBF) volume as a post-processing task (reported in ml/100gm/min). Separate from post-processing, the sequence produces 2 volumes, a perfusion-weighted (PW) volume and a PD volume. The PW volume is created from subtracting the tagged volume from the control volume during the scan sequence.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ASL-specific considerations&#039;&#039;&#039;:&lt;br /&gt;
* &#039;&#039;Post-Label Delay (PLD)&#039;&#039;: default is 2025ms&lt;br /&gt;
** This should be edited to reflect population being studied. Populations with faster heart rates (such as children) should have a shorter post-label delay (e.g. healthy teens can be successfully scanned at 1525ms)&lt;br /&gt;
** PLD is saved as inversion time (TI) in the dicom headers&lt;br /&gt;
* &#039;&#039;Labeling time (LT)&#039;&#039;: default is 1450ms&lt;br /&gt;
* &#039;&#039;Slice thickness&#039;&#039;: default is 4mm&lt;br /&gt;
** minimum is 2mm&lt;br /&gt;
* &#039;&#039;Spiral arms&#039;&#039;: default is 8&lt;br /&gt;
** This is most significant means of adjusting spatial resolution. More arms = better spatial resolution in each slice.&lt;br /&gt;
* &#039;&#039;Prescription&#039;&#039;: The inferior edge of the prescription box must align with the base of the cerebellum.  This ensure the labeling plane (which is just inferior to the prescription box) is aligned to tag the blood passing through the carotid arteries in the neck before entering the brain.&lt;br /&gt;
** It is very important that the subject&#039;s head is aligned straight in the scanner. Tilting can result in poor labeling or artifacts in the PW volume (and subsequently the CBF volume).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Processing ASL Data&#039;&#039;&#039;:&lt;br /&gt;
Analyses can be conducted on the CBF volume or on the  PW volume. The CBF volume already has CBF quantified (naturally) based on the below information. This volume can be spatially normalized and analyzed in a similar way as processed fMRI data.&lt;br /&gt;
&lt;br /&gt;
* Homogeneous blood/brain partition coefficient for water is 0.9 ml/g&lt;br /&gt;
* Labeling inversion efficiency is 80% for a 3T scanner&lt;br /&gt;
* T1 of blood is 1.6s at a 3T scanner&lt;br /&gt;
* Saturation time is 2s&lt;br /&gt;
* Overall efficiency is 0.6&lt;br /&gt;
* The PD volume is used as a reference image&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can quantify CBF yourself from the PW volume if you&#039;d like to use different parameters or would like to perform additional spatial/intensity corrections before CBF quantification.&lt;br /&gt;
&lt;br /&gt;
== Spectroscopy ==&lt;br /&gt;
In-vivo spectroscopy sequences and analysis methods available and used at CNI are described [[GABA spectro | on this CNI spectroscopy page]].&lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
== Device specific processing ==&lt;br /&gt;
The [[GE Processing | GE processing]] includes various steps that can influence the signal-to-noise of your data.  We explain what we have learned about this and how to control it in this page.&lt;br /&gt;
&lt;br /&gt;
== Technical notes ==&lt;br /&gt;
* [[Data_Processing|Some old notes]] from the former CNI staff/users on data processing and resources&lt;br /&gt;
* [[media:Bob_spatialRes_111216.pdf|Slides on spatial resolution]] from CNI tutorial&lt;br /&gt;
* [[MR Signal Equations]]&lt;br /&gt;
&lt;br /&gt;
== Session Running Script ==&lt;br /&gt;
&lt;br /&gt;
We advise you to put together a session running script that outlines set up of the scanner and peripherals and positioning of and communications with the participant. You can find an example [[media:Session_Running_Script.pdf|here]] (courtesy of Nanna Notthoff, Carstensen Lab).&lt;br /&gt;
&lt;br /&gt;
== CNI&#039;s Quality Assurance protocol ==&lt;br /&gt;
Weekly QA scans include: &lt;br /&gt;
# BOLD EPI sequence (analyze mean and variance over time)&lt;br /&gt;
# DW EPI sequence (analyze eddy current distortion stability)&lt;br /&gt;
# Spiral field map (analyze long-term B0 stability)&lt;br /&gt;
All QA scans are done on the fBIRN agar phantom. The phantom is positioned in the same orientation with the same padding each week. The landmark must be set to the same. The Rx should be not touched (use the same stored Rx). We should do HO shim and set the shim VOI to exactly cover the sphere.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=Main_Page&amp;diff=59430</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=Main_Page&amp;diff=59430"/>
		<updated>2026-03-18T20:39:43Z</updated>

		<summary type="html">&lt;p&gt;Huawu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Welcome to the CNI Wiki = __NOTOC__&lt;br /&gt;
&lt;br /&gt;
This site provides technical information for users of the Stanford Center for Cognitive and Neurobiological Imaging (CNI) facilities. All CNI users are invited to contribute their knowledge by editing content here.  It is important that you verify the accuracy of any information that you post.&lt;br /&gt;
&lt;br /&gt;
Follow [[Getting Started | this Getting Started link]] if you are new to the CNI and would like to learn about the basic facilities and how to get access and help in using the CNI facilities.  &lt;br /&gt;
&lt;br /&gt;
* General information is on the [http://cni.su.domains/ CNI administrative site (wordpress)]&lt;br /&gt;
* To schedule time on the facilities, see the [https://stanford-cni.calpendo.com CNI resource scheduler].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If you are experiencing problems with the scanner or the peripherals, please consult the [[Troubleshooting|Troubleshooting]] section.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Mission Statement = &lt;br /&gt;
&lt;br /&gt;
Discoveries about the brain have implications for fields ranging from Business, Law, Psychology, and Education. The Stanford Center for Cognitive and Neurobiological Imaging (CNI) supports scientific investigations into the brain that make rigorous connections between neuroscience and society. Our Mission is to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Support neuroscience discovery for enhancing society&lt;br /&gt;
&amp;lt;li&amp;gt; Develop and disseminate cognitive and neurobiological imaging methods&lt;br /&gt;
&amp;lt;li&amp;gt; Create a structured, safe, and innovative teaching environment for human neuroscience research&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= People =&lt;br /&gt;
Daily operations of the MRI facility are managed by Adam Kerr (akerr@stanford.edu), the Research Director, and by Laima Baltusis (laimab@stanford.edu), the Facility Manager. The MR Physics work at the CNI is led by Hua Wu (huawu@stanford.edu). Michael Perry oversees the information technology (e.g., NIMS). &lt;br /&gt;
&lt;br /&gt;
The CNI operations are guided by a faculty [http://cni.stanford.edu/content/cni-team#Internal_Advisory_Board Advisory Board] that includes representatives from the School of Humanities and Sciences, School of Education, the Department of Neurology, the Department of Psychiatry, and the School of Engineering.  The Board receives input from colleagues in the Law School and CCRMA.&lt;br /&gt;
&lt;br /&gt;
Stanford University oversight is through the office of the [http://dor.stanford.edu/ Vice-Provost and Dean of Research].&lt;br /&gt;
&lt;br /&gt;
= Facilities =&lt;br /&gt;
&lt;br /&gt;
The first CNI project was construction of the MR facility in the basement of Building 420.  The MR scanner was delivered on November 13th, 2010 and began running within a year.&lt;br /&gt;
&lt;br /&gt;
In addition to the MRI scanner, there is a mock scanner for training, experimental testing rooms, and integrated experimental equipment (displays and EEG). (See [[Facilities and Resources]] for more details and text useful when preparing sections of NIH or other grants.)&lt;br /&gt;
 &lt;br /&gt;
= Data Management = &lt;br /&gt;
&lt;br /&gt;
The scanner is heavily used. We train about 100 new users each year&lt;br /&gt;
&lt;br /&gt;
The [[ Flywheel | Data Management ]] page contains information about how we use Flywheel to store the data collected at the CNI, and to run certain data analyses.&lt;br /&gt;
&lt;br /&gt;
We have some summary statistics for the last few years gleaned from the Flywheel site that has been up since 2017.&lt;br /&gt;
&lt;br /&gt;
* We have collected approximately 1700 data sets (one hour sessions at the scanner) each year&lt;br /&gt;
* We have run about 75,000 jobs (Flywheel Gears) per year &lt;br /&gt;
* We are storing 540,000 files, including&lt;br /&gt;
** 50,000 T1 anatomical files &lt;br /&gt;
** 30,000 DWI diffusion files&lt;br /&gt;
** 250,000 functional MR files&lt;br /&gt;
&lt;br /&gt;
= Computational Resources =&lt;br /&gt;
&lt;br /&gt;
At startup time (2011), the CNI received funding from [http://biox.stanford.edu/biox/neuro.html BIO-X Neuroventures] for what was then a high-powered compute server which will be used to provide computational resources to CNI users. That system evolved to use Linux containers.&lt;br /&gt;
&lt;br /&gt;
In the early years we implemented a data management systems (NIMS) for storing and distributing all the data collected at the CNI. We also implemented an [[LXC | LXC Page]] system to support user computations.  NIMS was retired in 2017 and the LXC system was retired in 2021.&lt;br /&gt;
&lt;br /&gt;
In 2017 we installed Flywheel, which is a commercialized version of NIMS. That system continues to evolve and holds a great deal of data. It supports cloud-based computations (docker containers, which Flywheel calls Gears).&lt;br /&gt;
&lt;br /&gt;
In 2023 the CNI received funding from [https://csharp.stanford.edu/  C-ShARP] to upgrade our computational facilities with advanced GPUs.  These are being installed and will be heavily used for advanced reconstruction methods, particularly for quantitative methods developed by Kawin Setsompop&#039;s group.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;MediaWiki notes.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Consult the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents User&#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/postorius/lists/mediawiki-announce.lists.wikimedia.org/ MediaWiki release mailing list]&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn how to combat spam on your wiki]&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=Flywheel&amp;diff=59429</id>
		<title>Flywheel</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=Flywheel&amp;diff=59429"/>
		<updated>2026-03-18T20:36:43Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Downloading Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CNI uses [//flywheel.io Flywheel] for data and computational management.  Data from the scanner are automatically uploaded to the Flywheel database.  The Flywheel system is on the Google Cloud Platform. Users download data either using a web-browser or another of the [//docs.flywheel.io/hc/en-us/articles/360008410994-Getting-Started-Downloading-Data methods provided by Flywheel] (e.g., command-line-interface or software-development-kit). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the CNI, as data come into the Flywheel they are automatically processed according to rules determined by the CNI staff. For example, upon ingest PHI data are removed, DICOM and raw PFile data are converted to NIfTI format, and metadata about the scan parameters are read and inserted into the database. Some labs may configure initial processing of the data for individual projects differently. For help with customization groups can contact Flywheel directly or ask Michael Perry (see below).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page describes Flywheel features that are specific to the CNI. You can learn more about Flywheel using the links below:&lt;br /&gt;
&lt;br /&gt;
* A 5 minute video overview of Flywheel is available [//youtu.be/JUoSejTxXUw on YouTube]&lt;br /&gt;
* Manual pages and basic material about the system are maintained by Flywheel [//docs.flywheel.io/hc/en-us at this site]. &lt;br /&gt;
* Links to videos and webinars are on the [//docs.flywheel.io/hc/en-us Flywheel Docs site]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Log in to CNI&#039;s Flywheel site here: [//cni.flywheel.io cni.flywheel.io]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Authentication =&lt;br /&gt;
&lt;br /&gt;
Authentication to Flywheel at the CNI requires a valid (full-account) SUNetID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New users should ask the CNI staff to create an account.&lt;br /&gt;
&lt;br /&gt;
= Data upload =&lt;br /&gt;
The CNI scanner produces DICOM, P-File, and Physio data. The sequence you are using along with your scan parameters will determine which of those data are generated. Regardless of the type, those data will make their way into Flywheel automatically via one of the Connectors, described next.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
At the CNI data are uploaded to Flywheel automatically via Connectors (aka Reapers). CNI has multiple Flywheel Connectors running, one for each of the types of data that must make their way into Flywheel. &lt;br /&gt;
&lt;br /&gt;
The connectors running at CNI are:&lt;br /&gt;
* DICOM connector - communicates directly with the scanner&#039;s DICOM server to &amp;quot;discover&amp;quot; new data, package those data, and upload those data to Flywheel&lt;br /&gt;
* P-File connector - packages and transfers raw P-File data from the console to Flywheel. &lt;br /&gt;
* Physio connector - packages and transfers physio data from the console to Flywheel. This connector attempts to match the physio data to the correct series/acquisition within Flywheel, however if the scan is ended early, or if the prescribed duration is off from the actual duration, the physio data may not be transferred or it may end up in the wrong series. Please be sure to check your physio data and report any issues to CNI staff right away. &lt;br /&gt;
&lt;br /&gt;
== Getting your data to the right place ==&lt;br /&gt;
The Flywheel Connectors determine where to place data in the hierarchy using information entered into the MR console by the user and obtained from the DICOM or PFile data. &lt;br /&gt;
&lt;br /&gt;
We refer to the information provided by the user to help Flywheel understand where the data belong as the &amp;quot;Sort String&amp;quot;. It is important to understand how to provide this information correctly so that your data find their way to your project without delay. &lt;br /&gt;
&lt;br /&gt;
If a mistake is made here, worry not, those data will still be uploaded to Flywheel, however they will go to a group and project which only CNI staff have access to. If you believe this has happened to you, please feel free to reach out to CNI staff and we will help get your data where it belongs. &lt;br /&gt;
&lt;br /&gt;
=== Flywheel Sort String (Good) ===&lt;br /&gt;
&lt;br /&gt;
To make sure the data you collect is sent to the correct Flywheel project for your lab, you must enter a &amp;quot;Flywheel sort string&amp;quot; on the console. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enter this string into the &#039;&#039;&#039;Patient ID&#039;&#039;&#039; field on the scanner console.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The string format is:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;subject_label&amp;gt;@&amp;lt;group&amp;gt;/&amp;lt;project&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flywheel Sort String (Bad) ===&lt;br /&gt;
If you do not enter the sort string correctly, the data will still be sent to Flywheel, but it will not be routed to the correct project. Instead, it will be assigned to the &amp;quot;unknown&amp;quot; group or &amp;quot;Unsorted&amp;quot; project, depending on what Flywheel can determine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If the data are sent to the unknown group, you must ask the Site Admins to retrieve your data. (Michael, Laima). &lt;br /&gt;
* If the data are sent to the &amp;quot;Unsorted&amp;quot; project (case sensitive), you can find it and move it yourself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, for a given piece of data coming in through a Connector: &lt;br /&gt;
&lt;br /&gt;
  No Group, No Project --&amp;gt; group_id = &amp;quot;unknown&amp;quot;, project = &amp;quot;Unsorted&amp;quot;&lt;br /&gt;
  No Group, Project --&amp;gt; group_id = &amp;quot;unknown&amp;quot;, project = &amp;lt;Project&amp;gt;&lt;br /&gt;
  Group, No Project --&amp;gt; group_id = &amp;lt;Group&amp;gt;, project = &amp;quot;Unsorted&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Session Labels and Tags ===&lt;br /&gt;
In some cases, users want to set the name of the session rather than have Flywheel use the default name (which is the exam number).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can control the session name/label by placing information in the &#039;&#039;AdditionalPatientHistory&#039;&#039; section on the console, like so:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To set the &#039;&#039;&#039;session label&#039;&#039; using the following format (without the &amp;quot;&amp;lt;&amp;gt;&amp;quot;): &lt;br /&gt;
&lt;br /&gt;
  label_&amp;lt;your_desired_session_label&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may also &#039;&#039;&#039;tag a session&#039;&#039;&#039; to make it easier to find later. You can &#039;&#039;&#039;set a session tag&#039;&#039;&#039; by inserting this string in the &#039;&#039;AdditionalPatientHistory&#039;&#039; section.&lt;br /&gt;
&lt;br /&gt;
  tag_&amp;lt;tag_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Protected Health Information =&lt;br /&gt;
&lt;br /&gt;
Protected Health Information (PHI) is considered High Risk Data according to the Stanford Data Classification Guidelines. PHI is defined as any information that can be used to identify an individual and may relate to their past, present, or future health. By law, this information must be encrypted by law and must be (a) stored in encrypted form, and (b) transmitted only through secure means. &lt;br /&gt;
&lt;br /&gt;
Anonymized research data for publication can be shared without harm. See [https://med.stanford.edu/irt/security/stanfordinfo/hipaa.html this Stanford site]. Although CNI participants are not medical patients, we treat human subject data with the same PHI status as if they were patients. &lt;br /&gt;
&lt;br /&gt;
It is our policy that users &#039;&#039;&#039;never&#039;&#039;&#039; use any PHI identifiers when conducting an MRI exam.  We further strip out any field that may inadvertently include PHI before it is uploaded to Flywheel. This includes: &lt;br /&gt;
&lt;br /&gt;
* Patient ID field&lt;br /&gt;
* Date of Birth&lt;br /&gt;
* Medical Record Number &lt;br /&gt;
* Subject Name (first and last)&lt;br /&gt;
* Anything else that clearly identifies the human subject&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Our standard however is to never use any PHI identifiers when entering data into the scanner!&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Be careful also about what you enter in these fields - over the years we have found (and deleted) PHI from these fields:&lt;br /&gt;
&lt;br /&gt;
* Subject code (part of Patient ID)&lt;br /&gt;
* Exam description&lt;br /&gt;
* Series description&lt;br /&gt;
&lt;br /&gt;
It is permissible to include the subject&#039;s weight which is needed for scanner safety calculations.&lt;br /&gt;
&lt;br /&gt;
At present, to describe the PHI methods in your publications, you might find this summary paragraph helpful.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Data at Stanford&#039;s Center for Cognitive and Neurobiological Imaging are securely transferred from the MR scanner directly to a data management system (Flywheel.io) that is running within a Google platform space that is approved for research data. Prior to transfer the data file headers are stripped of fields that may contain subject information (patient id, DOB, MRN, name fields). These procedures meet the Stanford standard for anonymized research data for publication and can be shared without harm. See: [https://med.stanford.edu/irt/security/stanfordinfo/hipaa.html this Stanford site].&lt;br /&gt;
&lt;br /&gt;
= Data Processing =&lt;br /&gt;
&lt;br /&gt;
Once data are uploaded to Flywheel those data are automatically processed according to a given Project&#039;s &amp;quot;[//docs.flywheel.io/hc/en-us/articles/360008553133-Project-Gear-Rules Gear Rules]&amp;quot;. The Rules define which Gear will be run on a given piece of data when it lands in Flywheel. These rules do everything from metadata extraction from DICOM headers to execution of QA algorithms. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Gear Rules (Default) ==&lt;br /&gt;
&lt;br /&gt;
At CNI we have defined a default set of rules that are applied to every new project. Each rule defines the logic that must be satisfied in order for a given gear to be run on a data file. &lt;br /&gt;
&lt;br /&gt;
The image below shows the default rules that every new project is provided with. &lt;br /&gt;
&lt;br /&gt;
[[File:GearRules.png|600px|thumb|center|Gear Rule Template]]&lt;br /&gt;
&lt;br /&gt;
=== A special note on DICOM to NIfTI Conversion (dcm2niix &amp;amp; dcm-convert) ===&lt;br /&gt;
&lt;br /&gt;
Historically at CNI we have provided a tool that was developed in-house for DICOM to NIfTI conversion (dcm-convert). Recently users have expressed interest in having a very widely used and popular tool, dcm2niix, serve as the default tool to perform DICOM to NIfTI conversion in Flywheel. We are happy to say that Flywheel does provide a dcm2niix Gear and we have incorporated this into our default rule set. As of today the default is still dcm-convert, however for projects created recently you will see this rule available and in a disabled state. You can easily enable this rule, however it should be noted that if you do enable this rule you need to disable the existing dcm-convert rule so that you don&#039;t introduce a race condition which would result in a situation where you would not be able to predict which tool would be used to generate the NIfTI data. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Re-running DICOM to NIfTI conversion across a project ===&lt;br /&gt;
&lt;br /&gt;
There are special considerations to be made if you desire to re-run DICOM to NIfTI conversion across an entire project, namely you need to ignore DICOM data that was generated by any of the MUX sequences, as those data are aliased and running either of the DICOM to NIfTI tools on those data will result in aliased NIfTI data. Special care is taken within the Gear rules to avoid this situation by specifically ignoring data that were collected with a mux sequence. &lt;br /&gt;
&lt;br /&gt;
The best idea here is to coordinate with CNI staff (e.g., Michael Perry) prior to doing this.&lt;br /&gt;
&lt;br /&gt;
= Downloading Data =&lt;br /&gt;
There are several ways to download data from Flywheel, including via the [https://docs.flywheel.io/data_transfer/outbound/ WEB UI], the [https://docs.flywheel.io/CLI command line interface (CLI)], and the Flywheel SDK (which is available for both [https://docs.flywheel.io/Developer_Guides/api_sdk/#python-sdk Python] and [https://docs.flywheel.io/Developer_Guides/api_sdk/#call-flywheel-sdk-from-matlab MATLAB]).  The links below can help you get started with the various methods of export:&lt;br /&gt;
&lt;br /&gt;
=== UI Downloads ===&lt;br /&gt;
* [https://docs.flywheel.io/user/download/user_downloading_a_file_from_the_web_ui Download individual Files]&lt;br /&gt;
* [https://docs.flywheel.io/user/download/user_downloading_sessions_or_acquisitions_from_web_ui Download session or acquisition containers]&lt;br /&gt;
* [https://docs.flywheel.io/user/download/user_downloading_an_entire_project_from_the_web_ui Download a Project]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Flywheel SDK ===&lt;br /&gt;
* [https://docs.flywheel.io/Developer_Guides/api_sdk/#call-flywheel-sdk-from-matlab MATLAB] &lt;br /&gt;
* [https://docs.flywheel.io/Developer_Guides/api_sdk/#python-sdk Python]&lt;br /&gt;
* [https://docs.flywheel.io/Developer_Guides/additional_information/jupyter_notebooks_python_sdk Support materials SDK examples (Jupyter notebooks)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Flywheel CLI ===&lt;br /&gt;
* [https://docs.flywheel.io/CLI/ Flywheel CLI Documentation]&lt;br /&gt;
&lt;br /&gt;
=== CLI: Tips and Best Practices for CNI Users ===&lt;br /&gt;
&lt;br /&gt;
This section focuses on a few tips for using the CLI to download your data. For a complete overview of the Flywheel CLI, including how to get started, please look through the [https://docs.flywheel.io/CLI Flywheel CLI Documentation].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tip:&#039;&#039; &#039;&#039;&#039; Download only the files you need&#039;&#039;&#039; &lt;br /&gt;
When downloading data from Flywheel using the CLI you can greatly speed up your downloads by excluding data types which are not needed for your analysis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example: &#039;&#039;&#039;&#039;&#039;Exclude pfile and DICOM data from a container download&#039;&#039;&#039;:  Most users do not need to download the raw scanner files (PFILES) or raw DICOM data. You can exclude certain data types from your downloads by using the `-e` flag with your CLI download, like so:&lt;br /&gt;
  fw download &amp;quot;cni/testproject/subject1/session1&amp;quot; -e pfile -e dicom&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This tells the CLI to exclude any pfile and dicom files in the container. Note that you can use consecutive -e flags to exclude multiple data types. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example:&#039;&#039; &#039;&#039;&#039;Download only NIfTI, BVEC, and BVAL files&#039;&#039;&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
Most users are only interested in the data that will be input to their analysis pipelines. This is most often limited to three data types (nifti, bvec, and bval). You can use the following command with multiple include flags (`-i`) to accomplish exactly that: &lt;br /&gt;
  fw download &amp;quot;cni/testproject/subject1/session1&amp;quot; -i nifti -i bvec -i bval&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will generate an archive (.tar) file containing the requested hierarchy with only those files you explicitly need.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example:&#039;&#039; &#039;&#039;&#039;Using quotes&#039;&#039;&#039;&lt;br /&gt;
Often times your source-path (that is the &#039;&#039;group/project/subject/session&#039;&#039; string the describes the location of your data in Flywheel) will have one or more spaces or special characters in it. To properly address that location using the CLI it&#039;s important to use quotes around the source path, like so:&lt;br /&gt;
  fw download &amp;quot;cni/testproject/subject1/session1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example&#039;&#039; &#039;&#039;Download a single file with the CLI&#039;&#039;&lt;br /&gt;
So you have navigated to a container and your only desire is to download a single file from that container, the best way to do that is using the CLI with the &#039;files&#039; spec filter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example:&#039;&#039; &#039;&#039;&#039;Download a single NIfTI file from an acquisition container:&#039;&#039;&#039;&lt;br /&gt;
  fw download &amp;quot;test/Unsorted/s001/18591/T1w 1mm/files/18591_13_1.nii.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The important bit here is the inclusion of &amp;quot;files&amp;quot; prior to the file name.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Using Sherlock and other Computers =&lt;br /&gt;
We suggest that you use the Flywheel Command Line Interface (CLI) to transfer data to other compute resources, like Sherlock.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To download and install the CLI on Sherlock we use the `wget` tool, then `unzip` to extract the CLI resource package, and finally modify our `.bashrc` file to add the fw binary as an alias in our environment. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039; Get the URL for the CLI package, which can be found on the &amp;quot;Profile&amp;quot; page within the Flywheel interface. To grab the URL, find the CLI section on the Profile page, right-click the Linux CLI Download link, and choose &amp;quot;Copy Link Address&amp;quot; (or similar). Once you have the download link address move to the next step. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: &#039;&#039;&#039; Log in to Sherlock and run the `wget` command, using the URL from &#039;&#039;Step 1&#039;&#039; to download the CLI package. &lt;br /&gt;
  mkdir -p flywheel/cli&lt;br /&gt;
  cd flywheel/cli&lt;br /&gt;
  wget //storage.googleapis.com/flywheel-dist/cli/&amp;lt;version&amp;gt;/fw-linux_amd64.zip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039; Unpack the CLI archive and cleanup the downloaded package.&lt;br /&gt;
  unzip  fw-linux_amd64.zip&lt;br /&gt;
  mv linux_amd64/fw .&lt;br /&gt;
  rmdir linux_amd64&lt;br /&gt;
  rm -f fw-linux_amd64.zip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Modify your `.bashrc` file to add the fw CLI command to your environment, and source it to make the alias active. &#039;&#039;Note that this only needs to be done once.&#039;&#039;&lt;br /&gt;
  echo -e &amp;quot;alias fw=&#039;$HOME/flywheel/cli/fw&#039;&amp;quot; &amp;gt;&amp;gt; $HOME/.bashrc&lt;br /&gt;
  source $HOME/.bashrc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Once the above steps are complete, you should be able to log in using the CLI and use it as described in the official documentation: //flywheelio.zendesk.com/hc/en-us/sections/360001596834-Command-Line-Interface. The best way to do this is navigate to your [//cni.flywheel.io/#/profile profile page] in Flywheel, make sure that you have generated an API Key, and use the login command text that is provided for you there.&lt;br /&gt;
&lt;br /&gt;
  fw login &amp;lt;your API key&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Data Migration from NIMS =&lt;br /&gt;
Before there was Flywheel, there was NIMS.  Data have been preserved in NIMS and they can be migrated to Flywheel on an as-needed basis. Please inquire with Michael Perry for more information. &lt;br /&gt;
&lt;br /&gt;
= Support =&lt;br /&gt;
&lt;br /&gt;
Michael can help with most CNI Flywheel issues. If support is needed for Flywheel issues not related to the CNI, please email their help line:  support@flywheel.io.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=Flywheel&amp;diff=59428</id>
		<title>Flywheel</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=Flywheel&amp;diff=59428"/>
		<updated>2026-03-18T20:25:46Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* CLI: Tips and Best Practices for CNI Users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CNI uses [//flywheel.io Flywheel] for data and computational management.  Data from the scanner are automatically uploaded to the Flywheel database.  The Flywheel system is on the Google Cloud Platform. Users download data either using a web-browser or another of the [//docs.flywheel.io/hc/en-us/articles/360008410994-Getting-Started-Downloading-Data methods provided by Flywheel] (e.g., command-line-interface or software-development-kit). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the CNI, as data come into the Flywheel they are automatically processed according to rules determined by the CNI staff. For example, upon ingest PHI data are removed, DICOM and raw PFile data are converted to NIfTI format, and metadata about the scan parameters are read and inserted into the database. Some labs may configure initial processing of the data for individual projects differently. For help with customization groups can contact Flywheel directly or ask Michael Perry (see below).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page describes Flywheel features that are specific to the CNI. You can learn more about Flywheel using the links below:&lt;br /&gt;
&lt;br /&gt;
* A 5 minute video overview of Flywheel is available [//youtu.be/JUoSejTxXUw on YouTube]&lt;br /&gt;
* Manual pages and basic material about the system are maintained by Flywheel [//docs.flywheel.io/hc/en-us at this site]. &lt;br /&gt;
* Links to videos and webinars are on the [//docs.flywheel.io/hc/en-us Flywheel Docs site]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Log in to CNI&#039;s Flywheel site here: [//cni.flywheel.io cni.flywheel.io]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Authentication =&lt;br /&gt;
&lt;br /&gt;
Authentication to Flywheel at the CNI requires a valid (full-account) SUNetID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New users should ask the CNI staff to create an account.&lt;br /&gt;
&lt;br /&gt;
= Data upload =&lt;br /&gt;
The CNI scanner produces DICOM, P-File, and Physio data. The sequence you are using along with your scan parameters will determine which of those data are generated. Regardless of the type, those data will make their way into Flywheel automatically via one of the Connectors, described next.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
At the CNI data are uploaded to Flywheel automatically via Connectors (aka Reapers). CNI has multiple Flywheel Connectors running, one for each of the types of data that must make their way into Flywheel. &lt;br /&gt;
&lt;br /&gt;
The connectors running at CNI are:&lt;br /&gt;
* DICOM connector - communicates directly with the scanner&#039;s DICOM server to &amp;quot;discover&amp;quot; new data, package those data, and upload those data to Flywheel&lt;br /&gt;
* P-File connector - packages and transfers raw P-File data from the console to Flywheel. &lt;br /&gt;
* Physio connector - packages and transfers physio data from the console to Flywheel. This connector attempts to match the physio data to the correct series/acquisition within Flywheel, however if the scan is ended early, or if the prescribed duration is off from the actual duration, the physio data may not be transferred or it may end up in the wrong series. Please be sure to check your physio data and report any issues to CNI staff right away. &lt;br /&gt;
&lt;br /&gt;
== Getting your data to the right place ==&lt;br /&gt;
The Flywheel Connectors determine where to place data in the hierarchy using information entered into the MR console by the user and obtained from the DICOM or PFile data. &lt;br /&gt;
&lt;br /&gt;
We refer to the information provided by the user to help Flywheel understand where the data belong as the &amp;quot;Sort String&amp;quot;. It is important to understand how to provide this information correctly so that your data find their way to your project without delay. &lt;br /&gt;
&lt;br /&gt;
If a mistake is made here, worry not, those data will still be uploaded to Flywheel, however they will go to a group and project which only CNI staff have access to. If you believe this has happened to you, please feel free to reach out to CNI staff and we will help get your data where it belongs. &lt;br /&gt;
&lt;br /&gt;
=== Flywheel Sort String (Good) ===&lt;br /&gt;
&lt;br /&gt;
To make sure the data you collect is sent to the correct Flywheel project for your lab, you must enter a &amp;quot;Flywheel sort string&amp;quot; on the console. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enter this string into the &#039;&#039;&#039;Patient ID&#039;&#039;&#039; field on the scanner console.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The string format is:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;subject_label&amp;gt;@&amp;lt;group&amp;gt;/&amp;lt;project&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flywheel Sort String (Bad) ===&lt;br /&gt;
If you do not enter the sort string correctly, the data will still be sent to Flywheel, but it will not be routed to the correct project. Instead, it will be assigned to the &amp;quot;unknown&amp;quot; group or &amp;quot;Unsorted&amp;quot; project, depending on what Flywheel can determine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If the data are sent to the unknown group, you must ask the Site Admins to retrieve your data. (Michael, Laima). &lt;br /&gt;
* If the data are sent to the &amp;quot;Unsorted&amp;quot; project (case sensitive), you can find it and move it yourself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, for a given piece of data coming in through a Connector: &lt;br /&gt;
&lt;br /&gt;
  No Group, No Project --&amp;gt; group_id = &amp;quot;unknown&amp;quot;, project = &amp;quot;Unsorted&amp;quot;&lt;br /&gt;
  No Group, Project --&amp;gt; group_id = &amp;quot;unknown&amp;quot;, project = &amp;lt;Project&amp;gt;&lt;br /&gt;
  Group, No Project --&amp;gt; group_id = &amp;lt;Group&amp;gt;, project = &amp;quot;Unsorted&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Session Labels and Tags ===&lt;br /&gt;
In some cases, users want to set the name of the session rather than have Flywheel use the default name (which is the exam number).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can control the session name/label by placing information in the &#039;&#039;AdditionalPatientHistory&#039;&#039; section on the console, like so:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To set the &#039;&#039;&#039;session label&#039;&#039; using the following format (without the &amp;quot;&amp;lt;&amp;gt;&amp;quot;): &lt;br /&gt;
&lt;br /&gt;
  label_&amp;lt;your_desired_session_label&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may also &#039;&#039;&#039;tag a session&#039;&#039;&#039; to make it easier to find later. You can &#039;&#039;&#039;set a session tag&#039;&#039;&#039; by inserting this string in the &#039;&#039;AdditionalPatientHistory&#039;&#039; section.&lt;br /&gt;
&lt;br /&gt;
  tag_&amp;lt;tag_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Protected Health Information =&lt;br /&gt;
&lt;br /&gt;
Protected Health Information (PHI) is considered High Risk Data according to the Stanford Data Classification Guidelines. PHI is defined as any information that can be used to identify an individual and may relate to their past, present, or future health. By law, this information must be encrypted by law and must be (a) stored in encrypted form, and (b) transmitted only through secure means. &lt;br /&gt;
&lt;br /&gt;
Anonymized research data for publication can be shared without harm. See [https://med.stanford.edu/irt/security/stanfordinfo/hipaa.html this Stanford site]. Although CNI participants are not medical patients, we treat human subject data with the same PHI status as if they were patients. &lt;br /&gt;
&lt;br /&gt;
It is our policy that users &#039;&#039;&#039;never&#039;&#039;&#039; use any PHI identifiers when conducting an MRI exam.  We further strip out any field that may inadvertently include PHI before it is uploaded to Flywheel. This includes: &lt;br /&gt;
&lt;br /&gt;
* Patient ID field&lt;br /&gt;
* Date of Birth&lt;br /&gt;
* Medical Record Number &lt;br /&gt;
* Subject Name (first and last)&lt;br /&gt;
* Anything else that clearly identifies the human subject&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Our standard however is to never use any PHI identifiers when entering data into the scanner!&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Be careful also about what you enter in these fields - over the years we have found (and deleted) PHI from these fields:&lt;br /&gt;
&lt;br /&gt;
* Subject code (part of Patient ID)&lt;br /&gt;
* Exam description&lt;br /&gt;
* Series description&lt;br /&gt;
&lt;br /&gt;
It is permissible to include the subject&#039;s weight which is needed for scanner safety calculations.&lt;br /&gt;
&lt;br /&gt;
At present, to describe the PHI methods in your publications, you might find this summary paragraph helpful.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Data at Stanford&#039;s Center for Cognitive and Neurobiological Imaging are securely transferred from the MR scanner directly to a data management system (Flywheel.io) that is running within a Google platform space that is approved for research data. Prior to transfer the data file headers are stripped of fields that may contain subject information (patient id, DOB, MRN, name fields). These procedures meet the Stanford standard for anonymized research data for publication and can be shared without harm. See: [https://med.stanford.edu/irt/security/stanfordinfo/hipaa.html this Stanford site].&lt;br /&gt;
&lt;br /&gt;
= Data Processing =&lt;br /&gt;
&lt;br /&gt;
Once data are uploaded to Flywheel those data are automatically processed according to a given Project&#039;s &amp;quot;[//docs.flywheel.io/hc/en-us/articles/360008553133-Project-Gear-Rules Gear Rules]&amp;quot;. The Rules define which Gear will be run on a given piece of data when it lands in Flywheel. These rules do everything from metadata extraction from DICOM headers to execution of QA algorithms. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Gear Rules (Default) ==&lt;br /&gt;
&lt;br /&gt;
At CNI we have defined a default set of rules that are applied to every new project. Each rule defines the logic that must be satisfied in order for a given gear to be run on a data file. &lt;br /&gt;
&lt;br /&gt;
The image below shows the default rules that every new project is provided with. &lt;br /&gt;
&lt;br /&gt;
[[File:GearRules.png|600px|thumb|center|Gear Rule Template]]&lt;br /&gt;
&lt;br /&gt;
=== A special note on DICOM to NIfTI Conversion (dcm2niix &amp;amp; dcm-convert) ===&lt;br /&gt;
&lt;br /&gt;
Historically at CNI we have provided a tool that was developed in-house for DICOM to NIfTI conversion (dcm-convert). Recently users have expressed interest in having a very widely used and popular tool, dcm2niix, serve as the default tool to perform DICOM to NIfTI conversion in Flywheel. We are happy to say that Flywheel does provide a dcm2niix Gear and we have incorporated this into our default rule set. As of today the default is still dcm-convert, however for projects created recently you will see this rule available and in a disabled state. You can easily enable this rule, however it should be noted that if you do enable this rule you need to disable the existing dcm-convert rule so that you don&#039;t introduce a race condition which would result in a situation where you would not be able to predict which tool would be used to generate the NIfTI data. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Re-running DICOM to NIfTI conversion across a project ===&lt;br /&gt;
&lt;br /&gt;
There are special considerations to be made if you desire to re-run DICOM to NIfTI conversion across an entire project, namely you need to ignore DICOM data that was generated by any of the MUX sequences, as those data are aliased and running either of the DICOM to NIfTI tools on those data will result in aliased NIfTI data. Special care is taken within the Gear rules to avoid this situation by specifically ignoring data that were collected with a mux sequence. &lt;br /&gt;
&lt;br /&gt;
The best idea here is to coordinate with CNI staff (e.g., Michael Perry) prior to doing this.&lt;br /&gt;
&lt;br /&gt;
= Downloading Data =&lt;br /&gt;
There are several ways to download data from Flywheel, including via the [//flywheelio.zendesk.com/hc/en-us/articles/360008622994-Downloading-sessions-or-acquisitions-from-the-Web-UI WEB UI], the [//flywheelio.zendesk.com/hc/en-us/sections/360001596834-Command-Line-Interface command line interface (CLI)], and the Flywheel SDK (which is available for both [//flywheel-io.github.io/core/branches/master/python/getting_started.html Python] and [//flywheel-io.github.io/core/branches/master/matlab/getting_started.html MATLAB]).  The links below can help you get started with the various methods of export:&lt;br /&gt;
&lt;br /&gt;
=== UI Downloads ===&lt;br /&gt;
* [//flywheelio.zendesk.com/hc/en-us/articles/360009256973-Downloading-a-file Download individual Files]&lt;br /&gt;
* [//flywheelio.zendesk.com/hc/en-us/articles/360008622994-Downloading-sessions-or-acquisitions-from-the-Web-UI Download session or acquisition containers]&lt;br /&gt;
* [//flywheelio.zendesk.com/hc/en-us/articles/360008629794-Downloading-an-entire-project Download a Project]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Flywheel SDK ===&lt;br /&gt;
* [//flywheel-io.gitlab.io/product/backend/sdk/branches/master/matlab/index.html MATLAB] &lt;br /&gt;
* [//flywheel-io.gitlab.io/product/backend/sdk/branches/master/python/index.html Python]&lt;br /&gt;
* [//gitlab.com/flywheel-io/public/flywheel-tutorials Support materials SDK examples (Jupyter notebooks)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Flywheel CLI ===&lt;br /&gt;
* [https://docs.flywheel.io/CLI/ Flywheel CLI Documentation]&lt;br /&gt;
&lt;br /&gt;
=== CLI: Tips and Best Practices for CNI Users ===&lt;br /&gt;
&lt;br /&gt;
This section focuses on a few tips for using the CLI to download your data. For a complete overview of the Flywheel CLI, including how to get started, please look through the [https://docs.flywheel.io/CLI Flywheel CLI Documentation].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tip:&#039;&#039; &#039;&#039;&#039; Download only the files you need&#039;&#039;&#039; &lt;br /&gt;
When downloading data from Flywheel using the CLI you can greatly speed up your downloads by excluding data types which are not needed for your analysis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example: &#039;&#039;&#039;&#039;&#039;Exclude pfile and DICOM data from a container download&#039;&#039;&#039;:  Most users do not need to download the raw scanner files (PFILES) or raw DICOM data. You can exclude certain data types from your downloads by using the `-e` flag with your CLI download, like so:&lt;br /&gt;
  fw download &amp;quot;cni/testproject/subject1/session1&amp;quot; -e pfile -e dicom&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This tells the CLI to exclude any pfile and dicom files in the container. Note that you can use consecutive -e flags to exclude multiple data types. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example:&#039;&#039; &#039;&#039;&#039;Download only NIfTI, BVEC, and BVAL files&#039;&#039;&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
Most users are only interested in the data that will be input to their analysis pipelines. This is most often limited to three data types (nifti, bvec, and bval). You can use the following command with multiple include flags (`-i`) to accomplish exactly that: &lt;br /&gt;
  fw download &amp;quot;cni/testproject/subject1/session1&amp;quot; -i nifti -i bvec -i bval&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will generate an archive (.tar) file containing the requested hierarchy with only those files you explicitly need.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example:&#039;&#039; &#039;&#039;&#039;Using quotes&#039;&#039;&#039;&lt;br /&gt;
Often times your source-path (that is the &#039;&#039;group/project/subject/session&#039;&#039; string the describes the location of your data in Flywheel) will have one or more spaces or special characters in it. To properly address that location using the CLI it&#039;s important to use quotes around the source path, like so:&lt;br /&gt;
  fw download &amp;quot;cni/testproject/subject1/session1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example&#039;&#039; &#039;&#039;Download a single file with the CLI&#039;&#039;&lt;br /&gt;
So you have navigated to a container and your only desire is to download a single file from that container, the best way to do that is using the CLI with the &#039;files&#039; spec filter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example:&#039;&#039; &#039;&#039;&#039;Download a single NIfTI file from an acquisition container:&#039;&#039;&#039;&lt;br /&gt;
  fw download &amp;quot;test/Unsorted/s001/18591/T1w 1mm/files/18591_13_1.nii.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The important bit here is the inclusion of &amp;quot;files&amp;quot; prior to the file name.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Using Sherlock and other Computers =&lt;br /&gt;
We suggest that you use the Flywheel Command Line Interface (CLI) to transfer data to other compute resources, like Sherlock.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To download and install the CLI on Sherlock we use the `wget` tool, then `unzip` to extract the CLI resource package, and finally modify our `.bashrc` file to add the fw binary as an alias in our environment. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039; Get the URL for the CLI package, which can be found on the &amp;quot;Profile&amp;quot; page within the Flywheel interface. To grab the URL, find the CLI section on the Profile page, right-click the Linux CLI Download link, and choose &amp;quot;Copy Link Address&amp;quot; (or similar). Once you have the download link address move to the next step. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: &#039;&#039;&#039; Log in to Sherlock and run the `wget` command, using the URL from &#039;&#039;Step 1&#039;&#039; to download the CLI package. &lt;br /&gt;
  mkdir -p flywheel/cli&lt;br /&gt;
  cd flywheel/cli&lt;br /&gt;
  wget //storage.googleapis.com/flywheel-dist/cli/&amp;lt;version&amp;gt;/fw-linux_amd64.zip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039; Unpack the CLI archive and cleanup the downloaded package.&lt;br /&gt;
  unzip  fw-linux_amd64.zip&lt;br /&gt;
  mv linux_amd64/fw .&lt;br /&gt;
  rmdir linux_amd64&lt;br /&gt;
  rm -f fw-linux_amd64.zip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Modify your `.bashrc` file to add the fw CLI command to your environment, and source it to make the alias active. &#039;&#039;Note that this only needs to be done once.&#039;&#039;&lt;br /&gt;
  echo -e &amp;quot;alias fw=&#039;$HOME/flywheel/cli/fw&#039;&amp;quot; &amp;gt;&amp;gt; $HOME/.bashrc&lt;br /&gt;
  source $HOME/.bashrc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Once the above steps are complete, you should be able to log in using the CLI and use it as described in the official documentation: //flywheelio.zendesk.com/hc/en-us/sections/360001596834-Command-Line-Interface. The best way to do this is navigate to your [//cni.flywheel.io/#/profile profile page] in Flywheel, make sure that you have generated an API Key, and use the login command text that is provided for you there.&lt;br /&gt;
&lt;br /&gt;
  fw login &amp;lt;your API key&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Data Migration from NIMS =&lt;br /&gt;
Before there was Flywheel, there was NIMS.  Data have been preserved in NIMS and they can be migrated to Flywheel on an as-needed basis. Please inquire with Michael Perry for more information. &lt;br /&gt;
&lt;br /&gt;
= Support =&lt;br /&gt;
&lt;br /&gt;
Michael can help with most CNI Flywheel issues. If support is needed for Flywheel issues not related to the CNI, please email their help line:  support@flywheel.io.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=Flywheel&amp;diff=59427</id>
		<title>Flywheel</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=Flywheel&amp;diff=59427"/>
		<updated>2026-03-18T20:25:17Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Flywheel CLI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CNI uses [//flywheel.io Flywheel] for data and computational management.  Data from the scanner are automatically uploaded to the Flywheel database.  The Flywheel system is on the Google Cloud Platform. Users download data either using a web-browser or another of the [//docs.flywheel.io/hc/en-us/articles/360008410994-Getting-Started-Downloading-Data methods provided by Flywheel] (e.g., command-line-interface or software-development-kit). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the CNI, as data come into the Flywheel they are automatically processed according to rules determined by the CNI staff. For example, upon ingest PHI data are removed, DICOM and raw PFile data are converted to NIfTI format, and metadata about the scan parameters are read and inserted into the database. Some labs may configure initial processing of the data for individual projects differently. For help with customization groups can contact Flywheel directly or ask Michael Perry (see below).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page describes Flywheel features that are specific to the CNI. You can learn more about Flywheel using the links below:&lt;br /&gt;
&lt;br /&gt;
* A 5 minute video overview of Flywheel is available [//youtu.be/JUoSejTxXUw on YouTube]&lt;br /&gt;
* Manual pages and basic material about the system are maintained by Flywheel [//docs.flywheel.io/hc/en-us at this site]. &lt;br /&gt;
* Links to videos and webinars are on the [//docs.flywheel.io/hc/en-us Flywheel Docs site]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Log in to CNI&#039;s Flywheel site here: [//cni.flywheel.io cni.flywheel.io]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Authentication =&lt;br /&gt;
&lt;br /&gt;
Authentication to Flywheel at the CNI requires a valid (full-account) SUNetID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New users should ask the CNI staff to create an account.&lt;br /&gt;
&lt;br /&gt;
= Data upload =&lt;br /&gt;
The CNI scanner produces DICOM, P-File, and Physio data. The sequence you are using along with your scan parameters will determine which of those data are generated. Regardless of the type, those data will make their way into Flywheel automatically via one of the Connectors, described next.&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
At the CNI data are uploaded to Flywheel automatically via Connectors (aka Reapers). CNI has multiple Flywheel Connectors running, one for each of the types of data that must make their way into Flywheel. &lt;br /&gt;
&lt;br /&gt;
The connectors running at CNI are:&lt;br /&gt;
* DICOM connector - communicates directly with the scanner&#039;s DICOM server to &amp;quot;discover&amp;quot; new data, package those data, and upload those data to Flywheel&lt;br /&gt;
* P-File connector - packages and transfers raw P-File data from the console to Flywheel. &lt;br /&gt;
* Physio connector - packages and transfers physio data from the console to Flywheel. This connector attempts to match the physio data to the correct series/acquisition within Flywheel, however if the scan is ended early, or if the prescribed duration is off from the actual duration, the physio data may not be transferred or it may end up in the wrong series. Please be sure to check your physio data and report any issues to CNI staff right away. &lt;br /&gt;
&lt;br /&gt;
== Getting your data to the right place ==&lt;br /&gt;
The Flywheel Connectors determine where to place data in the hierarchy using information entered into the MR console by the user and obtained from the DICOM or PFile data. &lt;br /&gt;
&lt;br /&gt;
We refer to the information provided by the user to help Flywheel understand where the data belong as the &amp;quot;Sort String&amp;quot;. It is important to understand how to provide this information correctly so that your data find their way to your project without delay. &lt;br /&gt;
&lt;br /&gt;
If a mistake is made here, worry not, those data will still be uploaded to Flywheel, however they will go to a group and project which only CNI staff have access to. If you believe this has happened to you, please feel free to reach out to CNI staff and we will help get your data where it belongs. &lt;br /&gt;
&lt;br /&gt;
=== Flywheel Sort String (Good) ===&lt;br /&gt;
&lt;br /&gt;
To make sure the data you collect is sent to the correct Flywheel project for your lab, you must enter a &amp;quot;Flywheel sort string&amp;quot; on the console. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enter this string into the &#039;&#039;&#039;Patient ID&#039;&#039;&#039; field on the scanner console.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The string format is:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;subject_label&amp;gt;@&amp;lt;group&amp;gt;/&amp;lt;project&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flywheel Sort String (Bad) ===&lt;br /&gt;
If you do not enter the sort string correctly, the data will still be sent to Flywheel, but it will not be routed to the correct project. Instead, it will be assigned to the &amp;quot;unknown&amp;quot; group or &amp;quot;Unsorted&amp;quot; project, depending on what Flywheel can determine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If the data are sent to the unknown group, you must ask the Site Admins to retrieve your data. (Michael, Laima). &lt;br /&gt;
* If the data are sent to the &amp;quot;Unsorted&amp;quot; project (case sensitive), you can find it and move it yourself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, for a given piece of data coming in through a Connector: &lt;br /&gt;
&lt;br /&gt;
  No Group, No Project --&amp;gt; group_id = &amp;quot;unknown&amp;quot;, project = &amp;quot;Unsorted&amp;quot;&lt;br /&gt;
  No Group, Project --&amp;gt; group_id = &amp;quot;unknown&amp;quot;, project = &amp;lt;Project&amp;gt;&lt;br /&gt;
  Group, No Project --&amp;gt; group_id = &amp;lt;Group&amp;gt;, project = &amp;quot;Unsorted&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Session Labels and Tags ===&lt;br /&gt;
In some cases, users want to set the name of the session rather than have Flywheel use the default name (which is the exam number).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can control the session name/label by placing information in the &#039;&#039;AdditionalPatientHistory&#039;&#039; section on the console, like so:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To set the &#039;&#039;&#039;session label&#039;&#039; using the following format (without the &amp;quot;&amp;lt;&amp;gt;&amp;quot;): &lt;br /&gt;
&lt;br /&gt;
  label_&amp;lt;your_desired_session_label&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may also &#039;&#039;&#039;tag a session&#039;&#039;&#039; to make it easier to find later. You can &#039;&#039;&#039;set a session tag&#039;&#039;&#039; by inserting this string in the &#039;&#039;AdditionalPatientHistory&#039;&#039; section.&lt;br /&gt;
&lt;br /&gt;
  tag_&amp;lt;tag_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Protected Health Information =&lt;br /&gt;
&lt;br /&gt;
Protected Health Information (PHI) is considered High Risk Data according to the Stanford Data Classification Guidelines. PHI is defined as any information that can be used to identify an individual and may relate to their past, present, or future health. By law, this information must be encrypted by law and must be (a) stored in encrypted form, and (b) transmitted only through secure means. &lt;br /&gt;
&lt;br /&gt;
Anonymized research data for publication can be shared without harm. See [https://med.stanford.edu/irt/security/stanfordinfo/hipaa.html this Stanford site]. Although CNI participants are not medical patients, we treat human subject data with the same PHI status as if they were patients. &lt;br /&gt;
&lt;br /&gt;
It is our policy that users &#039;&#039;&#039;never&#039;&#039;&#039; use any PHI identifiers when conducting an MRI exam.  We further strip out any field that may inadvertently include PHI before it is uploaded to Flywheel. This includes: &lt;br /&gt;
&lt;br /&gt;
* Patient ID field&lt;br /&gt;
* Date of Birth&lt;br /&gt;
* Medical Record Number &lt;br /&gt;
* Subject Name (first and last)&lt;br /&gt;
* Anything else that clearly identifies the human subject&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Our standard however is to never use any PHI identifiers when entering data into the scanner!&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Be careful also about what you enter in these fields - over the years we have found (and deleted) PHI from these fields:&lt;br /&gt;
&lt;br /&gt;
* Subject code (part of Patient ID)&lt;br /&gt;
* Exam description&lt;br /&gt;
* Series description&lt;br /&gt;
&lt;br /&gt;
It is permissible to include the subject&#039;s weight which is needed for scanner safety calculations.&lt;br /&gt;
&lt;br /&gt;
At present, to describe the PHI methods in your publications, you might find this summary paragraph helpful.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Data at Stanford&#039;s Center for Cognitive and Neurobiological Imaging are securely transferred from the MR scanner directly to a data management system (Flywheel.io) that is running within a Google platform space that is approved for research data. Prior to transfer the data file headers are stripped of fields that may contain subject information (patient id, DOB, MRN, name fields). These procedures meet the Stanford standard for anonymized research data for publication and can be shared without harm. See: [https://med.stanford.edu/irt/security/stanfordinfo/hipaa.html this Stanford site].&lt;br /&gt;
&lt;br /&gt;
= Data Processing =&lt;br /&gt;
&lt;br /&gt;
Once data are uploaded to Flywheel those data are automatically processed according to a given Project&#039;s &amp;quot;[//docs.flywheel.io/hc/en-us/articles/360008553133-Project-Gear-Rules Gear Rules]&amp;quot;. The Rules define which Gear will be run on a given piece of data when it lands in Flywheel. These rules do everything from metadata extraction from DICOM headers to execution of QA algorithms. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Gear Rules (Default) ==&lt;br /&gt;
&lt;br /&gt;
At CNI we have defined a default set of rules that are applied to every new project. Each rule defines the logic that must be satisfied in order for a given gear to be run on a data file. &lt;br /&gt;
&lt;br /&gt;
The image below shows the default rules that every new project is provided with. &lt;br /&gt;
&lt;br /&gt;
[[File:GearRules.png|600px|thumb|center|Gear Rule Template]]&lt;br /&gt;
&lt;br /&gt;
=== A special note on DICOM to NIfTI Conversion (dcm2niix &amp;amp; dcm-convert) ===&lt;br /&gt;
&lt;br /&gt;
Historically at CNI we have provided a tool that was developed in-house for DICOM to NIfTI conversion (dcm-convert). Recently users have expressed interest in having a very widely used and popular tool, dcm2niix, serve as the default tool to perform DICOM to NIfTI conversion in Flywheel. We are happy to say that Flywheel does provide a dcm2niix Gear and we have incorporated this into our default rule set. As of today the default is still dcm-convert, however for projects created recently you will see this rule available and in a disabled state. You can easily enable this rule, however it should be noted that if you do enable this rule you need to disable the existing dcm-convert rule so that you don&#039;t introduce a race condition which would result in a situation where you would not be able to predict which tool would be used to generate the NIfTI data. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Re-running DICOM to NIfTI conversion across a project ===&lt;br /&gt;
&lt;br /&gt;
There are special considerations to be made if you desire to re-run DICOM to NIfTI conversion across an entire project, namely you need to ignore DICOM data that was generated by any of the MUX sequences, as those data are aliased and running either of the DICOM to NIfTI tools on those data will result in aliased NIfTI data. Special care is taken within the Gear rules to avoid this situation by specifically ignoring data that were collected with a mux sequence. &lt;br /&gt;
&lt;br /&gt;
The best idea here is to coordinate with CNI staff (e.g., Michael Perry) prior to doing this.&lt;br /&gt;
&lt;br /&gt;
= Downloading Data =&lt;br /&gt;
There are several ways to download data from Flywheel, including via the [//flywheelio.zendesk.com/hc/en-us/articles/360008622994-Downloading-sessions-or-acquisitions-from-the-Web-UI WEB UI], the [//flywheelio.zendesk.com/hc/en-us/sections/360001596834-Command-Line-Interface command line interface (CLI)], and the Flywheel SDK (which is available for both [//flywheel-io.github.io/core/branches/master/python/getting_started.html Python] and [//flywheel-io.github.io/core/branches/master/matlab/getting_started.html MATLAB]).  The links below can help you get started with the various methods of export:&lt;br /&gt;
&lt;br /&gt;
=== UI Downloads ===&lt;br /&gt;
* [//flywheelio.zendesk.com/hc/en-us/articles/360009256973-Downloading-a-file Download individual Files]&lt;br /&gt;
* [//flywheelio.zendesk.com/hc/en-us/articles/360008622994-Downloading-sessions-or-acquisitions-from-the-Web-UI Download session or acquisition containers]&lt;br /&gt;
* [//flywheelio.zendesk.com/hc/en-us/articles/360008629794-Downloading-an-entire-project Download a Project]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Flywheel SDK ===&lt;br /&gt;
* [//flywheel-io.gitlab.io/product/backend/sdk/branches/master/matlab/index.html MATLAB] &lt;br /&gt;
* [//flywheel-io.gitlab.io/product/backend/sdk/branches/master/python/index.html Python]&lt;br /&gt;
* [//gitlab.com/flywheel-io/public/flywheel-tutorials Support materials SDK examples (Jupyter notebooks)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Flywheel CLI ===&lt;br /&gt;
* [https://docs.flywheel.io/CLI/ Flywheel CLI Documentation]&lt;br /&gt;
&lt;br /&gt;
=== CLI: Tips and Best Practices for CNI Users ===&lt;br /&gt;
&lt;br /&gt;
This section focuses on a few tips for using the CLI to download your data. For a complete overview of the Flywheel CLI, including how to get started, please look through the [//docs.flywheel.io/hc/en-us/search?utf8=%E2%9C%93&amp;amp;query=CLI Flywheel CLI Documentation].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tip:&#039;&#039; &#039;&#039;&#039; Download only the files you need&#039;&#039;&#039; &lt;br /&gt;
When downloading data from Flywheel using the CLI you can greatly speed up your downloads by excluding data types which are not needed for your analysis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example: &#039;&#039;&#039;&#039;&#039;Exclude pfile and DICOM data from a container download&#039;&#039;&#039;:  Most users do not need to download the raw scanner files (PFILES) or raw DICOM data. You can exclude certain data types from your downloads by using the `-e` flag with your CLI download, like so:&lt;br /&gt;
  fw download &amp;quot;cni/testproject/subject1/session1&amp;quot; -e pfile -e dicom&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This tells the CLI to exclude any pfile and dicom files in the container. Note that you can use consecutive -e flags to exclude multiple data types. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example:&#039;&#039; &#039;&#039;&#039;Download only NIfTI, BVEC, and BVAL files&#039;&#039;&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
Most users are only interested in the data that will be input to their analysis pipelines. This is most often limited to three data types (nifti, bvec, and bval). You can use the following command with multiple include flags (`-i`) to accomplish exactly that: &lt;br /&gt;
  fw download &amp;quot;cni/testproject/subject1/session1&amp;quot; -i nifti -i bvec -i bval&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will generate an archive (.tar) file containing the requested hierarchy with only those files you explicitly need.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example:&#039;&#039; &#039;&#039;&#039;Using quotes&#039;&#039;&#039;&lt;br /&gt;
Often times your source-path (that is the &#039;&#039;group/project/subject/session&#039;&#039; string the describes the location of your data in Flywheel) will have one or more spaces or special characters in it. To properly address that location using the CLI it&#039;s important to use quotes around the source path, like so:&lt;br /&gt;
  fw download &amp;quot;cni/testproject/subject1/session1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example&#039;&#039; &#039;&#039;Download a single file with the CLI&#039;&#039;&lt;br /&gt;
So you have navigated to a container and your only desire is to download a single file from that container, the best way to do that is using the CLI with the &#039;files&#039; spec filter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example:&#039;&#039; &#039;&#039;&#039;Download a single NIfTI file from an acquisition container:&#039;&#039;&#039;&lt;br /&gt;
  fw download &amp;quot;test/Unsorted/s001/18591/T1w 1mm/files/18591_13_1.nii.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The important bit here is the inclusion of &amp;quot;files&amp;quot; prior to the file name.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Using Sherlock and other Computers =&lt;br /&gt;
We suggest that you use the Flywheel Command Line Interface (CLI) to transfer data to other compute resources, like Sherlock.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To download and install the CLI on Sherlock we use the `wget` tool, then `unzip` to extract the CLI resource package, and finally modify our `.bashrc` file to add the fw binary as an alias in our environment. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039; Get the URL for the CLI package, which can be found on the &amp;quot;Profile&amp;quot; page within the Flywheel interface. To grab the URL, find the CLI section on the Profile page, right-click the Linux CLI Download link, and choose &amp;quot;Copy Link Address&amp;quot; (or similar). Once you have the download link address move to the next step. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: &#039;&#039;&#039; Log in to Sherlock and run the `wget` command, using the URL from &#039;&#039;Step 1&#039;&#039; to download the CLI package. &lt;br /&gt;
  mkdir -p flywheel/cli&lt;br /&gt;
  cd flywheel/cli&lt;br /&gt;
  wget //storage.googleapis.com/flywheel-dist/cli/&amp;lt;version&amp;gt;/fw-linux_amd64.zip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039; Unpack the CLI archive and cleanup the downloaded package.&lt;br /&gt;
  unzip  fw-linux_amd64.zip&lt;br /&gt;
  mv linux_amd64/fw .&lt;br /&gt;
  rmdir linux_amd64&lt;br /&gt;
  rm -f fw-linux_amd64.zip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039; Modify your `.bashrc` file to add the fw CLI command to your environment, and source it to make the alias active. &#039;&#039;Note that this only needs to be done once.&#039;&#039;&lt;br /&gt;
  echo -e &amp;quot;alias fw=&#039;$HOME/flywheel/cli/fw&#039;&amp;quot; &amp;gt;&amp;gt; $HOME/.bashrc&lt;br /&gt;
  source $HOME/.bashrc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039; Once the above steps are complete, you should be able to log in using the CLI and use it as described in the official documentation: //flywheelio.zendesk.com/hc/en-us/sections/360001596834-Command-Line-Interface. The best way to do this is navigate to your [//cni.flywheel.io/#/profile profile page] in Flywheel, make sure that you have generated an API Key, and use the login command text that is provided for you there.&lt;br /&gt;
&lt;br /&gt;
  fw login &amp;lt;your API key&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Data Migration from NIMS =&lt;br /&gt;
Before there was Flywheel, there was NIMS.  Data have been preserved in NIMS and they can be migrated to Flywheel on an as-needed basis. Please inquire with Michael Perry for more information. &lt;br /&gt;
&lt;br /&gt;
= Support =&lt;br /&gt;
&lt;br /&gt;
Michael can help with most CNI Flywheel issues. If support is needed for Flywheel issues not related to the CNI, please email their help line:  support@flywheel.io.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59426</id>
		<title>MR Hardware</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59426"/>
		<updated>2026-03-18T20:20:32Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Parsing the physio files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= MR Scanner =&lt;br /&gt;
The MR scanner is in room 065 of the CNI suite in Building 420. It has its [[MR Scanner|own wiki page]].&lt;br /&gt;
&lt;br /&gt;
= Peripheral Device Rack (Laima Box) =&lt;br /&gt;
[[File:LB_Overview_Annotate.jpg|thumb|Overview of Laima Box]]&lt;br /&gt;
As you may guess from the title, the Laima Box came into being on the urging of Laima to find a solution to provide a stable and flexible interface to all the display devices, scanner signals, and other peripheral devices that are commonly used during studies. &lt;br /&gt;
&lt;br /&gt;
From the top rack to the bottom, the devices are (as marked in the photo): &lt;br /&gt;
* Small Monitor (Output 3 on HDMI Matrix, typically used for Eyelink display) and Eyelink keyboard + mouse&lt;br /&gt;
* Hyperion Projector Consoles (left: rear projector, right: side projector); Projector Switch for switching between the two projectors&lt;br /&gt;
* fORP Optical Interface; Serial Trigger Box; Video Flipper ([https://halltechav.com/product/sc-hd-2b/ Hall Research video scaler SC-HD-2B])&lt;br /&gt;
* Main Power to the rack&lt;br /&gt;
* Remote Power Switches for equipments in the magnet room: Eyelink camera, Webcam, DC shim amplifier; Audio Inputs for Avotec channel A &amp;amp; B and OptoAcoustics&lt;br /&gt;
* HDMI Matrix (see detailed Input-Output schematics [[#HDMI Matrix Switch|below]])&lt;br /&gt;
* fORP USB connection; Serial-to-USB connection; Scanner trigger co-ax connections; Video Inputs (Input 4 &amp;amp; 5 on HDMI Matrix)&lt;br /&gt;
&lt;br /&gt;
= Stimulus Presentation =&lt;br /&gt;
&lt;br /&gt;
==Visual System ==&lt;br /&gt;
The CNI offers several display options, depending on your visual stimulus needs. All use a digital interface (DVID or HDMI) and can be connected by selecting the appropriate options on the HDMI matrix switch. The mirror on the Nova 32-channel coil is a double mirror design (see [[32-channel_double_mirror]]), and that on the GE 64-channel coil is a single mirror design. &lt;br /&gt;
&lt;br /&gt;
=== 3D LCD display ===&lt;br /&gt;
We have a 49&amp;quot; 4K 3D LCD display from Resonance Technology. It is placed at the far end of the scanner room behind the scanner&#039;s rear pedestal. Its specs and field of view presented to the scan subjects are as follows: &lt;br /&gt;
 * 640x480@60Hz up to 4096x2160@50Hz resolution&lt;br /&gt;
 * 1000:1 contrast ratio&lt;br /&gt;
 * screen size: 107.2cm high x 60.3cm wide &lt;br /&gt;
 * visual distance from Nova coil: 267cm from mirror2, 6cm mirror2 to mirror1, 15cm from eye to mirror1 = 288cm&lt;br /&gt;
 * visual distance from NFL coil: 263cm from mirror1, 13cm from eye to mirror1 = 276cm &lt;br /&gt;
&lt;br /&gt;
To see 3D effects, subjects will need to wear passive polarized lenses. The screen can, of course, present non-3D stimuli too. &lt;br /&gt;
&lt;br /&gt;
As described in our Slack [https://stanford-cni.slack.com/archives/C011V1M2FRN/p1639611006023100 channel], the TV monitor has varying latency depending on the mode it is in.  We conducted tests using a 1920x1080p@60Hz signal comparing the mirrored display on a laptop while simultaneously viewing the display on the scan room monitor.  By capturing these displays simultaneously with a high-speed video acquisition we were able to calibrate the latency between the laptop and scan room monitor display.  Assuming the laptop display latency is 0, when in General mode the monitor processing creates about 133ms (8 video frames) of latency, as compared to Game mode where the latency is only 33ms or 2 frames. In order to switch modes, the remote control must be used inside the scan room but care must be taken as the batteries are slightly ferromagnetic so be sure to hold on the remote firmly and keep it as far from the scanner as possible.  Choose Options-&amp;gt;Scene Select-&amp;gt;Game in order to select Game mode.  It should be in this mode by default -- we ask any users that switch the monitor mode to please return to Game mode after their experiment. &lt;br /&gt;
&lt;br /&gt;
=== DLP Projector ===&lt;br /&gt;
We also have an MR-compatible rear-projection DLP projector ([https://pstnet.com/products/hyperion/ Hyperion 2-120 Projector]). The new Hyperion 2-120 Control Room Console features an LCD touchscreen to power on/off the projector, mirror the image, show the projector status, and display video input resolution, refresh rate, and synchronization status. This projector can be used by placing the large mirror on the back of the scanner bed in front of the LCD display. You also need to place the rear-projection screen on the head coil. Set-up of this system is a bit more involved than the LCD display, but it offers a much brighter display and a larger field of view. If you need that, let us know and we&#039;ll show you how to set up the projector system.&lt;br /&gt;
&lt;br /&gt;
Here are the specs of the projector:&lt;br /&gt;
 * 1920x1080&lt;br /&gt;
 * 120Hz or 60Hz frame rate&lt;br /&gt;
 * 16:9 and 16:10 widescreen formats (standard 4:3 available)&lt;br /&gt;
 * brighter and larger field of view than the LCD displays&lt;br /&gt;
&lt;br /&gt;
If you try the projector (via HDMI) and nothing happens, you can try cycling power to the [[#The Laima Box|Laima Box]. If this doesn’t work, troubleshoot the projector as you normally would (check the input cable on the projector is connected and cycle inputs etc).&lt;br /&gt;
&lt;br /&gt;
=== HDMI Matrix Switch ===&lt;br /&gt;
[[File:HDMI_Switch_Schematic.jpg|thumb|HDMI switch schematic.]]&lt;br /&gt;
[[File:LB_HDMI_Switch.jpg|thumb|HDMI switch in Laima Box.]]&lt;br /&gt;
We use an 8x8 HDMI Matrix Switch to distribute video signals to all the various displays.  This is a [https://keydigital.org/category/4k-18g-hdmi-matrix-switchers/KD-MS8x8G Key Digital KD-MS8x8G] switch capable of connecting any of 8 input HDMI inputs to any/all of 8 HDMI outputs.  The switch is capable of handling 4K HDCP2.2 video signals.  The [[Media:HDMI_Switch_Schematic.jpg|schematic]] of the switch connections are shown here with all 8 inputs and outputs in use. In order to make a connection to a particular output display, you choose the particular input under the labeled output row of 8 LEDs.  This is done by pressing the button under the labeled output (see HDMI Matrix switch [[Media:LB_HDMI_Switch.jpg|image]]) in order to progress left-to-right through the various inputs.  Unfortunately, the blue LEDs on this switch that show what input is currently connected have been burning out, so it&#039;s sometimes necessary to count your button presses from a visible LED to know what input you are on. &lt;br /&gt;
&lt;br /&gt;
The default output display for each input is nominally the same number as the input.  As you&#039;ll note, we have the GE Host computer and GE Table Driver on inputs 1 &amp;amp; 2 -- this is so we can send the GE Host Display to any other display connected to the HDMI matrix switch, or use the GE Table Monitor to display other output -- such as the Eyelink computer output when adjusting the Eyelink camera at the front of the scanner. &lt;br /&gt;
&lt;br /&gt;
The HDMI matrix switch allows for fairly elaborate configuration as described in the [https://www.keydigital.org/web/content/5839 manual] via a Key Digital PC application that is available on the CNI PC laptop when connected to the internal private ethernet network. &lt;br /&gt;
&lt;br /&gt;
Troubleshooting: The HDMI matrix switch is generally fairly stable but if you&#039;re having odd behavior a good first step is to cycle the main power to the Laima Box -- this will reset the HDMI matrix switch.&lt;br /&gt;
&lt;br /&gt;
=== MRI Compatible Glasses and Lensometer ===&lt;br /&gt;
[[File:mri-glasses.jpg|thumb|mri frames and lenses]]&lt;br /&gt;
For participants who wear glasses, CNI has a set of interchangeable lenses that are used with an MRI compatible plastic frame. The frame and lenses are located in the open shelving above and to the left of where the screening forms are located. We have lenses for both near-sighted (-0.5 to -8.0 in .5 step increments) and far-sighted (+.5 to +8.0 in .5 step increments) vision corrections. The lenses are made of hard polycarbonate plastic and are not breakable. The easiest way to install the lenses into the frame is insert the lens from the back first into the edge by the ear piece and then snap in the lens by the nose. If the participant does not know his/her glasses prescription we have a lensometer that can determine that. Basic instructions for use of the lensometer are in the next section. There is also an eye chart posted on the door to the equipment room where participants can test their vision with the MRI glasses. Have the participant stand right in front of the lensometer (about 10 feet from the chart) to use the chart.&lt;br /&gt;
[[File:eye-chart.jpg|thumb|eye chart]]&lt;br /&gt;
&lt;br /&gt;
To determine glass prescription strengths for MRI participants CNI has the AL200 Auto Lensometer. Is is located in the CNI control room area. There is both a User&#039;s guide and a quick reference sheet next to the lensometer. The lensometer is currently set up to read a single vision lens. There are settings available to read either bifocal or progressive lenses, but they are not typically used as only the distance portion of the lens needs to be measured.&lt;br /&gt;
&lt;br /&gt;
Here is a basic how-to from the Reichert user&#039;s guide.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:Lensometer-parts.png|The key parts of the lensometer.&lt;br /&gt;
Image:Lensometer-back.png|Turn on the lensometer using the switch on the back panel. The AL200 will do a calibration check; do not place any lenses or obstructions in front of the aperture during calibration.&lt;br /&gt;
Image:Step2.png|The AL200’s default measurement mode is Single Vision, Automatic. This mode is used for fast, easy measurement of a pair of single vision spectacle lenses. You&#039;re now ready to measure the right lens, indicated by the &#039;R&#039; on the upper left side of the screen.&lt;br /&gt;
Image:Glass-placement1.jpg|Place the spectacles on the lens table and secure the right lens with the lens holder. Using the table base levers and your hand, move the lens until the large cross is positioned directly over the small cross in the middle of the centering target.&lt;br /&gt;
Image:Glass-placement2.jpg|If you insert a progressive lens in single vision mode, the progressive icon may flash to indicate that the mode should be changed. NOTE: Place the glasses so that lenses are toward the front and the ear pieces toward the back.&lt;br /&gt;
Image:Step3.png|When optical center has been located, the AL200 tone will sound and the measurements will be locked on the screen. Upon removal of the lens the AL200 will automatically switch to the left lens, indicated by the highlighted L on the upper right side of the screen. &lt;br /&gt;
Image:Step4.png|Repeat the measurement process for the left lens. All measurements will remain on the screen until the operator chooses to print or clear the data.&lt;br /&gt;
Image:Lensometer-screen.png|The number that appears in the Sphere location is the correction number that you will use in choosing the lenses for the MRI glasses.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Auditory System ==&lt;br /&gt;
&lt;br /&gt;
=== Avotec System ===&lt;br /&gt;
[[File:Avotec2.jpg|thumb|Avotec Console]]&lt;br /&gt;
[[File:Avotec-headsets.png|thumb|Avotec Headsets]]&lt;br /&gt;
The [https://avotecinc.com/pages/silent-scan Avotec Silent Scan system] provides a maximum of 30dB with the [https://avotecinc.com/products/full-coverage-headset-3000-series Full Coverage] and [https://avotecinc.com/products/conformal-headset-3000-series Conformal] headsets. The conformal headset will fit in any coil and any patient. The system also has a [https://avotecinc.com/products/non-headset-3000-series Flat Headset] with a slim profile (0.5 inch pad) which offers great flexibility and can fit into tight coils. The system provides clear two-way communication with built-in patient-activated alarm. The console and equalizer provide high-fidelity, frequency-balanced sound for a variety of audio inputs. The console also has a built-in radio. &lt;br /&gt;
&lt;br /&gt;
This system is best to use if you need to deliver high quality audio to the subjects, or need to communicate with the subjects frequently during the scans.&lt;br /&gt;
&lt;br /&gt;
We recommend using the Avotec + Flat Headset for most studies as it would fit into the Nova 32ch coil for most participants and is more robust in operation (in comparison to the Conformal headset and the OptoAcoustics system). If the Flat headset does not fit into the head coil, you can also use the Conformal headset. Note that when the participant is wearing the Conformal headset and lying on the patient table, the tube connecting to the headset can sometimes slip and pull the earplugs out of the participant&#039;s ears; if that happens you can tape down the tube to the patient table to prevent it from slipping. For audio input, use Avotec Channel A and B for the Conformal headset and Flat headset respectively.&lt;br /&gt;
&lt;br /&gt;
=== OptoACTIVE Headphone System === &lt;br /&gt;
[[File:OptoACTIVE.jpg|thumb|OptoACTIVE Headphone System control console]]&lt;br /&gt;
The OptoACTIVE Headphone System provides active noise cancellation (ANC) during MR scans. The slim profile headphones are designed to fit into the head coils for most human subjects. Its built-in optical microphones monitor the sound level at the subject&#039;s ears, which enable automatic self-calibration, sound pressure level monitoring and real-time in-ear stereo sound recording. The OptoACTIVE headphones also provide very good airseal around the subject&#039;s ears which results in excellent passive noise reduction as well. In combination with the passive noise reduction and active noise cancellation, the headphone can reach a 60 dB attenuation (95%) of the main EPI resonance noise. It also features the FOMRI-III noise cancelling microphone for the subject, which enables quiet two-way communication during scans. &lt;br /&gt;
&lt;br /&gt;
The control console has an LCD touch-screen and pushbuttons that allow the operator to control initial and ongoing calibrations, real-time active noise cancelling, channel level volume and recording, FORMRI microphone communications, etc. It displays the noise level, stimuli levels and spectrum analysis in real time.&lt;br /&gt;
&lt;br /&gt;
The system is ideal for the study of: sleeping disorders, autism, children suffering from claustrophobia, auditory fMRI and other research areas that were previously impractical or unattainable due to scanner noise.&lt;br /&gt;
&lt;br /&gt;
For step-by-step operation instructions, please see this [[Media:Optoacoustics_How-To.pdf | How-To Guide]], clearly summarized by Prof. Cameron Ellis and Emily Chen.&lt;br /&gt;
&lt;br /&gt;
== CNI Laptops ==&lt;br /&gt;
The CNI has one MacBook and one Windows PC for users to use during their experiments. The MacBook is running OS 10.12 and has MATLAB R2014b with PsychToolbox and PsychoPy 3 installed. The Windows PC is running Windows 11 and has E-Prime 3 installed (CNI also has a license for E-Prime 3). You could also checkout out [[Stimulus|some (old) notes]] shared by previous CNI users on how to set up experiments with these toolboxes.&lt;br /&gt;
&lt;br /&gt;
= Subject measurement =&lt;br /&gt;
&lt;br /&gt;
== fORP Response Box ==&lt;br /&gt;
We have a modular response box system ([http://www.curdes.com/index.php/mainforp/interfaces/fiu-933.html fORP 932]) from [http://www.curdes.com/ Current Designs]. With ths system, you can swap out various response devices. The output from any of these devices is available from the fORP box via USB. The device emulates a USB keyboard. We have confirmed that the fORP 932 USB interface is polled at 1kHz. The device itself has sub-millisecond time resolution (see the [http://www.curdes.com/index.php/support/faqs.html fORP FAQ]). We estimate that this system provides response time measurements with a precision and reliability of about one millisecond. &lt;br /&gt;
&lt;br /&gt;
Note that the fORP can send keypresses every time the scanner acquires a slice (or a volume, if the &amp;quot;scope trigger (User CV3)&amp;quot; is set to &amp;quot;1&amp;quot; in the EPI scans). If you want to receive these keypresses, configure the fORP by selecting a configuration that does *not* say &amp;quot;no 5&amp;quot; (if you are receiving numbers) or &amp;quot;no t&amp;quot; (if you are receiving letters). If you *do not* want to get these pulses (most users actually do not want these), then select a configuration that includes &amp;quot;no 5&amp;quot; or &amp;quot;no t&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The response devices that we currently have are:&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-scrl-1.html scroll-wheel device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-2x4-c.html 2X4 bimanual button boxes]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x4-cyl-2.html  4-buttonstick-style response device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x5-d.html 5-button diamond button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/custom.html 5-button curved button box]&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-trk-2.html trackball device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-1x5-n4.html PYKA 5 button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/variabledevices/hhsc-joy-5.html joystick]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a need for a different response device, just let us know.&lt;br /&gt;
&lt;br /&gt;
To use a response device at the CNI:&lt;br /&gt;
# Plug the desired device into the black fiber-optic connector on the right side of the front of the magnet bore&lt;br /&gt;
# Locate the silver box (labeled fORP) on the peripheral device rack.&lt;br /&gt;
# Push in the knob on the right front side of the fORP box to enter menu mode. For the following instructions, you will turn the knob to scroll through the menu choices, and then push in on the knob to select your choice. (See [https://wiki.curdes.com/bin/view/CdiDocs/932QuickSetup this guide] for more details on using the fORP 932.)&lt;br /&gt;
# Turn the knob until the word &amp;quot;yes&amp;quot; is underlined then push the knob to select &amp;quot;yes&amp;quot;&lt;br /&gt;
# In the &amp;quot;mode select&amp;quot; menu that appears next, you can select &amp;quot;manual config&amp;quot;. We recommend, however, that you pick the AUTOCONFIGURE choice which tells the interface to determine as much as it can about the connected handheld device and the cabling to the host computer. This should simplify the choices that need to be made by you. If you have used the AUTOCONFIGURE option you can skip steps 6 and 7 below and proceed directly to step 8.&lt;br /&gt;
# In the response device menu, turn the knob to scroll through the choices until you find the device that you connected in step 1 (examples include):&lt;br /&gt;
## 4-button cylinder: select HHSC-cyl-5&lt;br /&gt;
## 5-button diamond: select HHSC-1x5-D&lt;br /&gt;
## 5-button curved: select HHSC-1x5-C&lt;br /&gt;
## bi-manual 4-button keypads: select HHSC-2x4c&lt;br /&gt;
## scrollwheel: select HHSC-SCRL1&lt;br /&gt;
## trackball: select HHSC-TRK-2 (for mouse emulation)&lt;br /&gt;
# Select USB in the next display by pushing in the knob.&lt;br /&gt;
# Select the desired output mode. For the cylinder or keypads, this determines the mapping between the buttons and the keypress that is generated. E.g., HID-NAR-12345 will map the 4 cylinder buttons to the four number keys, 1-4, and send a &#039;5&#039; for each scope trigger pulse received by the scanner (if you don&#039;t want these pulses, select the &#039;no 5&#039; mode, as noted above). NAR means &amp;quot;no auto release&amp;quot;. In NAR mode, the keypress is maintained as long as the button is pressed. In the non-NAR mode, a brief keypress is generated, even if the button is held down. We find that NAR mode works better with PsychToolbox. In non-NAR mode, it can miss the very brief keypresses produced by auto release. &lt;br /&gt;
# Setup is now complete.&lt;br /&gt;
&lt;br /&gt;
For more technical details about the fORP, see the [[fORP|fORP wiki page]].&lt;br /&gt;
&lt;br /&gt;
== Eye Tracker ==&lt;br /&gt;
[[File:cni_eye_tracker_camera.jpg|thumb|Eye tracker camera.]]&lt;br /&gt;
[[File:cni_eye_tracker_ir.jpg|thumb|Eye tracker IR illuminator.]]&lt;br /&gt;
&lt;br /&gt;
We have an [https://www.sr-research.com/eyelink-1000-plus/ SR Research EyeLink 1000 Plus] eye tracker with remote optics installed at the CNI. It has a frame rate of up to 2000Hz, up to 1/2 degree accuracy, and is fairly easy to set up and use. We found that the standard IR light source from SR Research did not adequately focus the light onto the subject&#039;s eye, so we use the [https://mrc-systems.de/en/products/mr-compatible-cameras#light-sources LED light source] from MRC Systems. &lt;br /&gt;
&lt;br /&gt;
The camera is mounted on a wood stand placed next to the patient bed at the back of the bore. The camera position and focus should not need to be adjusted if your subject is positioned with their eyes close to isocenter. However, if you have a prescription that is centered far from iso-center, you may need to adjust the focus a bit. To do that, you can use the HDMI matrix to show the eye tracker video on the bore monitor so that you can adjust the camera while seeing what you are doing.&lt;br /&gt;
&lt;br /&gt;
The LED light source is mounted on a blue loc-line stalk that attaches to the head coil and is usually left unattached and hanging on the side of the scanner next to the response devices; you will need to mount it to the head coil using the blue loc-line pliers that you can find under the shelf with all the padding. Once mounted, make sure the light source is directed toward the subject&#039;s eye by aiming it through the gap between the two mirrors.&lt;br /&gt;
&lt;br /&gt;
The eye tracker host computer is mounted in the equipment room. However, the display, keyboard, and mouse for that computer are to the right of the GE console. You can connect to the host computer by a direct TCP connection through the ethernet cable located in the cable bundle next to the GE console. This cable is, not surprisingly, labeled &amp;quot;eye tracker&amp;quot;. If you use psych toolbox for stimulus presentation, you can use the [http://psychtoolbox.org/docs/EyelinkToolbox EyeLink Toolbox]. For those who use python (e.g., [http://www.psychopy.org/ Psychopy]), try the [http://www.psychopy.org/api/hardware/pylink.html PyLink module]. If you use E-Prime, check out the [https://www.sr-research.com/e-prime-extensions/ E-Prime integration info] on the SR Research support site. In any case, the IP address of the Eyelink is on our private network and thus is NOT the default IP, so you need to explicitly set it to 10.0.3.2. This private network has a DHCP server, so your stimulus computer should automatically get assigned an IP address on the same subnet. Please don&#039;t hard-code an IP address for your stimulus computer! Note that older versions of psychtoolbox don&#039;t allow you to specify the IP address, so be sure to get the latest Eyelink mex file from [https://github.com/kleinerm/Psychtoolbox-3/commit/aa04b821e975e0e61978377bb05aa1e216f3382e github].&lt;br /&gt;
&lt;br /&gt;
The data recorded by the EyeLink software is saved in the EyeLink partition (E:\). To transfer the data to your own storage device, you can reboot the EyeLink computer into Windows and connect your own USB drive. Afterwards you can reboot the computer again and get back into the EyeLink system. &lt;br /&gt;
&lt;br /&gt;
For a tutorial and troubleshooting information on the Eyelink system, see the [[EyelinkTracker]] page.&lt;br /&gt;
&lt;br /&gt;
==Physio monitoring==&lt;br /&gt;
[[File:ppg_resp.jpg|thumb|Photo plethesmograph (PPG) and respiration belt.]]&lt;br /&gt;
[[File:Tools_gating.png|thumb|Tools Gating]]&lt;br /&gt;
[[File:Physio_waveforms.png|thumb|Physio Waveforms on Console]]&lt;br /&gt;
[[File:physmon.png|thumb|[[CNI_widgets|CNI PPG pulse detector device]].]]&lt;br /&gt;
The scanner has the standard suite of physiological measures: pulse oximetry, respiration belt, and ECG. These can be used for scan triggering. The digital data from these measurements are saved on the console and backed-up in the Flywheel database. These data are also processed by the [[CNI_widgets|CNI PPG monitoring device]] and used for EEG ballisto-cardiogram artifact removal by the EGI NetStation software. (See also the [http://fmri.ucsd.edu/Howto/3T/physio.html UCSD fMRI group&#039;s site] for more information on using the GE physio files to remove physiological artifacts from fMRI data.) A recent paper is here - [https://doi.org/10.1016/j.jneumeth.2016.10.019 The PhysIO Toolbox for Modeling Physiological Noise in fMRI Data]&lt;br /&gt;
&lt;br /&gt;
===Setting Up Physio Recording===&lt;br /&gt;
&lt;br /&gt;
* Go to “Tools” - &amp;quot;Gating&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* To record respiration/movement of the abdominal wall, select “Respiratory.”&lt;br /&gt;
&lt;br /&gt;
* To record pulse/peripheral gating, select “PG.”&lt;br /&gt;
&lt;br /&gt;
* Outfit your participant with the respiratory bellows and the PG sensor&lt;br /&gt;
&lt;br /&gt;
===Respiratory Bellows===&lt;br /&gt;
&lt;br /&gt;
The respiratory bellows goes around your participant’s diaphragm or abdomen. You will get the best signal in the area where the participant’s breathing motion is most visible when they are lying down. Use the Velcro to adjust the respiratory bellows; it should be snug and not move around much, but stretched as little as possible and not too tight. The bellows should expand and contract approximately 0.5 to 1 inches with the participant’s breathing. Do not place any padding over the respiratory bellows. You should be able to see the recording on the small screen on the scanner. Note that it’ll take about one minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the bellows if necessary. &lt;br /&gt;
&lt;br /&gt;
===Pulse/Peripheral Gating (PPG) ===&lt;br /&gt;
&lt;br /&gt;
The participant’s pulse is monitored by a photopulse sensor that detects blood oxygen levels (pulse oximetry) in the vascular bed of the participant’s finger/thumb or toe. During the measurement, the participant’s hand or foot should remain cool and dry. We recommend that you attach the sensor to the participant’s toe, especially if you are going to ask your participant to use one of the button boxes because hand movements will create noise in your PG signal. &lt;br /&gt;
&lt;br /&gt;
* Recording from the toe: Attach the sensor to the fastener for the toe (with the Velcro). Place the sensor on the vascular bed of the participant’s toe. To keep the sensor in place, tape it and the fastener to the participant’s foot using medical tape. It is also a good idea to tape the cable to the knee pillow or the participant’s leg to reduce the pull on the sensor. &lt;br /&gt;
* Recording from the thumb/finger: Place the sensor on the participant’s finger or thumb. It is a good idea to avoid placing the sensor on the joint (the signal will be much noisier if you place the sensor on the joint). To keep the sensor in place it helps to tape it to the participant’s hand with some medical tape.&lt;br /&gt;
&lt;br /&gt;
You should be able to see the recording on the small screen on the scanner. Note that it’ll take up to a minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the sensor if necessary. &lt;br /&gt;
&lt;br /&gt;
Note: When you are done, please clean the sensor with alcohol wipes as it directly touches the participant’s skin.&lt;br /&gt;
&lt;br /&gt;
===Recording Physio===&lt;br /&gt;
&lt;br /&gt;
The default method for recording the physio is the CV control method (set CV phys_record_flag to 1). With default setting of CV control method, a recording of maximum length (25 minute) will require approximately 3 seconds to save to files to the hard disk after the end of the scan. You need to make sure that the next phys-recording scan starts after the previous recording finishes saving data to files. If the next phys-recording scan starts before the previous recording finishes, the new recording request will be ignored. &lt;br /&gt;
&lt;br /&gt;
===Parsing the physio files===&lt;br /&gt;
&lt;br /&gt;
The physio data from the scanner can include three types of measurements: pulse, respiration, and electrocardiogram (ECG).  The pulse data come from the PPG, the respiration data from the breathing-belt, and the ECG from the specialized electrodes attached to the chest. &lt;br /&gt;
&lt;br /&gt;
The data recorded from these devices are written out into simple text-files. There are three files for each type of measurement.  The file names start with PPG, RESP and ECG for the three types of measurements.  The files have raw data (&#039;Data&#039;), and the times of the local peaks (&#039;Trig&#039;) (and sometimes an empty &#039;PACTrig&#039;). &lt;br /&gt;
&lt;br /&gt;
* The temporal sampling rates differ between the three types of measurements&lt;br /&gt;
** ECG: 1ms, &lt;br /&gt;
** Pulse/Peripheral Gating: 10ms, &lt;br /&gt;
** Respiration: 40ms.&lt;br /&gt;
* The timeseries data&lt;br /&gt;
** start 30 seconds of baseline from before the start scan button was pressed&lt;br /&gt;
** have a variable duration between start scan button press and the actual start (pre-scan delays, external trigger delays, etc.)&lt;br /&gt;
** stop at the same time as the scan&lt;br /&gt;
&lt;br /&gt;
To reiterate-- the physio data stored in the physio files starts 30 seconds &#039;&#039;&#039;before&#039;&#039;&#039; you press the &#039;Scan&#039; button (yes, it&#039;s psychic ;), which is almost always more than 30 seconds before scanning actually starts. It could be substantially longer if you do external triggering. In that case, you&#039;ll get some extra physio data recorded during the time between when you press start scan and you send your trigger. But the recording does stop when the scan stops. So, to synchronize physio and scan data, you can take the end of the physio data and count backward the number of data points to keep using the duration of MR acquisition and sampling rate of the physio data.&lt;br /&gt;
&lt;br /&gt;
The physio files are zipped and uploaded to Flywheel. A simple Flywheel gear &amp;quot;CNI GE Physio File Converter&amp;quot; is available to help extract, visualize, and summarize the data.&lt;br /&gt;
&lt;br /&gt;
===Biopac measures===&lt;br /&gt;
For measuring skin conductance and EMG, we have a Biopac with the [http://www.biopac.com/product/eda-electrodermal-activity-amplifier-for-mri electro-dermal activity amplifier] and [http://www.biopac.com/product/electromyogram-amplifier EMG amplifier] modules. The data from the Biopac are digitized with a [http://labjack.com/ue9 LabJack UE9] DAQ device and are available directly through a TCP stream (see [http://labjack.com/support/ue9/c-native-tcp-example the UE9 code samples]) or via our linux box voxel2, which can be used to trigger data acquisition that is synchronized with the scanner. The command to run the recording script is &amp;quot;testfix_labjack.py /data/biopac/[your experiment folder]/[run id] [recording duration]&amp;quot;. The recording duration is in seconds. The output is a csv file at /data/biopac/[your experiment folder]/[run id]_[timestamp].csv. The data file records the voltage and raw ADC values. The skin conductance is stored in the second (voltage) and third (raw ADC) columns. You probably want the second column (with numbers like &amp;quot;1.60230098&amp;quot;). The skin conductance amplifier gain is set to five microsiemens per volt. So, if you multiply the numbers in the second column by 5, you will have the skin conductance in microsiemens. The EMG values are in the fourth (voltage) and fifth (raw ADC) columns. The EMG amplifier gain is set to 2000, so dividing the values in the fourth column by 2 will give you the EMG voltage in millivolts.&lt;br /&gt;
&lt;br /&gt;
== Real-time motion tracking ==&lt;br /&gt;
[[File:FIRMM.jpg|thumb|FIRMM tablet]]&lt;br /&gt;
For subject motion tracking, we have a [https://turingmedical.com/firmm/ FIRMM tablet] that can access the scanner&#039;s image database and provide feedback on the subject&#039;s head motion in real-time. FIRMM will automatically plot the motion trace and quality metrics when scanning begins. You can also set protocol-specific parameters like the motion threshold and data quality goals required for your study. It helps monitor the quality metrics in real time so you can adjust your approach. This is mostly useful for fMRI studies. It is also possible to configure the video output so that you can send the real-time motion feedback to the subject via visual display. &lt;br /&gt;
&lt;br /&gt;
The FIRMM tablet is configured to be connected to the scanner by default. If it shows &amp;quot;FIRMM DISCONNECTED&amp;quot;, then we need to check if the firmm_transfer process is running on the scanner, sometimes restarting the process or restarting the FIRMM tablet is needed.&lt;br /&gt;
&lt;br /&gt;
==Subject video==&lt;br /&gt;
You can monitor and record the subject&#039;s face or body using the [https://mrc-systems.de/en/products/mr-compatible-cameras MRI compatible video camera from MRC Systems]. The camera is always on and streaming video to the linux box next to the scan console. An analog video signal is also sent to the large-screen tv in the control room (use the &#039;A/v input&#039;). To use the camera, you can attach it to the head coil using the loc-line connectors. When not in use, the camera should be hung on the side of the scanner along with the response devices. To see the video feed, run the following from the command line: &amp;quot;ffplay -f video4linux2 /dev/video0&amp;quot;. To record the video feed, you can use our video recording scripts. From the command line run &amp;quot;recordSubject 310&amp;quot;, this will record subject video for 5 minutes and 10 seconds; to synchronize the recording to the start of the scan, run &amp;quot;recordSubjectTrigger 310&amp;quot; instead. The data files are saved to the &amp;quot;video&amp;quot; directory. &lt;br /&gt;
&lt;br /&gt;
Troubleshoot: if you get an error &amp;quot;/dev/device0: busy or resource unavailable&amp;quot;, then run &amp;quot;fuser /dev/device0&amp;quot; and you&#039;ll get the PID of the process that is currently occupying the video device. Then run &amp;quot;kill -9 [PID]&amp;quot;. This should kill the process and you should be able to use the video camera again. Occasionally the camera feed fails and the recorded video files are empty. If this happens, check the video device setting with &amp;quot;v4l2-ctl -d /dev/video0 --all&amp;quot; and look for the &amp;quot;Video Standard&amp;quot; section. If it&#039;s something like &amp;quot;Video Standard = 0x000000ff PAL-B/B1/G/H/I/D/D1/K&amp;quot;, then you&#039;ll need to change it to NTSC standard with &amp;quot;v4l2-ctl -d /dev/video0 -s ntsc&amp;quot;. The returned message should be &amp;quot;Standard set to 0000b000 NTSC-M/M-JP/M-KR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
= Scan Triggers =&lt;br /&gt;
[[File:cni_epi_psd_usercvs_ss.png|thumb|UserCVs under the &#039;Advanced&#039; tab for the cni_epi PSD.]]&lt;br /&gt;
The moment when the scanner starts acquiring image data can be controlled from the computer you use to control your experiment. To do this you need to be able to program your computer to send a pulse to the scanner at the planned moment.&lt;br /&gt;
&lt;br /&gt;
At the CNI, we provide a [[CNI widgets|USB-to-Serial port device]], which works well for E-Prime and Presentation. The notes below show how to set up the UserCV so that the scanner listens for the trigger, and how to send a trigger pulse using the USB-to-Serial device.&lt;br /&gt;
&lt;br /&gt;
== Protocol configuration ==&lt;br /&gt;
For BOLD EPI, be sure to use the cni_epi PSD to get the triggering options described here. The same options are also available for the spiral PSD. Under the &#039;Advanced&#039; tab, make sure the &amp;quot;start scan trigger&amp;quot; CV is set to &#039;1&#039;, which tells it to use the external trigger. Other options include &#039;0&#039; for no trigger (scan starts as soon as the scan button is pressed), and &#039;2&#039; for cardiac gating, which will synchronize to the cardiac cycle (measured via either the PPG pulse oximeter or ECG leads).&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial Port Trigger ==&lt;br /&gt;
The CNI also has a USB-to-Serial port device set up to send scan triggers. Just connect the USB cable labeled &amp;quot;EPrime Trigger&amp;quot; to your computer. On OS-X and Linux, the device is automatically recognized as a serial port (under /dev/ttyACM? on linux or /dev/ttyUSB??? on OS-X). On Windows, the device will show up as a COM port. &lt;br /&gt;
&lt;br /&gt;
When configuring the port, note that the device is expecting communication at 57600 bps and the scanner is triggered by sending a three-character string: &amp;quot;[t]&amp;quot; (without the quotes). In E-Prime, you need to add the serial port device to your experiment and then configure it by specifying the device (you can find the COM port number in Windows Device Manager - Ports (COM&amp;amp;LPT)) and setting the baud rate to 57600. (Other settings can be left at their default values.) In your E-Prime script, add the following in-line code to send the trigger string to the port: &lt;br /&gt;
&lt;br /&gt;
 Serial.WriteString &amp;quot;[t]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To use this device from Matlab, try:&lt;br /&gt;
&lt;br /&gt;
 s = serial(&#039;/dev/ttyS0&#039;, &#039;BaudRate&#039;, 57600);&lt;br /&gt;
 fopen(s);&lt;br /&gt;
 fprintf(s, &#039;[t]&#039;);&lt;br /&gt;
 fclose(s);&lt;br /&gt;
&lt;br /&gt;
Note that you will need to replace &#039;/dev/ttyS0&#039; with the correct port on your machine. E.g., if you&#039;re on windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. On a mac,  type &#039;ls -lh /dev/tty.usbmodem*&#039; in a terminal. &lt;br /&gt;
&lt;br /&gt;
If you are using PsychoPy, first make sure the pyserial package is installed (e.g., pip install pyserial). Then create two code blocks:&lt;br /&gt;
&lt;br /&gt;
 # Insert a &#039;Begin Experiment&#039; code block to initialize (e.g., as part of your instructions)&lt;br /&gt;
 import serial&lt;br /&gt;
 import time&lt;br /&gt;
 device = &#039;/dev/ttyACM1&#039;  # NOTE: replace with your device identifier! On windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. &lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(device, 115200, timeout=1)&lt;br /&gt;
         time.sleep(0.1)&lt;br /&gt;
         ser.write(&#039;[t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         pass&lt;br /&gt;
&lt;br /&gt;
 # Insert a &amp;quot;Begin Routine&amp;quot; code block whenever you want to send a trigger:&lt;br /&gt;
 send_trigger()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternate example from Christina Chung: &lt;br /&gt;
 #################################################&lt;br /&gt;
 ### import modules&lt;br /&gt;
 import serial&lt;br /&gt;
 import time &lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 ### Set SCANNER_TRIGGER_NEEDED to False to bypass program abortion when scanner exception is thrown&lt;br /&gt;
 SCANNER_TRIGGER_NEEDED = False&lt;br /&gt;
 DEVICE_ID = &#039;com3&#039;&lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(DEVICE_ID, 57600, timeout=1)&lt;br /&gt;
         time.sleep(2)    ### wait for 2 sec to ensure scanner is ready; CNI wiki default 0.1&lt;br /&gt;
         ser.write(&#039;[t][t][t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         if not SCANNER_TRIGGER_NEEDED:&lt;br /&gt;
             pass&lt;br /&gt;
         else:&lt;br /&gt;
             core.quit()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The construction of our serial trigger device is described on the [[CNI widgets]] page.&lt;br /&gt;
&lt;br /&gt;
= Capturing Scan Timing Pulses =&lt;br /&gt;
Some researchers want to know the precise time when each slice or each volume is acquired. The scanner produces timing pulses that can be used to record this information. Additionally, a pulse sent by the scanner at the beginning of the scan can be used to trigger the start of an experimental task (reversing the direction of triggering discussed above). At the CNI, we have two methods of receiving these timing pulses. One method uses the USB-to-Serial trigger device and the other uses the fORP response box system. These two methods are described in more detail below.&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial timing pulses ==&lt;br /&gt;
The emulated serial port device [[#USB-to-Serial Port Trigger|described above]] can also be used to receive timing pulses from the scanner. To enable this mode, send a &amp;quot;[p]&amp;quot; command. You will then receive a &#039;p&#039; character every time a timing pulse is detected. The temporal accuracy of these pulses should be about 1 ms. These &amp;quot;scope trigger&amp;quot; pulses come at the beginning of every slice or the beginning of every volume, depending on how the PSD is configured. For the cni_epi and spiral PSDs, under the &amp;quot;Advanced&amp;quot; tab, you can change the &amp;quot;scope trigger&amp;quot; CV to send pulses for every slice or just for the first slice of each volume. To capture these trigger pulses, you can use this [[saveTriggers.py|python script]].&lt;br /&gt;
&lt;br /&gt;
== Timing pulses as keypresses via fORP ==&lt;br /&gt;
To use the fORP response box system to receive timing pulses from the scanner, set up the system as described in the &#039;Response Box&#039; section above. Note that timing pulses will be received via the same USB connection as subjects&#039; responses, and that no additional USB cables need be plugged into your testing computer. If you have selected a numeric mapping between button presses and keys, the timing pulses sent to your testing laptop will be in the form of a &#039;5&#039;. (Note that use of the 5-button diamond-shaped response box will include the numbers 1-4 and 6, and thus will not include the number 5). Use caution when editing experimental scripts while using this method--if your script is open while the scanner sends pulses, a long series of 5&#039;s will be inserted into your script!&lt;br /&gt;
&lt;br /&gt;
= General information =&lt;br /&gt;
&lt;br /&gt;
==The magnetic field==&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:mr750_gauss_lines_top.png|Gauss-lines for a generic install (top view).&lt;br /&gt;
Image:mr750_gauss_lines_side.png|Gauss-lines for a generic install (side view).&lt;br /&gt;
Image:mr750_gauss_lines_front.png|Gauss-lines for a generic install (front view).&lt;br /&gt;
Image:CNI_MR_fieldlines.png|Sketch of gauss-lines for our particular installation.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
When positioning equipment in the scan room, it&#039;s useful to be aware of the magnetic field lines. All equipment in the CNI scan room is MR-safe, but not all equipment functions properly in very high-field regions. The diagrams show the estimated field lines in the MR suite area.&lt;br /&gt;
&lt;br /&gt;
==Additional/Legacy hardware information==&lt;br /&gt;
See the [[Hardware configuration]] page for some additional and legacy hardware information.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59425</id>
		<title>MR Hardware</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59425"/>
		<updated>2026-03-18T20:19:28Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Parsing the physio files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= MR Scanner =&lt;br /&gt;
The MR scanner is in room 065 of the CNI suite in Building 420. It has its [[MR Scanner|own wiki page]].&lt;br /&gt;
&lt;br /&gt;
= Peripheral Device Rack (Laima Box) =&lt;br /&gt;
[[File:LB_Overview_Annotate.jpg|thumb|Overview of Laima Box]]&lt;br /&gt;
As you may guess from the title, the Laima Box came into being on the urging of Laima to find a solution to provide a stable and flexible interface to all the display devices, scanner signals, and other peripheral devices that are commonly used during studies. &lt;br /&gt;
&lt;br /&gt;
From the top rack to the bottom, the devices are (as marked in the photo): &lt;br /&gt;
* Small Monitor (Output 3 on HDMI Matrix, typically used for Eyelink display) and Eyelink keyboard + mouse&lt;br /&gt;
* Hyperion Projector Consoles (left: rear projector, right: side projector); Projector Switch for switching between the two projectors&lt;br /&gt;
* fORP Optical Interface; Serial Trigger Box; Video Flipper ([https://halltechav.com/product/sc-hd-2b/ Hall Research video scaler SC-HD-2B])&lt;br /&gt;
* Main Power to the rack&lt;br /&gt;
* Remote Power Switches for equipments in the magnet room: Eyelink camera, Webcam, DC shim amplifier; Audio Inputs for Avotec channel A &amp;amp; B and OptoAcoustics&lt;br /&gt;
* HDMI Matrix (see detailed Input-Output schematics [[#HDMI Matrix Switch|below]])&lt;br /&gt;
* fORP USB connection; Serial-to-USB connection; Scanner trigger co-ax connections; Video Inputs (Input 4 &amp;amp; 5 on HDMI Matrix)&lt;br /&gt;
&lt;br /&gt;
= Stimulus Presentation =&lt;br /&gt;
&lt;br /&gt;
==Visual System ==&lt;br /&gt;
The CNI offers several display options, depending on your visual stimulus needs. All use a digital interface (DVID or HDMI) and can be connected by selecting the appropriate options on the HDMI matrix switch. The mirror on the Nova 32-channel coil is a double mirror design (see [[32-channel_double_mirror]]), and that on the GE 64-channel coil is a single mirror design. &lt;br /&gt;
&lt;br /&gt;
=== 3D LCD display ===&lt;br /&gt;
We have a 49&amp;quot; 4K 3D LCD display from Resonance Technology. It is placed at the far end of the scanner room behind the scanner&#039;s rear pedestal. Its specs and field of view presented to the scan subjects are as follows: &lt;br /&gt;
 * 640x480@60Hz up to 4096x2160@50Hz resolution&lt;br /&gt;
 * 1000:1 contrast ratio&lt;br /&gt;
 * screen size: 107.2cm high x 60.3cm wide &lt;br /&gt;
 * visual distance from Nova coil: 267cm from mirror2, 6cm mirror2 to mirror1, 15cm from eye to mirror1 = 288cm&lt;br /&gt;
 * visual distance from NFL coil: 263cm from mirror1, 13cm from eye to mirror1 = 276cm &lt;br /&gt;
&lt;br /&gt;
To see 3D effects, subjects will need to wear passive polarized lenses. The screen can, of course, present non-3D stimuli too. &lt;br /&gt;
&lt;br /&gt;
As described in our Slack [https://stanford-cni.slack.com/archives/C011V1M2FRN/p1639611006023100 channel], the TV monitor has varying latency depending on the mode it is in.  We conducted tests using a 1920x1080p@60Hz signal comparing the mirrored display on a laptop while simultaneously viewing the display on the scan room monitor.  By capturing these displays simultaneously with a high-speed video acquisition we were able to calibrate the latency between the laptop and scan room monitor display.  Assuming the laptop display latency is 0, when in General mode the monitor processing creates about 133ms (8 video frames) of latency, as compared to Game mode where the latency is only 33ms or 2 frames. In order to switch modes, the remote control must be used inside the scan room but care must be taken as the batteries are slightly ferromagnetic so be sure to hold on the remote firmly and keep it as far from the scanner as possible.  Choose Options-&amp;gt;Scene Select-&amp;gt;Game in order to select Game mode.  It should be in this mode by default -- we ask any users that switch the monitor mode to please return to Game mode after their experiment. &lt;br /&gt;
&lt;br /&gt;
=== DLP Projector ===&lt;br /&gt;
We also have an MR-compatible rear-projection DLP projector ([https://pstnet.com/products/hyperion/ Hyperion 2-120 Projector]). The new Hyperion 2-120 Control Room Console features an LCD touchscreen to power on/off the projector, mirror the image, show the projector status, and display video input resolution, refresh rate, and synchronization status. This projector can be used by placing the large mirror on the back of the scanner bed in front of the LCD display. You also need to place the rear-projection screen on the head coil. Set-up of this system is a bit more involved than the LCD display, but it offers a much brighter display and a larger field of view. If you need that, let us know and we&#039;ll show you how to set up the projector system.&lt;br /&gt;
&lt;br /&gt;
Here are the specs of the projector:&lt;br /&gt;
 * 1920x1080&lt;br /&gt;
 * 120Hz or 60Hz frame rate&lt;br /&gt;
 * 16:9 and 16:10 widescreen formats (standard 4:3 available)&lt;br /&gt;
 * brighter and larger field of view than the LCD displays&lt;br /&gt;
&lt;br /&gt;
If you try the projector (via HDMI) and nothing happens, you can try cycling power to the [[#The Laima Box|Laima Box]. If this doesn’t work, troubleshoot the projector as you normally would (check the input cable on the projector is connected and cycle inputs etc).&lt;br /&gt;
&lt;br /&gt;
=== HDMI Matrix Switch ===&lt;br /&gt;
[[File:HDMI_Switch_Schematic.jpg|thumb|HDMI switch schematic.]]&lt;br /&gt;
[[File:LB_HDMI_Switch.jpg|thumb|HDMI switch in Laima Box.]]&lt;br /&gt;
We use an 8x8 HDMI Matrix Switch to distribute video signals to all the various displays.  This is a [https://keydigital.org/category/4k-18g-hdmi-matrix-switchers/KD-MS8x8G Key Digital KD-MS8x8G] switch capable of connecting any of 8 input HDMI inputs to any/all of 8 HDMI outputs.  The switch is capable of handling 4K HDCP2.2 video signals.  The [[Media:HDMI_Switch_Schematic.jpg|schematic]] of the switch connections are shown here with all 8 inputs and outputs in use. In order to make a connection to a particular output display, you choose the particular input under the labeled output row of 8 LEDs.  This is done by pressing the button under the labeled output (see HDMI Matrix switch [[Media:LB_HDMI_Switch.jpg|image]]) in order to progress left-to-right through the various inputs.  Unfortunately, the blue LEDs on this switch that show what input is currently connected have been burning out, so it&#039;s sometimes necessary to count your button presses from a visible LED to know what input you are on. &lt;br /&gt;
&lt;br /&gt;
The default output display for each input is nominally the same number as the input.  As you&#039;ll note, we have the GE Host computer and GE Table Driver on inputs 1 &amp;amp; 2 -- this is so we can send the GE Host Display to any other display connected to the HDMI matrix switch, or use the GE Table Monitor to display other output -- such as the Eyelink computer output when adjusting the Eyelink camera at the front of the scanner. &lt;br /&gt;
&lt;br /&gt;
The HDMI matrix switch allows for fairly elaborate configuration as described in the [https://www.keydigital.org/web/content/5839 manual] via a Key Digital PC application that is available on the CNI PC laptop when connected to the internal private ethernet network. &lt;br /&gt;
&lt;br /&gt;
Troubleshooting: The HDMI matrix switch is generally fairly stable but if you&#039;re having odd behavior a good first step is to cycle the main power to the Laima Box -- this will reset the HDMI matrix switch.&lt;br /&gt;
&lt;br /&gt;
=== MRI Compatible Glasses and Lensometer ===&lt;br /&gt;
[[File:mri-glasses.jpg|thumb|mri frames and lenses]]&lt;br /&gt;
For participants who wear glasses, CNI has a set of interchangeable lenses that are used with an MRI compatible plastic frame. The frame and lenses are located in the open shelving above and to the left of where the screening forms are located. We have lenses for both near-sighted (-0.5 to -8.0 in .5 step increments) and far-sighted (+.5 to +8.0 in .5 step increments) vision corrections. The lenses are made of hard polycarbonate plastic and are not breakable. The easiest way to install the lenses into the frame is insert the lens from the back first into the edge by the ear piece and then snap in the lens by the nose. If the participant does not know his/her glasses prescription we have a lensometer that can determine that. Basic instructions for use of the lensometer are in the next section. There is also an eye chart posted on the door to the equipment room where participants can test their vision with the MRI glasses. Have the participant stand right in front of the lensometer (about 10 feet from the chart) to use the chart.&lt;br /&gt;
[[File:eye-chart.jpg|thumb|eye chart]]&lt;br /&gt;
&lt;br /&gt;
To determine glass prescription strengths for MRI participants CNI has the AL200 Auto Lensometer. Is is located in the CNI control room area. There is both a User&#039;s guide and a quick reference sheet next to the lensometer. The lensometer is currently set up to read a single vision lens. There are settings available to read either bifocal or progressive lenses, but they are not typically used as only the distance portion of the lens needs to be measured.&lt;br /&gt;
&lt;br /&gt;
Here is a basic how-to from the Reichert user&#039;s guide.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:Lensometer-parts.png|The key parts of the lensometer.&lt;br /&gt;
Image:Lensometer-back.png|Turn on the lensometer using the switch on the back panel. The AL200 will do a calibration check; do not place any lenses or obstructions in front of the aperture during calibration.&lt;br /&gt;
Image:Step2.png|The AL200’s default measurement mode is Single Vision, Automatic. This mode is used for fast, easy measurement of a pair of single vision spectacle lenses. You&#039;re now ready to measure the right lens, indicated by the &#039;R&#039; on the upper left side of the screen.&lt;br /&gt;
Image:Glass-placement1.jpg|Place the spectacles on the lens table and secure the right lens with the lens holder. Using the table base levers and your hand, move the lens until the large cross is positioned directly over the small cross in the middle of the centering target.&lt;br /&gt;
Image:Glass-placement2.jpg|If you insert a progressive lens in single vision mode, the progressive icon may flash to indicate that the mode should be changed. NOTE: Place the glasses so that lenses are toward the front and the ear pieces toward the back.&lt;br /&gt;
Image:Step3.png|When optical center has been located, the AL200 tone will sound and the measurements will be locked on the screen. Upon removal of the lens the AL200 will automatically switch to the left lens, indicated by the highlighted L on the upper right side of the screen. &lt;br /&gt;
Image:Step4.png|Repeat the measurement process for the left lens. All measurements will remain on the screen until the operator chooses to print or clear the data.&lt;br /&gt;
Image:Lensometer-screen.png|The number that appears in the Sphere location is the correction number that you will use in choosing the lenses for the MRI glasses.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Auditory System ==&lt;br /&gt;
&lt;br /&gt;
=== Avotec System ===&lt;br /&gt;
[[File:Avotec2.jpg|thumb|Avotec Console]]&lt;br /&gt;
[[File:Avotec-headsets.png|thumb|Avotec Headsets]]&lt;br /&gt;
The [https://avotecinc.com/pages/silent-scan Avotec Silent Scan system] provides a maximum of 30dB with the [https://avotecinc.com/products/full-coverage-headset-3000-series Full Coverage] and [https://avotecinc.com/products/conformal-headset-3000-series Conformal] headsets. The conformal headset will fit in any coil and any patient. The system also has a [https://avotecinc.com/products/non-headset-3000-series Flat Headset] with a slim profile (0.5 inch pad) which offers great flexibility and can fit into tight coils. The system provides clear two-way communication with built-in patient-activated alarm. The console and equalizer provide high-fidelity, frequency-balanced sound for a variety of audio inputs. The console also has a built-in radio. &lt;br /&gt;
&lt;br /&gt;
This system is best to use if you need to deliver high quality audio to the subjects, or need to communicate with the subjects frequently during the scans.&lt;br /&gt;
&lt;br /&gt;
We recommend using the Avotec + Flat Headset for most studies as it would fit into the Nova 32ch coil for most participants and is more robust in operation (in comparison to the Conformal headset and the OptoAcoustics system). If the Flat headset does not fit into the head coil, you can also use the Conformal headset. Note that when the participant is wearing the Conformal headset and lying on the patient table, the tube connecting to the headset can sometimes slip and pull the earplugs out of the participant&#039;s ears; if that happens you can tape down the tube to the patient table to prevent it from slipping. For audio input, use Avotec Channel A and B for the Conformal headset and Flat headset respectively.&lt;br /&gt;
&lt;br /&gt;
=== OptoACTIVE Headphone System === &lt;br /&gt;
[[File:OptoACTIVE.jpg|thumb|OptoACTIVE Headphone System control console]]&lt;br /&gt;
The OptoACTIVE Headphone System provides active noise cancellation (ANC) during MR scans. The slim profile headphones are designed to fit into the head coils for most human subjects. Its built-in optical microphones monitor the sound level at the subject&#039;s ears, which enable automatic self-calibration, sound pressure level monitoring and real-time in-ear stereo sound recording. The OptoACTIVE headphones also provide very good airseal around the subject&#039;s ears which results in excellent passive noise reduction as well. In combination with the passive noise reduction and active noise cancellation, the headphone can reach a 60 dB attenuation (95%) of the main EPI resonance noise. It also features the FOMRI-III noise cancelling microphone for the subject, which enables quiet two-way communication during scans. &lt;br /&gt;
&lt;br /&gt;
The control console has an LCD touch-screen and pushbuttons that allow the operator to control initial and ongoing calibrations, real-time active noise cancelling, channel level volume and recording, FORMRI microphone communications, etc. It displays the noise level, stimuli levels and spectrum analysis in real time.&lt;br /&gt;
&lt;br /&gt;
The system is ideal for the study of: sleeping disorders, autism, children suffering from claustrophobia, auditory fMRI and other research areas that were previously impractical or unattainable due to scanner noise.&lt;br /&gt;
&lt;br /&gt;
For step-by-step operation instructions, please see this [[Media:Optoacoustics_How-To.pdf | How-To Guide]], clearly summarized by Prof. Cameron Ellis and Emily Chen.&lt;br /&gt;
&lt;br /&gt;
== CNI Laptops ==&lt;br /&gt;
The CNI has one MacBook and one Windows PC for users to use during their experiments. The MacBook is running OS 10.12 and has MATLAB R2014b with PsychToolbox and PsychoPy 3 installed. The Windows PC is running Windows 11 and has E-Prime 3 installed (CNI also has a license for E-Prime 3). You could also checkout out [[Stimulus|some (old) notes]] shared by previous CNI users on how to set up experiments with these toolboxes.&lt;br /&gt;
&lt;br /&gt;
= Subject measurement =&lt;br /&gt;
&lt;br /&gt;
== fORP Response Box ==&lt;br /&gt;
We have a modular response box system ([http://www.curdes.com/index.php/mainforp/interfaces/fiu-933.html fORP 932]) from [http://www.curdes.com/ Current Designs]. With ths system, you can swap out various response devices. The output from any of these devices is available from the fORP box via USB. The device emulates a USB keyboard. We have confirmed that the fORP 932 USB interface is polled at 1kHz. The device itself has sub-millisecond time resolution (see the [http://www.curdes.com/index.php/support/faqs.html fORP FAQ]). We estimate that this system provides response time measurements with a precision and reliability of about one millisecond. &lt;br /&gt;
&lt;br /&gt;
Note that the fORP can send keypresses every time the scanner acquires a slice (or a volume, if the &amp;quot;scope trigger (User CV3)&amp;quot; is set to &amp;quot;1&amp;quot; in the EPI scans). If you want to receive these keypresses, configure the fORP by selecting a configuration that does *not* say &amp;quot;no 5&amp;quot; (if you are receiving numbers) or &amp;quot;no t&amp;quot; (if you are receiving letters). If you *do not* want to get these pulses (most users actually do not want these), then select a configuration that includes &amp;quot;no 5&amp;quot; or &amp;quot;no t&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The response devices that we currently have are:&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-scrl-1.html scroll-wheel device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-2x4-c.html 2X4 bimanual button boxes]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x4-cyl-2.html  4-buttonstick-style response device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x5-d.html 5-button diamond button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/custom.html 5-button curved button box]&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-trk-2.html trackball device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-1x5-n4.html PYKA 5 button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/variabledevices/hhsc-joy-5.html joystick]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a need for a different response device, just let us know.&lt;br /&gt;
&lt;br /&gt;
To use a response device at the CNI:&lt;br /&gt;
# Plug the desired device into the black fiber-optic connector on the right side of the front of the magnet bore&lt;br /&gt;
# Locate the silver box (labeled fORP) on the peripheral device rack.&lt;br /&gt;
# Push in the knob on the right front side of the fORP box to enter menu mode. For the following instructions, you will turn the knob to scroll through the menu choices, and then push in on the knob to select your choice. (See [https://wiki.curdes.com/bin/view/CdiDocs/932QuickSetup this guide] for more details on using the fORP 932.)&lt;br /&gt;
# Turn the knob until the word &amp;quot;yes&amp;quot; is underlined then push the knob to select &amp;quot;yes&amp;quot;&lt;br /&gt;
# In the &amp;quot;mode select&amp;quot; menu that appears next, you can select &amp;quot;manual config&amp;quot;. We recommend, however, that you pick the AUTOCONFIGURE choice which tells the interface to determine as much as it can about the connected handheld device and the cabling to the host computer. This should simplify the choices that need to be made by you. If you have used the AUTOCONFIGURE option you can skip steps 6 and 7 below and proceed directly to step 8.&lt;br /&gt;
# In the response device menu, turn the knob to scroll through the choices until you find the device that you connected in step 1 (examples include):&lt;br /&gt;
## 4-button cylinder: select HHSC-cyl-5&lt;br /&gt;
## 5-button diamond: select HHSC-1x5-D&lt;br /&gt;
## 5-button curved: select HHSC-1x5-C&lt;br /&gt;
## bi-manual 4-button keypads: select HHSC-2x4c&lt;br /&gt;
## scrollwheel: select HHSC-SCRL1&lt;br /&gt;
## trackball: select HHSC-TRK-2 (for mouse emulation)&lt;br /&gt;
# Select USB in the next display by pushing in the knob.&lt;br /&gt;
# Select the desired output mode. For the cylinder or keypads, this determines the mapping between the buttons and the keypress that is generated. E.g., HID-NAR-12345 will map the 4 cylinder buttons to the four number keys, 1-4, and send a &#039;5&#039; for each scope trigger pulse received by the scanner (if you don&#039;t want these pulses, select the &#039;no 5&#039; mode, as noted above). NAR means &amp;quot;no auto release&amp;quot;. In NAR mode, the keypress is maintained as long as the button is pressed. In the non-NAR mode, a brief keypress is generated, even if the button is held down. We find that NAR mode works better with PsychToolbox. In non-NAR mode, it can miss the very brief keypresses produced by auto release. &lt;br /&gt;
# Setup is now complete.&lt;br /&gt;
&lt;br /&gt;
For more technical details about the fORP, see the [[fORP|fORP wiki page]].&lt;br /&gt;
&lt;br /&gt;
== Eye Tracker ==&lt;br /&gt;
[[File:cni_eye_tracker_camera.jpg|thumb|Eye tracker camera.]]&lt;br /&gt;
[[File:cni_eye_tracker_ir.jpg|thumb|Eye tracker IR illuminator.]]&lt;br /&gt;
&lt;br /&gt;
We have an [https://www.sr-research.com/eyelink-1000-plus/ SR Research EyeLink 1000 Plus] eye tracker with remote optics installed at the CNI. It has a frame rate of up to 2000Hz, up to 1/2 degree accuracy, and is fairly easy to set up and use. We found that the standard IR light source from SR Research did not adequately focus the light onto the subject&#039;s eye, so we use the [https://mrc-systems.de/en/products/mr-compatible-cameras#light-sources LED light source] from MRC Systems. &lt;br /&gt;
&lt;br /&gt;
The camera is mounted on a wood stand placed next to the patient bed at the back of the bore. The camera position and focus should not need to be adjusted if your subject is positioned with their eyes close to isocenter. However, if you have a prescription that is centered far from iso-center, you may need to adjust the focus a bit. To do that, you can use the HDMI matrix to show the eye tracker video on the bore monitor so that you can adjust the camera while seeing what you are doing.&lt;br /&gt;
&lt;br /&gt;
The LED light source is mounted on a blue loc-line stalk that attaches to the head coil and is usually left unattached and hanging on the side of the scanner next to the response devices; you will need to mount it to the head coil using the blue loc-line pliers that you can find under the shelf with all the padding. Once mounted, make sure the light source is directed toward the subject&#039;s eye by aiming it through the gap between the two mirrors.&lt;br /&gt;
&lt;br /&gt;
The eye tracker host computer is mounted in the equipment room. However, the display, keyboard, and mouse for that computer are to the right of the GE console. You can connect to the host computer by a direct TCP connection through the ethernet cable located in the cable bundle next to the GE console. This cable is, not surprisingly, labeled &amp;quot;eye tracker&amp;quot;. If you use psych toolbox for stimulus presentation, you can use the [http://psychtoolbox.org/docs/EyelinkToolbox EyeLink Toolbox]. For those who use python (e.g., [http://www.psychopy.org/ Psychopy]), try the [http://www.psychopy.org/api/hardware/pylink.html PyLink module]. If you use E-Prime, check out the [https://www.sr-research.com/e-prime-extensions/ E-Prime integration info] on the SR Research support site. In any case, the IP address of the Eyelink is on our private network and thus is NOT the default IP, so you need to explicitly set it to 10.0.3.2. This private network has a DHCP server, so your stimulus computer should automatically get assigned an IP address on the same subnet. Please don&#039;t hard-code an IP address for your stimulus computer! Note that older versions of psychtoolbox don&#039;t allow you to specify the IP address, so be sure to get the latest Eyelink mex file from [https://github.com/kleinerm/Psychtoolbox-3/commit/aa04b821e975e0e61978377bb05aa1e216f3382e github].&lt;br /&gt;
&lt;br /&gt;
The data recorded by the EyeLink software is saved in the EyeLink partition (E:\). To transfer the data to your own storage device, you can reboot the EyeLink computer into Windows and connect your own USB drive. Afterwards you can reboot the computer again and get back into the EyeLink system. &lt;br /&gt;
&lt;br /&gt;
For a tutorial and troubleshooting information on the Eyelink system, see the [[EyelinkTracker]] page.&lt;br /&gt;
&lt;br /&gt;
==Physio monitoring==&lt;br /&gt;
[[File:ppg_resp.jpg|thumb|Photo plethesmograph (PPG) and respiration belt.]]&lt;br /&gt;
[[File:Tools_gating.png|thumb|Tools Gating]]&lt;br /&gt;
[[File:Physio_waveforms.png|thumb|Physio Waveforms on Console]]&lt;br /&gt;
[[File:physmon.png|thumb|[[CNI_widgets|CNI PPG pulse detector device]].]]&lt;br /&gt;
The scanner has the standard suite of physiological measures: pulse oximetry, respiration belt, and ECG. These can be used for scan triggering. The digital data from these measurements are saved on the console and backed-up in the Flywheel database. These data are also processed by the [[CNI_widgets|CNI PPG monitoring device]] and used for EEG ballisto-cardiogram artifact removal by the EGI NetStation software. (See also the [http://fmri.ucsd.edu/Howto/3T/physio.html UCSD fMRI group&#039;s site] for more information on using the GE physio files to remove physiological artifacts from fMRI data.) A recent paper is here - [https://doi.org/10.1016/j.jneumeth.2016.10.019 The PhysIO Toolbox for Modeling Physiological Noise in fMRI Data]&lt;br /&gt;
&lt;br /&gt;
===Setting Up Physio Recording===&lt;br /&gt;
&lt;br /&gt;
* Go to “Tools” - &amp;quot;Gating&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* To record respiration/movement of the abdominal wall, select “Respiratory.”&lt;br /&gt;
&lt;br /&gt;
* To record pulse/peripheral gating, select “PG.”&lt;br /&gt;
&lt;br /&gt;
* Outfit your participant with the respiratory bellows and the PG sensor&lt;br /&gt;
&lt;br /&gt;
===Respiratory Bellows===&lt;br /&gt;
&lt;br /&gt;
The respiratory bellows goes around your participant’s diaphragm or abdomen. You will get the best signal in the area where the participant’s breathing motion is most visible when they are lying down. Use the Velcro to adjust the respiratory bellows; it should be snug and not move around much, but stretched as little as possible and not too tight. The bellows should expand and contract approximately 0.5 to 1 inches with the participant’s breathing. Do not place any padding over the respiratory bellows. You should be able to see the recording on the small screen on the scanner. Note that it’ll take about one minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the bellows if necessary. &lt;br /&gt;
&lt;br /&gt;
===Pulse/Peripheral Gating (PPG) ===&lt;br /&gt;
&lt;br /&gt;
The participant’s pulse is monitored by a photopulse sensor that detects blood oxygen levels (pulse oximetry) in the vascular bed of the participant’s finger/thumb or toe. During the measurement, the participant’s hand or foot should remain cool and dry. We recommend that you attach the sensor to the participant’s toe, especially if you are going to ask your participant to use one of the button boxes because hand movements will create noise in your PG signal. &lt;br /&gt;
&lt;br /&gt;
* Recording from the toe: Attach the sensor to the fastener for the toe (with the Velcro). Place the sensor on the vascular bed of the participant’s toe. To keep the sensor in place, tape it and the fastener to the participant’s foot using medical tape. It is also a good idea to tape the cable to the knee pillow or the participant’s leg to reduce the pull on the sensor. &lt;br /&gt;
* Recording from the thumb/finger: Place the sensor on the participant’s finger or thumb. It is a good idea to avoid placing the sensor on the joint (the signal will be much noisier if you place the sensor on the joint). To keep the sensor in place it helps to tape it to the participant’s hand with some medical tape.&lt;br /&gt;
&lt;br /&gt;
You should be able to see the recording on the small screen on the scanner. Note that it’ll take up to a minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the sensor if necessary. &lt;br /&gt;
&lt;br /&gt;
Note: When you are done, please clean the sensor with alcohol wipes as it directly touches the participant’s skin.&lt;br /&gt;
&lt;br /&gt;
===Recording Physio===&lt;br /&gt;
&lt;br /&gt;
The default method for recording the physio is the CV control method (set CV phys_record_flag to 1). With default setting of CV control method, a recording of maximum length (25 minute) will require approximately 3 seconds to save to files to the hard disk after the end of the scan. You need to make sure that the next phys-recording scan starts after the previous recording finishes saving data to files. If the next phys-recording scan starts before the previous recording finishes, the new recording request will be ignored. &lt;br /&gt;
&lt;br /&gt;
===Parsing the physio files===&lt;br /&gt;
&lt;br /&gt;
The physio data from the scanner can include three types of measurements: pulse, respiration, and electrocardiogram (ECG).  The pulse data come from the PPG, the respiration data from the breathing-belt, and the ECG from the specialized electrodes attached to the chest. &lt;br /&gt;
&lt;br /&gt;
The data recorded from these devices are written out into simple text-files. There are three files for each type of measurement.  The file names start with PPG, RESP and ECG for the three types of measurements.  The files have raw data (&#039;Data&#039;), and the times of the local peaks (&#039;Trig&#039;) (and sometimes an empty &#039;PACTrig&#039;). &lt;br /&gt;
&lt;br /&gt;
* The temporal sampling rates differ between the three types of measurements&lt;br /&gt;
** ECG: 1ms, &lt;br /&gt;
** Pulse/Peripheral Gating: 10ms, &lt;br /&gt;
** Respiration: 40ms.&lt;br /&gt;
* The timeseries data&lt;br /&gt;
** start 30 seconds of baseline from before the start scan button was pressed&lt;br /&gt;
** have a variable duration between start scan button press and the actual start (pre-scan delays, external trigger delays, etc.)&lt;br /&gt;
** stop at the same time as the scan&lt;br /&gt;
&lt;br /&gt;
To reiterate-- the physio data stored in the physio files starts 30 seconds &#039;&#039;&#039;before&#039;&#039;&#039; you press the &#039;Scan&#039; button (yes, it&#039;s psychic ;), which is almost always more than 30 seconds before scanning actually starts. It could be substantially longer if you do external triggering. In that case, you&#039;ll get some extra physio data recorded during the time between when you press start scan and you send your trigger. But the recording does stop when the scan stops. So, to synchronize physio and scan data, you can take the end of the physio data and count backward the number of data points to keep using the duration of MR acquisiton and sampling rate of the physio data.&lt;br /&gt;
&lt;br /&gt;
The physio files are zipped and uploaded to Flywheel. A simple Flywheel gear &amp;quot;CNI GE Physio File Converter&amp;quot; is available to help extract, visualize, and summarize the data.&lt;br /&gt;
&lt;br /&gt;
===Biopac measures===&lt;br /&gt;
For measuring skin conductance and EMG, we have a Biopac with the [http://www.biopac.com/product/eda-electrodermal-activity-amplifier-for-mri electro-dermal activity amplifier] and [http://www.biopac.com/product/electromyogram-amplifier EMG amplifier] modules. The data from the Biopac are digitized with a [http://labjack.com/ue9 LabJack UE9] DAQ device and are available directly through a TCP stream (see [http://labjack.com/support/ue9/c-native-tcp-example the UE9 code samples]) or via our linux box voxel2, which can be used to trigger data acquisition that is synchronized with the scanner. The command to run the recording script is &amp;quot;testfix_labjack.py /data/biopac/[your experiment folder]/[run id] [recording duration]&amp;quot;. The recording duration is in seconds. The output is a csv file at /data/biopac/[your experiment folder]/[run id]_[timestamp].csv. The data file records the voltage and raw ADC values. The skin conductance is stored in the second (voltage) and third (raw ADC) columns. You probably want the second column (with numbers like &amp;quot;1.60230098&amp;quot;). The skin conductance amplifier gain is set to five microsiemens per volt. So, if you multiply the numbers in the second column by 5, you will have the skin conductance in microsiemens. The EMG values are in the fourth (voltage) and fifth (raw ADC) columns. The EMG amplifier gain is set to 2000, so dividing the values in the fourth column by 2 will give you the EMG voltage in millivolts.&lt;br /&gt;
&lt;br /&gt;
== Real-time motion tracking ==&lt;br /&gt;
[[File:FIRMM.jpg|thumb|FIRMM tablet]]&lt;br /&gt;
For subject motion tracking, we have a [https://turingmedical.com/firmm/ FIRMM tablet] that can access the scanner&#039;s image database and provide feedback on the subject&#039;s head motion in real-time. FIRMM will automatically plot the motion trace and quality metrics when scanning begins. You can also set protocol-specific parameters like the motion threshold and data quality goals required for your study. It helps monitor the quality metrics in real time so you can adjust your approach. This is mostly useful for fMRI studies. It is also possible to configure the video output so that you can send the real-time motion feedback to the subject via visual display. &lt;br /&gt;
&lt;br /&gt;
The FIRMM tablet is configured to be connected to the scanner by default. If it shows &amp;quot;FIRMM DISCONNECTED&amp;quot;, then we need to check if the firmm_transfer process is running on the scanner, sometimes restarting the process or restarting the FIRMM tablet is needed.&lt;br /&gt;
&lt;br /&gt;
==Subject video==&lt;br /&gt;
You can monitor and record the subject&#039;s face or body using the [https://mrc-systems.de/en/products/mr-compatible-cameras MRI compatible video camera from MRC Systems]. The camera is always on and streaming video to the linux box next to the scan console. An analog video signal is also sent to the large-screen tv in the control room (use the &#039;A/v input&#039;). To use the camera, you can attach it to the head coil using the loc-line connectors. When not in use, the camera should be hung on the side of the scanner along with the response devices. To see the video feed, run the following from the command line: &amp;quot;ffplay -f video4linux2 /dev/video0&amp;quot;. To record the video feed, you can use our video recording scripts. From the command line run &amp;quot;recordSubject 310&amp;quot;, this will record subject video for 5 minutes and 10 seconds; to synchronize the recording to the start of the scan, run &amp;quot;recordSubjectTrigger 310&amp;quot; instead. The data files are saved to the &amp;quot;video&amp;quot; directory. &lt;br /&gt;
&lt;br /&gt;
Troubleshoot: if you get an error &amp;quot;/dev/device0: busy or resource unavailable&amp;quot;, then run &amp;quot;fuser /dev/device0&amp;quot; and you&#039;ll get the PID of the process that is currently occupying the video device. Then run &amp;quot;kill -9 [PID]&amp;quot;. This should kill the process and you should be able to use the video camera again. Occasionally the camera feed fails and the recorded video files are empty. If this happens, check the video device setting with &amp;quot;v4l2-ctl -d /dev/video0 --all&amp;quot; and look for the &amp;quot;Video Standard&amp;quot; section. If it&#039;s something like &amp;quot;Video Standard = 0x000000ff PAL-B/B1/G/H/I/D/D1/K&amp;quot;, then you&#039;ll need to change it to NTSC standard with &amp;quot;v4l2-ctl -d /dev/video0 -s ntsc&amp;quot;. The returned message should be &amp;quot;Standard set to 0000b000 NTSC-M/M-JP/M-KR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
= Scan Triggers =&lt;br /&gt;
[[File:cni_epi_psd_usercvs_ss.png|thumb|UserCVs under the &#039;Advanced&#039; tab for the cni_epi PSD.]]&lt;br /&gt;
The moment when the scanner starts acquiring image data can be controlled from the computer you use to control your experiment. To do this you need to be able to program your computer to send a pulse to the scanner at the planned moment.&lt;br /&gt;
&lt;br /&gt;
At the CNI, we provide a [[CNI widgets|USB-to-Serial port device]], which works well for E-Prime and Presentation. The notes below show how to set up the UserCV so that the scanner listens for the trigger, and how to send a trigger pulse using the USB-to-Serial device.&lt;br /&gt;
&lt;br /&gt;
== Protocol configuration ==&lt;br /&gt;
For BOLD EPI, be sure to use the cni_epi PSD to get the triggering options described here. The same options are also available for the spiral PSD. Under the &#039;Advanced&#039; tab, make sure the &amp;quot;start scan trigger&amp;quot; CV is set to &#039;1&#039;, which tells it to use the external trigger. Other options include &#039;0&#039; for no trigger (scan starts as soon as the scan button is pressed), and &#039;2&#039; for cardiac gating, which will synchronize to the cardiac cycle (measured via either the PPG pulse oximeter or ECG leads).&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial Port Trigger ==&lt;br /&gt;
The CNI also has a USB-to-Serial port device set up to send scan triggers. Just connect the USB cable labeled &amp;quot;EPrime Trigger&amp;quot; to your computer. On OS-X and Linux, the device is automatically recognized as a serial port (under /dev/ttyACM? on linux or /dev/ttyUSB??? on OS-X). On Windows, the device will show up as a COM port. &lt;br /&gt;
&lt;br /&gt;
When configuring the port, note that the device is expecting communication at 57600 bps and the scanner is triggered by sending a three-character string: &amp;quot;[t]&amp;quot; (without the quotes). In E-Prime, you need to add the serial port device to your experiment and then configure it by specifying the device (you can find the COM port number in Windows Device Manager - Ports (COM&amp;amp;LPT)) and setting the baud rate to 57600. (Other settings can be left at their default values.) In your E-Prime script, add the following in-line code to send the trigger string to the port: &lt;br /&gt;
&lt;br /&gt;
 Serial.WriteString &amp;quot;[t]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To use this device from Matlab, try:&lt;br /&gt;
&lt;br /&gt;
 s = serial(&#039;/dev/ttyS0&#039;, &#039;BaudRate&#039;, 57600);&lt;br /&gt;
 fopen(s);&lt;br /&gt;
 fprintf(s, &#039;[t]&#039;);&lt;br /&gt;
 fclose(s);&lt;br /&gt;
&lt;br /&gt;
Note that you will need to replace &#039;/dev/ttyS0&#039; with the correct port on your machine. E.g., if you&#039;re on windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. On a mac,  type &#039;ls -lh /dev/tty.usbmodem*&#039; in a terminal. &lt;br /&gt;
&lt;br /&gt;
If you are using PsychoPy, first make sure the pyserial package is installed (e.g., pip install pyserial). Then create two code blocks:&lt;br /&gt;
&lt;br /&gt;
 # Insert a &#039;Begin Experiment&#039; code block to initialize (e.g., as part of your instructions)&lt;br /&gt;
 import serial&lt;br /&gt;
 import time&lt;br /&gt;
 device = &#039;/dev/ttyACM1&#039;  # NOTE: replace with your device identifier! On windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. &lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(device, 115200, timeout=1)&lt;br /&gt;
         time.sleep(0.1)&lt;br /&gt;
         ser.write(&#039;[t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         pass&lt;br /&gt;
&lt;br /&gt;
 # Insert a &amp;quot;Begin Routine&amp;quot; code block whenever you want to send a trigger:&lt;br /&gt;
 send_trigger()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternate example from Christina Chung: &lt;br /&gt;
 #################################################&lt;br /&gt;
 ### import modules&lt;br /&gt;
 import serial&lt;br /&gt;
 import time &lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 ### Set SCANNER_TRIGGER_NEEDED to False to bypass program abortion when scanner exception is thrown&lt;br /&gt;
 SCANNER_TRIGGER_NEEDED = False&lt;br /&gt;
 DEVICE_ID = &#039;com3&#039;&lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(DEVICE_ID, 57600, timeout=1)&lt;br /&gt;
         time.sleep(2)    ### wait for 2 sec to ensure scanner is ready; CNI wiki default 0.1&lt;br /&gt;
         ser.write(&#039;[t][t][t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         if not SCANNER_TRIGGER_NEEDED:&lt;br /&gt;
             pass&lt;br /&gt;
         else:&lt;br /&gt;
             core.quit()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The construction of our serial trigger device is described on the [[CNI widgets]] page.&lt;br /&gt;
&lt;br /&gt;
= Capturing Scan Timing Pulses =&lt;br /&gt;
Some researchers want to know the precise time when each slice or each volume is acquired. The scanner produces timing pulses that can be used to record this information. Additionally, a pulse sent by the scanner at the beginning of the scan can be used to trigger the start of an experimental task (reversing the direction of triggering discussed above). At the CNI, we have two methods of receiving these timing pulses. One method uses the USB-to-Serial trigger device and the other uses the fORP response box system. These two methods are described in more detail below.&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial timing pulses ==&lt;br /&gt;
The emulated serial port device [[#USB-to-Serial Port Trigger|described above]] can also be used to receive timing pulses from the scanner. To enable this mode, send a &amp;quot;[p]&amp;quot; command. You will then receive a &#039;p&#039; character every time a timing pulse is detected. The temporal accuracy of these pulses should be about 1 ms. These &amp;quot;scope trigger&amp;quot; pulses come at the beginning of every slice or the beginning of every volume, depending on how the PSD is configured. For the cni_epi and spiral PSDs, under the &amp;quot;Advanced&amp;quot; tab, you can change the &amp;quot;scope trigger&amp;quot; CV to send pulses for every slice or just for the first slice of each volume. To capture these trigger pulses, you can use this [[saveTriggers.py|python script]].&lt;br /&gt;
&lt;br /&gt;
== Timing pulses as keypresses via fORP ==&lt;br /&gt;
To use the fORP response box system to receive timing pulses from the scanner, set up the system as described in the &#039;Response Box&#039; section above. Note that timing pulses will be received via the same USB connection as subjects&#039; responses, and that no additional USB cables need be plugged into your testing computer. If you have selected a numeric mapping between button presses and keys, the timing pulses sent to your testing laptop will be in the form of a &#039;5&#039;. (Note that use of the 5-button diamond-shaped response box will include the numbers 1-4 and 6, and thus will not include the number 5). Use caution when editing experimental scripts while using this method--if your script is open while the scanner sends pulses, a long series of 5&#039;s will be inserted into your script!&lt;br /&gt;
&lt;br /&gt;
= General information =&lt;br /&gt;
&lt;br /&gt;
==The magnetic field==&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:mr750_gauss_lines_top.png|Gauss-lines for a generic install (top view).&lt;br /&gt;
Image:mr750_gauss_lines_side.png|Gauss-lines for a generic install (side view).&lt;br /&gt;
Image:mr750_gauss_lines_front.png|Gauss-lines for a generic install (front view).&lt;br /&gt;
Image:CNI_MR_fieldlines.png|Sketch of gauss-lines for our particular installation.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
When positioning equipment in the scan room, it&#039;s useful to be aware of the magnetic field lines. All equipment in the CNI scan room is MR-safe, but not all equipment functions properly in very high-field regions. The diagrams show the estimated field lines in the MR suite area.&lt;br /&gt;
&lt;br /&gt;
==Additional/Legacy hardware information==&lt;br /&gt;
See the [[Hardware configuration]] page for some additional and legacy hardware information.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59424</id>
		<title>MR Hardware</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59424"/>
		<updated>2026-03-18T20:18:31Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Subject video */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= MR Scanner =&lt;br /&gt;
The MR scanner is in room 065 of the CNI suite in Building 420. It has its [[MR Scanner|own wiki page]].&lt;br /&gt;
&lt;br /&gt;
= Peripheral Device Rack (Laima Box) =&lt;br /&gt;
[[File:LB_Overview_Annotate.jpg|thumb|Overview of Laima Box]]&lt;br /&gt;
As you may guess from the title, the Laima Box came into being on the urging of Laima to find a solution to provide a stable and flexible interface to all the display devices, scanner signals, and other peripheral devices that are commonly used during studies. &lt;br /&gt;
&lt;br /&gt;
From the top rack to the bottom, the devices are (as marked in the photo): &lt;br /&gt;
* Small Monitor (Output 3 on HDMI Matrix, typically used for Eyelink display) and Eyelink keyboard + mouse&lt;br /&gt;
* Hyperion Projector Consoles (left: rear projector, right: side projector); Projector Switch for switching between the two projectors&lt;br /&gt;
* fORP Optical Interface; Serial Trigger Box; Video Flipper ([https://halltechav.com/product/sc-hd-2b/ Hall Research video scaler SC-HD-2B])&lt;br /&gt;
* Main Power to the rack&lt;br /&gt;
* Remote Power Switches for equipments in the magnet room: Eyelink camera, Webcam, DC shim amplifier; Audio Inputs for Avotec channel A &amp;amp; B and OptoAcoustics&lt;br /&gt;
* HDMI Matrix (see detailed Input-Output schematics [[#HDMI Matrix Switch|below]])&lt;br /&gt;
* fORP USB connection; Serial-to-USB connection; Scanner trigger co-ax connections; Video Inputs (Input 4 &amp;amp; 5 on HDMI Matrix)&lt;br /&gt;
&lt;br /&gt;
= Stimulus Presentation =&lt;br /&gt;
&lt;br /&gt;
==Visual System ==&lt;br /&gt;
The CNI offers several display options, depending on your visual stimulus needs. All use a digital interface (DVID or HDMI) and can be connected by selecting the appropriate options on the HDMI matrix switch. The mirror on the Nova 32-channel coil is a double mirror design (see [[32-channel_double_mirror]]), and that on the GE 64-channel coil is a single mirror design. &lt;br /&gt;
&lt;br /&gt;
=== 3D LCD display ===&lt;br /&gt;
We have a 49&amp;quot; 4K 3D LCD display from Resonance Technology. It is placed at the far end of the scanner room behind the scanner&#039;s rear pedestal. Its specs and field of view presented to the scan subjects are as follows: &lt;br /&gt;
 * 640x480@60Hz up to 4096x2160@50Hz resolution&lt;br /&gt;
 * 1000:1 contrast ratio&lt;br /&gt;
 * screen size: 107.2cm high x 60.3cm wide &lt;br /&gt;
 * visual distance from Nova coil: 267cm from mirror2, 6cm mirror2 to mirror1, 15cm from eye to mirror1 = 288cm&lt;br /&gt;
 * visual distance from NFL coil: 263cm from mirror1, 13cm from eye to mirror1 = 276cm &lt;br /&gt;
&lt;br /&gt;
To see 3D effects, subjects will need to wear passive polarized lenses. The screen can, of course, present non-3D stimuli too. &lt;br /&gt;
&lt;br /&gt;
As described in our Slack [https://stanford-cni.slack.com/archives/C011V1M2FRN/p1639611006023100 channel], the TV monitor has varying latency depending on the mode it is in.  We conducted tests using a 1920x1080p@60Hz signal comparing the mirrored display on a laptop while simultaneously viewing the display on the scan room monitor.  By capturing these displays simultaneously with a high-speed video acquisition we were able to calibrate the latency between the laptop and scan room monitor display.  Assuming the laptop display latency is 0, when in General mode the monitor processing creates about 133ms (8 video frames) of latency, as compared to Game mode where the latency is only 33ms or 2 frames. In order to switch modes, the remote control must be used inside the scan room but care must be taken as the batteries are slightly ferromagnetic so be sure to hold on the remote firmly and keep it as far from the scanner as possible.  Choose Options-&amp;gt;Scene Select-&amp;gt;Game in order to select Game mode.  It should be in this mode by default -- we ask any users that switch the monitor mode to please return to Game mode after their experiment. &lt;br /&gt;
&lt;br /&gt;
=== DLP Projector ===&lt;br /&gt;
We also have an MR-compatible rear-projection DLP projector ([https://pstnet.com/products/hyperion/ Hyperion 2-120 Projector]). The new Hyperion 2-120 Control Room Console features an LCD touchscreen to power on/off the projector, mirror the image, show the projector status, and display video input resolution, refresh rate, and synchronization status. This projector can be used by placing the large mirror on the back of the scanner bed in front of the LCD display. You also need to place the rear-projection screen on the head coil. Set-up of this system is a bit more involved than the LCD display, but it offers a much brighter display and a larger field of view. If you need that, let us know and we&#039;ll show you how to set up the projector system.&lt;br /&gt;
&lt;br /&gt;
Here are the specs of the projector:&lt;br /&gt;
 * 1920x1080&lt;br /&gt;
 * 120Hz or 60Hz frame rate&lt;br /&gt;
 * 16:9 and 16:10 widescreen formats (standard 4:3 available)&lt;br /&gt;
 * brighter and larger field of view than the LCD displays&lt;br /&gt;
&lt;br /&gt;
If you try the projector (via HDMI) and nothing happens, you can try cycling power to the [[#The Laima Box|Laima Box]. If this doesn’t work, troubleshoot the projector as you normally would (check the input cable on the projector is connected and cycle inputs etc).&lt;br /&gt;
&lt;br /&gt;
=== HDMI Matrix Switch ===&lt;br /&gt;
[[File:HDMI_Switch_Schematic.jpg|thumb|HDMI switch schematic.]]&lt;br /&gt;
[[File:LB_HDMI_Switch.jpg|thumb|HDMI switch in Laima Box.]]&lt;br /&gt;
We use an 8x8 HDMI Matrix Switch to distribute video signals to all the various displays.  This is a [https://keydigital.org/category/4k-18g-hdmi-matrix-switchers/KD-MS8x8G Key Digital KD-MS8x8G] switch capable of connecting any of 8 input HDMI inputs to any/all of 8 HDMI outputs.  The switch is capable of handling 4K HDCP2.2 video signals.  The [[Media:HDMI_Switch_Schematic.jpg|schematic]] of the switch connections are shown here with all 8 inputs and outputs in use. In order to make a connection to a particular output display, you choose the particular input under the labeled output row of 8 LEDs.  This is done by pressing the button under the labeled output (see HDMI Matrix switch [[Media:LB_HDMI_Switch.jpg|image]]) in order to progress left-to-right through the various inputs.  Unfortunately, the blue LEDs on this switch that show what input is currently connected have been burning out, so it&#039;s sometimes necessary to count your button presses from a visible LED to know what input you are on. &lt;br /&gt;
&lt;br /&gt;
The default output display for each input is nominally the same number as the input.  As you&#039;ll note, we have the GE Host computer and GE Table Driver on inputs 1 &amp;amp; 2 -- this is so we can send the GE Host Display to any other display connected to the HDMI matrix switch, or use the GE Table Monitor to display other output -- such as the Eyelink computer output when adjusting the Eyelink camera at the front of the scanner. &lt;br /&gt;
&lt;br /&gt;
The HDMI matrix switch allows for fairly elaborate configuration as described in the [https://www.keydigital.org/web/content/5839 manual] via a Key Digital PC application that is available on the CNI PC laptop when connected to the internal private ethernet network. &lt;br /&gt;
&lt;br /&gt;
Troubleshooting: The HDMI matrix switch is generally fairly stable but if you&#039;re having odd behavior a good first step is to cycle the main power to the Laima Box -- this will reset the HDMI matrix switch.&lt;br /&gt;
&lt;br /&gt;
=== MRI Compatible Glasses and Lensometer ===&lt;br /&gt;
[[File:mri-glasses.jpg|thumb|mri frames and lenses]]&lt;br /&gt;
For participants who wear glasses, CNI has a set of interchangeable lenses that are used with an MRI compatible plastic frame. The frame and lenses are located in the open shelving above and to the left of where the screening forms are located. We have lenses for both near-sighted (-0.5 to -8.0 in .5 step increments) and far-sighted (+.5 to +8.0 in .5 step increments) vision corrections. The lenses are made of hard polycarbonate plastic and are not breakable. The easiest way to install the lenses into the frame is insert the lens from the back first into the edge by the ear piece and then snap in the lens by the nose. If the participant does not know his/her glasses prescription we have a lensometer that can determine that. Basic instructions for use of the lensometer are in the next section. There is also an eye chart posted on the door to the equipment room where participants can test their vision with the MRI glasses. Have the participant stand right in front of the lensometer (about 10 feet from the chart) to use the chart.&lt;br /&gt;
[[File:eye-chart.jpg|thumb|eye chart]]&lt;br /&gt;
&lt;br /&gt;
To determine glass prescription strengths for MRI participants CNI has the AL200 Auto Lensometer. Is is located in the CNI control room area. There is both a User&#039;s guide and a quick reference sheet next to the lensometer. The lensometer is currently set up to read a single vision lens. There are settings available to read either bifocal or progressive lenses, but they are not typically used as only the distance portion of the lens needs to be measured.&lt;br /&gt;
&lt;br /&gt;
Here is a basic how-to from the Reichert user&#039;s guide.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:Lensometer-parts.png|The key parts of the lensometer.&lt;br /&gt;
Image:Lensometer-back.png|Turn on the lensometer using the switch on the back panel. The AL200 will do a calibration check; do not place any lenses or obstructions in front of the aperture during calibration.&lt;br /&gt;
Image:Step2.png|The AL200’s default measurement mode is Single Vision, Automatic. This mode is used for fast, easy measurement of a pair of single vision spectacle lenses. You&#039;re now ready to measure the right lens, indicated by the &#039;R&#039; on the upper left side of the screen.&lt;br /&gt;
Image:Glass-placement1.jpg|Place the spectacles on the lens table and secure the right lens with the lens holder. Using the table base levers and your hand, move the lens until the large cross is positioned directly over the small cross in the middle of the centering target.&lt;br /&gt;
Image:Glass-placement2.jpg|If you insert a progressive lens in single vision mode, the progressive icon may flash to indicate that the mode should be changed. NOTE: Place the glasses so that lenses are toward the front and the ear pieces toward the back.&lt;br /&gt;
Image:Step3.png|When optical center has been located, the AL200 tone will sound and the measurements will be locked on the screen. Upon removal of the lens the AL200 will automatically switch to the left lens, indicated by the highlighted L on the upper right side of the screen. &lt;br /&gt;
Image:Step4.png|Repeat the measurement process for the left lens. All measurements will remain on the screen until the operator chooses to print or clear the data.&lt;br /&gt;
Image:Lensometer-screen.png|The number that appears in the Sphere location is the correction number that you will use in choosing the lenses for the MRI glasses.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Auditory System ==&lt;br /&gt;
&lt;br /&gt;
=== Avotec System ===&lt;br /&gt;
[[File:Avotec2.jpg|thumb|Avotec Console]]&lt;br /&gt;
[[File:Avotec-headsets.png|thumb|Avotec Headsets]]&lt;br /&gt;
The [https://avotecinc.com/pages/silent-scan Avotec Silent Scan system] provides a maximum of 30dB with the [https://avotecinc.com/products/full-coverage-headset-3000-series Full Coverage] and [https://avotecinc.com/products/conformal-headset-3000-series Conformal] headsets. The conformal headset will fit in any coil and any patient. The system also has a [https://avotecinc.com/products/non-headset-3000-series Flat Headset] with a slim profile (0.5 inch pad) which offers great flexibility and can fit into tight coils. The system provides clear two-way communication with built-in patient-activated alarm. The console and equalizer provide high-fidelity, frequency-balanced sound for a variety of audio inputs. The console also has a built-in radio. &lt;br /&gt;
&lt;br /&gt;
This system is best to use if you need to deliver high quality audio to the subjects, or need to communicate with the subjects frequently during the scans.&lt;br /&gt;
&lt;br /&gt;
We recommend using the Avotec + Flat Headset for most studies as it would fit into the Nova 32ch coil for most participants and is more robust in operation (in comparison to the Conformal headset and the OptoAcoustics system). If the Flat headset does not fit into the head coil, you can also use the Conformal headset. Note that when the participant is wearing the Conformal headset and lying on the patient table, the tube connecting to the headset can sometimes slip and pull the earplugs out of the participant&#039;s ears; if that happens you can tape down the tube to the patient table to prevent it from slipping. For audio input, use Avotec Channel A and B for the Conformal headset and Flat headset respectively.&lt;br /&gt;
&lt;br /&gt;
=== OptoACTIVE Headphone System === &lt;br /&gt;
[[File:OptoACTIVE.jpg|thumb|OptoACTIVE Headphone System control console]]&lt;br /&gt;
The OptoACTIVE Headphone System provides active noise cancellation (ANC) during MR scans. The slim profile headphones are designed to fit into the head coils for most human subjects. Its built-in optical microphones monitor the sound level at the subject&#039;s ears, which enable automatic self-calibration, sound pressure level monitoring and real-time in-ear stereo sound recording. The OptoACTIVE headphones also provide very good airseal around the subject&#039;s ears which results in excellent passive noise reduction as well. In combination with the passive noise reduction and active noise cancellation, the headphone can reach a 60 dB attenuation (95%) of the main EPI resonance noise. It also features the FOMRI-III noise cancelling microphone for the subject, which enables quiet two-way communication during scans. &lt;br /&gt;
&lt;br /&gt;
The control console has an LCD touch-screen and pushbuttons that allow the operator to control initial and ongoing calibrations, real-time active noise cancelling, channel level volume and recording, FORMRI microphone communications, etc. It displays the noise level, stimuli levels and spectrum analysis in real time.&lt;br /&gt;
&lt;br /&gt;
The system is ideal for the study of: sleeping disorders, autism, children suffering from claustrophobia, auditory fMRI and other research areas that were previously impractical or unattainable due to scanner noise.&lt;br /&gt;
&lt;br /&gt;
For step-by-step operation instructions, please see this [[Media:Optoacoustics_How-To.pdf | How-To Guide]], clearly summarized by Prof. Cameron Ellis and Emily Chen.&lt;br /&gt;
&lt;br /&gt;
== CNI Laptops ==&lt;br /&gt;
The CNI has one MacBook and one Windows PC for users to use during their experiments. The MacBook is running OS 10.12 and has MATLAB R2014b with PsychToolbox and PsychoPy 3 installed. The Windows PC is running Windows 11 and has E-Prime 3 installed (CNI also has a license for E-Prime 3). You could also checkout out [[Stimulus|some (old) notes]] shared by previous CNI users on how to set up experiments with these toolboxes.&lt;br /&gt;
&lt;br /&gt;
= Subject measurement =&lt;br /&gt;
&lt;br /&gt;
== fORP Response Box ==&lt;br /&gt;
We have a modular response box system ([http://www.curdes.com/index.php/mainforp/interfaces/fiu-933.html fORP 932]) from [http://www.curdes.com/ Current Designs]. With ths system, you can swap out various response devices. The output from any of these devices is available from the fORP box via USB. The device emulates a USB keyboard. We have confirmed that the fORP 932 USB interface is polled at 1kHz. The device itself has sub-millisecond time resolution (see the [http://www.curdes.com/index.php/support/faqs.html fORP FAQ]). We estimate that this system provides response time measurements with a precision and reliability of about one millisecond. &lt;br /&gt;
&lt;br /&gt;
Note that the fORP can send keypresses every time the scanner acquires a slice (or a volume, if the &amp;quot;scope trigger (User CV3)&amp;quot; is set to &amp;quot;1&amp;quot; in the EPI scans). If you want to receive these keypresses, configure the fORP by selecting a configuration that does *not* say &amp;quot;no 5&amp;quot; (if you are receiving numbers) or &amp;quot;no t&amp;quot; (if you are receiving letters). If you *do not* want to get these pulses (most users actually do not want these), then select a configuration that includes &amp;quot;no 5&amp;quot; or &amp;quot;no t&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The response devices that we currently have are:&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-scrl-1.html scroll-wheel device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-2x4-c.html 2X4 bimanual button boxes]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x4-cyl-2.html  4-buttonstick-style response device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x5-d.html 5-button diamond button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/custom.html 5-button curved button box]&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-trk-2.html trackball device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-1x5-n4.html PYKA 5 button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/variabledevices/hhsc-joy-5.html joystick]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a need for a different response device, just let us know.&lt;br /&gt;
&lt;br /&gt;
To use a response device at the CNI:&lt;br /&gt;
# Plug the desired device into the black fiber-optic connector on the right side of the front of the magnet bore&lt;br /&gt;
# Locate the silver box (labeled fORP) on the peripheral device rack.&lt;br /&gt;
# Push in the knob on the right front side of the fORP box to enter menu mode. For the following instructions, you will turn the knob to scroll through the menu choices, and then push in on the knob to select your choice. (See [https://wiki.curdes.com/bin/view/CdiDocs/932QuickSetup this guide] for more details on using the fORP 932.)&lt;br /&gt;
# Turn the knob until the word &amp;quot;yes&amp;quot; is underlined then push the knob to select &amp;quot;yes&amp;quot;&lt;br /&gt;
# In the &amp;quot;mode select&amp;quot; menu that appears next, you can select &amp;quot;manual config&amp;quot;. We recommend, however, that you pick the AUTOCONFIGURE choice which tells the interface to determine as much as it can about the connected handheld device and the cabling to the host computer. This should simplify the choices that need to be made by you. If you have used the AUTOCONFIGURE option you can skip steps 6 and 7 below and proceed directly to step 8.&lt;br /&gt;
# In the response device menu, turn the knob to scroll through the choices until you find the device that you connected in step 1 (examples include):&lt;br /&gt;
## 4-button cylinder: select HHSC-cyl-5&lt;br /&gt;
## 5-button diamond: select HHSC-1x5-D&lt;br /&gt;
## 5-button curved: select HHSC-1x5-C&lt;br /&gt;
## bi-manual 4-button keypads: select HHSC-2x4c&lt;br /&gt;
## scrollwheel: select HHSC-SCRL1&lt;br /&gt;
## trackball: select HHSC-TRK-2 (for mouse emulation)&lt;br /&gt;
# Select USB in the next display by pushing in the knob.&lt;br /&gt;
# Select the desired output mode. For the cylinder or keypads, this determines the mapping between the buttons and the keypress that is generated. E.g., HID-NAR-12345 will map the 4 cylinder buttons to the four number keys, 1-4, and send a &#039;5&#039; for each scope trigger pulse received by the scanner (if you don&#039;t want these pulses, select the &#039;no 5&#039; mode, as noted above). NAR means &amp;quot;no auto release&amp;quot;. In NAR mode, the keypress is maintained as long as the button is pressed. In the non-NAR mode, a brief keypress is generated, even if the button is held down. We find that NAR mode works better with PsychToolbox. In non-NAR mode, it can miss the very brief keypresses produced by auto release. &lt;br /&gt;
# Setup is now complete.&lt;br /&gt;
&lt;br /&gt;
For more technical details about the fORP, see the [[fORP|fORP wiki page]].&lt;br /&gt;
&lt;br /&gt;
== Eye Tracker ==&lt;br /&gt;
[[File:cni_eye_tracker_camera.jpg|thumb|Eye tracker camera.]]&lt;br /&gt;
[[File:cni_eye_tracker_ir.jpg|thumb|Eye tracker IR illuminator.]]&lt;br /&gt;
&lt;br /&gt;
We have an [https://www.sr-research.com/eyelink-1000-plus/ SR Research EyeLink 1000 Plus] eye tracker with remote optics installed at the CNI. It has a frame rate of up to 2000Hz, up to 1/2 degree accuracy, and is fairly easy to set up and use. We found that the standard IR light source from SR Research did not adequately focus the light onto the subject&#039;s eye, so we use the [https://mrc-systems.de/en/products/mr-compatible-cameras#light-sources LED light source] from MRC Systems. &lt;br /&gt;
&lt;br /&gt;
The camera is mounted on a wood stand placed next to the patient bed at the back of the bore. The camera position and focus should not need to be adjusted if your subject is positioned with their eyes close to isocenter. However, if you have a prescription that is centered far from iso-center, you may need to adjust the focus a bit. To do that, you can use the HDMI matrix to show the eye tracker video on the bore monitor so that you can adjust the camera while seeing what you are doing.&lt;br /&gt;
&lt;br /&gt;
The LED light source is mounted on a blue loc-line stalk that attaches to the head coil and is usually left unattached and hanging on the side of the scanner next to the response devices; you will need to mount it to the head coil using the blue loc-line pliers that you can find under the shelf with all the padding. Once mounted, make sure the light source is directed toward the subject&#039;s eye by aiming it through the gap between the two mirrors.&lt;br /&gt;
&lt;br /&gt;
The eye tracker host computer is mounted in the equipment room. However, the display, keyboard, and mouse for that computer are to the right of the GE console. You can connect to the host computer by a direct TCP connection through the ethernet cable located in the cable bundle next to the GE console. This cable is, not surprisingly, labeled &amp;quot;eye tracker&amp;quot;. If you use psych toolbox for stimulus presentation, you can use the [http://psychtoolbox.org/docs/EyelinkToolbox EyeLink Toolbox]. For those who use python (e.g., [http://www.psychopy.org/ Psychopy]), try the [http://www.psychopy.org/api/hardware/pylink.html PyLink module]. If you use E-Prime, check out the [https://www.sr-research.com/e-prime-extensions/ E-Prime integration info] on the SR Research support site. In any case, the IP address of the Eyelink is on our private network and thus is NOT the default IP, so you need to explicitly set it to 10.0.3.2. This private network has a DHCP server, so your stimulus computer should automatically get assigned an IP address on the same subnet. Please don&#039;t hard-code an IP address for your stimulus computer! Note that older versions of psychtoolbox don&#039;t allow you to specify the IP address, so be sure to get the latest Eyelink mex file from [https://github.com/kleinerm/Psychtoolbox-3/commit/aa04b821e975e0e61978377bb05aa1e216f3382e github].&lt;br /&gt;
&lt;br /&gt;
The data recorded by the EyeLink software is saved in the EyeLink partition (E:\). To transfer the data to your own storage device, you can reboot the EyeLink computer into Windows and connect your own USB drive. Afterwards you can reboot the computer again and get back into the EyeLink system. &lt;br /&gt;
&lt;br /&gt;
For a tutorial and troubleshooting information on the Eyelink system, see the [[EyelinkTracker]] page.&lt;br /&gt;
&lt;br /&gt;
==Physio monitoring==&lt;br /&gt;
[[File:ppg_resp.jpg|thumb|Photo plethesmograph (PPG) and respiration belt.]]&lt;br /&gt;
[[File:Tools_gating.png|thumb|Tools Gating]]&lt;br /&gt;
[[File:Physio_waveforms.png|thumb|Physio Waveforms on Console]]&lt;br /&gt;
[[File:physmon.png|thumb|[[CNI_widgets|CNI PPG pulse detector device]].]]&lt;br /&gt;
The scanner has the standard suite of physiological measures: pulse oximetry, respiration belt, and ECG. These can be used for scan triggering. The digital data from these measurements are saved on the console and backed-up in the Flywheel database. These data are also processed by the [[CNI_widgets|CNI PPG monitoring device]] and used for EEG ballisto-cardiogram artifact removal by the EGI NetStation software. (See also the [http://fmri.ucsd.edu/Howto/3T/physio.html UCSD fMRI group&#039;s site] for more information on using the GE physio files to remove physiological artifacts from fMRI data.) A recent paper is here - [https://doi.org/10.1016/j.jneumeth.2016.10.019 The PhysIO Toolbox for Modeling Physiological Noise in fMRI Data]&lt;br /&gt;
&lt;br /&gt;
===Setting Up Physio Recording===&lt;br /&gt;
&lt;br /&gt;
* Go to “Tools” - &amp;quot;Gating&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* To record respiration/movement of the abdominal wall, select “Respiratory.”&lt;br /&gt;
&lt;br /&gt;
* To record pulse/peripheral gating, select “PG.”&lt;br /&gt;
&lt;br /&gt;
* Outfit your participant with the respiratory bellows and the PG sensor&lt;br /&gt;
&lt;br /&gt;
===Respiratory Bellows===&lt;br /&gt;
&lt;br /&gt;
The respiratory bellows goes around your participant’s diaphragm or abdomen. You will get the best signal in the area where the participant’s breathing motion is most visible when they are lying down. Use the Velcro to adjust the respiratory bellows; it should be snug and not move around much, but stretched as little as possible and not too tight. The bellows should expand and contract approximately 0.5 to 1 inches with the participant’s breathing. Do not place any padding over the respiratory bellows. You should be able to see the recording on the small screen on the scanner. Note that it’ll take about one minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the bellows if necessary. &lt;br /&gt;
&lt;br /&gt;
===Pulse/Peripheral Gating (PPG) ===&lt;br /&gt;
&lt;br /&gt;
The participant’s pulse is monitored by a photopulse sensor that detects blood oxygen levels (pulse oximetry) in the vascular bed of the participant’s finger/thumb or toe. During the measurement, the participant’s hand or foot should remain cool and dry. We recommend that you attach the sensor to the participant’s toe, especially if you are going to ask your participant to use one of the button boxes because hand movements will create noise in your PG signal. &lt;br /&gt;
&lt;br /&gt;
* Recording from the toe: Attach the sensor to the fastener for the toe (with the Velcro). Place the sensor on the vascular bed of the participant’s toe. To keep the sensor in place, tape it and the fastener to the participant’s foot using medical tape. It is also a good idea to tape the cable to the knee pillow or the participant’s leg to reduce the pull on the sensor. &lt;br /&gt;
* Recording from the thumb/finger: Place the sensor on the participant’s finger or thumb. It is a good idea to avoid placing the sensor on the joint (the signal will be much noisier if you place the sensor on the joint). To keep the sensor in place it helps to tape it to the participant’s hand with some medical tape.&lt;br /&gt;
&lt;br /&gt;
You should be able to see the recording on the small screen on the scanner. Note that it’ll take up to a minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the sensor if necessary. &lt;br /&gt;
&lt;br /&gt;
Note: When you are done, please clean the sensor with alcohol wipes as it directly touches the participant’s skin.&lt;br /&gt;
&lt;br /&gt;
===Recording Physio===&lt;br /&gt;
&lt;br /&gt;
The default method for recording the physio is the CV control method (set CV phys_record_flag to 1). With default setting of CV control method, a recording of maximum length (25 minute) will require approximately 3 seconds to save to files to the hard disk after the end of the scan. You need to make sure that the next phys-recording scan starts after the previous recording finishes saving data to files. If the next phys-recording scan starts before the previous recording finishes, the new recording request will be ignored. &lt;br /&gt;
&lt;br /&gt;
===Parsing the physio files===&lt;br /&gt;
&lt;br /&gt;
The physio data from the scanner can include three types of measurements: pulse, respiration, and electrocardiogram (ECG).  The pulse data come from the PPG, the respiration data from the breathing-belt, and the ECG from the specialized electrodes attached to the chest. &lt;br /&gt;
&lt;br /&gt;
The data recorded from these devices are written out into simple text-files. There are three files for each type of measurement.  The file names start with PPG, RESP and ECG for the three types of measurements.  The files have raw data (&#039;Data&#039;), and the times of the local peaks (&#039;Trig&#039;) (and sometimes an empty &#039;PACTrig&#039;). &lt;br /&gt;
&lt;br /&gt;
* The temporal sampling rates differ between the three types of measurements&lt;br /&gt;
** ECG: 1ms, &lt;br /&gt;
** Pulse/Peripheral Gating: 10ms, &lt;br /&gt;
** Respiration: 40ms.&lt;br /&gt;
* The timeseries data&lt;br /&gt;
** start 30 seconds of baseline from before the start scan button was pressed&lt;br /&gt;
** have a variable duration between start scan button press and the actual start (pre-scan delays, external trigger delays, etc.)&lt;br /&gt;
** stop at the same time as the scan&lt;br /&gt;
&lt;br /&gt;
To reiterate-- the physio data stored in the physio files starts 30 seconds &#039;&#039;&#039;before&#039;&#039;&#039; you press the &#039;Scan&#039; button (yes, it&#039;s psychic ;), which is almost always more than 30 seconds before scanning actually starts. It could be substantially longer if you do external triggering. In that case, you&#039;ll get some extra physio data recorded during the time between when you press start scan and you send your trigger. But the recording does stop when the scan stops. So, to synchronize physio and scan data, you can take the end of the physio data and count backward the number of data points to keep using the duration of MR acquisiton and sampling rate of the physio data.&lt;br /&gt;
&lt;br /&gt;
The physio files are zipped and uploaded to Flywheel. A simple Flywheel gear &amp;quot;CNI GE Physio File Converter&amp;quot; is avalible to help extract, visualize, and summarize the data.&lt;br /&gt;
&lt;br /&gt;
===Biopac measures===&lt;br /&gt;
For measuring skin conductance and EMG, we have a Biopac with the [http://www.biopac.com/product/eda-electrodermal-activity-amplifier-for-mri electro-dermal activity amplifier] and [http://www.biopac.com/product/electromyogram-amplifier EMG amplifier] modules. The data from the Biopac are digitized with a [http://labjack.com/ue9 LabJack UE9] DAQ device and are available directly through a TCP stream (see [http://labjack.com/support/ue9/c-native-tcp-example the UE9 code samples]) or via our linux box voxel2, which can be used to trigger data acquisition that is synchronized with the scanner. The command to run the recording script is &amp;quot;testfix_labjack.py /data/biopac/[your experiment folder]/[run id] [recording duration]&amp;quot;. The recording duration is in seconds. The output is a csv file at /data/biopac/[your experiment folder]/[run id]_[timestamp].csv. The data file records the voltage and raw ADC values. The skin conductance is stored in the second (voltage) and third (raw ADC) columns. You probably want the second column (with numbers like &amp;quot;1.60230098&amp;quot;). The skin conductance amplifier gain is set to five microsiemens per volt. So, if you multiply the numbers in the second column by 5, you will have the skin conductance in microsiemens. The EMG values are in the fourth (voltage) and fifth (raw ADC) columns. The EMG amplifier gain is set to 2000, so dividing the values in the fourth column by 2 will give you the EMG voltage in millivolts.&lt;br /&gt;
&lt;br /&gt;
== Real-time motion tracking ==&lt;br /&gt;
[[File:FIRMM.jpg|thumb|FIRMM tablet]]&lt;br /&gt;
For subject motion tracking, we have a [https://turingmedical.com/firmm/ FIRMM tablet] that can access the scanner&#039;s image database and provide feedback on the subject&#039;s head motion in real-time. FIRMM will automatically plot the motion trace and quality metrics when scanning begins. You can also set protocol-specific parameters like the motion threshold and data quality goals required for your study. It helps monitor the quality metrics in real time so you can adjust your approach. This is mostly useful for fMRI studies. It is also possible to configure the video output so that you can send the real-time motion feedback to the subject via visual display. &lt;br /&gt;
&lt;br /&gt;
The FIRMM tablet is configured to be connected to the scanner by default. If it shows &amp;quot;FIRMM DISCONNECTED&amp;quot;, then we need to check if the firmm_transfer process is running on the scanner, sometimes restarting the process or restarting the FIRMM tablet is needed.&lt;br /&gt;
&lt;br /&gt;
==Subject video==&lt;br /&gt;
You can monitor and record the subject&#039;s face or body using the [https://mrc-systems.de/en/products/mr-compatible-cameras MRI compatible video camera from MRC Systems]. The camera is always on and streaming video to the linux box next to the scan console. An analog video signal is also sent to the large-screen tv in the control room (use the &#039;A/v input&#039;). To use the camera, you can attach it to the head coil using the loc-line connectors. When not in use, the camera should be hung on the side of the scanner along with the response devices. To see the video feed, run the following from the command line: &amp;quot;ffplay -f video4linux2 /dev/video0&amp;quot;. To record the video feed, you can use our video recording scripts. From the command line run &amp;quot;recordSubject 310&amp;quot;, this will record subject video for 5 minutes and 10 seconds; to synchronize the recording to the start of the scan, run &amp;quot;recordSubjectTrigger 310&amp;quot; instead. The data files are saved to the &amp;quot;video&amp;quot; directory. &lt;br /&gt;
&lt;br /&gt;
Troubleshoot: if you get an error &amp;quot;/dev/device0: busy or resource unavailable&amp;quot;, then run &amp;quot;fuser /dev/device0&amp;quot; and you&#039;ll get the PID of the process that is currently occupying the video device. Then run &amp;quot;kill -9 [PID]&amp;quot;. This should kill the process and you should be able to use the video camera again. Occasionally the camera feed fails and the recorded video files are empty. If this happens, check the video device setting with &amp;quot;v4l2-ctl -d /dev/video0 --all&amp;quot; and look for the &amp;quot;Video Standard&amp;quot; section. If it&#039;s something like &amp;quot;Video Standard = 0x000000ff PAL-B/B1/G/H/I/D/D1/K&amp;quot;, then you&#039;ll need to change it to NTSC standard with &amp;quot;v4l2-ctl -d /dev/video0 -s ntsc&amp;quot;. The returned message should be &amp;quot;Standard set to 0000b000 NTSC-M/M-JP/M-KR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
= Scan Triggers =&lt;br /&gt;
[[File:cni_epi_psd_usercvs_ss.png|thumb|UserCVs under the &#039;Advanced&#039; tab for the cni_epi PSD.]]&lt;br /&gt;
The moment when the scanner starts acquiring image data can be controlled from the computer you use to control your experiment. To do this you need to be able to program your computer to send a pulse to the scanner at the planned moment.&lt;br /&gt;
&lt;br /&gt;
At the CNI, we provide a [[CNI widgets|USB-to-Serial port device]], which works well for E-Prime and Presentation. The notes below show how to set up the UserCV so that the scanner listens for the trigger, and how to send a trigger pulse using the USB-to-Serial device.&lt;br /&gt;
&lt;br /&gt;
== Protocol configuration ==&lt;br /&gt;
For BOLD EPI, be sure to use the cni_epi PSD to get the triggering options described here. The same options are also available for the spiral PSD. Under the &#039;Advanced&#039; tab, make sure the &amp;quot;start scan trigger&amp;quot; CV is set to &#039;1&#039;, which tells it to use the external trigger. Other options include &#039;0&#039; for no trigger (scan starts as soon as the scan button is pressed), and &#039;2&#039; for cardiac gating, which will synchronize to the cardiac cycle (measured via either the PPG pulse oximeter or ECG leads).&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial Port Trigger ==&lt;br /&gt;
The CNI also has a USB-to-Serial port device set up to send scan triggers. Just connect the USB cable labeled &amp;quot;EPrime Trigger&amp;quot; to your computer. On OS-X and Linux, the device is automatically recognized as a serial port (under /dev/ttyACM? on linux or /dev/ttyUSB??? on OS-X). On Windows, the device will show up as a COM port. &lt;br /&gt;
&lt;br /&gt;
When configuring the port, note that the device is expecting communication at 57600 bps and the scanner is triggered by sending a three-character string: &amp;quot;[t]&amp;quot; (without the quotes). In E-Prime, you need to add the serial port device to your experiment and then configure it by specifying the device (you can find the COM port number in Windows Device Manager - Ports (COM&amp;amp;LPT)) and setting the baud rate to 57600. (Other settings can be left at their default values.) In your E-Prime script, add the following in-line code to send the trigger string to the port: &lt;br /&gt;
&lt;br /&gt;
 Serial.WriteString &amp;quot;[t]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To use this device from Matlab, try:&lt;br /&gt;
&lt;br /&gt;
 s = serial(&#039;/dev/ttyS0&#039;, &#039;BaudRate&#039;, 57600);&lt;br /&gt;
 fopen(s);&lt;br /&gt;
 fprintf(s, &#039;[t]&#039;);&lt;br /&gt;
 fclose(s);&lt;br /&gt;
&lt;br /&gt;
Note that you will need to replace &#039;/dev/ttyS0&#039; with the correct port on your machine. E.g., if you&#039;re on windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. On a mac,  type &#039;ls -lh /dev/tty.usbmodem*&#039; in a terminal. &lt;br /&gt;
&lt;br /&gt;
If you are using PsychoPy, first make sure the pyserial package is installed (e.g., pip install pyserial). Then create two code blocks:&lt;br /&gt;
&lt;br /&gt;
 # Insert a &#039;Begin Experiment&#039; code block to initialize (e.g., as part of your instructions)&lt;br /&gt;
 import serial&lt;br /&gt;
 import time&lt;br /&gt;
 device = &#039;/dev/ttyACM1&#039;  # NOTE: replace with your device identifier! On windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. &lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(device, 115200, timeout=1)&lt;br /&gt;
         time.sleep(0.1)&lt;br /&gt;
         ser.write(&#039;[t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         pass&lt;br /&gt;
&lt;br /&gt;
 # Insert a &amp;quot;Begin Routine&amp;quot; code block whenever you want to send a trigger:&lt;br /&gt;
 send_trigger()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternate example from Christina Chung: &lt;br /&gt;
 #################################################&lt;br /&gt;
 ### import modules&lt;br /&gt;
 import serial&lt;br /&gt;
 import time &lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 ### Set SCANNER_TRIGGER_NEEDED to False to bypass program abortion when scanner exception is thrown&lt;br /&gt;
 SCANNER_TRIGGER_NEEDED = False&lt;br /&gt;
 DEVICE_ID = &#039;com3&#039;&lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(DEVICE_ID, 57600, timeout=1)&lt;br /&gt;
         time.sleep(2)    ### wait for 2 sec to ensure scanner is ready; CNI wiki default 0.1&lt;br /&gt;
         ser.write(&#039;[t][t][t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         if not SCANNER_TRIGGER_NEEDED:&lt;br /&gt;
             pass&lt;br /&gt;
         else:&lt;br /&gt;
             core.quit()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The construction of our serial trigger device is described on the [[CNI widgets]] page.&lt;br /&gt;
&lt;br /&gt;
= Capturing Scan Timing Pulses =&lt;br /&gt;
Some researchers want to know the precise time when each slice or each volume is acquired. The scanner produces timing pulses that can be used to record this information. Additionally, a pulse sent by the scanner at the beginning of the scan can be used to trigger the start of an experimental task (reversing the direction of triggering discussed above). At the CNI, we have two methods of receiving these timing pulses. One method uses the USB-to-Serial trigger device and the other uses the fORP response box system. These two methods are described in more detail below.&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial timing pulses ==&lt;br /&gt;
The emulated serial port device [[#USB-to-Serial Port Trigger|described above]] can also be used to receive timing pulses from the scanner. To enable this mode, send a &amp;quot;[p]&amp;quot; command. You will then receive a &#039;p&#039; character every time a timing pulse is detected. The temporal accuracy of these pulses should be about 1 ms. These &amp;quot;scope trigger&amp;quot; pulses come at the beginning of every slice or the beginning of every volume, depending on how the PSD is configured. For the cni_epi and spiral PSDs, under the &amp;quot;Advanced&amp;quot; tab, you can change the &amp;quot;scope trigger&amp;quot; CV to send pulses for every slice or just for the first slice of each volume. To capture these trigger pulses, you can use this [[saveTriggers.py|python script]].&lt;br /&gt;
&lt;br /&gt;
== Timing pulses as keypresses via fORP ==&lt;br /&gt;
To use the fORP response box system to receive timing pulses from the scanner, set up the system as described in the &#039;Response Box&#039; section above. Note that timing pulses will be received via the same USB connection as subjects&#039; responses, and that no additional USB cables need be plugged into your testing computer. If you have selected a numeric mapping between button presses and keys, the timing pulses sent to your testing laptop will be in the form of a &#039;5&#039;. (Note that use of the 5-button diamond-shaped response box will include the numbers 1-4 and 6, and thus will not include the number 5). Use caution when editing experimental scripts while using this method--if your script is open while the scanner sends pulses, a long series of 5&#039;s will be inserted into your script!&lt;br /&gt;
&lt;br /&gt;
= General information =&lt;br /&gt;
&lt;br /&gt;
==The magnetic field==&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:mr750_gauss_lines_top.png|Gauss-lines for a generic install (top view).&lt;br /&gt;
Image:mr750_gauss_lines_side.png|Gauss-lines for a generic install (side view).&lt;br /&gt;
Image:mr750_gauss_lines_front.png|Gauss-lines for a generic install (front view).&lt;br /&gt;
Image:CNI_MR_fieldlines.png|Sketch of gauss-lines for our particular installation.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
When positioning equipment in the scan room, it&#039;s useful to be aware of the magnetic field lines. All equipment in the CNI scan room is MR-safe, but not all equipment functions properly in very high-field regions. The diagrams show the estimated field lines in the MR suite area.&lt;br /&gt;
&lt;br /&gt;
==Additional/Legacy hardware information==&lt;br /&gt;
See the [[Hardware configuration]] page for some additional and legacy hardware information.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59423</id>
		<title>MR Hardware</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59423"/>
		<updated>2026-03-18T20:17:03Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Eye Tracker */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= MR Scanner =&lt;br /&gt;
The MR scanner is in room 065 of the CNI suite in Building 420. It has its [[MR Scanner|own wiki page]].&lt;br /&gt;
&lt;br /&gt;
= Peripheral Device Rack (Laima Box) =&lt;br /&gt;
[[File:LB_Overview_Annotate.jpg|thumb|Overview of Laima Box]]&lt;br /&gt;
As you may guess from the title, the Laima Box came into being on the urging of Laima to find a solution to provide a stable and flexible interface to all the display devices, scanner signals, and other peripheral devices that are commonly used during studies. &lt;br /&gt;
&lt;br /&gt;
From the top rack to the bottom, the devices are (as marked in the photo): &lt;br /&gt;
* Small Monitor (Output 3 on HDMI Matrix, typically used for Eyelink display) and Eyelink keyboard + mouse&lt;br /&gt;
* Hyperion Projector Consoles (left: rear projector, right: side projector); Projector Switch for switching between the two projectors&lt;br /&gt;
* fORP Optical Interface; Serial Trigger Box; Video Flipper ([https://halltechav.com/product/sc-hd-2b/ Hall Research video scaler SC-HD-2B])&lt;br /&gt;
* Main Power to the rack&lt;br /&gt;
* Remote Power Switches for equipments in the magnet room: Eyelink camera, Webcam, DC shim amplifier; Audio Inputs for Avotec channel A &amp;amp; B and OptoAcoustics&lt;br /&gt;
* HDMI Matrix (see detailed Input-Output schematics [[#HDMI Matrix Switch|below]])&lt;br /&gt;
* fORP USB connection; Serial-to-USB connection; Scanner trigger co-ax connections; Video Inputs (Input 4 &amp;amp; 5 on HDMI Matrix)&lt;br /&gt;
&lt;br /&gt;
= Stimulus Presentation =&lt;br /&gt;
&lt;br /&gt;
==Visual System ==&lt;br /&gt;
The CNI offers several display options, depending on your visual stimulus needs. All use a digital interface (DVID or HDMI) and can be connected by selecting the appropriate options on the HDMI matrix switch. The mirror on the Nova 32-channel coil is a double mirror design (see [[32-channel_double_mirror]]), and that on the GE 64-channel coil is a single mirror design. &lt;br /&gt;
&lt;br /&gt;
=== 3D LCD display ===&lt;br /&gt;
We have a 49&amp;quot; 4K 3D LCD display from Resonance Technology. It is placed at the far end of the scanner room behind the scanner&#039;s rear pedestal. Its specs and field of view presented to the scan subjects are as follows: &lt;br /&gt;
 * 640x480@60Hz up to 4096x2160@50Hz resolution&lt;br /&gt;
 * 1000:1 contrast ratio&lt;br /&gt;
 * screen size: 107.2cm high x 60.3cm wide &lt;br /&gt;
 * visual distance from Nova coil: 267cm from mirror2, 6cm mirror2 to mirror1, 15cm from eye to mirror1 = 288cm&lt;br /&gt;
 * visual distance from NFL coil: 263cm from mirror1, 13cm from eye to mirror1 = 276cm &lt;br /&gt;
&lt;br /&gt;
To see 3D effects, subjects will need to wear passive polarized lenses. The screen can, of course, present non-3D stimuli too. &lt;br /&gt;
&lt;br /&gt;
As described in our Slack [https://stanford-cni.slack.com/archives/C011V1M2FRN/p1639611006023100 channel], the TV monitor has varying latency depending on the mode it is in.  We conducted tests using a 1920x1080p@60Hz signal comparing the mirrored display on a laptop while simultaneously viewing the display on the scan room monitor.  By capturing these displays simultaneously with a high-speed video acquisition we were able to calibrate the latency between the laptop and scan room monitor display.  Assuming the laptop display latency is 0, when in General mode the monitor processing creates about 133ms (8 video frames) of latency, as compared to Game mode where the latency is only 33ms or 2 frames. In order to switch modes, the remote control must be used inside the scan room but care must be taken as the batteries are slightly ferromagnetic so be sure to hold on the remote firmly and keep it as far from the scanner as possible.  Choose Options-&amp;gt;Scene Select-&amp;gt;Game in order to select Game mode.  It should be in this mode by default -- we ask any users that switch the monitor mode to please return to Game mode after their experiment. &lt;br /&gt;
&lt;br /&gt;
=== DLP Projector ===&lt;br /&gt;
We also have an MR-compatible rear-projection DLP projector ([https://pstnet.com/products/hyperion/ Hyperion 2-120 Projector]). The new Hyperion 2-120 Control Room Console features an LCD touchscreen to power on/off the projector, mirror the image, show the projector status, and display video input resolution, refresh rate, and synchronization status. This projector can be used by placing the large mirror on the back of the scanner bed in front of the LCD display. You also need to place the rear-projection screen on the head coil. Set-up of this system is a bit more involved than the LCD display, but it offers a much brighter display and a larger field of view. If you need that, let us know and we&#039;ll show you how to set up the projector system.&lt;br /&gt;
&lt;br /&gt;
Here are the specs of the projector:&lt;br /&gt;
 * 1920x1080&lt;br /&gt;
 * 120Hz or 60Hz frame rate&lt;br /&gt;
 * 16:9 and 16:10 widescreen formats (standard 4:3 available)&lt;br /&gt;
 * brighter and larger field of view than the LCD displays&lt;br /&gt;
&lt;br /&gt;
If you try the projector (via HDMI) and nothing happens, you can try cycling power to the [[#The Laima Box|Laima Box]. If this doesn’t work, troubleshoot the projector as you normally would (check the input cable on the projector is connected and cycle inputs etc).&lt;br /&gt;
&lt;br /&gt;
=== HDMI Matrix Switch ===&lt;br /&gt;
[[File:HDMI_Switch_Schematic.jpg|thumb|HDMI switch schematic.]]&lt;br /&gt;
[[File:LB_HDMI_Switch.jpg|thumb|HDMI switch in Laima Box.]]&lt;br /&gt;
We use an 8x8 HDMI Matrix Switch to distribute video signals to all the various displays.  This is a [https://keydigital.org/category/4k-18g-hdmi-matrix-switchers/KD-MS8x8G Key Digital KD-MS8x8G] switch capable of connecting any of 8 input HDMI inputs to any/all of 8 HDMI outputs.  The switch is capable of handling 4K HDCP2.2 video signals.  The [[Media:HDMI_Switch_Schematic.jpg|schematic]] of the switch connections are shown here with all 8 inputs and outputs in use. In order to make a connection to a particular output display, you choose the particular input under the labeled output row of 8 LEDs.  This is done by pressing the button under the labeled output (see HDMI Matrix switch [[Media:LB_HDMI_Switch.jpg|image]]) in order to progress left-to-right through the various inputs.  Unfortunately, the blue LEDs on this switch that show what input is currently connected have been burning out, so it&#039;s sometimes necessary to count your button presses from a visible LED to know what input you are on. &lt;br /&gt;
&lt;br /&gt;
The default output display for each input is nominally the same number as the input.  As you&#039;ll note, we have the GE Host computer and GE Table Driver on inputs 1 &amp;amp; 2 -- this is so we can send the GE Host Display to any other display connected to the HDMI matrix switch, or use the GE Table Monitor to display other output -- such as the Eyelink computer output when adjusting the Eyelink camera at the front of the scanner. &lt;br /&gt;
&lt;br /&gt;
The HDMI matrix switch allows for fairly elaborate configuration as described in the [https://www.keydigital.org/web/content/5839 manual] via a Key Digital PC application that is available on the CNI PC laptop when connected to the internal private ethernet network. &lt;br /&gt;
&lt;br /&gt;
Troubleshooting: The HDMI matrix switch is generally fairly stable but if you&#039;re having odd behavior a good first step is to cycle the main power to the Laima Box -- this will reset the HDMI matrix switch.&lt;br /&gt;
&lt;br /&gt;
=== MRI Compatible Glasses and Lensometer ===&lt;br /&gt;
[[File:mri-glasses.jpg|thumb|mri frames and lenses]]&lt;br /&gt;
For participants who wear glasses, CNI has a set of interchangeable lenses that are used with an MRI compatible plastic frame. The frame and lenses are located in the open shelving above and to the left of where the screening forms are located. We have lenses for both near-sighted (-0.5 to -8.0 in .5 step increments) and far-sighted (+.5 to +8.0 in .5 step increments) vision corrections. The lenses are made of hard polycarbonate plastic and are not breakable. The easiest way to install the lenses into the frame is insert the lens from the back first into the edge by the ear piece and then snap in the lens by the nose. If the participant does not know his/her glasses prescription we have a lensometer that can determine that. Basic instructions for use of the lensometer are in the next section. There is also an eye chart posted on the door to the equipment room where participants can test their vision with the MRI glasses. Have the participant stand right in front of the lensometer (about 10 feet from the chart) to use the chart.&lt;br /&gt;
[[File:eye-chart.jpg|thumb|eye chart]]&lt;br /&gt;
&lt;br /&gt;
To determine glass prescription strengths for MRI participants CNI has the AL200 Auto Lensometer. Is is located in the CNI control room area. There is both a User&#039;s guide and a quick reference sheet next to the lensometer. The lensometer is currently set up to read a single vision lens. There are settings available to read either bifocal or progressive lenses, but they are not typically used as only the distance portion of the lens needs to be measured.&lt;br /&gt;
&lt;br /&gt;
Here is a basic how-to from the Reichert user&#039;s guide.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:Lensometer-parts.png|The key parts of the lensometer.&lt;br /&gt;
Image:Lensometer-back.png|Turn on the lensometer using the switch on the back panel. The AL200 will do a calibration check; do not place any lenses or obstructions in front of the aperture during calibration.&lt;br /&gt;
Image:Step2.png|The AL200’s default measurement mode is Single Vision, Automatic. This mode is used for fast, easy measurement of a pair of single vision spectacle lenses. You&#039;re now ready to measure the right lens, indicated by the &#039;R&#039; on the upper left side of the screen.&lt;br /&gt;
Image:Glass-placement1.jpg|Place the spectacles on the lens table and secure the right lens with the lens holder. Using the table base levers and your hand, move the lens until the large cross is positioned directly over the small cross in the middle of the centering target.&lt;br /&gt;
Image:Glass-placement2.jpg|If you insert a progressive lens in single vision mode, the progressive icon may flash to indicate that the mode should be changed. NOTE: Place the glasses so that lenses are toward the front and the ear pieces toward the back.&lt;br /&gt;
Image:Step3.png|When optical center has been located, the AL200 tone will sound and the measurements will be locked on the screen. Upon removal of the lens the AL200 will automatically switch to the left lens, indicated by the highlighted L on the upper right side of the screen. &lt;br /&gt;
Image:Step4.png|Repeat the measurement process for the left lens. All measurements will remain on the screen until the operator chooses to print or clear the data.&lt;br /&gt;
Image:Lensometer-screen.png|The number that appears in the Sphere location is the correction number that you will use in choosing the lenses for the MRI glasses.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Auditory System ==&lt;br /&gt;
&lt;br /&gt;
=== Avotec System ===&lt;br /&gt;
[[File:Avotec2.jpg|thumb|Avotec Console]]&lt;br /&gt;
[[File:Avotec-headsets.png|thumb|Avotec Headsets]]&lt;br /&gt;
The [https://avotecinc.com/pages/silent-scan Avotec Silent Scan system] provides a maximum of 30dB with the [https://avotecinc.com/products/full-coverage-headset-3000-series Full Coverage] and [https://avotecinc.com/products/conformal-headset-3000-series Conformal] headsets. The conformal headset will fit in any coil and any patient. The system also has a [https://avotecinc.com/products/non-headset-3000-series Flat Headset] with a slim profile (0.5 inch pad) which offers great flexibility and can fit into tight coils. The system provides clear two-way communication with built-in patient-activated alarm. The console and equalizer provide high-fidelity, frequency-balanced sound for a variety of audio inputs. The console also has a built-in radio. &lt;br /&gt;
&lt;br /&gt;
This system is best to use if you need to deliver high quality audio to the subjects, or need to communicate with the subjects frequently during the scans.&lt;br /&gt;
&lt;br /&gt;
We recommend using the Avotec + Flat Headset for most studies as it would fit into the Nova 32ch coil for most participants and is more robust in operation (in comparison to the Conformal headset and the OptoAcoustics system). If the Flat headset does not fit into the head coil, you can also use the Conformal headset. Note that when the participant is wearing the Conformal headset and lying on the patient table, the tube connecting to the headset can sometimes slip and pull the earplugs out of the participant&#039;s ears; if that happens you can tape down the tube to the patient table to prevent it from slipping. For audio input, use Avotec Channel A and B for the Conformal headset and Flat headset respectively.&lt;br /&gt;
&lt;br /&gt;
=== OptoACTIVE Headphone System === &lt;br /&gt;
[[File:OptoACTIVE.jpg|thumb|OptoACTIVE Headphone System control console]]&lt;br /&gt;
The OptoACTIVE Headphone System provides active noise cancellation (ANC) during MR scans. The slim profile headphones are designed to fit into the head coils for most human subjects. Its built-in optical microphones monitor the sound level at the subject&#039;s ears, which enable automatic self-calibration, sound pressure level monitoring and real-time in-ear stereo sound recording. The OptoACTIVE headphones also provide very good airseal around the subject&#039;s ears which results in excellent passive noise reduction as well. In combination with the passive noise reduction and active noise cancellation, the headphone can reach a 60 dB attenuation (95%) of the main EPI resonance noise. It also features the FOMRI-III noise cancelling microphone for the subject, which enables quiet two-way communication during scans. &lt;br /&gt;
&lt;br /&gt;
The control console has an LCD touch-screen and pushbuttons that allow the operator to control initial and ongoing calibrations, real-time active noise cancelling, channel level volume and recording, FORMRI microphone communications, etc. It displays the noise level, stimuli levels and spectrum analysis in real time.&lt;br /&gt;
&lt;br /&gt;
The system is ideal for the study of: sleeping disorders, autism, children suffering from claustrophobia, auditory fMRI and other research areas that were previously impractical or unattainable due to scanner noise.&lt;br /&gt;
&lt;br /&gt;
For step-by-step operation instructions, please see this [[Media:Optoacoustics_How-To.pdf | How-To Guide]], clearly summarized by Prof. Cameron Ellis and Emily Chen.&lt;br /&gt;
&lt;br /&gt;
== CNI Laptops ==&lt;br /&gt;
The CNI has one MacBook and one Windows PC for users to use during their experiments. The MacBook is running OS 10.12 and has MATLAB R2014b with PsychToolbox and PsychoPy 3 installed. The Windows PC is running Windows 11 and has E-Prime 3 installed (CNI also has a license for E-Prime 3). You could also checkout out [[Stimulus|some (old) notes]] shared by previous CNI users on how to set up experiments with these toolboxes.&lt;br /&gt;
&lt;br /&gt;
= Subject measurement =&lt;br /&gt;
&lt;br /&gt;
== fORP Response Box ==&lt;br /&gt;
We have a modular response box system ([http://www.curdes.com/index.php/mainforp/interfaces/fiu-933.html fORP 932]) from [http://www.curdes.com/ Current Designs]. With ths system, you can swap out various response devices. The output from any of these devices is available from the fORP box via USB. The device emulates a USB keyboard. We have confirmed that the fORP 932 USB interface is polled at 1kHz. The device itself has sub-millisecond time resolution (see the [http://www.curdes.com/index.php/support/faqs.html fORP FAQ]). We estimate that this system provides response time measurements with a precision and reliability of about one millisecond. &lt;br /&gt;
&lt;br /&gt;
Note that the fORP can send keypresses every time the scanner acquires a slice (or a volume, if the &amp;quot;scope trigger (User CV3)&amp;quot; is set to &amp;quot;1&amp;quot; in the EPI scans). If you want to receive these keypresses, configure the fORP by selecting a configuration that does *not* say &amp;quot;no 5&amp;quot; (if you are receiving numbers) or &amp;quot;no t&amp;quot; (if you are receiving letters). If you *do not* want to get these pulses (most users actually do not want these), then select a configuration that includes &amp;quot;no 5&amp;quot; or &amp;quot;no t&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The response devices that we currently have are:&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-scrl-1.html scroll-wheel device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-2x4-c.html 2X4 bimanual button boxes]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x4-cyl-2.html  4-buttonstick-style response device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x5-d.html 5-button diamond button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/custom.html 5-button curved button box]&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-trk-2.html trackball device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-1x5-n4.html PYKA 5 button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/variabledevices/hhsc-joy-5.html joystick]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a need for a different response device, just let us know.&lt;br /&gt;
&lt;br /&gt;
To use a response device at the CNI:&lt;br /&gt;
# Plug the desired device into the black fiber-optic connector on the right side of the front of the magnet bore&lt;br /&gt;
# Locate the silver box (labeled fORP) on the peripheral device rack.&lt;br /&gt;
# Push in the knob on the right front side of the fORP box to enter menu mode. For the following instructions, you will turn the knob to scroll through the menu choices, and then push in on the knob to select your choice. (See [https://wiki.curdes.com/bin/view/CdiDocs/932QuickSetup this guide] for more details on using the fORP 932.)&lt;br /&gt;
# Turn the knob until the word &amp;quot;yes&amp;quot; is underlined then push the knob to select &amp;quot;yes&amp;quot;&lt;br /&gt;
# In the &amp;quot;mode select&amp;quot; menu that appears next, you can select &amp;quot;manual config&amp;quot;. We recommend, however, that you pick the AUTOCONFIGURE choice which tells the interface to determine as much as it can about the connected handheld device and the cabling to the host computer. This should simplify the choices that need to be made by you. If you have used the AUTOCONFIGURE option you can skip steps 6 and 7 below and proceed directly to step 8.&lt;br /&gt;
# In the response device menu, turn the knob to scroll through the choices until you find the device that you connected in step 1 (examples include):&lt;br /&gt;
## 4-button cylinder: select HHSC-cyl-5&lt;br /&gt;
## 5-button diamond: select HHSC-1x5-D&lt;br /&gt;
## 5-button curved: select HHSC-1x5-C&lt;br /&gt;
## bi-manual 4-button keypads: select HHSC-2x4c&lt;br /&gt;
## scrollwheel: select HHSC-SCRL1&lt;br /&gt;
## trackball: select HHSC-TRK-2 (for mouse emulation)&lt;br /&gt;
# Select USB in the next display by pushing in the knob.&lt;br /&gt;
# Select the desired output mode. For the cylinder or keypads, this determines the mapping between the buttons and the keypress that is generated. E.g., HID-NAR-12345 will map the 4 cylinder buttons to the four number keys, 1-4, and send a &#039;5&#039; for each scope trigger pulse received by the scanner (if you don&#039;t want these pulses, select the &#039;no 5&#039; mode, as noted above). NAR means &amp;quot;no auto release&amp;quot;. In NAR mode, the keypress is maintained as long as the button is pressed. In the non-NAR mode, a brief keypress is generated, even if the button is held down. We find that NAR mode works better with PsychToolbox. In non-NAR mode, it can miss the very brief keypresses produced by auto release. &lt;br /&gt;
# Setup is now complete.&lt;br /&gt;
&lt;br /&gt;
For more technical details about the fORP, see the [[fORP|fORP wiki page]].&lt;br /&gt;
&lt;br /&gt;
== Eye Tracker ==&lt;br /&gt;
[[File:cni_eye_tracker_camera.jpg|thumb|Eye tracker camera.]]&lt;br /&gt;
[[File:cni_eye_tracker_ir.jpg|thumb|Eye tracker IR illuminator.]]&lt;br /&gt;
&lt;br /&gt;
We have an [https://www.sr-research.com/eyelink-1000-plus/ SR Research EyeLink 1000 Plus] eye tracker with remote optics installed at the CNI. It has a frame rate of up to 2000Hz, up to 1/2 degree accuracy, and is fairly easy to set up and use. We found that the standard IR light source from SR Research did not adequately focus the light onto the subject&#039;s eye, so we use the [https://mrc-systems.de/en/products/mr-compatible-cameras#light-sources LED light source] from MRC Systems. &lt;br /&gt;
&lt;br /&gt;
The camera is mounted on a wood stand placed next to the patient bed at the back of the bore. The camera position and focus should not need to be adjusted if your subject is positioned with their eyes close to isocenter. However, if you have a prescription that is centered far from iso-center, you may need to adjust the focus a bit. To do that, you can use the HDMI matrix to show the eye tracker video on the bore monitor so that you can adjust the camera while seeing what you are doing.&lt;br /&gt;
&lt;br /&gt;
The LED light source is mounted on a blue loc-line stalk that attaches to the head coil and is usually left unattached and hanging on the side of the scanner next to the response devices; you will need to mount it to the head coil using the blue loc-line pliers that you can find under the shelf with all the padding. Once mounted, make sure the light source is directed toward the subject&#039;s eye by aiming it through the gap between the two mirrors.&lt;br /&gt;
&lt;br /&gt;
The eye tracker host computer is mounted in the equipment room. However, the display, keyboard, and mouse for that computer are to the right of the GE console. You can connect to the host computer by a direct TCP connection through the ethernet cable located in the cable bundle next to the GE console. This cable is, not surprisingly, labeled &amp;quot;eye tracker&amp;quot;. If you use psych toolbox for stimulus presentation, you can use the [http://psychtoolbox.org/docs/EyelinkToolbox EyeLink Toolbox]. For those who use python (e.g., [http://www.psychopy.org/ Psychopy]), try the [http://www.psychopy.org/api/hardware/pylink.html PyLink module]. If you use E-Prime, check out the [https://www.sr-research.com/e-prime-extensions/ E-Prime integration info] on the SR Research support site. In any case, the IP address of the Eyelink is on our private network and thus is NOT the default IP, so you need to explicitly set it to 10.0.3.2. This private network has a DHCP server, so your stimulus computer should automatically get assigned an IP address on the same subnet. Please don&#039;t hard-code an IP address for your stimulus computer! Note that older versions of psychtoolbox don&#039;t allow you to specify the IP address, so be sure to get the latest Eyelink mex file from [https://github.com/kleinerm/Psychtoolbox-3/commit/aa04b821e975e0e61978377bb05aa1e216f3382e github].&lt;br /&gt;
&lt;br /&gt;
The data recorded by the EyeLink software is saved in the EyeLink partition (E:\). To transfer the data to your own storage device, you can reboot the EyeLink computer into Windows and connect your own USB drive. Afterwards you can reboot the computer again and get back into the EyeLink system. &lt;br /&gt;
&lt;br /&gt;
For a tutorial and troubleshooting information on the Eyelink system, see the [[EyelinkTracker]] page.&lt;br /&gt;
&lt;br /&gt;
==Physio monitoring==&lt;br /&gt;
[[File:ppg_resp.jpg|thumb|Photo plethesmograph (PPG) and respiration belt.]]&lt;br /&gt;
[[File:Tools_gating.png|thumb|Tools Gating]]&lt;br /&gt;
[[File:Physio_waveforms.png|thumb|Physio Waveforms on Console]]&lt;br /&gt;
[[File:physmon.png|thumb|[[CNI_widgets|CNI PPG pulse detector device]].]]&lt;br /&gt;
The scanner has the standard suite of physiological measures: pulse oximetry, respiration belt, and ECG. These can be used for scan triggering. The digital data from these measurements are saved on the console and backed-up in the Flywheel database. These data are also processed by the [[CNI_widgets|CNI PPG monitoring device]] and used for EEG ballisto-cardiogram artifact removal by the EGI NetStation software. (See also the [http://fmri.ucsd.edu/Howto/3T/physio.html UCSD fMRI group&#039;s site] for more information on using the GE physio files to remove physiological artifacts from fMRI data.) A recent paper is here - [https://doi.org/10.1016/j.jneumeth.2016.10.019 The PhysIO Toolbox for Modeling Physiological Noise in fMRI Data]&lt;br /&gt;
&lt;br /&gt;
===Setting Up Physio Recording===&lt;br /&gt;
&lt;br /&gt;
* Go to “Tools” - &amp;quot;Gating&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* To record respiration/movement of the abdominal wall, select “Respiratory.”&lt;br /&gt;
&lt;br /&gt;
* To record pulse/peripheral gating, select “PG.”&lt;br /&gt;
&lt;br /&gt;
* Outfit your participant with the respiratory bellows and the PG sensor&lt;br /&gt;
&lt;br /&gt;
===Respiratory Bellows===&lt;br /&gt;
&lt;br /&gt;
The respiratory bellows goes around your participant’s diaphragm or abdomen. You will get the best signal in the area where the participant’s breathing motion is most visible when they are lying down. Use the Velcro to adjust the respiratory bellows; it should be snug and not move around much, but stretched as little as possible and not too tight. The bellows should expand and contract approximately 0.5 to 1 inches with the participant’s breathing. Do not place any padding over the respiratory bellows. You should be able to see the recording on the small screen on the scanner. Note that it’ll take about one minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the bellows if necessary. &lt;br /&gt;
&lt;br /&gt;
===Pulse/Peripheral Gating (PPG) ===&lt;br /&gt;
&lt;br /&gt;
The participant’s pulse is monitored by a photopulse sensor that detects blood oxygen levels (pulse oximetry) in the vascular bed of the participant’s finger/thumb or toe. During the measurement, the participant’s hand or foot should remain cool and dry. We recommend that you attach the sensor to the participant’s toe, especially if you are going to ask your participant to use one of the button boxes because hand movements will create noise in your PG signal. &lt;br /&gt;
&lt;br /&gt;
* Recording from the toe: Attach the sensor to the fastener for the toe (with the Velcro). Place the sensor on the vascular bed of the participant’s toe. To keep the sensor in place, tape it and the fastener to the participant’s foot using medical tape. It is also a good idea to tape the cable to the knee pillow or the participant’s leg to reduce the pull on the sensor. &lt;br /&gt;
* Recording from the thumb/finger: Place the sensor on the participant’s finger or thumb. It is a good idea to avoid placing the sensor on the joint (the signal will be much noisier if you place the sensor on the joint). To keep the sensor in place it helps to tape it to the participant’s hand with some medical tape.&lt;br /&gt;
&lt;br /&gt;
You should be able to see the recording on the small screen on the scanner. Note that it’ll take up to a minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the sensor if necessary. &lt;br /&gt;
&lt;br /&gt;
Note: When you are done, please clean the sensor with alcohol wipes as it directly touches the participant’s skin.&lt;br /&gt;
&lt;br /&gt;
===Recording Physio===&lt;br /&gt;
&lt;br /&gt;
The default method for recording the physio is the CV control method (set CV phys_record_flag to 1). With default setting of CV control method, a recording of maximum length (25 minute) will require approximately 3 seconds to save to files to the hard disk after the end of the scan. You need to make sure that the next phys-recording scan starts after the previous recording finishes saving data to files. If the next phys-recording scan starts before the previous recording finishes, the new recording request will be ignored. &lt;br /&gt;
&lt;br /&gt;
===Parsing the physio files===&lt;br /&gt;
&lt;br /&gt;
The physio data from the scanner can include three types of measurements: pulse, respiration, and electrocardiogram (ECG).  The pulse data come from the PPG, the respiration data from the breathing-belt, and the ECG from the specialized electrodes attached to the chest. &lt;br /&gt;
&lt;br /&gt;
The data recorded from these devices are written out into simple text-files. There are three files for each type of measurement.  The file names start with PPG, RESP and ECG for the three types of measurements.  The files have raw data (&#039;Data&#039;), and the times of the local peaks (&#039;Trig&#039;) (and sometimes an empty &#039;PACTrig&#039;). &lt;br /&gt;
&lt;br /&gt;
* The temporal sampling rates differ between the three types of measurements&lt;br /&gt;
** ECG: 1ms, &lt;br /&gt;
** Pulse/Peripheral Gating: 10ms, &lt;br /&gt;
** Respiration: 40ms.&lt;br /&gt;
* The timeseries data&lt;br /&gt;
** start 30 seconds of baseline from before the start scan button was pressed&lt;br /&gt;
** have a variable duration between start scan button press and the actual start (pre-scan delays, external trigger delays, etc.)&lt;br /&gt;
** stop at the same time as the scan&lt;br /&gt;
&lt;br /&gt;
To reiterate-- the physio data stored in the physio files starts 30 seconds &#039;&#039;&#039;before&#039;&#039;&#039; you press the &#039;Scan&#039; button (yes, it&#039;s psychic ;), which is almost always more than 30 seconds before scanning actually starts. It could be substantially longer if you do external triggering. In that case, you&#039;ll get some extra physio data recorded during the time between when you press start scan and you send your trigger. But the recording does stop when the scan stops. So, to synchronize physio and scan data, you can take the end of the physio data and count backward the number of data points to keep using the duration of MR acquisiton and sampling rate of the physio data.&lt;br /&gt;
&lt;br /&gt;
The physio files are zipped and uploaded to Flywheel. A simple Flywheel gear &amp;quot;CNI GE Physio File Converter&amp;quot; is avalible to help extract, visualize, and summarize the data.&lt;br /&gt;
&lt;br /&gt;
===Biopac measures===&lt;br /&gt;
For measuring skin conductance and EMG, we have a Biopac with the [http://www.biopac.com/product/eda-electrodermal-activity-amplifier-for-mri electro-dermal activity amplifier] and [http://www.biopac.com/product/electromyogram-amplifier EMG amplifier] modules. The data from the Biopac are digitized with a [http://labjack.com/ue9 LabJack UE9] DAQ device and are available directly through a TCP stream (see [http://labjack.com/support/ue9/c-native-tcp-example the UE9 code samples]) or via our linux box voxel2, which can be used to trigger data acquisition that is synchronized with the scanner. The command to run the recording script is &amp;quot;testfix_labjack.py /data/biopac/[your experiment folder]/[run id] [recording duration]&amp;quot;. The recording duration is in seconds. The output is a csv file at /data/biopac/[your experiment folder]/[run id]_[timestamp].csv. The data file records the voltage and raw ADC values. The skin conductance is stored in the second (voltage) and third (raw ADC) columns. You probably want the second column (with numbers like &amp;quot;1.60230098&amp;quot;). The skin conductance amplifier gain is set to five microsiemens per volt. So, if you multiply the numbers in the second column by 5, you will have the skin conductance in microsiemens. The EMG values are in the fourth (voltage) and fifth (raw ADC) columns. The EMG amplifier gain is set to 2000, so dividing the values in the fourth column by 2 will give you the EMG voltage in millivolts.&lt;br /&gt;
&lt;br /&gt;
== Real-time motion tracking ==&lt;br /&gt;
[[File:FIRMM.jpg|thumb|FIRMM tablet]]&lt;br /&gt;
For subject motion tracking, we have a [https://turingmedical.com/firmm/ FIRMM tablet] that can access the scanner&#039;s image database and provide feedback on the subject&#039;s head motion in real-time. FIRMM will automatically plot the motion trace and quality metrics when scanning begins. You can also set protocol-specific parameters like the motion threshold and data quality goals required for your study. It helps monitor the quality metrics in real time so you can adjust your approach. This is mostly useful for fMRI studies. It is also possible to configure the video output so that you can send the real-time motion feedback to the subject via visual display. &lt;br /&gt;
&lt;br /&gt;
The FIRMM tablet is configured to be connected to the scanner by default. If it shows &amp;quot;FIRMM DISCONNECTED&amp;quot;, then we need to check if the firmm_transfer process is running on the scanner, sometimes restarting the process or restarting the FIRMM tablet is needed.&lt;br /&gt;
&lt;br /&gt;
==Subject video==&lt;br /&gt;
You can monitor and record the subject&#039;s face or body using the [https://mrc-systems.de/en/products/mr-compatible-cameras MRI compatable video camera from MRC Systems]. The camera is always on and streaming video to the linux box next to the scan console. An analog video signal is also sent to the large-screen tv in the control room (use the &#039;A/v input&#039;). To use the camera, you can attach it to the head coil using the loc-line connectors. When not in use, the camera should be hung on the side of the scanner along with the response devices. To see the video feed, run the following from the command line: &amp;quot;ffplay -f video4linux2 /dev/video0&amp;quot;. To record the video feed, you can use our video recording scripts. From the command line run &amp;quot;recordSubject 310&amp;quot;, this will record subject video for 5 minutes and 10 seconds; to synchronize the recording to the start of the scan, run &amp;quot;recordSubjectTrigger 310&amp;quot; instead. The data files are saved to the &amp;quot;video&amp;quot; directory. &lt;br /&gt;
&lt;br /&gt;
Troubleshoot: if you get an error &amp;quot;/dev/device0: busy or resource unavailable&amp;quot;, then run &amp;quot;fuser /dev/device0&amp;quot; and you&#039;ll get the PID of the process that is currently occupying the video device. Then run &amp;quot;kill -9 [PID]&amp;quot;. This should kill the process and you should be able to use the video camera again. Occasionally the camera feed fails and the recorded video files are empty. If this happens, check the video device setting with &amp;quot;v4l2-ctl -d /dev/video0 --all&amp;quot; and look for the &amp;quot;Video Standard&amp;quot; section. If it&#039;s something like &amp;quot;Video Standard = 0x000000ff PAL-B/B1/G/H/I/D/D1/K&amp;quot;, then you&#039;ll need to change it to NTSC standard with &amp;quot;v4l2-ctl -d /dev/video0 -s ntsc&amp;quot;. The returned message should be &amp;quot;Standard set to 0000b000 NTSC-M/M-JP/M-KR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scan Triggers =&lt;br /&gt;
[[File:cni_epi_psd_usercvs_ss.png|thumb|UserCVs under the &#039;Advanced&#039; tab for the cni_epi PSD.]]&lt;br /&gt;
The moment when the scanner starts acquiring image data can be controlled from the computer you use to control your experiment. To do this you need to be able to program your computer to send a pulse to the scanner at the planned moment.&lt;br /&gt;
&lt;br /&gt;
At the CNI, we provide a [[CNI widgets|USB-to-Serial port device]], which works well for E-Prime and Presentation. The notes below show how to set up the UserCV so that the scanner listens for the trigger, and how to send a trigger pulse using the USB-to-Serial device.&lt;br /&gt;
&lt;br /&gt;
== Protocol configuration ==&lt;br /&gt;
For BOLD EPI, be sure to use the cni_epi PSD to get the triggering options described here. The same options are also available for the spiral PSD. Under the &#039;Advanced&#039; tab, make sure the &amp;quot;start scan trigger&amp;quot; CV is set to &#039;1&#039;, which tells it to use the external trigger. Other options include &#039;0&#039; for no trigger (scan starts as soon as the scan button is pressed), and &#039;2&#039; for cardiac gating, which will synchronize to the cardiac cycle (measured via either the PPG pulse oximeter or ECG leads).&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial Port Trigger ==&lt;br /&gt;
The CNI also has a USB-to-Serial port device set up to send scan triggers. Just connect the USB cable labeled &amp;quot;EPrime Trigger&amp;quot; to your computer. On OS-X and Linux, the device is automatically recognized as a serial port (under /dev/ttyACM? on linux or /dev/ttyUSB??? on OS-X). On Windows, the device will show up as a COM port. &lt;br /&gt;
&lt;br /&gt;
When configuring the port, note that the device is expecting communication at 57600 bps and the scanner is triggered by sending a three-character string: &amp;quot;[t]&amp;quot; (without the quotes). In E-Prime, you need to add the serial port device to your experiment and then configure it by specifying the device (you can find the COM port number in Windows Device Manager - Ports (COM&amp;amp;LPT)) and setting the baud rate to 57600. (Other settings can be left at their default values.) In your E-Prime script, add the following in-line code to send the trigger string to the port: &lt;br /&gt;
&lt;br /&gt;
 Serial.WriteString &amp;quot;[t]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To use this device from Matlab, try:&lt;br /&gt;
&lt;br /&gt;
 s = serial(&#039;/dev/ttyS0&#039;, &#039;BaudRate&#039;, 57600);&lt;br /&gt;
 fopen(s);&lt;br /&gt;
 fprintf(s, &#039;[t]&#039;);&lt;br /&gt;
 fclose(s);&lt;br /&gt;
&lt;br /&gt;
Note that you will need to replace &#039;/dev/ttyS0&#039; with the correct port on your machine. E.g., if you&#039;re on windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. On a mac,  type &#039;ls -lh /dev/tty.usbmodem*&#039; in a terminal. &lt;br /&gt;
&lt;br /&gt;
If you are using PsychoPy, first make sure the pyserial package is installed (e.g., pip install pyserial). Then create two code blocks:&lt;br /&gt;
&lt;br /&gt;
 # Insert a &#039;Begin Experiment&#039; code block to initialize (e.g., as part of your instructions)&lt;br /&gt;
 import serial&lt;br /&gt;
 import time&lt;br /&gt;
 device = &#039;/dev/ttyACM1&#039;  # NOTE: replace with your device identifier! On windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. &lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(device, 115200, timeout=1)&lt;br /&gt;
         time.sleep(0.1)&lt;br /&gt;
         ser.write(&#039;[t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         pass&lt;br /&gt;
&lt;br /&gt;
 # Insert a &amp;quot;Begin Routine&amp;quot; code block whenever you want to send a trigger:&lt;br /&gt;
 send_trigger()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternate example from Christina Chung: &lt;br /&gt;
 #################################################&lt;br /&gt;
 ### import modules&lt;br /&gt;
 import serial&lt;br /&gt;
 import time &lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 ### Set SCANNER_TRIGGER_NEEDED to False to bypass program abortion when scanner exception is thrown&lt;br /&gt;
 SCANNER_TRIGGER_NEEDED = False&lt;br /&gt;
 DEVICE_ID = &#039;com3&#039;&lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(DEVICE_ID, 57600, timeout=1)&lt;br /&gt;
         time.sleep(2)    ### wait for 2 sec to ensure scanner is ready; CNI wiki default 0.1&lt;br /&gt;
         ser.write(&#039;[t][t][t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         if not SCANNER_TRIGGER_NEEDED:&lt;br /&gt;
             pass&lt;br /&gt;
         else:&lt;br /&gt;
             core.quit()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The construction of our serial trigger device is described on the [[CNI widgets]] page.&lt;br /&gt;
&lt;br /&gt;
= Capturing Scan Timing Pulses =&lt;br /&gt;
Some researchers want to know the precise time when each slice or each volume is acquired. The scanner produces timing pulses that can be used to record this information. Additionally, a pulse sent by the scanner at the beginning of the scan can be used to trigger the start of an experimental task (reversing the direction of triggering discussed above). At the CNI, we have two methods of receiving these timing pulses. One method uses the USB-to-Serial trigger device and the other uses the fORP response box system. These two methods are described in more detail below.&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial timing pulses ==&lt;br /&gt;
The emulated serial port device [[#USB-to-Serial Port Trigger|described above]] can also be used to receive timing pulses from the scanner. To enable this mode, send a &amp;quot;[p]&amp;quot; command. You will then receive a &#039;p&#039; character every time a timing pulse is detected. The temporal accuracy of these pulses should be about 1 ms. These &amp;quot;scope trigger&amp;quot; pulses come at the beginning of every slice or the beginning of every volume, depending on how the PSD is configured. For the cni_epi and spiral PSDs, under the &amp;quot;Advanced&amp;quot; tab, you can change the &amp;quot;scope trigger&amp;quot; CV to send pulses for every slice or just for the first slice of each volume. To capture these trigger pulses, you can use this [[saveTriggers.py|python script]].&lt;br /&gt;
&lt;br /&gt;
== Timing pulses as keypresses via fORP ==&lt;br /&gt;
To use the fORP response box system to receive timing pulses from the scanner, set up the system as described in the &#039;Response Box&#039; section above. Note that timing pulses will be received via the same USB connection as subjects&#039; responses, and that no additional USB cables need be plugged into your testing computer. If you have selected a numeric mapping between button presses and keys, the timing pulses sent to your testing laptop will be in the form of a &#039;5&#039;. (Note that use of the 5-button diamond-shaped response box will include the numbers 1-4 and 6, and thus will not include the number 5). Use caution when editing experimental scripts while using this method--if your script is open while the scanner sends pulses, a long series of 5&#039;s will be inserted into your script!&lt;br /&gt;
&lt;br /&gt;
= General information =&lt;br /&gt;
&lt;br /&gt;
==The magnetic field==&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:mr750_gauss_lines_top.png|Gauss-lines for a generic install (top view).&lt;br /&gt;
Image:mr750_gauss_lines_side.png|Gauss-lines for a generic install (side view).&lt;br /&gt;
Image:mr750_gauss_lines_front.png|Gauss-lines for a generic install (front view).&lt;br /&gt;
Image:CNI_MR_fieldlines.png|Sketch of gauss-lines for our particular installation.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
When positioning equipment in the scan room, it&#039;s useful to be aware of the magnetic field lines. All equipment in the CNI scan room is MR-safe, but not all equipment functions properly in very high-field regions. The diagrams show the estimated field lines in the MR suite area.&lt;br /&gt;
&lt;br /&gt;
==Additional/Legacy hardware information==&lt;br /&gt;
See the [[Hardware configuration]] page for some additional and legacy hardware information.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59422</id>
		<title>MR Hardware</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59422"/>
		<updated>2026-03-18T20:03:52Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* fORP Response Box */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= MR Scanner =&lt;br /&gt;
The MR scanner is in room 065 of the CNI suite in Building 420. It has its [[MR Scanner|own wiki page]].&lt;br /&gt;
&lt;br /&gt;
= Peripheral Device Rack (Laima Box) =&lt;br /&gt;
[[File:LB_Overview_Annotate.jpg|thumb|Overview of Laima Box]]&lt;br /&gt;
As you may guess from the title, the Laima Box came into being on the urging of Laima to find a solution to provide a stable and flexible interface to all the display devices, scanner signals, and other peripheral devices that are commonly used during studies. &lt;br /&gt;
&lt;br /&gt;
From the top rack to the bottom, the devices are (as marked in the photo): &lt;br /&gt;
* Small Monitor (Output 3 on HDMI Matrix, typically used for Eyelink display) and Eyelink keyboard + mouse&lt;br /&gt;
* Hyperion Projector Consoles (left: rear projector, right: side projector); Projector Switch for switching between the two projectors&lt;br /&gt;
* fORP Optical Interface; Serial Trigger Box; Video Flipper ([https://halltechav.com/product/sc-hd-2b/ Hall Research video scaler SC-HD-2B])&lt;br /&gt;
* Main Power to the rack&lt;br /&gt;
* Remote Power Switches for equipments in the magnet room: Eyelink camera, Webcam, DC shim amplifier; Audio Inputs for Avotec channel A &amp;amp; B and OptoAcoustics&lt;br /&gt;
* HDMI Matrix (see detailed Input-Output schematics [[#HDMI Matrix Switch|below]])&lt;br /&gt;
* fORP USB connection; Serial-to-USB connection; Scanner trigger co-ax connections; Video Inputs (Input 4 &amp;amp; 5 on HDMI Matrix)&lt;br /&gt;
&lt;br /&gt;
= Stimulus Presentation =&lt;br /&gt;
&lt;br /&gt;
==Visual System ==&lt;br /&gt;
The CNI offers several display options, depending on your visual stimulus needs. All use a digital interface (DVID or HDMI) and can be connected by selecting the appropriate options on the HDMI matrix switch. The mirror on the Nova 32-channel coil is a double mirror design (see [[32-channel_double_mirror]]), and that on the GE 64-channel coil is a single mirror design. &lt;br /&gt;
&lt;br /&gt;
=== 3D LCD display ===&lt;br /&gt;
We have a 49&amp;quot; 4K 3D LCD display from Resonance Technology. It is placed at the far end of the scanner room behind the scanner&#039;s rear pedestal. Its specs and field of view presented to the scan subjects are as follows: &lt;br /&gt;
 * 640x480@60Hz up to 4096x2160@50Hz resolution&lt;br /&gt;
 * 1000:1 contrast ratio&lt;br /&gt;
 * screen size: 107.2cm high x 60.3cm wide &lt;br /&gt;
 * visual distance from Nova coil: 267cm from mirror2, 6cm mirror2 to mirror1, 15cm from eye to mirror1 = 288cm&lt;br /&gt;
 * visual distance from NFL coil: 263cm from mirror1, 13cm from eye to mirror1 = 276cm &lt;br /&gt;
&lt;br /&gt;
To see 3D effects, subjects will need to wear passive polarized lenses. The screen can, of course, present non-3D stimuli too. &lt;br /&gt;
&lt;br /&gt;
As described in our Slack [https://stanford-cni.slack.com/archives/C011V1M2FRN/p1639611006023100 channel], the TV monitor has varying latency depending on the mode it is in.  We conducted tests using a 1920x1080p@60Hz signal comparing the mirrored display on a laptop while simultaneously viewing the display on the scan room monitor.  By capturing these displays simultaneously with a high-speed video acquisition we were able to calibrate the latency between the laptop and scan room monitor display.  Assuming the laptop display latency is 0, when in General mode the monitor processing creates about 133ms (8 video frames) of latency, as compared to Game mode where the latency is only 33ms or 2 frames. In order to switch modes, the remote control must be used inside the scan room but care must be taken as the batteries are slightly ferromagnetic so be sure to hold on the remote firmly and keep it as far from the scanner as possible.  Choose Options-&amp;gt;Scene Select-&amp;gt;Game in order to select Game mode.  It should be in this mode by default -- we ask any users that switch the monitor mode to please return to Game mode after their experiment. &lt;br /&gt;
&lt;br /&gt;
=== DLP Projector ===&lt;br /&gt;
We also have an MR-compatible rear-projection DLP projector ([https://pstnet.com/products/hyperion/ Hyperion 2-120 Projector]). The new Hyperion 2-120 Control Room Console features an LCD touchscreen to power on/off the projector, mirror the image, show the projector status, and display video input resolution, refresh rate, and synchronization status. This projector can be used by placing the large mirror on the back of the scanner bed in front of the LCD display. You also need to place the rear-projection screen on the head coil. Set-up of this system is a bit more involved than the LCD display, but it offers a much brighter display and a larger field of view. If you need that, let us know and we&#039;ll show you how to set up the projector system.&lt;br /&gt;
&lt;br /&gt;
Here are the specs of the projector:&lt;br /&gt;
 * 1920x1080&lt;br /&gt;
 * 120Hz or 60Hz frame rate&lt;br /&gt;
 * 16:9 and 16:10 widescreen formats (standard 4:3 available)&lt;br /&gt;
 * brighter and larger field of view than the LCD displays&lt;br /&gt;
&lt;br /&gt;
If you try the projector (via HDMI) and nothing happens, you can try cycling power to the [[#The Laima Box|Laima Box]. If this doesn’t work, troubleshoot the projector as you normally would (check the input cable on the projector is connected and cycle inputs etc).&lt;br /&gt;
&lt;br /&gt;
=== HDMI Matrix Switch ===&lt;br /&gt;
[[File:HDMI_Switch_Schematic.jpg|thumb|HDMI switch schematic.]]&lt;br /&gt;
[[File:LB_HDMI_Switch.jpg|thumb|HDMI switch in Laima Box.]]&lt;br /&gt;
We use an 8x8 HDMI Matrix Switch to distribute video signals to all the various displays.  This is a [https://keydigital.org/category/4k-18g-hdmi-matrix-switchers/KD-MS8x8G Key Digital KD-MS8x8G] switch capable of connecting any of 8 input HDMI inputs to any/all of 8 HDMI outputs.  The switch is capable of handling 4K HDCP2.2 video signals.  The [[Media:HDMI_Switch_Schematic.jpg|schematic]] of the switch connections are shown here with all 8 inputs and outputs in use. In order to make a connection to a particular output display, you choose the particular input under the labeled output row of 8 LEDs.  This is done by pressing the button under the labeled output (see HDMI Matrix switch [[Media:LB_HDMI_Switch.jpg|image]]) in order to progress left-to-right through the various inputs.  Unfortunately, the blue LEDs on this switch that show what input is currently connected have been burning out, so it&#039;s sometimes necessary to count your button presses from a visible LED to know what input you are on. &lt;br /&gt;
&lt;br /&gt;
The default output display for each input is nominally the same number as the input.  As you&#039;ll note, we have the GE Host computer and GE Table Driver on inputs 1 &amp;amp; 2 -- this is so we can send the GE Host Display to any other display connected to the HDMI matrix switch, or use the GE Table Monitor to display other output -- such as the Eyelink computer output when adjusting the Eyelink camera at the front of the scanner. &lt;br /&gt;
&lt;br /&gt;
The HDMI matrix switch allows for fairly elaborate configuration as described in the [https://www.keydigital.org/web/content/5839 manual] via a Key Digital PC application that is available on the CNI PC laptop when connected to the internal private ethernet network. &lt;br /&gt;
&lt;br /&gt;
Troubleshooting: The HDMI matrix switch is generally fairly stable but if you&#039;re having odd behavior a good first step is to cycle the main power to the Laima Box -- this will reset the HDMI matrix switch.&lt;br /&gt;
&lt;br /&gt;
=== MRI Compatible Glasses and Lensometer ===&lt;br /&gt;
[[File:mri-glasses.jpg|thumb|mri frames and lenses]]&lt;br /&gt;
For participants who wear glasses, CNI has a set of interchangeable lenses that are used with an MRI compatible plastic frame. The frame and lenses are located in the open shelving above and to the left of where the screening forms are located. We have lenses for both near-sighted (-0.5 to -8.0 in .5 step increments) and far-sighted (+.5 to +8.0 in .5 step increments) vision corrections. The lenses are made of hard polycarbonate plastic and are not breakable. The easiest way to install the lenses into the frame is insert the lens from the back first into the edge by the ear piece and then snap in the lens by the nose. If the participant does not know his/her glasses prescription we have a lensometer that can determine that. Basic instructions for use of the lensometer are in the next section. There is also an eye chart posted on the door to the equipment room where participants can test their vision with the MRI glasses. Have the participant stand right in front of the lensometer (about 10 feet from the chart) to use the chart.&lt;br /&gt;
[[File:eye-chart.jpg|thumb|eye chart]]&lt;br /&gt;
&lt;br /&gt;
To determine glass prescription strengths for MRI participants CNI has the AL200 Auto Lensometer. Is is located in the CNI control room area. There is both a User&#039;s guide and a quick reference sheet next to the lensometer. The lensometer is currently set up to read a single vision lens. There are settings available to read either bifocal or progressive lenses, but they are not typically used as only the distance portion of the lens needs to be measured.&lt;br /&gt;
&lt;br /&gt;
Here is a basic how-to from the Reichert user&#039;s guide.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:Lensometer-parts.png|The key parts of the lensometer.&lt;br /&gt;
Image:Lensometer-back.png|Turn on the lensometer using the switch on the back panel. The AL200 will do a calibration check; do not place any lenses or obstructions in front of the aperture during calibration.&lt;br /&gt;
Image:Step2.png|The AL200’s default measurement mode is Single Vision, Automatic. This mode is used for fast, easy measurement of a pair of single vision spectacle lenses. You&#039;re now ready to measure the right lens, indicated by the &#039;R&#039; on the upper left side of the screen.&lt;br /&gt;
Image:Glass-placement1.jpg|Place the spectacles on the lens table and secure the right lens with the lens holder. Using the table base levers and your hand, move the lens until the large cross is positioned directly over the small cross in the middle of the centering target.&lt;br /&gt;
Image:Glass-placement2.jpg|If you insert a progressive lens in single vision mode, the progressive icon may flash to indicate that the mode should be changed. NOTE: Place the glasses so that lenses are toward the front and the ear pieces toward the back.&lt;br /&gt;
Image:Step3.png|When optical center has been located, the AL200 tone will sound and the measurements will be locked on the screen. Upon removal of the lens the AL200 will automatically switch to the left lens, indicated by the highlighted L on the upper right side of the screen. &lt;br /&gt;
Image:Step4.png|Repeat the measurement process for the left lens. All measurements will remain on the screen until the operator chooses to print or clear the data.&lt;br /&gt;
Image:Lensometer-screen.png|The number that appears in the Sphere location is the correction number that you will use in choosing the lenses for the MRI glasses.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Auditory System ==&lt;br /&gt;
&lt;br /&gt;
=== Avotec System ===&lt;br /&gt;
[[File:Avotec2.jpg|thumb|Avotec Console]]&lt;br /&gt;
[[File:Avotec-headsets.png|thumb|Avotec Headsets]]&lt;br /&gt;
The [https://avotecinc.com/pages/silent-scan Avotec Silent Scan system] provides a maximum of 30dB with the [https://avotecinc.com/products/full-coverage-headset-3000-series Full Coverage] and [https://avotecinc.com/products/conformal-headset-3000-series Conformal] headsets. The conformal headset will fit in any coil and any patient. The system also has a [https://avotecinc.com/products/non-headset-3000-series Flat Headset] with a slim profile (0.5 inch pad) which offers great flexibility and can fit into tight coils. The system provides clear two-way communication with built-in patient-activated alarm. The console and equalizer provide high-fidelity, frequency-balanced sound for a variety of audio inputs. The console also has a built-in radio. &lt;br /&gt;
&lt;br /&gt;
This system is best to use if you need to deliver high quality audio to the subjects, or need to communicate with the subjects frequently during the scans.&lt;br /&gt;
&lt;br /&gt;
We recommend using the Avotec + Flat Headset for most studies as it would fit into the Nova 32ch coil for most participants and is more robust in operation (in comparison to the Conformal headset and the OptoAcoustics system). If the Flat headset does not fit into the head coil, you can also use the Conformal headset. Note that when the participant is wearing the Conformal headset and lying on the patient table, the tube connecting to the headset can sometimes slip and pull the earplugs out of the participant&#039;s ears; if that happens you can tape down the tube to the patient table to prevent it from slipping. For audio input, use Avotec Channel A and B for the Conformal headset and Flat headset respectively.&lt;br /&gt;
&lt;br /&gt;
=== OptoACTIVE Headphone System === &lt;br /&gt;
[[File:OptoACTIVE.jpg|thumb|OptoACTIVE Headphone System control console]]&lt;br /&gt;
The OptoACTIVE Headphone System provides active noise cancellation (ANC) during MR scans. The slim profile headphones are designed to fit into the head coils for most human subjects. Its built-in optical microphones monitor the sound level at the subject&#039;s ears, which enable automatic self-calibration, sound pressure level monitoring and real-time in-ear stereo sound recording. The OptoACTIVE headphones also provide very good airseal around the subject&#039;s ears which results in excellent passive noise reduction as well. In combination with the passive noise reduction and active noise cancellation, the headphone can reach a 60 dB attenuation (95%) of the main EPI resonance noise. It also features the FOMRI-III noise cancelling microphone for the subject, which enables quiet two-way communication during scans. &lt;br /&gt;
&lt;br /&gt;
The control console has an LCD touch-screen and pushbuttons that allow the operator to control initial and ongoing calibrations, real-time active noise cancelling, channel level volume and recording, FORMRI microphone communications, etc. It displays the noise level, stimuli levels and spectrum analysis in real time.&lt;br /&gt;
&lt;br /&gt;
The system is ideal for the study of: sleeping disorders, autism, children suffering from claustrophobia, auditory fMRI and other research areas that were previously impractical or unattainable due to scanner noise.&lt;br /&gt;
&lt;br /&gt;
For step-by-step operation instructions, please see this [[Media:Optoacoustics_How-To.pdf | How-To Guide]], clearly summarized by Prof. Cameron Ellis and Emily Chen.&lt;br /&gt;
&lt;br /&gt;
== CNI Laptops ==&lt;br /&gt;
The CNI has one MacBook and one Windows PC for users to use during their experiments. The MacBook is running OS 10.12 and has MATLAB R2014b with PsychToolbox and PsychoPy 3 installed. The Windows PC is running Windows 11 and has E-Prime 3 installed (CNI also has a license for E-Prime 3). You could also checkout out [[Stimulus|some (old) notes]] shared by previous CNI users on how to set up experiments with these toolboxes.&lt;br /&gt;
&lt;br /&gt;
= Subject measurement =&lt;br /&gt;
&lt;br /&gt;
== fORP Response Box ==&lt;br /&gt;
We have a modular response box system ([http://www.curdes.com/index.php/mainforp/interfaces/fiu-933.html fORP 932]) from [http://www.curdes.com/ Current Designs]. With ths system, you can swap out various response devices. The output from any of these devices is available from the fORP box via USB. The device emulates a USB keyboard. We have confirmed that the fORP 932 USB interface is polled at 1kHz. The device itself has sub-millisecond time resolution (see the [http://www.curdes.com/index.php/support/faqs.html fORP FAQ]). We estimate that this system provides response time measurements with a precision and reliability of about one millisecond. &lt;br /&gt;
&lt;br /&gt;
Note that the fORP can send keypresses every time the scanner acquires a slice (or a volume, if the &amp;quot;scope trigger (User CV3)&amp;quot; is set to &amp;quot;1&amp;quot; in the EPI scans). If you want to receive these keypresses, configure the fORP by selecting a configuration that does *not* say &amp;quot;no 5&amp;quot; (if you are receiving numbers) or &amp;quot;no t&amp;quot; (if you are receiving letters). If you *do not* want to get these pulses (most users actually do not want these), then select a configuration that includes &amp;quot;no 5&amp;quot; or &amp;quot;no t&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The response devices that we currently have are:&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-scrl-1.html scroll-wheel device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-2x4-c.html 2X4 bimanual button boxes]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x4-cyl-2.html  4-buttonstick-style response device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x5-d.html 5-button diamond button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/custom.html 5-button curved button box]&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-trk-2.html trackball device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-1x5-n4.html PYKA 5 button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/variabledevices/hhsc-joy-5.html joystick]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a need for a different response device, just let us know.&lt;br /&gt;
&lt;br /&gt;
To use a response device at the CNI:&lt;br /&gt;
# Plug the desired device into the black fiber-optic connector on the right side of the front of the magnet bore&lt;br /&gt;
# Locate the silver box (labeled fORP) on the peripheral device rack.&lt;br /&gt;
# Push in the knob on the right front side of the fORP box to enter menu mode. For the following instructions, you will turn the knob to scroll through the menu choices, and then push in on the knob to select your choice. (See [https://wiki.curdes.com/bin/view/CdiDocs/932QuickSetup this guide] for more details on using the fORP 932.)&lt;br /&gt;
# Turn the knob until the word &amp;quot;yes&amp;quot; is underlined then push the knob to select &amp;quot;yes&amp;quot;&lt;br /&gt;
# In the &amp;quot;mode select&amp;quot; menu that appears next, you can select &amp;quot;manual config&amp;quot;. We recommend, however, that you pick the AUTOCONFIGURE choice which tells the interface to determine as much as it can about the connected handheld device and the cabling to the host computer. This should simplify the choices that need to be made by you. If you have used the AUTOCONFIGURE option you can skip steps 6 and 7 below and proceed directly to step 8.&lt;br /&gt;
# In the response device menu, turn the knob to scroll through the choices until you find the device that you connected in step 1 (examples include):&lt;br /&gt;
## 4-button cylinder: select HHSC-cyl-5&lt;br /&gt;
## 5-button diamond: select HHSC-1x5-D&lt;br /&gt;
## 5-button curved: select HHSC-1x5-C&lt;br /&gt;
## bi-manual 4-button keypads: select HHSC-2x4c&lt;br /&gt;
## scrollwheel: select HHSC-SCRL1&lt;br /&gt;
## trackball: select HHSC-TRK-2 (for mouse emulation)&lt;br /&gt;
# Select USB in the next display by pushing in the knob.&lt;br /&gt;
# Select the desired output mode. For the cylinder or keypads, this determines the mapping between the buttons and the keypress that is generated. E.g., HID-NAR-12345 will map the 4 cylinder buttons to the four number keys, 1-4, and send a &#039;5&#039; for each scope trigger pulse received by the scanner (if you don&#039;t want these pulses, select the &#039;no 5&#039; mode, as noted above). NAR means &amp;quot;no auto release&amp;quot;. In NAR mode, the keypress is maintained as long as the button is pressed. In the non-NAR mode, a brief keypress is generated, even if the button is held down. We find that NAR mode works better with PsychToolbox. In non-NAR mode, it can miss the very brief keypresses produced by auto release. &lt;br /&gt;
# Setup is now complete.&lt;br /&gt;
&lt;br /&gt;
For more technical details about the fORP, see the [[fORP|fORP wiki page]].&lt;br /&gt;
&lt;br /&gt;
== Eye Tracker ==&lt;br /&gt;
[[File:cni_eye_tracker_camera.jpg|thumb|Eye tracker camera.]]&lt;br /&gt;
[[File:cni_eye_tracker_ir.jpg|thumb|Eye tracker IR illuminator.]]&lt;br /&gt;
&lt;br /&gt;
We have an [https://www.sr-research.com/eyelink-1000-plus/ SR Research EyeLink 1000 Plus] eye tracker with remote optics installed at the CNI. It has a frame rate of up to 2000Hz, up to 1/2 degree accuracy, and is fairly easy to set up and use. We found that the standard IR light source from SR Research did not adequately focus the light onto the subject&#039;s eye, so we use the [https://mrc-systems.de/en/products/mr-compatible-cameras#light-sources LED light source] from MRC Systems. &lt;br /&gt;
&lt;br /&gt;
The camera is mounted on a wood stand placed next to the patient bed at the back of the bore. The camera position and focus should not need to be adjusted if your subject is positioned with their eyes close to isocenter. However, if you have a prescription that is centered far from iso-center, you may need to adjust the focus a bit. To do that, you can use the HDMI matrix to show the eye tracker video on the bore monitor so that you can adjust the camera while seeing what you are doing.&lt;br /&gt;
&lt;br /&gt;
The LED light source is mounted on a blue loc-line stalk that attaches to the head coil and is usually left unattached and hanging on the side of the scanner next to the response devices; you will need to mount it to the head coil using the blue loc-line pliers that you can find under the shelf with all the padding. Once mounted, make sure the light source is directed toward the subject&#039;s eye by aiming it through the gap between the two mirrors.&lt;br /&gt;
&lt;br /&gt;
The eye tracker host computer is mounted in the equipment room. However, the display, keyboard, and mouse for that computer are to the right of the GE console. You can connect to the host computer by a direct TCP connection through the ethernet cable located in the cable bundle next to the GE console. This cable is, not surprisingly, labeled &amp;quot;eye tracker&amp;quot;. If you use psych toolbox for stimulus presentation, you can use the [http://psychtoolbox.org/docs/EyelinkToolbox EyeLink Toolbox]. For those who use python (e.g., [http://www.psychopy.org/ Psychopy]), try the [http://www.psychopy.org/api/hardware/pylink.html PyLink module]. If you use E-Prime, check out the [https://www.sr-support.com/showthread.php?149-E-Prime-integration E-Prime integration info] on the SR Research support site. In any case, the IP address of the Eyelink is on our private network and thus is NOT the default IP, so you need to explicitly set it to 10.0.3.2. This private network has a DHCP server, so your stimulus computer should automatically get assigned an IP address on the same subnet. Please don&#039;t hard-code an IP address for your stimulus computer! Note that older versions of psychtoolbox don&#039;t allow you to specify the IP address, so be sure to get the latest Eyelink mex file from [https://github.com/kleinerm/Psychtoolbox-3/commit/aa04b821e975e0e61978377bb05aa1e216f3382e github].&lt;br /&gt;
&lt;br /&gt;
The data recorded by the EyeLink software is saved in the EyeLink partition (E:\). To transfer the data to your own storage device, you can reboot the EyeLink computer into Windows and connect your own USB drive. Afterwards you can reboot the computer again and get back into the EyeLink system. &lt;br /&gt;
&lt;br /&gt;
For a tutorial and troubleshooting information on the Eyelink system, see the [[EyelinkTracker]] page.&lt;br /&gt;
&lt;br /&gt;
==Physio monitoring==&lt;br /&gt;
[[File:ppg_resp.jpg|thumb|Photo plethesmograph (PPG) and respiration belt.]]&lt;br /&gt;
[[File:Tools_gating.png|thumb|Tools Gating]]&lt;br /&gt;
[[File:Physio_waveforms.png|thumb|Physio Waveforms on Console]]&lt;br /&gt;
[[File:physmon.png|thumb|[[CNI_widgets|CNI PPG pulse detector device]].]]&lt;br /&gt;
The scanner has the standard suite of physiological measures: pulse oximetry, respiration belt, and ECG. These can be used for scan triggering. The digital data from these measurements are saved on the console and backed-up in the Flywheel database. These data are also processed by the [[CNI_widgets|CNI PPG monitoring device]] and used for EEG ballisto-cardiogram artifact removal by the EGI NetStation software. (See also the [http://fmri.ucsd.edu/Howto/3T/physio.html UCSD fMRI group&#039;s site] for more information on using the GE physio files to remove physiological artifacts from fMRI data.) A recent paper is here - [https://doi.org/10.1016/j.jneumeth.2016.10.019 The PhysIO Toolbox for Modeling Physiological Noise in fMRI Data]&lt;br /&gt;
&lt;br /&gt;
===Setting Up Physio Recording===&lt;br /&gt;
&lt;br /&gt;
* Go to “Tools” - &amp;quot;Gating&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* To record respiration/movement of the abdominal wall, select “Respiratory.”&lt;br /&gt;
&lt;br /&gt;
* To record pulse/peripheral gating, select “PG.”&lt;br /&gt;
&lt;br /&gt;
* Outfit your participant with the respiratory bellows and the PG sensor&lt;br /&gt;
&lt;br /&gt;
===Respiratory Bellows===&lt;br /&gt;
&lt;br /&gt;
The respiratory bellows goes around your participant’s diaphragm or abdomen. You will get the best signal in the area where the participant’s breathing motion is most visible when they are lying down. Use the Velcro to adjust the respiratory bellows; it should be snug and not move around much, but stretched as little as possible and not too tight. The bellows should expand and contract approximately 0.5 to 1 inches with the participant’s breathing. Do not place any padding over the respiratory bellows. You should be able to see the recording on the small screen on the scanner. Note that it’ll take about one minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the bellows if necessary. &lt;br /&gt;
&lt;br /&gt;
===Pulse/Peripheral Gating (PPG) ===&lt;br /&gt;
&lt;br /&gt;
The participant’s pulse is monitored by a photopulse sensor that detects blood oxygen levels (pulse oximetry) in the vascular bed of the participant’s finger/thumb or toe. During the measurement, the participant’s hand or foot should remain cool and dry. We recommend that you attach the sensor to the participant’s toe, especially if you are going to ask your participant to use one of the button boxes because hand movements will create noise in your PG signal. &lt;br /&gt;
&lt;br /&gt;
* Recording from the toe: Attach the sensor to the fastener for the toe (with the Velcro). Place the sensor on the vascular bed of the participant’s toe. To keep the sensor in place, tape it and the fastener to the participant’s foot using medical tape. It is also a good idea to tape the cable to the knee pillow or the participant’s leg to reduce the pull on the sensor. &lt;br /&gt;
* Recording from the thumb/finger: Place the sensor on the participant’s finger or thumb. It is a good idea to avoid placing the sensor on the joint (the signal will be much noisier if you place the sensor on the joint). To keep the sensor in place it helps to tape it to the participant’s hand with some medical tape.&lt;br /&gt;
&lt;br /&gt;
You should be able to see the recording on the small screen on the scanner. Note that it’ll take up to a minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the sensor if necessary. &lt;br /&gt;
&lt;br /&gt;
Note: When you are done, please clean the sensor with alcohol wipes as it directly touches the participant’s skin.&lt;br /&gt;
&lt;br /&gt;
===Recording Physio===&lt;br /&gt;
&lt;br /&gt;
The default method for recording the physio is the CV control method (set CV phys_record_flag to 1). With default setting of CV control method, a recording of maximum length (25 minute) will require approximately 3 seconds to save to files to the hard disk after the end of the scan. You need to make sure that the next phys-recording scan starts after the previous recording finishes saving data to files. If the next phys-recording scan starts before the previous recording finishes, the new recording request will be ignored. &lt;br /&gt;
&lt;br /&gt;
===Parsing the physio files===&lt;br /&gt;
&lt;br /&gt;
The physio data from the scanner can include three types of measurements: pulse, respiration, and electrocardiogram (ECG).  The pulse data come from the PPG, the respiration data from the breathing-belt, and the ECG from the specialized electrodes attached to the chest. &lt;br /&gt;
&lt;br /&gt;
The data recorded from these devices are written out into simple text-files. There are three files for each type of measurement.  The file names start with PPG, RESP and ECG for the three types of measurements.  The files have raw data (&#039;Data&#039;), and the times of the local peaks (&#039;Trig&#039;) (and sometimes an empty &#039;PACTrig&#039;). &lt;br /&gt;
&lt;br /&gt;
* The temporal sampling rates differ between the three types of measurements&lt;br /&gt;
** ECG: 1ms, &lt;br /&gt;
** Pulse/Peripheral Gating: 10ms, &lt;br /&gt;
** Respiration: 40ms.&lt;br /&gt;
* The timeseries data&lt;br /&gt;
** start 30 seconds of baseline from before the start scan button was pressed&lt;br /&gt;
** have a variable duration between start scan button press and the actual start (pre-scan delays, external trigger delays, etc.)&lt;br /&gt;
** stop at the same time as the scan&lt;br /&gt;
&lt;br /&gt;
To reiterate-- the physio data stored in the physio files starts 30 seconds &#039;&#039;&#039;before&#039;&#039;&#039; you press the &#039;Scan&#039; button (yes, it&#039;s psychic ;), which is almost always more than 30 seconds before scanning actually starts. It could be substantially longer if you do external triggering. In that case, you&#039;ll get some extra physio data recorded during the time between when you press start scan and you send your trigger. But the recording does stop when the scan stops. So, to synchronize physio and scan data, you can take the end of the physio data and count backward the number of data points to keep using the duration of MR acquisiton and sampling rate of the physio data.&lt;br /&gt;
&lt;br /&gt;
The physio files are zipped and uploaded to Flywheel. A simple Flywheel gear &amp;quot;CNI GE Physio File Converter&amp;quot; is avalible to help extract, visualize, and summarize the data.&lt;br /&gt;
&lt;br /&gt;
===Biopac measures===&lt;br /&gt;
For measuring skin conductance and EMG, we have a Biopac with the [http://www.biopac.com/product/eda-electrodermal-activity-amplifier-for-mri electro-dermal activity amplifier] and [http://www.biopac.com/product/electromyogram-amplifier EMG amplifier] modules. The data from the Biopac are digitized with a [http://labjack.com/ue9 LabJack UE9] DAQ device and are available directly through a TCP stream (see [http://labjack.com/support/ue9/c-native-tcp-example the UE9 code samples]) or via our linux box voxel2, which can be used to trigger data acquisition that is synchronized with the scanner. The command to run the recording script is &amp;quot;testfix_labjack.py /data/biopac/[your experiment folder]/[run id] [recording duration]&amp;quot;. The recording duration is in seconds. The output is a csv file at /data/biopac/[your experiment folder]/[run id]_[timestamp].csv. The data file records the voltage and raw ADC values. The skin conductance is stored in the second (voltage) and third (raw ADC) columns. You probably want the second column (with numbers like &amp;quot;1.60230098&amp;quot;). The skin conductance amplifier gain is set to five microsiemens per volt. So, if you multiply the numbers in the second column by 5, you will have the skin conductance in microsiemens. The EMG values are in the fourth (voltage) and fifth (raw ADC) columns. The EMG amplifier gain is set to 2000, so dividing the values in the fourth column by 2 will give you the EMG voltage in millivolts.&lt;br /&gt;
&lt;br /&gt;
== Real-time motion tracking ==&lt;br /&gt;
[[File:FIRMM.jpg|thumb|FIRMM tablet]]&lt;br /&gt;
For subject motion tracking, we have a [https://turingmedical.com/firmm/ FIRMM tablet] that can access the scanner&#039;s image database and provide feedback on the subject&#039;s head motion in real-time. FIRMM will automatically plot the motion trace and quality metrics when scanning begins. You can also set protocol-specific parameters like the motion threshold and data quality goals required for your study. It helps monitor the quality metrics in real time so you can adjust your approach. This is mostly useful for fMRI studies. It is also possible to configure the video output so that you can send the real-time motion feedback to the subject via visual display. &lt;br /&gt;
&lt;br /&gt;
The FIRMM tablet is configured to be connected to the scanner by default. If it shows &amp;quot;FIRMM DISCONNECTED&amp;quot;, then we need to check if the firmm_transfer process is running on the scanner, sometimes restarting the process or restarting the FIRMM tablet is needed.&lt;br /&gt;
&lt;br /&gt;
==Subject video==&lt;br /&gt;
You can monitor and record the subject&#039;s face or body using the [https://mrc-systems.de/en/products/mr-compatible-cameras MRI compatable video camera from MRC Systems]. The camera is always on and streaming video to the linux box next to the scan console. An analog video signal is also sent to the large-screen tv in the control room (use the &#039;A/v input&#039;). To use the camera, you can attach it to the head coil using the loc-line connectors. When not in use, the camera should be hung on the side of the scanner along with the response devices. To see the video feed, run the following from the command line: &amp;quot;ffplay -f video4linux2 /dev/video0&amp;quot;. To record the video feed, you can use our video recording scripts. From the command line run &amp;quot;recordSubject 310&amp;quot;, this will record subject video for 5 minutes and 10 seconds; to synchronize the recording to the start of the scan, run &amp;quot;recordSubjectTrigger 310&amp;quot; instead. The data files are saved to the &amp;quot;video&amp;quot; directory. &lt;br /&gt;
&lt;br /&gt;
Troubleshoot: if you get an error &amp;quot;/dev/device0: busy or resource unavailable&amp;quot;, then run &amp;quot;fuser /dev/device0&amp;quot; and you&#039;ll get the PID of the process that is currently occupying the video device. Then run &amp;quot;kill -9 [PID]&amp;quot;. This should kill the process and you should be able to use the video camera again. Occasionally the camera feed fails and the recorded video files are empty. If this happens, check the video device setting with &amp;quot;v4l2-ctl -d /dev/video0 --all&amp;quot; and look for the &amp;quot;Video Standard&amp;quot; section. If it&#039;s something like &amp;quot;Video Standard = 0x000000ff PAL-B/B1/G/H/I/D/D1/K&amp;quot;, then you&#039;ll need to change it to NTSC standard with &amp;quot;v4l2-ctl -d /dev/video0 -s ntsc&amp;quot;. The returned message should be &amp;quot;Standard set to 0000b000 NTSC-M/M-JP/M-KR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scan Triggers =&lt;br /&gt;
[[File:cni_epi_psd_usercvs_ss.png|thumb|UserCVs under the &#039;Advanced&#039; tab for the cni_epi PSD.]]&lt;br /&gt;
The moment when the scanner starts acquiring image data can be controlled from the computer you use to control your experiment. To do this you need to be able to program your computer to send a pulse to the scanner at the planned moment.&lt;br /&gt;
&lt;br /&gt;
At the CNI, we provide a [[CNI widgets|USB-to-Serial port device]], which works well for E-Prime and Presentation. The notes below show how to set up the UserCV so that the scanner listens for the trigger, and how to send a trigger pulse using the USB-to-Serial device.&lt;br /&gt;
&lt;br /&gt;
== Protocol configuration ==&lt;br /&gt;
For BOLD EPI, be sure to use the cni_epi PSD to get the triggering options described here. The same options are also available for the spiral PSD. Under the &#039;Advanced&#039; tab, make sure the &amp;quot;start scan trigger&amp;quot; CV is set to &#039;1&#039;, which tells it to use the external trigger. Other options include &#039;0&#039; for no trigger (scan starts as soon as the scan button is pressed), and &#039;2&#039; for cardiac gating, which will synchronize to the cardiac cycle (measured via either the PPG pulse oximeter or ECG leads).&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial Port Trigger ==&lt;br /&gt;
The CNI also has a USB-to-Serial port device set up to send scan triggers. Just connect the USB cable labeled &amp;quot;EPrime Trigger&amp;quot; to your computer. On OS-X and Linux, the device is automatically recognized as a serial port (under /dev/ttyACM? on linux or /dev/ttyUSB??? on OS-X). On Windows, the device will show up as a COM port. &lt;br /&gt;
&lt;br /&gt;
When configuring the port, note that the device is expecting communication at 57600 bps and the scanner is triggered by sending a three-character string: &amp;quot;[t]&amp;quot; (without the quotes). In E-Prime, you need to add the serial port device to your experiment and then configure it by specifying the device (you can find the COM port number in Windows Device Manager - Ports (COM&amp;amp;LPT)) and setting the baud rate to 57600. (Other settings can be left at their default values.) In your E-Prime script, add the following in-line code to send the trigger string to the port: &lt;br /&gt;
&lt;br /&gt;
 Serial.WriteString &amp;quot;[t]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To use this device from Matlab, try:&lt;br /&gt;
&lt;br /&gt;
 s = serial(&#039;/dev/ttyS0&#039;, &#039;BaudRate&#039;, 57600);&lt;br /&gt;
 fopen(s);&lt;br /&gt;
 fprintf(s, &#039;[t]&#039;);&lt;br /&gt;
 fclose(s);&lt;br /&gt;
&lt;br /&gt;
Note that you will need to replace &#039;/dev/ttyS0&#039; with the correct port on your machine. E.g., if you&#039;re on windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. On a mac,  type &#039;ls -lh /dev/tty.usbmodem*&#039; in a terminal. &lt;br /&gt;
&lt;br /&gt;
If you are using PsychoPy, first make sure the pyserial package is installed (e.g., pip install pyserial). Then create two code blocks:&lt;br /&gt;
&lt;br /&gt;
 # Insert a &#039;Begin Experiment&#039; code block to initialize (e.g., as part of your instructions)&lt;br /&gt;
 import serial&lt;br /&gt;
 import time&lt;br /&gt;
 device = &#039;/dev/ttyACM1&#039;  # NOTE: replace with your device identifier! On windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. &lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(device, 115200, timeout=1)&lt;br /&gt;
         time.sleep(0.1)&lt;br /&gt;
         ser.write(&#039;[t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         pass&lt;br /&gt;
&lt;br /&gt;
 # Insert a &amp;quot;Begin Routine&amp;quot; code block whenever you want to send a trigger:&lt;br /&gt;
 send_trigger()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternate example from Christina Chung: &lt;br /&gt;
 #################################################&lt;br /&gt;
 ### import modules&lt;br /&gt;
 import serial&lt;br /&gt;
 import time &lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 ### Set SCANNER_TRIGGER_NEEDED to False to bypass program abortion when scanner exception is thrown&lt;br /&gt;
 SCANNER_TRIGGER_NEEDED = False&lt;br /&gt;
 DEVICE_ID = &#039;com3&#039;&lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(DEVICE_ID, 57600, timeout=1)&lt;br /&gt;
         time.sleep(2)    ### wait for 2 sec to ensure scanner is ready; CNI wiki default 0.1&lt;br /&gt;
         ser.write(&#039;[t][t][t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         if not SCANNER_TRIGGER_NEEDED:&lt;br /&gt;
             pass&lt;br /&gt;
         else:&lt;br /&gt;
             core.quit()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The construction of our serial trigger device is described on the [[CNI widgets]] page.&lt;br /&gt;
&lt;br /&gt;
= Capturing Scan Timing Pulses =&lt;br /&gt;
Some researchers want to know the precise time when each slice or each volume is acquired. The scanner produces timing pulses that can be used to record this information. Additionally, a pulse sent by the scanner at the beginning of the scan can be used to trigger the start of an experimental task (reversing the direction of triggering discussed above). At the CNI, we have two methods of receiving these timing pulses. One method uses the USB-to-Serial trigger device and the other uses the fORP response box system. These two methods are described in more detail below.&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial timing pulses ==&lt;br /&gt;
The emulated serial port device [[#USB-to-Serial Port Trigger|described above]] can also be used to receive timing pulses from the scanner. To enable this mode, send a &amp;quot;[p]&amp;quot; command. You will then receive a &#039;p&#039; character every time a timing pulse is detected. The temporal accuracy of these pulses should be about 1 ms. These &amp;quot;scope trigger&amp;quot; pulses come at the beginning of every slice or the beginning of every volume, depending on how the PSD is configured. For the cni_epi and spiral PSDs, under the &amp;quot;Advanced&amp;quot; tab, you can change the &amp;quot;scope trigger&amp;quot; CV to send pulses for every slice or just for the first slice of each volume. To capture these trigger pulses, you can use this [[saveTriggers.py|python script]].&lt;br /&gt;
&lt;br /&gt;
== Timing pulses as keypresses via fORP ==&lt;br /&gt;
To use the fORP response box system to receive timing pulses from the scanner, set up the system as described in the &#039;Response Box&#039; section above. Note that timing pulses will be received via the same USB connection as subjects&#039; responses, and that no additional USB cables need be plugged into your testing computer. If you have selected a numeric mapping between button presses and keys, the timing pulses sent to your testing laptop will be in the form of a &#039;5&#039;. (Note that use of the 5-button diamond-shaped response box will include the numbers 1-4 and 6, and thus will not include the number 5). Use caution when editing experimental scripts while using this method--if your script is open while the scanner sends pulses, a long series of 5&#039;s will be inserted into your script!&lt;br /&gt;
&lt;br /&gt;
= General information =&lt;br /&gt;
&lt;br /&gt;
==The magnetic field==&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:mr750_gauss_lines_top.png|Gauss-lines for a generic install (top view).&lt;br /&gt;
Image:mr750_gauss_lines_side.png|Gauss-lines for a generic install (side view).&lt;br /&gt;
Image:mr750_gauss_lines_front.png|Gauss-lines for a generic install (front view).&lt;br /&gt;
Image:CNI_MR_fieldlines.png|Sketch of gauss-lines for our particular installation.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
When positioning equipment in the scan room, it&#039;s useful to be aware of the magnetic field lines. All equipment in the CNI scan room is MR-safe, but not all equipment functions properly in very high-field regions. The diagrams show the estimated field lines in the MR suite area.&lt;br /&gt;
&lt;br /&gt;
==Additional/Legacy hardware information==&lt;br /&gt;
See the [[Hardware configuration]] page for some additional and legacy hardware information.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59421</id>
		<title>MR Hardware</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59421"/>
		<updated>2026-03-18T20:02:23Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* fORP Response Box */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= MR Scanner =&lt;br /&gt;
The MR scanner is in room 065 of the CNI suite in Building 420. It has its [[MR Scanner|own wiki page]].&lt;br /&gt;
&lt;br /&gt;
= Peripheral Device Rack (Laima Box) =&lt;br /&gt;
[[File:LB_Overview_Annotate.jpg|thumb|Overview of Laima Box]]&lt;br /&gt;
As you may guess from the title, the Laima Box came into being on the urging of Laima to find a solution to provide a stable and flexible interface to all the display devices, scanner signals, and other peripheral devices that are commonly used during studies. &lt;br /&gt;
&lt;br /&gt;
From the top rack to the bottom, the devices are (as marked in the photo): &lt;br /&gt;
* Small Monitor (Output 3 on HDMI Matrix, typically used for Eyelink display) and Eyelink keyboard + mouse&lt;br /&gt;
* Hyperion Projector Consoles (left: rear projector, right: side projector); Projector Switch for switching between the two projectors&lt;br /&gt;
* fORP Optical Interface; Serial Trigger Box; Video Flipper ([https://halltechav.com/product/sc-hd-2b/ Hall Research video scaler SC-HD-2B])&lt;br /&gt;
* Main Power to the rack&lt;br /&gt;
* Remote Power Switches for equipments in the magnet room: Eyelink camera, Webcam, DC shim amplifier; Audio Inputs for Avotec channel A &amp;amp; B and OptoAcoustics&lt;br /&gt;
* HDMI Matrix (see detailed Input-Output schematics [[#HDMI Matrix Switch|below]])&lt;br /&gt;
* fORP USB connection; Serial-to-USB connection; Scanner trigger co-ax connections; Video Inputs (Input 4 &amp;amp; 5 on HDMI Matrix)&lt;br /&gt;
&lt;br /&gt;
= Stimulus Presentation =&lt;br /&gt;
&lt;br /&gt;
==Visual System ==&lt;br /&gt;
The CNI offers several display options, depending on your visual stimulus needs. All use a digital interface (DVID or HDMI) and can be connected by selecting the appropriate options on the HDMI matrix switch. The mirror on the Nova 32-channel coil is a double mirror design (see [[32-channel_double_mirror]]), and that on the GE 64-channel coil is a single mirror design. &lt;br /&gt;
&lt;br /&gt;
=== 3D LCD display ===&lt;br /&gt;
We have a 49&amp;quot; 4K 3D LCD display from Resonance Technology. It is placed at the far end of the scanner room behind the scanner&#039;s rear pedestal. Its specs and field of view presented to the scan subjects are as follows: &lt;br /&gt;
 * 640x480@60Hz up to 4096x2160@50Hz resolution&lt;br /&gt;
 * 1000:1 contrast ratio&lt;br /&gt;
 * screen size: 107.2cm high x 60.3cm wide &lt;br /&gt;
 * visual distance from Nova coil: 267cm from mirror2, 6cm mirror2 to mirror1, 15cm from eye to mirror1 = 288cm&lt;br /&gt;
 * visual distance from NFL coil: 263cm from mirror1, 13cm from eye to mirror1 = 276cm &lt;br /&gt;
&lt;br /&gt;
To see 3D effects, subjects will need to wear passive polarized lenses. The screen can, of course, present non-3D stimuli too. &lt;br /&gt;
&lt;br /&gt;
As described in our Slack [https://stanford-cni.slack.com/archives/C011V1M2FRN/p1639611006023100 channel], the TV monitor has varying latency depending on the mode it is in.  We conducted tests using a 1920x1080p@60Hz signal comparing the mirrored display on a laptop while simultaneously viewing the display on the scan room monitor.  By capturing these displays simultaneously with a high-speed video acquisition we were able to calibrate the latency between the laptop and scan room monitor display.  Assuming the laptop display latency is 0, when in General mode the monitor processing creates about 133ms (8 video frames) of latency, as compared to Game mode where the latency is only 33ms or 2 frames. In order to switch modes, the remote control must be used inside the scan room but care must be taken as the batteries are slightly ferromagnetic so be sure to hold on the remote firmly and keep it as far from the scanner as possible.  Choose Options-&amp;gt;Scene Select-&amp;gt;Game in order to select Game mode.  It should be in this mode by default -- we ask any users that switch the monitor mode to please return to Game mode after their experiment. &lt;br /&gt;
&lt;br /&gt;
=== DLP Projector ===&lt;br /&gt;
We also have an MR-compatible rear-projection DLP projector ([https://pstnet.com/products/hyperion/ Hyperion 2-120 Projector]). The new Hyperion 2-120 Control Room Console features an LCD touchscreen to power on/off the projector, mirror the image, show the projector status, and display video input resolution, refresh rate, and synchronization status. This projector can be used by placing the large mirror on the back of the scanner bed in front of the LCD display. You also need to place the rear-projection screen on the head coil. Set-up of this system is a bit more involved than the LCD display, but it offers a much brighter display and a larger field of view. If you need that, let us know and we&#039;ll show you how to set up the projector system.&lt;br /&gt;
&lt;br /&gt;
Here are the specs of the projector:&lt;br /&gt;
 * 1920x1080&lt;br /&gt;
 * 120Hz or 60Hz frame rate&lt;br /&gt;
 * 16:9 and 16:10 widescreen formats (standard 4:3 available)&lt;br /&gt;
 * brighter and larger field of view than the LCD displays&lt;br /&gt;
&lt;br /&gt;
If you try the projector (via HDMI) and nothing happens, you can try cycling power to the [[#The Laima Box|Laima Box]. If this doesn’t work, troubleshoot the projector as you normally would (check the input cable on the projector is connected and cycle inputs etc).&lt;br /&gt;
&lt;br /&gt;
=== HDMI Matrix Switch ===&lt;br /&gt;
[[File:HDMI_Switch_Schematic.jpg|thumb|HDMI switch schematic.]]&lt;br /&gt;
[[File:LB_HDMI_Switch.jpg|thumb|HDMI switch in Laima Box.]]&lt;br /&gt;
We use an 8x8 HDMI Matrix Switch to distribute video signals to all the various displays.  This is a [https://keydigital.org/category/4k-18g-hdmi-matrix-switchers/KD-MS8x8G Key Digital KD-MS8x8G] switch capable of connecting any of 8 input HDMI inputs to any/all of 8 HDMI outputs.  The switch is capable of handling 4K HDCP2.2 video signals.  The [[Media:HDMI_Switch_Schematic.jpg|schematic]] of the switch connections are shown here with all 8 inputs and outputs in use. In order to make a connection to a particular output display, you choose the particular input under the labeled output row of 8 LEDs.  This is done by pressing the button under the labeled output (see HDMI Matrix switch [[Media:LB_HDMI_Switch.jpg|image]]) in order to progress left-to-right through the various inputs.  Unfortunately, the blue LEDs on this switch that show what input is currently connected have been burning out, so it&#039;s sometimes necessary to count your button presses from a visible LED to know what input you are on. &lt;br /&gt;
&lt;br /&gt;
The default output display for each input is nominally the same number as the input.  As you&#039;ll note, we have the GE Host computer and GE Table Driver on inputs 1 &amp;amp; 2 -- this is so we can send the GE Host Display to any other display connected to the HDMI matrix switch, or use the GE Table Monitor to display other output -- such as the Eyelink computer output when adjusting the Eyelink camera at the front of the scanner. &lt;br /&gt;
&lt;br /&gt;
The HDMI matrix switch allows for fairly elaborate configuration as described in the [https://www.keydigital.org/web/content/5839 manual] via a Key Digital PC application that is available on the CNI PC laptop when connected to the internal private ethernet network. &lt;br /&gt;
&lt;br /&gt;
Troubleshooting: The HDMI matrix switch is generally fairly stable but if you&#039;re having odd behavior a good first step is to cycle the main power to the Laima Box -- this will reset the HDMI matrix switch.&lt;br /&gt;
&lt;br /&gt;
=== MRI Compatible Glasses and Lensometer ===&lt;br /&gt;
[[File:mri-glasses.jpg|thumb|mri frames and lenses]]&lt;br /&gt;
For participants who wear glasses, CNI has a set of interchangeable lenses that are used with an MRI compatible plastic frame. The frame and lenses are located in the open shelving above and to the left of where the screening forms are located. We have lenses for both near-sighted (-0.5 to -8.0 in .5 step increments) and far-sighted (+.5 to +8.0 in .5 step increments) vision corrections. The lenses are made of hard polycarbonate plastic and are not breakable. The easiest way to install the lenses into the frame is insert the lens from the back first into the edge by the ear piece and then snap in the lens by the nose. If the participant does not know his/her glasses prescription we have a lensometer that can determine that. Basic instructions for use of the lensometer are in the next section. There is also an eye chart posted on the door to the equipment room where participants can test their vision with the MRI glasses. Have the participant stand right in front of the lensometer (about 10 feet from the chart) to use the chart.&lt;br /&gt;
[[File:eye-chart.jpg|thumb|eye chart]]&lt;br /&gt;
&lt;br /&gt;
To determine glass prescription strengths for MRI participants CNI has the AL200 Auto Lensometer. Is is located in the CNI control room area. There is both a User&#039;s guide and a quick reference sheet next to the lensometer. The lensometer is currently set up to read a single vision lens. There are settings available to read either bifocal or progressive lenses, but they are not typically used as only the distance portion of the lens needs to be measured.&lt;br /&gt;
&lt;br /&gt;
Here is a basic how-to from the Reichert user&#039;s guide.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:Lensometer-parts.png|The key parts of the lensometer.&lt;br /&gt;
Image:Lensometer-back.png|Turn on the lensometer using the switch on the back panel. The AL200 will do a calibration check; do not place any lenses or obstructions in front of the aperture during calibration.&lt;br /&gt;
Image:Step2.png|The AL200’s default measurement mode is Single Vision, Automatic. This mode is used for fast, easy measurement of a pair of single vision spectacle lenses. You&#039;re now ready to measure the right lens, indicated by the &#039;R&#039; on the upper left side of the screen.&lt;br /&gt;
Image:Glass-placement1.jpg|Place the spectacles on the lens table and secure the right lens with the lens holder. Using the table base levers and your hand, move the lens until the large cross is positioned directly over the small cross in the middle of the centering target.&lt;br /&gt;
Image:Glass-placement2.jpg|If you insert a progressive lens in single vision mode, the progressive icon may flash to indicate that the mode should be changed. NOTE: Place the glasses so that lenses are toward the front and the ear pieces toward the back.&lt;br /&gt;
Image:Step3.png|When optical center has been located, the AL200 tone will sound and the measurements will be locked on the screen. Upon removal of the lens the AL200 will automatically switch to the left lens, indicated by the highlighted L on the upper right side of the screen. &lt;br /&gt;
Image:Step4.png|Repeat the measurement process for the left lens. All measurements will remain on the screen until the operator chooses to print or clear the data.&lt;br /&gt;
Image:Lensometer-screen.png|The number that appears in the Sphere location is the correction number that you will use in choosing the lenses for the MRI glasses.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Auditory System ==&lt;br /&gt;
&lt;br /&gt;
=== Avotec System ===&lt;br /&gt;
[[File:Avotec2.jpg|thumb|Avotec Console]]&lt;br /&gt;
[[File:Avotec-headsets.png|thumb|Avotec Headsets]]&lt;br /&gt;
The [https://avotecinc.com/pages/silent-scan Avotec Silent Scan system] provides a maximum of 30dB with the [https://avotecinc.com/products/full-coverage-headset-3000-series Full Coverage] and [https://avotecinc.com/products/conformal-headset-3000-series Conformal] headsets. The conformal headset will fit in any coil and any patient. The system also has a [https://avotecinc.com/products/non-headset-3000-series Flat Headset] with a slim profile (0.5 inch pad) which offers great flexibility and can fit into tight coils. The system provides clear two-way communication with built-in patient-activated alarm. The console and equalizer provide high-fidelity, frequency-balanced sound for a variety of audio inputs. The console also has a built-in radio. &lt;br /&gt;
&lt;br /&gt;
This system is best to use if you need to deliver high quality audio to the subjects, or need to communicate with the subjects frequently during the scans.&lt;br /&gt;
&lt;br /&gt;
We recommend using the Avotec + Flat Headset for most studies as it would fit into the Nova 32ch coil for most participants and is more robust in operation (in comparison to the Conformal headset and the OptoAcoustics system). If the Flat headset does not fit into the head coil, you can also use the Conformal headset. Note that when the participant is wearing the Conformal headset and lying on the patient table, the tube connecting to the headset can sometimes slip and pull the earplugs out of the participant&#039;s ears; if that happens you can tape down the tube to the patient table to prevent it from slipping. For audio input, use Avotec Channel A and B for the Conformal headset and Flat headset respectively.&lt;br /&gt;
&lt;br /&gt;
=== OptoACTIVE Headphone System === &lt;br /&gt;
[[File:OptoACTIVE.jpg|thumb|OptoACTIVE Headphone System control console]]&lt;br /&gt;
The OptoACTIVE Headphone System provides active noise cancellation (ANC) during MR scans. The slim profile headphones are designed to fit into the head coils for most human subjects. Its built-in optical microphones monitor the sound level at the subject&#039;s ears, which enable automatic self-calibration, sound pressure level monitoring and real-time in-ear stereo sound recording. The OptoACTIVE headphones also provide very good airseal around the subject&#039;s ears which results in excellent passive noise reduction as well. In combination with the passive noise reduction and active noise cancellation, the headphone can reach a 60 dB attenuation (95%) of the main EPI resonance noise. It also features the FOMRI-III noise cancelling microphone for the subject, which enables quiet two-way communication during scans. &lt;br /&gt;
&lt;br /&gt;
The control console has an LCD touch-screen and pushbuttons that allow the operator to control initial and ongoing calibrations, real-time active noise cancelling, channel level volume and recording, FORMRI microphone communications, etc. It displays the noise level, stimuli levels and spectrum analysis in real time.&lt;br /&gt;
&lt;br /&gt;
The system is ideal for the study of: sleeping disorders, autism, children suffering from claustrophobia, auditory fMRI and other research areas that were previously impractical or unattainable due to scanner noise.&lt;br /&gt;
&lt;br /&gt;
For step-by-step operation instructions, please see this [[Media:Optoacoustics_How-To.pdf | How-To Guide]], clearly summarized by Prof. Cameron Ellis and Emily Chen.&lt;br /&gt;
&lt;br /&gt;
== CNI Laptops ==&lt;br /&gt;
The CNI has one MacBook and one Windows PC for users to use during their experiments. The MacBook is running OS 10.12 and has MATLAB R2014b with PsychToolbox and PsychoPy 3 installed. The Windows PC is running Windows 11 and has E-Prime 3 installed (CNI also has a license for E-Prime 3). You could also checkout out [[Stimulus|some (old) notes]] shared by previous CNI users on how to set up experiments with these toolboxes.&lt;br /&gt;
&lt;br /&gt;
= Subject measurement =&lt;br /&gt;
&lt;br /&gt;
== fORP Response Box ==&lt;br /&gt;
We have a modular response box system ([http://www.curdes.com/index.php/mainforp/interfaces/fiu-933.html fORP 932]) from [http://www.curdes.com/ Current Designs]. With ths system, you can swap out various response devices. The output from any of these devices is available from the fORP box via USB. The device emulates a USB keyboard. We have confirmed that the fORP 932 USB interface is polled at 1kHz. The device itself has sub-millisecond time resolution (see the [http://www.curdes.com/index.php/support/faqs.html fORP FAQ]). We estimate that this system provides response time measurements with a precision and reliability of about one millisecond. &lt;br /&gt;
&lt;br /&gt;
Note that the fORP can send keypresses every time the scanner acquires a slice (or a volume, if the &amp;quot;scope trigger (User CV3)&amp;quot; is set to &amp;quot;1&amp;quot; in the EPI scans). If you want to receive these keypresses, configure the fORP by selecting a configuration that does *not* say &amp;quot;no 5&amp;quot; (if you are receiving numbers) or &amp;quot;no t&amp;quot; (if you are receiving letters). If you *do not* want to get these pulses (most users actually do not want these), then select a configuration that includes &amp;quot;no 5&amp;quot; or &amp;quot;no t&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The response devices that we currently have are:&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-scrl-1.html scroll-wheel device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-2x4-c.htmlhtml 2X4 bimanual button boxes]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x4-cyl-2.html  4-buttonstick-style response device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x5-d.html 5-button diamond button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/custom.html 5-button curved button box]&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-trk-2.html trackball device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-1x5-n4.html PYKA 5 button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/variabledevices/hhsc-joy-5.html joystick]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a need for a different response device, just let us know.&lt;br /&gt;
&lt;br /&gt;
To use a response device at the CNI:&lt;br /&gt;
# Plug the desired device into the black fiber-optic connector on the right side of the front of the magnet bore&lt;br /&gt;
# Locate the silver box (labeled fORP) on the peripheral device rack.&lt;br /&gt;
# Push in the knob on the right front side of the fORP box to enter menu mode. For the following instructions, you will turn the knob to scroll through the menu choices, and then push in on the knob to select your choice. (See [https://wiki.curdes.com/bin/view/CdiDocs/932QuickSetup this guide] for more details on using the fORP 932.)&lt;br /&gt;
# Turn the knob until the word &amp;quot;yes&amp;quot; is underlined then push the knob to select &amp;quot;yes&amp;quot;&lt;br /&gt;
# In the &amp;quot;mode select&amp;quot; menu that appears next, you can select &amp;quot;manual config&amp;quot;. We recommend, however, that you pick the AUTOCONFIGURE choice which tells the interface to determine as much as it can about the connected handheld device and the cabling to the host computer. This should simplify the choices that need to be made by you. If you have used the AUTOCONFIGURE option you can skip steps 6 and 7 below and proceed directly to step 8.&lt;br /&gt;
# In the response device menu, turn the knob to scroll through the choices until you find the device that you connected in step 1 (examples include):&lt;br /&gt;
## 4-button cylinder: select HHSC-cyl-5&lt;br /&gt;
## 5-button diamond: select HHSC-1x5-D&lt;br /&gt;
## 5-button curved: select HHSC-1x5-C&lt;br /&gt;
## bi-manual 4-button keypads: select HHSC-2x4c&lt;br /&gt;
## scrollwheel: select HHSC-SCRL1&lt;br /&gt;
## trackball: select HHSC-TRK-2 (for mouse emulation)&lt;br /&gt;
# Select USB in the next display by pushing in the knob.&lt;br /&gt;
# Select the desired output mode. For the cylinder or keypads, this determines the mapping between the buttons and the keypress that is generated. E.g., HID-NAR-12345 will map the 4 cylinder buttons to the four number keys, 1-4, and send a &#039;5&#039; for each scope trigger pulse received by the scanner (if you don&#039;t want these pulses, select the &#039;no 5&#039; mode, as noted above). NAR means &amp;quot;no auto release&amp;quot;. In NAR mode, the keypress is maintained as long as the button is pressed. In the non-NAR mode, a brief keypress is generated, even if the button is held down. We find that NAR mode works better with PsychToolbox. In non-NAR mode, it can miss the very brief keypresses produced by auto release. &lt;br /&gt;
# Setup is now complete.&lt;br /&gt;
&lt;br /&gt;
For more technical details about the fORP, see the [[fORP|fORP wiki page]].&lt;br /&gt;
&lt;br /&gt;
== Eye Tracker ==&lt;br /&gt;
[[File:cni_eye_tracker_camera.jpg|thumb|Eye tracker camera.]]&lt;br /&gt;
[[File:cni_eye_tracker_ir.jpg|thumb|Eye tracker IR illuminator.]]&lt;br /&gt;
&lt;br /&gt;
We have an [https://www.sr-research.com/eyelink-1000-plus/ SR Research EyeLink 1000 Plus] eye tracker with remote optics installed at the CNI. It has a frame rate of up to 2000Hz, up to 1/2 degree accuracy, and is fairly easy to set up and use. We found that the standard IR light source from SR Research did not adequately focus the light onto the subject&#039;s eye, so we use the [https://mrc-systems.de/en/products/mr-compatible-cameras#light-sources LED light source] from MRC Systems. &lt;br /&gt;
&lt;br /&gt;
The camera is mounted on a wood stand placed next to the patient bed at the back of the bore. The camera position and focus should not need to be adjusted if your subject is positioned with their eyes close to isocenter. However, if you have a prescription that is centered far from iso-center, you may need to adjust the focus a bit. To do that, you can use the HDMI matrix to show the eye tracker video on the bore monitor so that you can adjust the camera while seeing what you are doing.&lt;br /&gt;
&lt;br /&gt;
The LED light source is mounted on a blue loc-line stalk that attaches to the head coil and is usually left unattached and hanging on the side of the scanner next to the response devices; you will need to mount it to the head coil using the blue loc-line pliers that you can find under the shelf with all the padding. Once mounted, make sure the light source is directed toward the subject&#039;s eye by aiming it through the gap between the two mirrors.&lt;br /&gt;
&lt;br /&gt;
The eye tracker host computer is mounted in the equipment room. However, the display, keyboard, and mouse for that computer are to the right of the GE console. You can connect to the host computer by a direct TCP connection through the ethernet cable located in the cable bundle next to the GE console. This cable is, not surprisingly, labeled &amp;quot;eye tracker&amp;quot;. If you use psych toolbox for stimulus presentation, you can use the [http://psychtoolbox.org/docs/EyelinkToolbox EyeLink Toolbox]. For those who use python (e.g., [http://www.psychopy.org/ Psychopy]), try the [http://www.psychopy.org/api/hardware/pylink.html PyLink module]. If you use E-Prime, check out the [https://www.sr-support.com/showthread.php?149-E-Prime-integration E-Prime integration info] on the SR Research support site. In any case, the IP address of the Eyelink is on our private network and thus is NOT the default IP, so you need to explicitly set it to 10.0.3.2. This private network has a DHCP server, so your stimulus computer should automatically get assigned an IP address on the same subnet. Please don&#039;t hard-code an IP address for your stimulus computer! Note that older versions of psychtoolbox don&#039;t allow you to specify the IP address, so be sure to get the latest Eyelink mex file from [https://github.com/kleinerm/Psychtoolbox-3/commit/aa04b821e975e0e61978377bb05aa1e216f3382e github].&lt;br /&gt;
&lt;br /&gt;
The data recorded by the EyeLink software is saved in the EyeLink partition (E:\). To transfer the data to your own storage device, you can reboot the EyeLink computer into Windows and connect your own USB drive. Afterwards you can reboot the computer again and get back into the EyeLink system. &lt;br /&gt;
&lt;br /&gt;
For a tutorial and troubleshooting information on the Eyelink system, see the [[EyelinkTracker]] page.&lt;br /&gt;
&lt;br /&gt;
==Physio monitoring==&lt;br /&gt;
[[File:ppg_resp.jpg|thumb|Photo plethesmograph (PPG) and respiration belt.]]&lt;br /&gt;
[[File:Tools_gating.png|thumb|Tools Gating]]&lt;br /&gt;
[[File:Physio_waveforms.png|thumb|Physio Waveforms on Console]]&lt;br /&gt;
[[File:physmon.png|thumb|[[CNI_widgets|CNI PPG pulse detector device]].]]&lt;br /&gt;
The scanner has the standard suite of physiological measures: pulse oximetry, respiration belt, and ECG. These can be used for scan triggering. The digital data from these measurements are saved on the console and backed-up in the Flywheel database. These data are also processed by the [[CNI_widgets|CNI PPG monitoring device]] and used for EEG ballisto-cardiogram artifact removal by the EGI NetStation software. (See also the [http://fmri.ucsd.edu/Howto/3T/physio.html UCSD fMRI group&#039;s site] for more information on using the GE physio files to remove physiological artifacts from fMRI data.) A recent paper is here - [https://doi.org/10.1016/j.jneumeth.2016.10.019 The PhysIO Toolbox for Modeling Physiological Noise in fMRI Data]&lt;br /&gt;
&lt;br /&gt;
===Setting Up Physio Recording===&lt;br /&gt;
&lt;br /&gt;
* Go to “Tools” - &amp;quot;Gating&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* To record respiration/movement of the abdominal wall, select “Respiratory.”&lt;br /&gt;
&lt;br /&gt;
* To record pulse/peripheral gating, select “PG.”&lt;br /&gt;
&lt;br /&gt;
* Outfit your participant with the respiratory bellows and the PG sensor&lt;br /&gt;
&lt;br /&gt;
===Respiratory Bellows===&lt;br /&gt;
&lt;br /&gt;
The respiratory bellows goes around your participant’s diaphragm or abdomen. You will get the best signal in the area where the participant’s breathing motion is most visible when they are lying down. Use the Velcro to adjust the respiratory bellows; it should be snug and not move around much, but stretched as little as possible and not too tight. The bellows should expand and contract approximately 0.5 to 1 inches with the participant’s breathing. Do not place any padding over the respiratory bellows. You should be able to see the recording on the small screen on the scanner. Note that it’ll take about one minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the bellows if necessary. &lt;br /&gt;
&lt;br /&gt;
===Pulse/Peripheral Gating (PPG) ===&lt;br /&gt;
&lt;br /&gt;
The participant’s pulse is monitored by a photopulse sensor that detects blood oxygen levels (pulse oximetry) in the vascular bed of the participant’s finger/thumb or toe. During the measurement, the participant’s hand or foot should remain cool and dry. We recommend that you attach the sensor to the participant’s toe, especially if you are going to ask your participant to use one of the button boxes because hand movements will create noise in your PG signal. &lt;br /&gt;
&lt;br /&gt;
* Recording from the toe: Attach the sensor to the fastener for the toe (with the Velcro). Place the sensor on the vascular bed of the participant’s toe. To keep the sensor in place, tape it and the fastener to the participant’s foot using medical tape. It is also a good idea to tape the cable to the knee pillow or the participant’s leg to reduce the pull on the sensor. &lt;br /&gt;
* Recording from the thumb/finger: Place the sensor on the participant’s finger or thumb. It is a good idea to avoid placing the sensor on the joint (the signal will be much noisier if you place the sensor on the joint). To keep the sensor in place it helps to tape it to the participant’s hand with some medical tape.&lt;br /&gt;
&lt;br /&gt;
You should be able to see the recording on the small screen on the scanner. Note that it’ll take up to a minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the sensor if necessary. &lt;br /&gt;
&lt;br /&gt;
Note: When you are done, please clean the sensor with alcohol wipes as it directly touches the participant’s skin.&lt;br /&gt;
&lt;br /&gt;
===Recording Physio===&lt;br /&gt;
&lt;br /&gt;
The default method for recording the physio is the CV control method (set CV phys_record_flag to 1). With default setting of CV control method, a recording of maximum length (25 minute) will require approximately 3 seconds to save to files to the hard disk after the end of the scan. You need to make sure that the next phys-recording scan starts after the previous recording finishes saving data to files. If the next phys-recording scan starts before the previous recording finishes, the new recording request will be ignored. &lt;br /&gt;
&lt;br /&gt;
===Parsing the physio files===&lt;br /&gt;
&lt;br /&gt;
The physio data from the scanner can include three types of measurements: pulse, respiration, and electrocardiogram (ECG).  The pulse data come from the PPG, the respiration data from the breathing-belt, and the ECG from the specialized electrodes attached to the chest. &lt;br /&gt;
&lt;br /&gt;
The data recorded from these devices are written out into simple text-files. There are three files for each type of measurement.  The file names start with PPG, RESP and ECG for the three types of measurements.  The files have raw data (&#039;Data&#039;), and the times of the local peaks (&#039;Trig&#039;) (and sometimes an empty &#039;PACTrig&#039;). &lt;br /&gt;
&lt;br /&gt;
* The temporal sampling rates differ between the three types of measurements&lt;br /&gt;
** ECG: 1ms, &lt;br /&gt;
** Pulse/Peripheral Gating: 10ms, &lt;br /&gt;
** Respiration: 40ms.&lt;br /&gt;
* The timeseries data&lt;br /&gt;
** start 30 seconds of baseline from before the start scan button was pressed&lt;br /&gt;
** have a variable duration between start scan button press and the actual start (pre-scan delays, external trigger delays, etc.)&lt;br /&gt;
** stop at the same time as the scan&lt;br /&gt;
&lt;br /&gt;
To reiterate-- the physio data stored in the physio files starts 30 seconds &#039;&#039;&#039;before&#039;&#039;&#039; you press the &#039;Scan&#039; button (yes, it&#039;s psychic ;), which is almost always more than 30 seconds before scanning actually starts. It could be substantially longer if you do external triggering. In that case, you&#039;ll get some extra physio data recorded during the time between when you press start scan and you send your trigger. But the recording does stop when the scan stops. So, to synchronize physio and scan data, you can take the end of the physio data and count backward the number of data points to keep using the duration of MR acquisiton and sampling rate of the physio data.&lt;br /&gt;
&lt;br /&gt;
The physio files are zipped and uploaded to Flywheel. A simple Flywheel gear &amp;quot;CNI GE Physio File Converter&amp;quot; is avalible to help extract, visualize, and summarize the data.&lt;br /&gt;
&lt;br /&gt;
===Biopac measures===&lt;br /&gt;
For measuring skin conductance and EMG, we have a Biopac with the [http://www.biopac.com/product/eda-electrodermal-activity-amplifier-for-mri electro-dermal activity amplifier] and [http://www.biopac.com/product/electromyogram-amplifier EMG amplifier] modules. The data from the Biopac are digitized with a [http://labjack.com/ue9 LabJack UE9] DAQ device and are available directly through a TCP stream (see [http://labjack.com/support/ue9/c-native-tcp-example the UE9 code samples]) or via our linux box voxel2, which can be used to trigger data acquisition that is synchronized with the scanner. The command to run the recording script is &amp;quot;testfix_labjack.py /data/biopac/[your experiment folder]/[run id] [recording duration]&amp;quot;. The recording duration is in seconds. The output is a csv file at /data/biopac/[your experiment folder]/[run id]_[timestamp].csv. The data file records the voltage and raw ADC values. The skin conductance is stored in the second (voltage) and third (raw ADC) columns. You probably want the second column (with numbers like &amp;quot;1.60230098&amp;quot;). The skin conductance amplifier gain is set to five microsiemens per volt. So, if you multiply the numbers in the second column by 5, you will have the skin conductance in microsiemens. The EMG values are in the fourth (voltage) and fifth (raw ADC) columns. The EMG amplifier gain is set to 2000, so dividing the values in the fourth column by 2 will give you the EMG voltage in millivolts.&lt;br /&gt;
&lt;br /&gt;
== Real-time motion tracking ==&lt;br /&gt;
[[File:FIRMM.jpg|thumb|FIRMM tablet]]&lt;br /&gt;
For subject motion tracking, we have a [https://turingmedical.com/firmm/ FIRMM tablet] that can access the scanner&#039;s image database and provide feedback on the subject&#039;s head motion in real-time. FIRMM will automatically plot the motion trace and quality metrics when scanning begins. You can also set protocol-specific parameters like the motion threshold and data quality goals required for your study. It helps monitor the quality metrics in real time so you can adjust your approach. This is mostly useful for fMRI studies. It is also possible to configure the video output so that you can send the real-time motion feedback to the subject via visual display. &lt;br /&gt;
&lt;br /&gt;
The FIRMM tablet is configured to be connected to the scanner by default. If it shows &amp;quot;FIRMM DISCONNECTED&amp;quot;, then we need to check if the firmm_transfer process is running on the scanner, sometimes restarting the process or restarting the FIRMM tablet is needed.&lt;br /&gt;
&lt;br /&gt;
==Subject video==&lt;br /&gt;
You can monitor and record the subject&#039;s face or body using the [https://mrc-systems.de/en/products/mr-compatible-cameras MRI compatable video camera from MRC Systems]. The camera is always on and streaming video to the linux box next to the scan console. An analog video signal is also sent to the large-screen tv in the control room (use the &#039;A/v input&#039;). To use the camera, you can attach it to the head coil using the loc-line connectors. When not in use, the camera should be hung on the side of the scanner along with the response devices. To see the video feed, run the following from the command line: &amp;quot;ffplay -f video4linux2 /dev/video0&amp;quot;. To record the video feed, you can use our video recording scripts. From the command line run &amp;quot;recordSubject 310&amp;quot;, this will record subject video for 5 minutes and 10 seconds; to synchronize the recording to the start of the scan, run &amp;quot;recordSubjectTrigger 310&amp;quot; instead. The data files are saved to the &amp;quot;video&amp;quot; directory. &lt;br /&gt;
&lt;br /&gt;
Troubleshoot: if you get an error &amp;quot;/dev/device0: busy or resource unavailable&amp;quot;, then run &amp;quot;fuser /dev/device0&amp;quot; and you&#039;ll get the PID of the process that is currently occupying the video device. Then run &amp;quot;kill -9 [PID]&amp;quot;. This should kill the process and you should be able to use the video camera again. Occasionally the camera feed fails and the recorded video files are empty. If this happens, check the video device setting with &amp;quot;v4l2-ctl -d /dev/video0 --all&amp;quot; and look for the &amp;quot;Video Standard&amp;quot; section. If it&#039;s something like &amp;quot;Video Standard = 0x000000ff PAL-B/B1/G/H/I/D/D1/K&amp;quot;, then you&#039;ll need to change it to NTSC standard with &amp;quot;v4l2-ctl -d /dev/video0 -s ntsc&amp;quot;. The returned message should be &amp;quot;Standard set to 0000b000 NTSC-M/M-JP/M-KR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scan Triggers =&lt;br /&gt;
[[File:cni_epi_psd_usercvs_ss.png|thumb|UserCVs under the &#039;Advanced&#039; tab for the cni_epi PSD.]]&lt;br /&gt;
The moment when the scanner starts acquiring image data can be controlled from the computer you use to control your experiment. To do this you need to be able to program your computer to send a pulse to the scanner at the planned moment.&lt;br /&gt;
&lt;br /&gt;
At the CNI, we provide a [[CNI widgets|USB-to-Serial port device]], which works well for E-Prime and Presentation. The notes below show how to set up the UserCV so that the scanner listens for the trigger, and how to send a trigger pulse using the USB-to-Serial device.&lt;br /&gt;
&lt;br /&gt;
== Protocol configuration ==&lt;br /&gt;
For BOLD EPI, be sure to use the cni_epi PSD to get the triggering options described here. The same options are also available for the spiral PSD. Under the &#039;Advanced&#039; tab, make sure the &amp;quot;start scan trigger&amp;quot; CV is set to &#039;1&#039;, which tells it to use the external trigger. Other options include &#039;0&#039; for no trigger (scan starts as soon as the scan button is pressed), and &#039;2&#039; for cardiac gating, which will synchronize to the cardiac cycle (measured via either the PPG pulse oximeter or ECG leads).&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial Port Trigger ==&lt;br /&gt;
The CNI also has a USB-to-Serial port device set up to send scan triggers. Just connect the USB cable labeled &amp;quot;EPrime Trigger&amp;quot; to your computer. On OS-X and Linux, the device is automatically recognized as a serial port (under /dev/ttyACM? on linux or /dev/ttyUSB??? on OS-X). On Windows, the device will show up as a COM port. &lt;br /&gt;
&lt;br /&gt;
When configuring the port, note that the device is expecting communication at 57600 bps and the scanner is triggered by sending a three-character string: &amp;quot;[t]&amp;quot; (without the quotes). In E-Prime, you need to add the serial port device to your experiment and then configure it by specifying the device (you can find the COM port number in Windows Device Manager - Ports (COM&amp;amp;LPT)) and setting the baud rate to 57600. (Other settings can be left at their default values.) In your E-Prime script, add the following in-line code to send the trigger string to the port: &lt;br /&gt;
&lt;br /&gt;
 Serial.WriteString &amp;quot;[t]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To use this device from Matlab, try:&lt;br /&gt;
&lt;br /&gt;
 s = serial(&#039;/dev/ttyS0&#039;, &#039;BaudRate&#039;, 57600);&lt;br /&gt;
 fopen(s);&lt;br /&gt;
 fprintf(s, &#039;[t]&#039;);&lt;br /&gt;
 fclose(s);&lt;br /&gt;
&lt;br /&gt;
Note that you will need to replace &#039;/dev/ttyS0&#039; with the correct port on your machine. E.g., if you&#039;re on windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. On a mac,  type &#039;ls -lh /dev/tty.usbmodem*&#039; in a terminal. &lt;br /&gt;
&lt;br /&gt;
If you are using PsychoPy, first make sure the pyserial package is installed (e.g., pip install pyserial). Then create two code blocks:&lt;br /&gt;
&lt;br /&gt;
 # Insert a &#039;Begin Experiment&#039; code block to initialize (e.g., as part of your instructions)&lt;br /&gt;
 import serial&lt;br /&gt;
 import time&lt;br /&gt;
 device = &#039;/dev/ttyACM1&#039;  # NOTE: replace with your device identifier! On windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. &lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(device, 115200, timeout=1)&lt;br /&gt;
         time.sleep(0.1)&lt;br /&gt;
         ser.write(&#039;[t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         pass&lt;br /&gt;
&lt;br /&gt;
 # Insert a &amp;quot;Begin Routine&amp;quot; code block whenever you want to send a trigger:&lt;br /&gt;
 send_trigger()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternate example from Christina Chung: &lt;br /&gt;
 #################################################&lt;br /&gt;
 ### import modules&lt;br /&gt;
 import serial&lt;br /&gt;
 import time &lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 ### Set SCANNER_TRIGGER_NEEDED to False to bypass program abortion when scanner exception is thrown&lt;br /&gt;
 SCANNER_TRIGGER_NEEDED = False&lt;br /&gt;
 DEVICE_ID = &#039;com3&#039;&lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(DEVICE_ID, 57600, timeout=1)&lt;br /&gt;
         time.sleep(2)    ### wait for 2 sec to ensure scanner is ready; CNI wiki default 0.1&lt;br /&gt;
         ser.write(&#039;[t][t][t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         if not SCANNER_TRIGGER_NEEDED:&lt;br /&gt;
             pass&lt;br /&gt;
         else:&lt;br /&gt;
             core.quit()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The construction of our serial trigger device is described on the [[CNI widgets]] page.&lt;br /&gt;
&lt;br /&gt;
= Capturing Scan Timing Pulses =&lt;br /&gt;
Some researchers want to know the precise time when each slice or each volume is acquired. The scanner produces timing pulses that can be used to record this information. Additionally, a pulse sent by the scanner at the beginning of the scan can be used to trigger the start of an experimental task (reversing the direction of triggering discussed above). At the CNI, we have two methods of receiving these timing pulses. One method uses the USB-to-Serial trigger device and the other uses the fORP response box system. These two methods are described in more detail below.&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial timing pulses ==&lt;br /&gt;
The emulated serial port device [[#USB-to-Serial Port Trigger|described above]] can also be used to receive timing pulses from the scanner. To enable this mode, send a &amp;quot;[p]&amp;quot; command. You will then receive a &#039;p&#039; character every time a timing pulse is detected. The temporal accuracy of these pulses should be about 1 ms. These &amp;quot;scope trigger&amp;quot; pulses come at the beginning of every slice or the beginning of every volume, depending on how the PSD is configured. For the cni_epi and spiral PSDs, under the &amp;quot;Advanced&amp;quot; tab, you can change the &amp;quot;scope trigger&amp;quot; CV to send pulses for every slice or just for the first slice of each volume. To capture these trigger pulses, you can use this [[saveTriggers.py|python script]].&lt;br /&gt;
&lt;br /&gt;
== Timing pulses as keypresses via fORP ==&lt;br /&gt;
To use the fORP response box system to receive timing pulses from the scanner, set up the system as described in the &#039;Response Box&#039; section above. Note that timing pulses will be received via the same USB connection as subjects&#039; responses, and that no additional USB cables need be plugged into your testing computer. If you have selected a numeric mapping between button presses and keys, the timing pulses sent to your testing laptop will be in the form of a &#039;5&#039;. (Note that use of the 5-button diamond-shaped response box will include the numbers 1-4 and 6, and thus will not include the number 5). Use caution when editing experimental scripts while using this method--if your script is open while the scanner sends pulses, a long series of 5&#039;s will be inserted into your script!&lt;br /&gt;
&lt;br /&gt;
= General information =&lt;br /&gt;
&lt;br /&gt;
==The magnetic field==&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:mr750_gauss_lines_top.png|Gauss-lines for a generic install (top view).&lt;br /&gt;
Image:mr750_gauss_lines_side.png|Gauss-lines for a generic install (side view).&lt;br /&gt;
Image:mr750_gauss_lines_front.png|Gauss-lines for a generic install (front view).&lt;br /&gt;
Image:CNI_MR_fieldlines.png|Sketch of gauss-lines for our particular installation.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
When positioning equipment in the scan room, it&#039;s useful to be aware of the magnetic field lines. All equipment in the CNI scan room is MR-safe, but not all equipment functions properly in very high-field regions. The diagrams show the estimated field lines in the MR suite area.&lt;br /&gt;
&lt;br /&gt;
==Additional/Legacy hardware information==&lt;br /&gt;
See the [[Hardware configuration]] page for some additional and legacy hardware information.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59420</id>
		<title>MR Hardware</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59420"/>
		<updated>2026-03-18T20:00:22Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Biopac measures */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= MR Scanner =&lt;br /&gt;
The MR scanner is in room 065 of the CNI suite in Building 420. It has its [[MR Scanner|own wiki page]].&lt;br /&gt;
&lt;br /&gt;
= Peripheral Device Rack (Laima Box) =&lt;br /&gt;
[[File:LB_Overview_Annotate.jpg|thumb|Overview of Laima Box]]&lt;br /&gt;
As you may guess from the title, the Laima Box came into being on the urging of Laima to find a solution to provide a stable and flexible interface to all the display devices, scanner signals, and other peripheral devices that are commonly used during studies. &lt;br /&gt;
&lt;br /&gt;
From the top rack to the bottom, the devices are (as marked in the photo): &lt;br /&gt;
* Small Monitor (Output 3 on HDMI Matrix, typically used for Eyelink display) and Eyelink keyboard + mouse&lt;br /&gt;
* Hyperion Projector Consoles (left: rear projector, right: side projector); Projector Switch for switching between the two projectors&lt;br /&gt;
* fORP Optical Interface; Serial Trigger Box; Video Flipper ([https://halltechav.com/product/sc-hd-2b/ Hall Research video scaler SC-HD-2B])&lt;br /&gt;
* Main Power to the rack&lt;br /&gt;
* Remote Power Switches for equipments in the magnet room: Eyelink camera, Webcam, DC shim amplifier; Audio Inputs for Avotec channel A &amp;amp; B and OptoAcoustics&lt;br /&gt;
* HDMI Matrix (see detailed Input-Output schematics [[#HDMI Matrix Switch|below]])&lt;br /&gt;
* fORP USB connection; Serial-to-USB connection; Scanner trigger co-ax connections; Video Inputs (Input 4 &amp;amp; 5 on HDMI Matrix)&lt;br /&gt;
&lt;br /&gt;
= Stimulus Presentation =&lt;br /&gt;
&lt;br /&gt;
==Visual System ==&lt;br /&gt;
The CNI offers several display options, depending on your visual stimulus needs. All use a digital interface (DVID or HDMI) and can be connected by selecting the appropriate options on the HDMI matrix switch. The mirror on the Nova 32-channel coil is a double mirror design (see [[32-channel_double_mirror]]), and that on the GE 64-channel coil is a single mirror design. &lt;br /&gt;
&lt;br /&gt;
=== 3D LCD display ===&lt;br /&gt;
We have a 49&amp;quot; 4K 3D LCD display from Resonance Technology. It is placed at the far end of the scanner room behind the scanner&#039;s rear pedestal. Its specs and field of view presented to the scan subjects are as follows: &lt;br /&gt;
 * 640x480@60Hz up to 4096x2160@50Hz resolution&lt;br /&gt;
 * 1000:1 contrast ratio&lt;br /&gt;
 * screen size: 107.2cm high x 60.3cm wide &lt;br /&gt;
 * visual distance from Nova coil: 267cm from mirror2, 6cm mirror2 to mirror1, 15cm from eye to mirror1 = 288cm&lt;br /&gt;
 * visual distance from NFL coil: 263cm from mirror1, 13cm from eye to mirror1 = 276cm &lt;br /&gt;
&lt;br /&gt;
To see 3D effects, subjects will need to wear passive polarized lenses. The screen can, of course, present non-3D stimuli too. &lt;br /&gt;
&lt;br /&gt;
As described in our Slack [https://stanford-cni.slack.com/archives/C011V1M2FRN/p1639611006023100 channel], the TV monitor has varying latency depending on the mode it is in.  We conducted tests using a 1920x1080p@60Hz signal comparing the mirrored display on a laptop while simultaneously viewing the display on the scan room monitor.  By capturing these displays simultaneously with a high-speed video acquisition we were able to calibrate the latency between the laptop and scan room monitor display.  Assuming the laptop display latency is 0, when in General mode the monitor processing creates about 133ms (8 video frames) of latency, as compared to Game mode where the latency is only 33ms or 2 frames. In order to switch modes, the remote control must be used inside the scan room but care must be taken as the batteries are slightly ferromagnetic so be sure to hold on the remote firmly and keep it as far from the scanner as possible.  Choose Options-&amp;gt;Scene Select-&amp;gt;Game in order to select Game mode.  It should be in this mode by default -- we ask any users that switch the monitor mode to please return to Game mode after their experiment. &lt;br /&gt;
&lt;br /&gt;
=== DLP Projector ===&lt;br /&gt;
We also have an MR-compatible rear-projection DLP projector ([https://pstnet.com/products/hyperion/ Hyperion 2-120 Projector]). The new Hyperion 2-120 Control Room Console features an LCD touchscreen to power on/off the projector, mirror the image, show the projector status, and display video input resolution, refresh rate, and synchronization status. This projector can be used by placing the large mirror on the back of the scanner bed in front of the LCD display. You also need to place the rear-projection screen on the head coil. Set-up of this system is a bit more involved than the LCD display, but it offers a much brighter display and a larger field of view. If you need that, let us know and we&#039;ll show you how to set up the projector system.&lt;br /&gt;
&lt;br /&gt;
Here are the specs of the projector:&lt;br /&gt;
 * 1920x1080&lt;br /&gt;
 * 120Hz or 60Hz frame rate&lt;br /&gt;
 * 16:9 and 16:10 widescreen formats (standard 4:3 available)&lt;br /&gt;
 * brighter and larger field of view than the LCD displays&lt;br /&gt;
&lt;br /&gt;
If you try the projector (via HDMI) and nothing happens, you can try cycling power to the [[#The Laima Box|Laima Box]. If this doesn’t work, troubleshoot the projector as you normally would (check the input cable on the projector is connected and cycle inputs etc).&lt;br /&gt;
&lt;br /&gt;
=== HDMI Matrix Switch ===&lt;br /&gt;
[[File:HDMI_Switch_Schematic.jpg|thumb|HDMI switch schematic.]]&lt;br /&gt;
[[File:LB_HDMI_Switch.jpg|thumb|HDMI switch in Laima Box.]]&lt;br /&gt;
We use an 8x8 HDMI Matrix Switch to distribute video signals to all the various displays.  This is a [https://keydigital.org/category/4k-18g-hdmi-matrix-switchers/KD-MS8x8G Key Digital KD-MS8x8G] switch capable of connecting any of 8 input HDMI inputs to any/all of 8 HDMI outputs.  The switch is capable of handling 4K HDCP2.2 video signals.  The [[Media:HDMI_Switch_Schematic.jpg|schematic]] of the switch connections are shown here with all 8 inputs and outputs in use. In order to make a connection to a particular output display, you choose the particular input under the labeled output row of 8 LEDs.  This is done by pressing the button under the labeled output (see HDMI Matrix switch [[Media:LB_HDMI_Switch.jpg|image]]) in order to progress left-to-right through the various inputs.  Unfortunately, the blue LEDs on this switch that show what input is currently connected have been burning out, so it&#039;s sometimes necessary to count your button presses from a visible LED to know what input you are on. &lt;br /&gt;
&lt;br /&gt;
The default output display for each input is nominally the same number as the input.  As you&#039;ll note, we have the GE Host computer and GE Table Driver on inputs 1 &amp;amp; 2 -- this is so we can send the GE Host Display to any other display connected to the HDMI matrix switch, or use the GE Table Monitor to display other output -- such as the Eyelink computer output when adjusting the Eyelink camera at the front of the scanner. &lt;br /&gt;
&lt;br /&gt;
The HDMI matrix switch allows for fairly elaborate configuration as described in the [https://www.keydigital.org/web/content/5839 manual] via a Key Digital PC application that is available on the CNI PC laptop when connected to the internal private ethernet network. &lt;br /&gt;
&lt;br /&gt;
Troubleshooting: The HDMI matrix switch is generally fairly stable but if you&#039;re having odd behavior a good first step is to cycle the main power to the Laima Box -- this will reset the HDMI matrix switch.&lt;br /&gt;
&lt;br /&gt;
=== MRI Compatible Glasses and Lensometer ===&lt;br /&gt;
[[File:mri-glasses.jpg|thumb|mri frames and lenses]]&lt;br /&gt;
For participants who wear glasses, CNI has a set of interchangeable lenses that are used with an MRI compatible plastic frame. The frame and lenses are located in the open shelving above and to the left of where the screening forms are located. We have lenses for both near-sighted (-0.5 to -8.0 in .5 step increments) and far-sighted (+.5 to +8.0 in .5 step increments) vision corrections. The lenses are made of hard polycarbonate plastic and are not breakable. The easiest way to install the lenses into the frame is insert the lens from the back first into the edge by the ear piece and then snap in the lens by the nose. If the participant does not know his/her glasses prescription we have a lensometer that can determine that. Basic instructions for use of the lensometer are in the next section. There is also an eye chart posted on the door to the equipment room where participants can test their vision with the MRI glasses. Have the participant stand right in front of the lensometer (about 10 feet from the chart) to use the chart.&lt;br /&gt;
[[File:eye-chart.jpg|thumb|eye chart]]&lt;br /&gt;
&lt;br /&gt;
To determine glass prescription strengths for MRI participants CNI has the AL200 Auto Lensometer. Is is located in the CNI control room area. There is both a User&#039;s guide and a quick reference sheet next to the lensometer. The lensometer is currently set up to read a single vision lens. There are settings available to read either bifocal or progressive lenses, but they are not typically used as only the distance portion of the lens needs to be measured.&lt;br /&gt;
&lt;br /&gt;
Here is a basic how-to from the Reichert user&#039;s guide.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:Lensometer-parts.png|The key parts of the lensometer.&lt;br /&gt;
Image:Lensometer-back.png|Turn on the lensometer using the switch on the back panel. The AL200 will do a calibration check; do not place any lenses or obstructions in front of the aperture during calibration.&lt;br /&gt;
Image:Step2.png|The AL200’s default measurement mode is Single Vision, Automatic. This mode is used for fast, easy measurement of a pair of single vision spectacle lenses. You&#039;re now ready to measure the right lens, indicated by the &#039;R&#039; on the upper left side of the screen.&lt;br /&gt;
Image:Glass-placement1.jpg|Place the spectacles on the lens table and secure the right lens with the lens holder. Using the table base levers and your hand, move the lens until the large cross is positioned directly over the small cross in the middle of the centering target.&lt;br /&gt;
Image:Glass-placement2.jpg|If you insert a progressive lens in single vision mode, the progressive icon may flash to indicate that the mode should be changed. NOTE: Place the glasses so that lenses are toward the front and the ear pieces toward the back.&lt;br /&gt;
Image:Step3.png|When optical center has been located, the AL200 tone will sound and the measurements will be locked on the screen. Upon removal of the lens the AL200 will automatically switch to the left lens, indicated by the highlighted L on the upper right side of the screen. &lt;br /&gt;
Image:Step4.png|Repeat the measurement process for the left lens. All measurements will remain on the screen until the operator chooses to print or clear the data.&lt;br /&gt;
Image:Lensometer-screen.png|The number that appears in the Sphere location is the correction number that you will use in choosing the lenses for the MRI glasses.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Auditory System ==&lt;br /&gt;
&lt;br /&gt;
=== Avotec System ===&lt;br /&gt;
[[File:Avotec2.jpg|thumb|Avotec Console]]&lt;br /&gt;
[[File:Avotec-headsets.png|thumb|Avotec Headsets]]&lt;br /&gt;
The [https://avotecinc.com/pages/silent-scan Avotec Silent Scan system] provides a maximum of 30dB with the [https://avotecinc.com/products/full-coverage-headset-3000-series Full Coverage] and [https://avotecinc.com/products/conformal-headset-3000-series Conformal] headsets. The conformal headset will fit in any coil and any patient. The system also has a [https://avotecinc.com/products/non-headset-3000-series Flat Headset] with a slim profile (0.5 inch pad) which offers great flexibility and can fit into tight coils. The system provides clear two-way communication with built-in patient-activated alarm. The console and equalizer provide high-fidelity, frequency-balanced sound for a variety of audio inputs. The console also has a built-in radio. &lt;br /&gt;
&lt;br /&gt;
This system is best to use if you need to deliver high quality audio to the subjects, or need to communicate with the subjects frequently during the scans.&lt;br /&gt;
&lt;br /&gt;
We recommend using the Avotec + Flat Headset for most studies as it would fit into the Nova 32ch coil for most participants and is more robust in operation (in comparison to the Conformal headset and the OptoAcoustics system). If the Flat headset does not fit into the head coil, you can also use the Conformal headset. Note that when the participant is wearing the Conformal headset and lying on the patient table, the tube connecting to the headset can sometimes slip and pull the earplugs out of the participant&#039;s ears; if that happens you can tape down the tube to the patient table to prevent it from slipping. For audio input, use Avotec Channel A and B for the Conformal headset and Flat headset respectively.&lt;br /&gt;
&lt;br /&gt;
=== OptoACTIVE Headphone System === &lt;br /&gt;
[[File:OptoACTIVE.jpg|thumb|OptoACTIVE Headphone System control console]]&lt;br /&gt;
The OptoACTIVE Headphone System provides active noise cancellation (ANC) during MR scans. The slim profile headphones are designed to fit into the head coils for most human subjects. Its built-in optical microphones monitor the sound level at the subject&#039;s ears, which enable automatic self-calibration, sound pressure level monitoring and real-time in-ear stereo sound recording. The OptoACTIVE headphones also provide very good airseal around the subject&#039;s ears which results in excellent passive noise reduction as well. In combination with the passive noise reduction and active noise cancellation, the headphone can reach a 60 dB attenuation (95%) of the main EPI resonance noise. It also features the FOMRI-III noise cancelling microphone for the subject, which enables quiet two-way communication during scans. &lt;br /&gt;
&lt;br /&gt;
The control console has an LCD touch-screen and pushbuttons that allow the operator to control initial and ongoing calibrations, real-time active noise cancelling, channel level volume and recording, FORMRI microphone communications, etc. It displays the noise level, stimuli levels and spectrum analysis in real time.&lt;br /&gt;
&lt;br /&gt;
The system is ideal for the study of: sleeping disorders, autism, children suffering from claustrophobia, auditory fMRI and other research areas that were previously impractical or unattainable due to scanner noise.&lt;br /&gt;
&lt;br /&gt;
For step-by-step operation instructions, please see this [[Media:Optoacoustics_How-To.pdf | How-To Guide]], clearly summarized by Prof. Cameron Ellis and Emily Chen.&lt;br /&gt;
&lt;br /&gt;
== CNI Laptops ==&lt;br /&gt;
The CNI has one MacBook and one Windows PC for users to use during their experiments. The MacBook is running OS 10.12 and has MATLAB R2014b with PsychToolbox and PsychoPy 3 installed. The Windows PC is running Windows 11 and has E-Prime 3 installed (CNI also has a license for E-Prime 3). You could also checkout out [[Stimulus|some (old) notes]] shared by previous CNI users on how to set up experiments with these toolboxes.&lt;br /&gt;
&lt;br /&gt;
= Subject measurement =&lt;br /&gt;
&lt;br /&gt;
== fORP Response Box ==&lt;br /&gt;
We have a modular response box system ([http://www.curdes.com/index.php/mainforp/interfaces/fiu-933.html fORP 932]) from [http://www.curdes.com/ Current Designs]. With ths system, you can swap out various response devices. The output from any of these devices is available from the fORP box via USB. The device emulates a USB keyboard. We have confirmed that the fORP 932 USB interface is polled at 1kHz. The device itself has sub-millisecond time resolution (see the [http://www.curdes.com/index.php/support/faqs.html fORP FAQ]). We estimate that this system provides response time measurements with a precision and reliability of about one millisecond. &lt;br /&gt;
&lt;br /&gt;
Note that the fORP can send keypresses every time the scanner acquires a slice (or a volume, if the &amp;quot;scope trigger (User CV3)&amp;quot; is set to &amp;quot;1&amp;quot; in the EPI scans). If you want to receive these keypresses, configure the fORP by selecting a configuration that does *not* say &amp;quot;no 5&amp;quot; (if you are receiving numbers) or &amp;quot;no t&amp;quot; (if you are receiving letters). If you *do not* want to get these pulses (most users actually do not want these), then select a configuration that includes &amp;quot;no 5&amp;quot; or &amp;quot;no t&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The response devices that we currently have are:&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-scrl-1.html scroll-wheel device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-2x4-c.htmlhtml 2X4 bimanual button boxes]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x4-cyl-2.html  4-buttonstick-style response device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x5-d.html 5-button diamond button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/custom.html 5-button curved button box]&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-trk-2.html trackball device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-1x5-n4.html PYKA 5 button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/variabledevices/hhsc-joy-5.html joystick]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/foot-pedal.html foot pedal]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a need for a different response device, just let us know.&lt;br /&gt;
&lt;br /&gt;
To use a response device at the CNI:&lt;br /&gt;
# Plug the desired device into the black fiber-optic connector on the right side of the front of the magnet bore&lt;br /&gt;
# Locate the silver box (labeled fORP) on the peripheral device rack.&lt;br /&gt;
# Push in the knob on the right front side of the fORP box to enter menu mode. For the following instructions, you will turn the knob to scroll through the menu choices, and then push in on the knob to select your choice. (See [https://wiki.curdes.com/bin/view/CdiDocs/932QuickSetup this guide] for more details on using the fORP 932.)&lt;br /&gt;
# Turn the knob until the word &amp;quot;yes&amp;quot; is underlined then push the knob to select &amp;quot;yes&amp;quot;&lt;br /&gt;
# In the &amp;quot;mode select&amp;quot; menu that appears next, you can select &amp;quot;manual config&amp;quot;. We recommend, however, that you pick the AUTOCONFIGURE choice which tells the interface to determine as much as it can about the connected handheld device and the cabling to the host computer. This should simplify the choices that need to be made by you. If you have used the AUTOCONFIGURE option you can skip steps 6 and 7 below and proceed directly to step 8.&lt;br /&gt;
# In the response device menu, turn the knob to scroll through the choices until you find the device that you connected in step 1 (examples include):&lt;br /&gt;
## 4-button cylinder: select HHSC-cyl-5&lt;br /&gt;
## 5-button diamond: select HHSC-1x5-D&lt;br /&gt;
## 5-button curved: select HHSC-1x5-C&lt;br /&gt;
## bi-manual 4-button keypads: select HHSC-2x4c&lt;br /&gt;
## scrollwheel: select HHSC-SCRL1&lt;br /&gt;
## trackball: select HHSC-TRK-2 (for mouse emulation)&lt;br /&gt;
# Select USB in the next display by pushing in the knob.&lt;br /&gt;
# Select the desired output mode. For the cylinder or keypads, this determines the mapping between the buttons and the keypress that is generated. E.g., HID-NAR-12345 will map the 4 cylinder buttons to the four number keys, 1-4, and send a &#039;5&#039; for each scope trigger pulse received by the scanner (if you don&#039;t want these pulses, select the &#039;no 5&#039; mode, as noted above). NAR means &amp;quot;no auto release&amp;quot;. In NAR mode, the keypress is maintained as long as the button is pressed. In the non-NAR mode, a brief keypress is generated, even if the button is held down. We find that NAR mode works better with PsychToolbox. In non-NAR mode, it can miss the very brief keypresses produced by auto release. &lt;br /&gt;
# Setup is now complete.&lt;br /&gt;
&lt;br /&gt;
For more technical details about the fORP, see the [[fORP|fORP wiki page]].&lt;br /&gt;
&lt;br /&gt;
== Eye Tracker ==&lt;br /&gt;
[[File:cni_eye_tracker_camera.jpg|thumb|Eye tracker camera.]]&lt;br /&gt;
[[File:cni_eye_tracker_ir.jpg|thumb|Eye tracker IR illuminator.]]&lt;br /&gt;
&lt;br /&gt;
We have an [https://www.sr-research.com/eyelink-1000-plus/ SR Research EyeLink 1000 Plus] eye tracker with remote optics installed at the CNI. It has a frame rate of up to 2000Hz, up to 1/2 degree accuracy, and is fairly easy to set up and use. We found that the standard IR light source from SR Research did not adequately focus the light onto the subject&#039;s eye, so we use the [https://mrc-systems.de/en/products/mr-compatible-cameras#light-sources LED light source] from MRC Systems. &lt;br /&gt;
&lt;br /&gt;
The camera is mounted on a wood stand placed next to the patient bed at the back of the bore. The camera position and focus should not need to be adjusted if your subject is positioned with their eyes close to isocenter. However, if you have a prescription that is centered far from iso-center, you may need to adjust the focus a bit. To do that, you can use the HDMI matrix to show the eye tracker video on the bore monitor so that you can adjust the camera while seeing what you are doing.&lt;br /&gt;
&lt;br /&gt;
The LED light source is mounted on a blue loc-line stalk that attaches to the head coil and is usually left unattached and hanging on the side of the scanner next to the response devices; you will need to mount it to the head coil using the blue loc-line pliers that you can find under the shelf with all the padding. Once mounted, make sure the light source is directed toward the subject&#039;s eye by aiming it through the gap between the two mirrors.&lt;br /&gt;
&lt;br /&gt;
The eye tracker host computer is mounted in the equipment room. However, the display, keyboard, and mouse for that computer are to the right of the GE console. You can connect to the host computer by a direct TCP connection through the ethernet cable located in the cable bundle next to the GE console. This cable is, not surprisingly, labeled &amp;quot;eye tracker&amp;quot;. If you use psych toolbox for stimulus presentation, you can use the [http://psychtoolbox.org/docs/EyelinkToolbox EyeLink Toolbox]. For those who use python (e.g., [http://www.psychopy.org/ Psychopy]), try the [http://www.psychopy.org/api/hardware/pylink.html PyLink module]. If you use E-Prime, check out the [https://www.sr-support.com/showthread.php?149-E-Prime-integration E-Prime integration info] on the SR Research support site. In any case, the IP address of the Eyelink is on our private network and thus is NOT the default IP, so you need to explicitly set it to 10.0.3.2. This private network has a DHCP server, so your stimulus computer should automatically get assigned an IP address on the same subnet. Please don&#039;t hard-code an IP address for your stimulus computer! Note that older versions of psychtoolbox don&#039;t allow you to specify the IP address, so be sure to get the latest Eyelink mex file from [https://github.com/kleinerm/Psychtoolbox-3/commit/aa04b821e975e0e61978377bb05aa1e216f3382e github].&lt;br /&gt;
&lt;br /&gt;
The data recorded by the EyeLink software is saved in the EyeLink partition (E:\). To transfer the data to your own storage device, you can reboot the EyeLink computer into Windows and connect your own USB drive. Afterwards you can reboot the computer again and get back into the EyeLink system. &lt;br /&gt;
&lt;br /&gt;
For a tutorial and troubleshooting information on the Eyelink system, see the [[EyelinkTracker]] page.&lt;br /&gt;
&lt;br /&gt;
==Physio monitoring==&lt;br /&gt;
[[File:ppg_resp.jpg|thumb|Photo plethesmograph (PPG) and respiration belt.]]&lt;br /&gt;
[[File:Tools_gating.png|thumb|Tools Gating]]&lt;br /&gt;
[[File:Physio_waveforms.png|thumb|Physio Waveforms on Console]]&lt;br /&gt;
[[File:physmon.png|thumb|[[CNI_widgets|CNI PPG pulse detector device]].]]&lt;br /&gt;
The scanner has the standard suite of physiological measures: pulse oximetry, respiration belt, and ECG. These can be used for scan triggering. The digital data from these measurements are saved on the console and backed-up in the Flywheel database. These data are also processed by the [[CNI_widgets|CNI PPG monitoring device]] and used for EEG ballisto-cardiogram artifact removal by the EGI NetStation software. (See also the [http://fmri.ucsd.edu/Howto/3T/physio.html UCSD fMRI group&#039;s site] for more information on using the GE physio files to remove physiological artifacts from fMRI data.) A recent paper is here - [https://doi.org/10.1016/j.jneumeth.2016.10.019 The PhysIO Toolbox for Modeling Physiological Noise in fMRI Data]&lt;br /&gt;
&lt;br /&gt;
===Setting Up Physio Recording===&lt;br /&gt;
&lt;br /&gt;
* Go to “Tools” - &amp;quot;Gating&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* To record respiration/movement of the abdominal wall, select “Respiratory.”&lt;br /&gt;
&lt;br /&gt;
* To record pulse/peripheral gating, select “PG.”&lt;br /&gt;
&lt;br /&gt;
* Outfit your participant with the respiratory bellows and the PG sensor&lt;br /&gt;
&lt;br /&gt;
===Respiratory Bellows===&lt;br /&gt;
&lt;br /&gt;
The respiratory bellows goes around your participant’s diaphragm or abdomen. You will get the best signal in the area where the participant’s breathing motion is most visible when they are lying down. Use the Velcro to adjust the respiratory bellows; it should be snug and not move around much, but stretched as little as possible and not too tight. The bellows should expand and contract approximately 0.5 to 1 inches with the participant’s breathing. Do not place any padding over the respiratory bellows. You should be able to see the recording on the small screen on the scanner. Note that it’ll take about one minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the bellows if necessary. &lt;br /&gt;
&lt;br /&gt;
===Pulse/Peripheral Gating (PPG) ===&lt;br /&gt;
&lt;br /&gt;
The participant’s pulse is monitored by a photopulse sensor that detects blood oxygen levels (pulse oximetry) in the vascular bed of the participant’s finger/thumb or toe. During the measurement, the participant’s hand or foot should remain cool and dry. We recommend that you attach the sensor to the participant’s toe, especially if you are going to ask your participant to use one of the button boxes because hand movements will create noise in your PG signal. &lt;br /&gt;
&lt;br /&gt;
* Recording from the toe: Attach the sensor to the fastener for the toe (with the Velcro). Place the sensor on the vascular bed of the participant’s toe. To keep the sensor in place, tape it and the fastener to the participant’s foot using medical tape. It is also a good idea to tape the cable to the knee pillow or the participant’s leg to reduce the pull on the sensor. &lt;br /&gt;
* Recording from the thumb/finger: Place the sensor on the participant’s finger or thumb. It is a good idea to avoid placing the sensor on the joint (the signal will be much noisier if you place the sensor on the joint). To keep the sensor in place it helps to tape it to the participant’s hand with some medical tape.&lt;br /&gt;
&lt;br /&gt;
You should be able to see the recording on the small screen on the scanner. Note that it’ll take up to a minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the sensor if necessary. &lt;br /&gt;
&lt;br /&gt;
Note: When you are done, please clean the sensor with alcohol wipes as it directly touches the participant’s skin.&lt;br /&gt;
&lt;br /&gt;
===Recording Physio===&lt;br /&gt;
&lt;br /&gt;
The default method for recording the physio is the CV control method (set CV phys_record_flag to 1). With default setting of CV control method, a recording of maximum length (25 minute) will require approximately 3 seconds to save to files to the hard disk after the end of the scan. You need to make sure that the next phys-recording scan starts after the previous recording finishes saving data to files. If the next phys-recording scan starts before the previous recording finishes, the new recording request will be ignored. &lt;br /&gt;
&lt;br /&gt;
===Parsing the physio files===&lt;br /&gt;
&lt;br /&gt;
The physio data from the scanner can include three types of measurements: pulse, respiration, and electrocardiogram (ECG).  The pulse data come from the PPG, the respiration data from the breathing-belt, and the ECG from the specialized electrodes attached to the chest. &lt;br /&gt;
&lt;br /&gt;
The data recorded from these devices are written out into simple text-files. There are three files for each type of measurement.  The file names start with PPG, RESP and ECG for the three types of measurements.  The files have raw data (&#039;Data&#039;), and the times of the local peaks (&#039;Trig&#039;) (and sometimes an empty &#039;PACTrig&#039;). &lt;br /&gt;
&lt;br /&gt;
* The temporal sampling rates differ between the three types of measurements&lt;br /&gt;
** ECG: 1ms, &lt;br /&gt;
** Pulse/Peripheral Gating: 10ms, &lt;br /&gt;
** Respiration: 40ms.&lt;br /&gt;
* The timeseries data&lt;br /&gt;
** start 30 seconds of baseline from before the start scan button was pressed&lt;br /&gt;
** have a variable duration between start scan button press and the actual start (pre-scan delays, external trigger delays, etc.)&lt;br /&gt;
** stop at the same time as the scan&lt;br /&gt;
&lt;br /&gt;
To reiterate-- the physio data stored in the physio files starts 30 seconds &#039;&#039;&#039;before&#039;&#039;&#039; you press the &#039;Scan&#039; button (yes, it&#039;s psychic ;), which is almost always more than 30 seconds before scanning actually starts. It could be substantially longer if you do external triggering. In that case, you&#039;ll get some extra physio data recorded during the time between when you press start scan and you send your trigger. But the recording does stop when the scan stops. So, to synchronize physio and scan data, you can take the end of the physio data and count backward the number of data points to keep using the duration of MR acquisiton and sampling rate of the physio data.&lt;br /&gt;
&lt;br /&gt;
The physio files are zipped and uploaded to Flywheel. A simple Flywheel gear &amp;quot;CNI GE Physio File Converter&amp;quot; is avalible to help extract, visualize, and summarize the data.&lt;br /&gt;
&lt;br /&gt;
===Biopac measures===&lt;br /&gt;
For measuring skin conductance and EMG, we have a Biopac with the [http://www.biopac.com/product/eda-electrodermal-activity-amplifier-for-mri electro-dermal activity amplifier] and [http://www.biopac.com/product/electromyogram-amplifier EMG amplifier] modules. The data from the Biopac are digitized with a [http://labjack.com/ue9 LabJack UE9] DAQ device and are available directly through a TCP stream (see [http://labjack.com/support/ue9/c-native-tcp-example the UE9 code samples]) or via our linux box voxel2, which can be used to trigger data acquisition that is synchronized with the scanner. The command to run the recording script is &amp;quot;testfix_labjack.py /data/biopac/[your experiment folder]/[run id] [recording duration]&amp;quot;. The recording duration is in seconds. The output is a csv file at /data/biopac/[your experiment folder]/[run id]_[timestamp].csv. The data file records the voltage and raw ADC values. The skin conductance is stored in the second (voltage) and third (raw ADC) columns. You probably want the second column (with numbers like &amp;quot;1.60230098&amp;quot;). The skin conductance amplifier gain is set to five microsiemens per volt. So, if you multiply the numbers in the second column by 5, you will have the skin conductance in microsiemens. The EMG values are in the fourth (voltage) and fifth (raw ADC) columns. The EMG amplifier gain is set to 2000, so dividing the values in the fourth column by 2 will give you the EMG voltage in millivolts.&lt;br /&gt;
&lt;br /&gt;
== Real-time motion tracking ==&lt;br /&gt;
[[File:FIRMM.jpg|thumb|FIRMM tablet]]&lt;br /&gt;
For subject motion tracking, we have a [https://turingmedical.com/firmm/ FIRMM tablet] that can access the scanner&#039;s image database and provide feedback on the subject&#039;s head motion in real-time. FIRMM will automatically plot the motion trace and quality metrics when scanning begins. You can also set protocol-specific parameters like the motion threshold and data quality goals required for your study. It helps monitor the quality metrics in real time so you can adjust your approach. This is mostly useful for fMRI studies. It is also possible to configure the video output so that you can send the real-time motion feedback to the subject via visual display. &lt;br /&gt;
&lt;br /&gt;
The FIRMM tablet is configured to be connected to the scanner by default. If it shows &amp;quot;FIRMM DISCONNECTED&amp;quot;, then we need to check if the firmm_transfer process is running on the scanner, sometimes restarting the process or restarting the FIRMM tablet is needed.&lt;br /&gt;
&lt;br /&gt;
==Subject video==&lt;br /&gt;
You can monitor and record the subject&#039;s face or body using the [https://mrc-systems.de/en/products/mr-compatible-cameras MRI compatable video camera from MRC Systems]. The camera is always on and streaming video to the linux box next to the scan console. An analog video signal is also sent to the large-screen tv in the control room (use the &#039;A/v input&#039;). To use the camera, you can attach it to the head coil using the loc-line connectors. When not in use, the camera should be hung on the side of the scanner along with the response devices. To see the video feed, run the following from the command line: &amp;quot;ffplay -f video4linux2 /dev/video0&amp;quot;. To record the video feed, you can use our video recording scripts. From the command line run &amp;quot;recordSubject 310&amp;quot;, this will record subject video for 5 minutes and 10 seconds; to synchronize the recording to the start of the scan, run &amp;quot;recordSubjectTrigger 310&amp;quot; instead. The data files are saved to the &amp;quot;video&amp;quot; directory. &lt;br /&gt;
&lt;br /&gt;
Troubleshoot: if you get an error &amp;quot;/dev/device0: busy or resource unavailable&amp;quot;, then run &amp;quot;fuser /dev/device0&amp;quot; and you&#039;ll get the PID of the process that is currently occupying the video device. Then run &amp;quot;kill -9 [PID]&amp;quot;. This should kill the process and you should be able to use the video camera again. Occasionally the camera feed fails and the recorded video files are empty. If this happens, check the video device setting with &amp;quot;v4l2-ctl -d /dev/video0 --all&amp;quot; and look for the &amp;quot;Video Standard&amp;quot; section. If it&#039;s something like &amp;quot;Video Standard = 0x000000ff PAL-B/B1/G/H/I/D/D1/K&amp;quot;, then you&#039;ll need to change it to NTSC standard with &amp;quot;v4l2-ctl -d /dev/video0 -s ntsc&amp;quot;. The returned message should be &amp;quot;Standard set to 0000b000 NTSC-M/M-JP/M-KR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scan Triggers =&lt;br /&gt;
[[File:cni_epi_psd_usercvs_ss.png|thumb|UserCVs under the &#039;Advanced&#039; tab for the cni_epi PSD.]]&lt;br /&gt;
The moment when the scanner starts acquiring image data can be controlled from the computer you use to control your experiment. To do this you need to be able to program your computer to send a pulse to the scanner at the planned moment.&lt;br /&gt;
&lt;br /&gt;
At the CNI, we provide a [[CNI widgets|USB-to-Serial port device]], which works well for E-Prime and Presentation. The notes below show how to set up the UserCV so that the scanner listens for the trigger, and how to send a trigger pulse using the USB-to-Serial device.&lt;br /&gt;
&lt;br /&gt;
== Protocol configuration ==&lt;br /&gt;
For BOLD EPI, be sure to use the cni_epi PSD to get the triggering options described here. The same options are also available for the spiral PSD. Under the &#039;Advanced&#039; tab, make sure the &amp;quot;start scan trigger&amp;quot; CV is set to &#039;1&#039;, which tells it to use the external trigger. Other options include &#039;0&#039; for no trigger (scan starts as soon as the scan button is pressed), and &#039;2&#039; for cardiac gating, which will synchronize to the cardiac cycle (measured via either the PPG pulse oximeter or ECG leads).&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial Port Trigger ==&lt;br /&gt;
The CNI also has a USB-to-Serial port device set up to send scan triggers. Just connect the USB cable labeled &amp;quot;EPrime Trigger&amp;quot; to your computer. On OS-X and Linux, the device is automatically recognized as a serial port (under /dev/ttyACM? on linux or /dev/ttyUSB??? on OS-X). On Windows, the device will show up as a COM port. &lt;br /&gt;
&lt;br /&gt;
When configuring the port, note that the device is expecting communication at 57600 bps and the scanner is triggered by sending a three-character string: &amp;quot;[t]&amp;quot; (without the quotes). In E-Prime, you need to add the serial port device to your experiment and then configure it by specifying the device (you can find the COM port number in Windows Device Manager - Ports (COM&amp;amp;LPT)) and setting the baud rate to 57600. (Other settings can be left at their default values.) In your E-Prime script, add the following in-line code to send the trigger string to the port: &lt;br /&gt;
&lt;br /&gt;
 Serial.WriteString &amp;quot;[t]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To use this device from Matlab, try:&lt;br /&gt;
&lt;br /&gt;
 s = serial(&#039;/dev/ttyS0&#039;, &#039;BaudRate&#039;, 57600);&lt;br /&gt;
 fopen(s);&lt;br /&gt;
 fprintf(s, &#039;[t]&#039;);&lt;br /&gt;
 fclose(s);&lt;br /&gt;
&lt;br /&gt;
Note that you will need to replace &#039;/dev/ttyS0&#039; with the correct port on your machine. E.g., if you&#039;re on windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. On a mac,  type &#039;ls -lh /dev/tty.usbmodem*&#039; in a terminal. &lt;br /&gt;
&lt;br /&gt;
If you are using PsychoPy, first make sure the pyserial package is installed (e.g., pip install pyserial). Then create two code blocks:&lt;br /&gt;
&lt;br /&gt;
 # Insert a &#039;Begin Experiment&#039; code block to initialize (e.g., as part of your instructions)&lt;br /&gt;
 import serial&lt;br /&gt;
 import time&lt;br /&gt;
 device = &#039;/dev/ttyACM1&#039;  # NOTE: replace with your device identifier! On windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. &lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(device, 115200, timeout=1)&lt;br /&gt;
         time.sleep(0.1)&lt;br /&gt;
         ser.write(&#039;[t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         pass&lt;br /&gt;
&lt;br /&gt;
 # Insert a &amp;quot;Begin Routine&amp;quot; code block whenever you want to send a trigger:&lt;br /&gt;
 send_trigger()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternate example from Christina Chung: &lt;br /&gt;
 #################################################&lt;br /&gt;
 ### import modules&lt;br /&gt;
 import serial&lt;br /&gt;
 import time &lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 ### Set SCANNER_TRIGGER_NEEDED to False to bypass program abortion when scanner exception is thrown&lt;br /&gt;
 SCANNER_TRIGGER_NEEDED = False&lt;br /&gt;
 DEVICE_ID = &#039;com3&#039;&lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(DEVICE_ID, 57600, timeout=1)&lt;br /&gt;
         time.sleep(2)    ### wait for 2 sec to ensure scanner is ready; CNI wiki default 0.1&lt;br /&gt;
         ser.write(&#039;[t][t][t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         if not SCANNER_TRIGGER_NEEDED:&lt;br /&gt;
             pass&lt;br /&gt;
         else:&lt;br /&gt;
             core.quit()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The construction of our serial trigger device is described on the [[CNI widgets]] page.&lt;br /&gt;
&lt;br /&gt;
= Capturing Scan Timing Pulses =&lt;br /&gt;
Some researchers want to know the precise time when each slice or each volume is acquired. The scanner produces timing pulses that can be used to record this information. Additionally, a pulse sent by the scanner at the beginning of the scan can be used to trigger the start of an experimental task (reversing the direction of triggering discussed above). At the CNI, we have two methods of receiving these timing pulses. One method uses the USB-to-Serial trigger device and the other uses the fORP response box system. These two methods are described in more detail below.&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial timing pulses ==&lt;br /&gt;
The emulated serial port device [[#USB-to-Serial Port Trigger|described above]] can also be used to receive timing pulses from the scanner. To enable this mode, send a &amp;quot;[p]&amp;quot; command. You will then receive a &#039;p&#039; character every time a timing pulse is detected. The temporal accuracy of these pulses should be about 1 ms. These &amp;quot;scope trigger&amp;quot; pulses come at the beginning of every slice or the beginning of every volume, depending on how the PSD is configured. For the cni_epi and spiral PSDs, under the &amp;quot;Advanced&amp;quot; tab, you can change the &amp;quot;scope trigger&amp;quot; CV to send pulses for every slice or just for the first slice of each volume. To capture these trigger pulses, you can use this [[saveTriggers.py|python script]].&lt;br /&gt;
&lt;br /&gt;
== Timing pulses as keypresses via fORP ==&lt;br /&gt;
To use the fORP response box system to receive timing pulses from the scanner, set up the system as described in the &#039;Response Box&#039; section above. Note that timing pulses will be received via the same USB connection as subjects&#039; responses, and that no additional USB cables need be plugged into your testing computer. If you have selected a numeric mapping between button presses and keys, the timing pulses sent to your testing laptop will be in the form of a &#039;5&#039;. (Note that use of the 5-button diamond-shaped response box will include the numbers 1-4 and 6, and thus will not include the number 5). Use caution when editing experimental scripts while using this method--if your script is open while the scanner sends pulses, a long series of 5&#039;s will be inserted into your script!&lt;br /&gt;
&lt;br /&gt;
= General information =&lt;br /&gt;
&lt;br /&gt;
==The magnetic field==&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:mr750_gauss_lines_top.png|Gauss-lines for a generic install (top view).&lt;br /&gt;
Image:mr750_gauss_lines_side.png|Gauss-lines for a generic install (side view).&lt;br /&gt;
Image:mr750_gauss_lines_front.png|Gauss-lines for a generic install (front view).&lt;br /&gt;
Image:CNI_MR_fieldlines.png|Sketch of gauss-lines for our particular installation.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
When positioning equipment in the scan room, it&#039;s useful to be aware of the magnetic field lines. All equipment in the CNI scan room is MR-safe, but not all equipment functions properly in very high-field regions. The diagrams show the estimated field lines in the MR suite area.&lt;br /&gt;
&lt;br /&gt;
==Additional/Legacy hardware information==&lt;br /&gt;
See the [[Hardware configuration]] page for some additional and legacy hardware information.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59419</id>
		<title>MR Hardware</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59419"/>
		<updated>2026-03-18T19:59:04Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Biopac measures */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= MR Scanner =&lt;br /&gt;
The MR scanner is in room 065 of the CNI suite in Building 420. It has its [[MR Scanner|own wiki page]].&lt;br /&gt;
&lt;br /&gt;
= Peripheral Device Rack (Laima Box) =&lt;br /&gt;
[[File:LB_Overview_Annotate.jpg|thumb|Overview of Laima Box]]&lt;br /&gt;
As you may guess from the title, the Laima Box came into being on the urging of Laima to find a solution to provide a stable and flexible interface to all the display devices, scanner signals, and other peripheral devices that are commonly used during studies. &lt;br /&gt;
&lt;br /&gt;
From the top rack to the bottom, the devices are (as marked in the photo): &lt;br /&gt;
* Small Monitor (Output 3 on HDMI Matrix, typically used for Eyelink display) and Eyelink keyboard + mouse&lt;br /&gt;
* Hyperion Projector Consoles (left: rear projector, right: side projector); Projector Switch for switching between the two projectors&lt;br /&gt;
* fORP Optical Interface; Serial Trigger Box; Video Flipper ([https://halltechav.com/product/sc-hd-2b/ Hall Research video scaler SC-HD-2B])&lt;br /&gt;
* Main Power to the rack&lt;br /&gt;
* Remote Power Switches for equipments in the magnet room: Eyelink camera, Webcam, DC shim amplifier; Audio Inputs for Avotec channel A &amp;amp; B and OptoAcoustics&lt;br /&gt;
* HDMI Matrix (see detailed Input-Output schematics [[#HDMI Matrix Switch|below]])&lt;br /&gt;
* fORP USB connection; Serial-to-USB connection; Scanner trigger co-ax connections; Video Inputs (Input 4 &amp;amp; 5 on HDMI Matrix)&lt;br /&gt;
&lt;br /&gt;
= Stimulus Presentation =&lt;br /&gt;
&lt;br /&gt;
==Visual System ==&lt;br /&gt;
The CNI offers several display options, depending on your visual stimulus needs. All use a digital interface (DVID or HDMI) and can be connected by selecting the appropriate options on the HDMI matrix switch. The mirror on the Nova 32-channel coil is a double mirror design (see [[32-channel_double_mirror]]), and that on the GE 64-channel coil is a single mirror design. &lt;br /&gt;
&lt;br /&gt;
=== 3D LCD display ===&lt;br /&gt;
We have a 49&amp;quot; 4K 3D LCD display from Resonance Technology. It is placed at the far end of the scanner room behind the scanner&#039;s rear pedestal. Its specs and field of view presented to the scan subjects are as follows: &lt;br /&gt;
 * 640x480@60Hz up to 4096x2160@50Hz resolution&lt;br /&gt;
 * 1000:1 contrast ratio&lt;br /&gt;
 * screen size: 107.2cm high x 60.3cm wide &lt;br /&gt;
 * visual distance from Nova coil: 267cm from mirror2, 6cm mirror2 to mirror1, 15cm from eye to mirror1 = 288cm&lt;br /&gt;
 * visual distance from NFL coil: 263cm from mirror1, 13cm from eye to mirror1 = 276cm &lt;br /&gt;
&lt;br /&gt;
To see 3D effects, subjects will need to wear passive polarized lenses. The screen can, of course, present non-3D stimuli too. &lt;br /&gt;
&lt;br /&gt;
As described in our Slack [https://stanford-cni.slack.com/archives/C011V1M2FRN/p1639611006023100 channel], the TV monitor has varying latency depending on the mode it is in.  We conducted tests using a 1920x1080p@60Hz signal comparing the mirrored display on a laptop while simultaneously viewing the display on the scan room monitor.  By capturing these displays simultaneously with a high-speed video acquisition we were able to calibrate the latency between the laptop and scan room monitor display.  Assuming the laptop display latency is 0, when in General mode the monitor processing creates about 133ms (8 video frames) of latency, as compared to Game mode where the latency is only 33ms or 2 frames. In order to switch modes, the remote control must be used inside the scan room but care must be taken as the batteries are slightly ferromagnetic so be sure to hold on the remote firmly and keep it as far from the scanner as possible.  Choose Options-&amp;gt;Scene Select-&amp;gt;Game in order to select Game mode.  It should be in this mode by default -- we ask any users that switch the monitor mode to please return to Game mode after their experiment. &lt;br /&gt;
&lt;br /&gt;
=== DLP Projector ===&lt;br /&gt;
We also have an MR-compatible rear-projection DLP projector ([https://pstnet.com/products/hyperion/ Hyperion 2-120 Projector]). The new Hyperion 2-120 Control Room Console features an LCD touchscreen to power on/off the projector, mirror the image, show the projector status, and display video input resolution, refresh rate, and synchronization status. This projector can be used by placing the large mirror on the back of the scanner bed in front of the LCD display. You also need to place the rear-projection screen on the head coil. Set-up of this system is a bit more involved than the LCD display, but it offers a much brighter display and a larger field of view. If you need that, let us know and we&#039;ll show you how to set up the projector system.&lt;br /&gt;
&lt;br /&gt;
Here are the specs of the projector:&lt;br /&gt;
 * 1920x1080&lt;br /&gt;
 * 120Hz or 60Hz frame rate&lt;br /&gt;
 * 16:9 and 16:10 widescreen formats (standard 4:3 available)&lt;br /&gt;
 * brighter and larger field of view than the LCD displays&lt;br /&gt;
&lt;br /&gt;
If you try the projector (via HDMI) and nothing happens, you can try cycling power to the [[#The Laima Box|Laima Box]. If this doesn’t work, troubleshoot the projector as you normally would (check the input cable on the projector is connected and cycle inputs etc).&lt;br /&gt;
&lt;br /&gt;
=== HDMI Matrix Switch ===&lt;br /&gt;
[[File:HDMI_Switch_Schematic.jpg|thumb|HDMI switch schematic.]]&lt;br /&gt;
[[File:LB_HDMI_Switch.jpg|thumb|HDMI switch in Laima Box.]]&lt;br /&gt;
We use an 8x8 HDMI Matrix Switch to distribute video signals to all the various displays.  This is a [https://keydigital.org/category/4k-18g-hdmi-matrix-switchers/KD-MS8x8G Key Digital KD-MS8x8G] switch capable of connecting any of 8 input HDMI inputs to any/all of 8 HDMI outputs.  The switch is capable of handling 4K HDCP2.2 video signals.  The [[Media:HDMI_Switch_Schematic.jpg|schematic]] of the switch connections are shown here with all 8 inputs and outputs in use. In order to make a connection to a particular output display, you choose the particular input under the labeled output row of 8 LEDs.  This is done by pressing the button under the labeled output (see HDMI Matrix switch [[Media:LB_HDMI_Switch.jpg|image]]) in order to progress left-to-right through the various inputs.  Unfortunately, the blue LEDs on this switch that show what input is currently connected have been burning out, so it&#039;s sometimes necessary to count your button presses from a visible LED to know what input you are on. &lt;br /&gt;
&lt;br /&gt;
The default output display for each input is nominally the same number as the input.  As you&#039;ll note, we have the GE Host computer and GE Table Driver on inputs 1 &amp;amp; 2 -- this is so we can send the GE Host Display to any other display connected to the HDMI matrix switch, or use the GE Table Monitor to display other output -- such as the Eyelink computer output when adjusting the Eyelink camera at the front of the scanner. &lt;br /&gt;
&lt;br /&gt;
The HDMI matrix switch allows for fairly elaborate configuration as described in the [https://www.keydigital.org/web/content/5839 manual] via a Key Digital PC application that is available on the CNI PC laptop when connected to the internal private ethernet network. &lt;br /&gt;
&lt;br /&gt;
Troubleshooting: The HDMI matrix switch is generally fairly stable but if you&#039;re having odd behavior a good first step is to cycle the main power to the Laima Box -- this will reset the HDMI matrix switch.&lt;br /&gt;
&lt;br /&gt;
=== MRI Compatible Glasses and Lensometer ===&lt;br /&gt;
[[File:mri-glasses.jpg|thumb|mri frames and lenses]]&lt;br /&gt;
For participants who wear glasses, CNI has a set of interchangeable lenses that are used with an MRI compatible plastic frame. The frame and lenses are located in the open shelving above and to the left of where the screening forms are located. We have lenses for both near-sighted (-0.5 to -8.0 in .5 step increments) and far-sighted (+.5 to +8.0 in .5 step increments) vision corrections. The lenses are made of hard polycarbonate plastic and are not breakable. The easiest way to install the lenses into the frame is insert the lens from the back first into the edge by the ear piece and then snap in the lens by the nose. If the participant does not know his/her glasses prescription we have a lensometer that can determine that. Basic instructions for use of the lensometer are in the next section. There is also an eye chart posted on the door to the equipment room where participants can test their vision with the MRI glasses. Have the participant stand right in front of the lensometer (about 10 feet from the chart) to use the chart.&lt;br /&gt;
[[File:eye-chart.jpg|thumb|eye chart]]&lt;br /&gt;
&lt;br /&gt;
To determine glass prescription strengths for MRI participants CNI has the AL200 Auto Lensometer. Is is located in the CNI control room area. There is both a User&#039;s guide and a quick reference sheet next to the lensometer. The lensometer is currently set up to read a single vision lens. There are settings available to read either bifocal or progressive lenses, but they are not typically used as only the distance portion of the lens needs to be measured.&lt;br /&gt;
&lt;br /&gt;
Here is a basic how-to from the Reichert user&#039;s guide.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:Lensometer-parts.png|The key parts of the lensometer.&lt;br /&gt;
Image:Lensometer-back.png|Turn on the lensometer using the switch on the back panel. The AL200 will do a calibration check; do not place any lenses or obstructions in front of the aperture during calibration.&lt;br /&gt;
Image:Step2.png|The AL200’s default measurement mode is Single Vision, Automatic. This mode is used for fast, easy measurement of a pair of single vision spectacle lenses. You&#039;re now ready to measure the right lens, indicated by the &#039;R&#039; on the upper left side of the screen.&lt;br /&gt;
Image:Glass-placement1.jpg|Place the spectacles on the lens table and secure the right lens with the lens holder. Using the table base levers and your hand, move the lens until the large cross is positioned directly over the small cross in the middle of the centering target.&lt;br /&gt;
Image:Glass-placement2.jpg|If you insert a progressive lens in single vision mode, the progressive icon may flash to indicate that the mode should be changed. NOTE: Place the glasses so that lenses are toward the front and the ear pieces toward the back.&lt;br /&gt;
Image:Step3.png|When optical center has been located, the AL200 tone will sound and the measurements will be locked on the screen. Upon removal of the lens the AL200 will automatically switch to the left lens, indicated by the highlighted L on the upper right side of the screen. &lt;br /&gt;
Image:Step4.png|Repeat the measurement process for the left lens. All measurements will remain on the screen until the operator chooses to print or clear the data.&lt;br /&gt;
Image:Lensometer-screen.png|The number that appears in the Sphere location is the correction number that you will use in choosing the lenses for the MRI glasses.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Auditory System ==&lt;br /&gt;
&lt;br /&gt;
=== Avotec System ===&lt;br /&gt;
[[File:Avotec2.jpg|thumb|Avotec Console]]&lt;br /&gt;
[[File:Avotec-headsets.png|thumb|Avotec Headsets]]&lt;br /&gt;
The [https://avotecinc.com/pages/silent-scan Avotec Silent Scan system] provides a maximum of 30dB with the [https://avotecinc.com/products/full-coverage-headset-3000-series Full Coverage] and [https://avotecinc.com/products/conformal-headset-3000-series Conformal] headsets. The conformal headset will fit in any coil and any patient. The system also has a [https://avotecinc.com/products/non-headset-3000-series Flat Headset] with a slim profile (0.5 inch pad) which offers great flexibility and can fit into tight coils. The system provides clear two-way communication with built-in patient-activated alarm. The console and equalizer provide high-fidelity, frequency-balanced sound for a variety of audio inputs. The console also has a built-in radio. &lt;br /&gt;
&lt;br /&gt;
This system is best to use if you need to deliver high quality audio to the subjects, or need to communicate with the subjects frequently during the scans.&lt;br /&gt;
&lt;br /&gt;
We recommend using the Avotec + Flat Headset for most studies as it would fit into the Nova 32ch coil for most participants and is more robust in operation (in comparison to the Conformal headset and the OptoAcoustics system). If the Flat headset does not fit into the head coil, you can also use the Conformal headset. Note that when the participant is wearing the Conformal headset and lying on the patient table, the tube connecting to the headset can sometimes slip and pull the earplugs out of the participant&#039;s ears; if that happens you can tape down the tube to the patient table to prevent it from slipping. For audio input, use Avotec Channel A and B for the Conformal headset and Flat headset respectively.&lt;br /&gt;
&lt;br /&gt;
=== OptoACTIVE Headphone System === &lt;br /&gt;
[[File:OptoACTIVE.jpg|thumb|OptoACTIVE Headphone System control console]]&lt;br /&gt;
The OptoACTIVE Headphone System provides active noise cancellation (ANC) during MR scans. The slim profile headphones are designed to fit into the head coils for most human subjects. Its built-in optical microphones monitor the sound level at the subject&#039;s ears, which enable automatic self-calibration, sound pressure level monitoring and real-time in-ear stereo sound recording. The OptoACTIVE headphones also provide very good airseal around the subject&#039;s ears which results in excellent passive noise reduction as well. In combination with the passive noise reduction and active noise cancellation, the headphone can reach a 60 dB attenuation (95%) of the main EPI resonance noise. It also features the FOMRI-III noise cancelling microphone for the subject, which enables quiet two-way communication during scans. &lt;br /&gt;
&lt;br /&gt;
The control console has an LCD touch-screen and pushbuttons that allow the operator to control initial and ongoing calibrations, real-time active noise cancelling, channel level volume and recording, FORMRI microphone communications, etc. It displays the noise level, stimuli levels and spectrum analysis in real time.&lt;br /&gt;
&lt;br /&gt;
The system is ideal for the study of: sleeping disorders, autism, children suffering from claustrophobia, auditory fMRI and other research areas that were previously impractical or unattainable due to scanner noise.&lt;br /&gt;
&lt;br /&gt;
For step-by-step operation instructions, please see this [[Media:Optoacoustics_How-To.pdf | How-To Guide]], clearly summarized by Prof. Cameron Ellis and Emily Chen.&lt;br /&gt;
&lt;br /&gt;
== CNI Laptops ==&lt;br /&gt;
The CNI has one MacBook and one Windows PC for users to use during their experiments. The MacBook is running OS 10.12 and has MATLAB R2014b with PsychToolbox and PsychoPy 3 installed. The Windows PC is running Windows 11 and has E-Prime 3 installed (CNI also has a license for E-Prime 3). You could also checkout out [[Stimulus|some (old) notes]] shared by previous CNI users on how to set up experiments with these toolboxes.&lt;br /&gt;
&lt;br /&gt;
= Subject measurement =&lt;br /&gt;
&lt;br /&gt;
== fORP Response Box ==&lt;br /&gt;
We have a modular response box system ([http://www.curdes.com/index.php/mainforp/interfaces/fiu-933.html fORP 932]) from [http://www.curdes.com/ Current Designs]. With ths system, you can swap out various response devices. The output from any of these devices is available from the fORP box via USB. The device emulates a USB keyboard. We have confirmed that the fORP 932 USB interface is polled at 1kHz. The device itself has sub-millisecond time resolution (see the [http://www.curdes.com/index.php/support/faqs.html fORP FAQ]). We estimate that this system provides response time measurements with a precision and reliability of about one millisecond. &lt;br /&gt;
&lt;br /&gt;
Note that the fORP can send keypresses every time the scanner acquires a slice (or a volume, if the &amp;quot;scope trigger (User CV3)&amp;quot; is set to &amp;quot;1&amp;quot; in the EPI scans). If you want to receive these keypresses, configure the fORP by selecting a configuration that does *not* say &amp;quot;no 5&amp;quot; (if you are receiving numbers) or &amp;quot;no t&amp;quot; (if you are receiving letters). If you *do not* want to get these pulses (most users actually do not want these), then select a configuration that includes &amp;quot;no 5&amp;quot; or &amp;quot;no t&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The response devices that we currently have are:&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-scrl-1.html scroll-wheel device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-2x4-c.htmlhtml 2X4 bimanual button boxes]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x4-cyl-2.html  4-buttonstick-style response device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x5-d.html 5-button diamond button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/custom.html 5-button curved button box]&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-trk-2.html trackball device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-1x5-n4.html PYKA 5 button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/variabledevices/hhsc-joy-5.html joystick]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/foot-pedal.html foot pedal]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a need for a different response device, just let us know.&lt;br /&gt;
&lt;br /&gt;
To use a response device at the CNI:&lt;br /&gt;
# Plug the desired device into the black fiber-optic connector on the right side of the front of the magnet bore&lt;br /&gt;
# Locate the silver box (labeled fORP) on the peripheral device rack.&lt;br /&gt;
# Push in the knob on the right front side of the fORP box to enter menu mode. For the following instructions, you will turn the knob to scroll through the menu choices, and then push in on the knob to select your choice. (See [https://wiki.curdes.com/bin/view/CdiDocs/932QuickSetup this guide] for more details on using the fORP 932.)&lt;br /&gt;
# Turn the knob until the word &amp;quot;yes&amp;quot; is underlined then push the knob to select &amp;quot;yes&amp;quot;&lt;br /&gt;
# In the &amp;quot;mode select&amp;quot; menu that appears next, you can select &amp;quot;manual config&amp;quot;. We recommend, however, that you pick the AUTOCONFIGURE choice which tells the interface to determine as much as it can about the connected handheld device and the cabling to the host computer. This should simplify the choices that need to be made by you. If you have used the AUTOCONFIGURE option you can skip steps 6 and 7 below and proceed directly to step 8.&lt;br /&gt;
# In the response device menu, turn the knob to scroll through the choices until you find the device that you connected in step 1 (examples include):&lt;br /&gt;
## 4-button cylinder: select HHSC-cyl-5&lt;br /&gt;
## 5-button diamond: select HHSC-1x5-D&lt;br /&gt;
## 5-button curved: select HHSC-1x5-C&lt;br /&gt;
## bi-manual 4-button keypads: select HHSC-2x4c&lt;br /&gt;
## scrollwheel: select HHSC-SCRL1&lt;br /&gt;
## trackball: select HHSC-TRK-2 (for mouse emulation)&lt;br /&gt;
# Select USB in the next display by pushing in the knob.&lt;br /&gt;
# Select the desired output mode. For the cylinder or keypads, this determines the mapping between the buttons and the keypress that is generated. E.g., HID-NAR-12345 will map the 4 cylinder buttons to the four number keys, 1-4, and send a &#039;5&#039; for each scope trigger pulse received by the scanner (if you don&#039;t want these pulses, select the &#039;no 5&#039; mode, as noted above). NAR means &amp;quot;no auto release&amp;quot;. In NAR mode, the keypress is maintained as long as the button is pressed. In the non-NAR mode, a brief keypress is generated, even if the button is held down. We find that NAR mode works better with PsychToolbox. In non-NAR mode, it can miss the very brief keypresses produced by auto release. &lt;br /&gt;
# Setup is now complete.&lt;br /&gt;
&lt;br /&gt;
For more technical details about the fORP, see the [[fORP|fORP wiki page]].&lt;br /&gt;
&lt;br /&gt;
== Eye Tracker ==&lt;br /&gt;
[[File:cni_eye_tracker_camera.jpg|thumb|Eye tracker camera.]]&lt;br /&gt;
[[File:cni_eye_tracker_ir.jpg|thumb|Eye tracker IR illuminator.]]&lt;br /&gt;
&lt;br /&gt;
We have an [https://www.sr-research.com/eyelink-1000-plus/ SR Research EyeLink 1000 Plus] eye tracker with remote optics installed at the CNI. It has a frame rate of up to 2000Hz, up to 1/2 degree accuracy, and is fairly easy to set up and use. We found that the standard IR light source from SR Research did not adequately focus the light onto the subject&#039;s eye, so we use the [https://mrc-systems.de/en/products/mr-compatible-cameras#light-sources LED light source] from MRC Systems. &lt;br /&gt;
&lt;br /&gt;
The camera is mounted on a wood stand placed next to the patient bed at the back of the bore. The camera position and focus should not need to be adjusted if your subject is positioned with their eyes close to isocenter. However, if you have a prescription that is centered far from iso-center, you may need to adjust the focus a bit. To do that, you can use the HDMI matrix to show the eye tracker video on the bore monitor so that you can adjust the camera while seeing what you are doing.&lt;br /&gt;
&lt;br /&gt;
The LED light source is mounted on a blue loc-line stalk that attaches to the head coil and is usually left unattached and hanging on the side of the scanner next to the response devices; you will need to mount it to the head coil using the blue loc-line pliers that you can find under the shelf with all the padding. Once mounted, make sure the light source is directed toward the subject&#039;s eye by aiming it through the gap between the two mirrors.&lt;br /&gt;
&lt;br /&gt;
The eye tracker host computer is mounted in the equipment room. However, the display, keyboard, and mouse for that computer are to the right of the GE console. You can connect to the host computer by a direct TCP connection through the ethernet cable located in the cable bundle next to the GE console. This cable is, not surprisingly, labeled &amp;quot;eye tracker&amp;quot;. If you use psych toolbox for stimulus presentation, you can use the [http://psychtoolbox.org/docs/EyelinkToolbox EyeLink Toolbox]. For those who use python (e.g., [http://www.psychopy.org/ Psychopy]), try the [http://www.psychopy.org/api/hardware/pylink.html PyLink module]. If you use E-Prime, check out the [https://www.sr-support.com/showthread.php?149-E-Prime-integration E-Prime integration info] on the SR Research support site. In any case, the IP address of the Eyelink is on our private network and thus is NOT the default IP, so you need to explicitly set it to 10.0.3.2. This private network has a DHCP server, so your stimulus computer should automatically get assigned an IP address on the same subnet. Please don&#039;t hard-code an IP address for your stimulus computer! Note that older versions of psychtoolbox don&#039;t allow you to specify the IP address, so be sure to get the latest Eyelink mex file from [https://github.com/kleinerm/Psychtoolbox-3/commit/aa04b821e975e0e61978377bb05aa1e216f3382e github].&lt;br /&gt;
&lt;br /&gt;
The data recorded by the EyeLink software is saved in the EyeLink partition (E:\). To transfer the data to your own storage device, you can reboot the EyeLink computer into Windows and connect your own USB drive. Afterwards you can reboot the computer again and get back into the EyeLink system. &lt;br /&gt;
&lt;br /&gt;
For a tutorial and troubleshooting information on the Eyelink system, see the [[EyelinkTracker]] page.&lt;br /&gt;
&lt;br /&gt;
==Physio monitoring==&lt;br /&gt;
[[File:ppg_resp.jpg|thumb|Photo plethesmograph (PPG) and respiration belt.]]&lt;br /&gt;
[[File:Tools_gating.png|thumb|Tools Gating]]&lt;br /&gt;
[[File:Physio_waveforms.png|thumb|Physio Waveforms on Console]]&lt;br /&gt;
[[File:physmon.png|thumb|[[CNI_widgets|CNI PPG pulse detector device]].]]&lt;br /&gt;
The scanner has the standard suite of physiological measures: pulse oximetry, respiration belt, and ECG. These can be used for scan triggering. The digital data from these measurements are saved on the console and backed-up in the Flywheel database. These data are also processed by the [[CNI_widgets|CNI PPG monitoring device]] and used for EEG ballisto-cardiogram artifact removal by the EGI NetStation software. (See also the [http://fmri.ucsd.edu/Howto/3T/physio.html UCSD fMRI group&#039;s site] for more information on using the GE physio files to remove physiological artifacts from fMRI data.) A recent paper is here - [https://doi.org/10.1016/j.jneumeth.2016.10.019 The PhysIO Toolbox for Modeling Physiological Noise in fMRI Data]&lt;br /&gt;
&lt;br /&gt;
===Setting Up Physio Recording===&lt;br /&gt;
&lt;br /&gt;
* Go to “Tools” - &amp;quot;Gating&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* To record respiration/movement of the abdominal wall, select “Respiratory.”&lt;br /&gt;
&lt;br /&gt;
* To record pulse/peripheral gating, select “PG.”&lt;br /&gt;
&lt;br /&gt;
* Outfit your participant with the respiratory bellows and the PG sensor&lt;br /&gt;
&lt;br /&gt;
===Respiratory Bellows===&lt;br /&gt;
&lt;br /&gt;
The respiratory bellows goes around your participant’s diaphragm or abdomen. You will get the best signal in the area where the participant’s breathing motion is most visible when they are lying down. Use the Velcro to adjust the respiratory bellows; it should be snug and not move around much, but stretched as little as possible and not too tight. The bellows should expand and contract approximately 0.5 to 1 inches with the participant’s breathing. Do not place any padding over the respiratory bellows. You should be able to see the recording on the small screen on the scanner. Note that it’ll take about one minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the bellows if necessary. &lt;br /&gt;
&lt;br /&gt;
===Pulse/Peripheral Gating (PPG) ===&lt;br /&gt;
&lt;br /&gt;
The participant’s pulse is monitored by a photopulse sensor that detects blood oxygen levels (pulse oximetry) in the vascular bed of the participant’s finger/thumb or toe. During the measurement, the participant’s hand or foot should remain cool and dry. We recommend that you attach the sensor to the participant’s toe, especially if you are going to ask your participant to use one of the button boxes because hand movements will create noise in your PG signal. &lt;br /&gt;
&lt;br /&gt;
* Recording from the toe: Attach the sensor to the fastener for the toe (with the Velcro). Place the sensor on the vascular bed of the participant’s toe. To keep the sensor in place, tape it and the fastener to the participant’s foot using medical tape. It is also a good idea to tape the cable to the knee pillow or the participant’s leg to reduce the pull on the sensor. &lt;br /&gt;
* Recording from the thumb/finger: Place the sensor on the participant’s finger or thumb. It is a good idea to avoid placing the sensor on the joint (the signal will be much noisier if you place the sensor on the joint). To keep the sensor in place it helps to tape it to the participant’s hand with some medical tape.&lt;br /&gt;
&lt;br /&gt;
You should be able to see the recording on the small screen on the scanner. Note that it’ll take up to a minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the sensor if necessary. &lt;br /&gt;
&lt;br /&gt;
Note: When you are done, please clean the sensor with alcohol wipes as it directly touches the participant’s skin.&lt;br /&gt;
&lt;br /&gt;
===Recording Physio===&lt;br /&gt;
&lt;br /&gt;
The default method for recording the physio is the CV control method (set CV phys_record_flag to 1). With default setting of CV control method, a recording of maximum length (25 minute) will require approximately 3 seconds to save to files to the hard disk after the end of the scan. You need to make sure that the next phys-recording scan starts after the previous recording finishes saving data to files. If the next phys-recording scan starts before the previous recording finishes, the new recording request will be ignored. &lt;br /&gt;
&lt;br /&gt;
===Parsing the physio files===&lt;br /&gt;
&lt;br /&gt;
The physio data from the scanner can include three types of measurements: pulse, respiration, and electrocardiogram (ECG).  The pulse data come from the PPG, the respiration data from the breathing-belt, and the ECG from the specialized electrodes attached to the chest. &lt;br /&gt;
&lt;br /&gt;
The data recorded from these devices are written out into simple text-files. There are three files for each type of measurement.  The file names start with PPG, RESP and ECG for the three types of measurements.  The files have raw data (&#039;Data&#039;), and the times of the local peaks (&#039;Trig&#039;) (and sometimes an empty &#039;PACTrig&#039;). &lt;br /&gt;
&lt;br /&gt;
* The temporal sampling rates differ between the three types of measurements&lt;br /&gt;
** ECG: 1ms, &lt;br /&gt;
** Pulse/Peripheral Gating: 10ms, &lt;br /&gt;
** Respiration: 40ms.&lt;br /&gt;
* The timeseries data&lt;br /&gt;
** start 30 seconds of baseline from before the start scan button was pressed&lt;br /&gt;
** have a variable duration between start scan button press and the actual start (pre-scan delays, external trigger delays, etc.)&lt;br /&gt;
** stop at the same time as the scan&lt;br /&gt;
&lt;br /&gt;
To reiterate-- the physio data stored in the physio files starts 30 seconds &#039;&#039;&#039;before&#039;&#039;&#039; you press the &#039;Scan&#039; button (yes, it&#039;s psychic ;), which is almost always more than 30 seconds before scanning actually starts. It could be substantially longer if you do external triggering. In that case, you&#039;ll get some extra physio data recorded during the time between when you press start scan and you send your trigger. But the recording does stop when the scan stops. So, to synchronize physio and scan data, you can take the end of the physio data and count backward the number of data points to keep using the duration of MR acquisiton and sampling rate of the physio data.&lt;br /&gt;
&lt;br /&gt;
The physio files are zipped and uploaded to Flywheel. A simple Flywheel gear &amp;quot;CNI GE Physio File Converter&amp;quot; is avalible to help extract, visualize, and summarize the data.&lt;br /&gt;
&lt;br /&gt;
===Biopac measures===&lt;br /&gt;
For measuring skin conductance and EMG, we have a Biopac with the [http://www.biopac.com/product/eda-electrodermal-activity-amplifier-for-mri electro-dermal activity amplifier] and [http://www.biopac.com/product/emg-electromyogram-amplifier EMG amplifier] modules. The data from the Biopac are digitized with a [http://labjack.com/ue9 LabJack UE9] DAQ device and are available directly through a TCP stream (see [http://labjack.com/support/ue9/c-native-tcp-example the UE9 code samples]) or via our linux box voxel2, which can be used to trigger data acquisition that is synchronized with the scanner. The command to run the recording script is &amp;quot;testfix_labjack.py /data/biopac/[your experiment folder]/[run id] [recording duration]&amp;quot;. The recording duration is in seconds. The output is a csv file at /data/biopac/[your experiment folder]/[run id]_[timestamp].csv. The data file records the voltage and raw ADC values. The skin conductance is stored in the second (voltage) and third (raw ADC) columns. You probably want the second column (with numbers like &amp;quot;1.60230098&amp;quot;). The skin conductance amplifier gain is set to five microsiemens per volt. So, if you multiply the numbers in the second column by 5, you will have the skin conductance in microsiemens. The EMG values are in the fourth (voltage) and fifth (raw ADC) columns. The EMG amplifier gain is set to 2000, so dividing the values in the fourth column by 2 will give you the EMG voltage in millivolts.&lt;br /&gt;
&lt;br /&gt;
== Real-time motion tracking ==&lt;br /&gt;
[[File:FIRMM.jpg|thumb|FIRMM tablet]]&lt;br /&gt;
For subject motion tracking, we have a [https://turingmedical.com/firmm/ FIRMM tablet] that can access the scanner&#039;s image database and provide feedback on the subject&#039;s head motion in real-time. FIRMM will automatically plot the motion trace and quality metrics when scanning begins. You can also set protocol-specific parameters like the motion threshold and data quality goals required for your study. It helps monitor the quality metrics in real time so you can adjust your approach. This is mostly useful for fMRI studies. It is also possible to configure the video output so that you can send the real-time motion feedback to the subject via visual display. &lt;br /&gt;
&lt;br /&gt;
The FIRMM tablet is configured to be connected to the scanner by default. If it shows &amp;quot;FIRMM DISCONNECTED&amp;quot;, then we need to check if the firmm_transfer process is running on the scanner, sometimes restarting the process or restarting the FIRMM tablet is needed.&lt;br /&gt;
&lt;br /&gt;
==Subject video==&lt;br /&gt;
You can monitor and record the subject&#039;s face or body using the [https://mrc-systems.de/en/products/mr-compatible-cameras MRI compatable video camera from MRC Systems]. The camera is always on and streaming video to the linux box next to the scan console. An analog video signal is also sent to the large-screen tv in the control room (use the &#039;A/v input&#039;). To use the camera, you can attach it to the head coil using the loc-line connectors. When not in use, the camera should be hung on the side of the scanner along with the response devices. To see the video feed, run the following from the command line: &amp;quot;ffplay -f video4linux2 /dev/video0&amp;quot;. To record the video feed, you can use our video recording scripts. From the command line run &amp;quot;recordSubject 310&amp;quot;, this will record subject video for 5 minutes and 10 seconds; to synchronize the recording to the start of the scan, run &amp;quot;recordSubjectTrigger 310&amp;quot; instead. The data files are saved to the &amp;quot;video&amp;quot; directory. &lt;br /&gt;
&lt;br /&gt;
Troubleshoot: if you get an error &amp;quot;/dev/device0: busy or resource unavailable&amp;quot;, then run &amp;quot;fuser /dev/device0&amp;quot; and you&#039;ll get the PID of the process that is currently occupying the video device. Then run &amp;quot;kill -9 [PID]&amp;quot;. This should kill the process and you should be able to use the video camera again. Occasionally the camera feed fails and the recorded video files are empty. If this happens, check the video device setting with &amp;quot;v4l2-ctl -d /dev/video0 --all&amp;quot; and look for the &amp;quot;Video Standard&amp;quot; section. If it&#039;s something like &amp;quot;Video Standard = 0x000000ff PAL-B/B1/G/H/I/D/D1/K&amp;quot;, then you&#039;ll need to change it to NTSC standard with &amp;quot;v4l2-ctl -d /dev/video0 -s ntsc&amp;quot;. The returned message should be &amp;quot;Standard set to 0000b000 NTSC-M/M-JP/M-KR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scan Triggers =&lt;br /&gt;
[[File:cni_epi_psd_usercvs_ss.png|thumb|UserCVs under the &#039;Advanced&#039; tab for the cni_epi PSD.]]&lt;br /&gt;
The moment when the scanner starts acquiring image data can be controlled from the computer you use to control your experiment. To do this you need to be able to program your computer to send a pulse to the scanner at the planned moment.&lt;br /&gt;
&lt;br /&gt;
At the CNI, we provide a [[CNI widgets|USB-to-Serial port device]], which works well for E-Prime and Presentation. The notes below show how to set up the UserCV so that the scanner listens for the trigger, and how to send a trigger pulse using the USB-to-Serial device.&lt;br /&gt;
&lt;br /&gt;
== Protocol configuration ==&lt;br /&gt;
For BOLD EPI, be sure to use the cni_epi PSD to get the triggering options described here. The same options are also available for the spiral PSD. Under the &#039;Advanced&#039; tab, make sure the &amp;quot;start scan trigger&amp;quot; CV is set to &#039;1&#039;, which tells it to use the external trigger. Other options include &#039;0&#039; for no trigger (scan starts as soon as the scan button is pressed), and &#039;2&#039; for cardiac gating, which will synchronize to the cardiac cycle (measured via either the PPG pulse oximeter or ECG leads).&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial Port Trigger ==&lt;br /&gt;
The CNI also has a USB-to-Serial port device set up to send scan triggers. Just connect the USB cable labeled &amp;quot;EPrime Trigger&amp;quot; to your computer. On OS-X and Linux, the device is automatically recognized as a serial port (under /dev/ttyACM? on linux or /dev/ttyUSB??? on OS-X). On Windows, the device will show up as a COM port. &lt;br /&gt;
&lt;br /&gt;
When configuring the port, note that the device is expecting communication at 57600 bps and the scanner is triggered by sending a three-character string: &amp;quot;[t]&amp;quot; (without the quotes). In E-Prime, you need to add the serial port device to your experiment and then configure it by specifying the device (you can find the COM port number in Windows Device Manager - Ports (COM&amp;amp;LPT)) and setting the baud rate to 57600. (Other settings can be left at their default values.) In your E-Prime script, add the following in-line code to send the trigger string to the port: &lt;br /&gt;
&lt;br /&gt;
 Serial.WriteString &amp;quot;[t]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To use this device from Matlab, try:&lt;br /&gt;
&lt;br /&gt;
 s = serial(&#039;/dev/ttyS0&#039;, &#039;BaudRate&#039;, 57600);&lt;br /&gt;
 fopen(s);&lt;br /&gt;
 fprintf(s, &#039;[t]&#039;);&lt;br /&gt;
 fclose(s);&lt;br /&gt;
&lt;br /&gt;
Note that you will need to replace &#039;/dev/ttyS0&#039; with the correct port on your machine. E.g., if you&#039;re on windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. On a mac,  type &#039;ls -lh /dev/tty.usbmodem*&#039; in a terminal. &lt;br /&gt;
&lt;br /&gt;
If you are using PsychoPy, first make sure the pyserial package is installed (e.g., pip install pyserial). Then create two code blocks:&lt;br /&gt;
&lt;br /&gt;
 # Insert a &#039;Begin Experiment&#039; code block to initialize (e.g., as part of your instructions)&lt;br /&gt;
 import serial&lt;br /&gt;
 import time&lt;br /&gt;
 device = &#039;/dev/ttyACM1&#039;  # NOTE: replace with your device identifier! On windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. &lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(device, 115200, timeout=1)&lt;br /&gt;
         time.sleep(0.1)&lt;br /&gt;
         ser.write(&#039;[t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         pass&lt;br /&gt;
&lt;br /&gt;
 # Insert a &amp;quot;Begin Routine&amp;quot; code block whenever you want to send a trigger:&lt;br /&gt;
 send_trigger()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternate example from Christina Chung: &lt;br /&gt;
 #################################################&lt;br /&gt;
 ### import modules&lt;br /&gt;
 import serial&lt;br /&gt;
 import time &lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 ### Set SCANNER_TRIGGER_NEEDED to False to bypass program abortion when scanner exception is thrown&lt;br /&gt;
 SCANNER_TRIGGER_NEEDED = False&lt;br /&gt;
 DEVICE_ID = &#039;com3&#039;&lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(DEVICE_ID, 57600, timeout=1)&lt;br /&gt;
         time.sleep(2)    ### wait for 2 sec to ensure scanner is ready; CNI wiki default 0.1&lt;br /&gt;
         ser.write(&#039;[t][t][t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         if not SCANNER_TRIGGER_NEEDED:&lt;br /&gt;
             pass&lt;br /&gt;
         else:&lt;br /&gt;
             core.quit()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The construction of our serial trigger device is described on the [[CNI widgets]] page.&lt;br /&gt;
&lt;br /&gt;
= Capturing Scan Timing Pulses =&lt;br /&gt;
Some researchers want to know the precise time when each slice or each volume is acquired. The scanner produces timing pulses that can be used to record this information. Additionally, a pulse sent by the scanner at the beginning of the scan can be used to trigger the start of an experimental task (reversing the direction of triggering discussed above). At the CNI, we have two methods of receiving these timing pulses. One method uses the USB-to-Serial trigger device and the other uses the fORP response box system. These two methods are described in more detail below.&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial timing pulses ==&lt;br /&gt;
The emulated serial port device [[#USB-to-Serial Port Trigger|described above]] can also be used to receive timing pulses from the scanner. To enable this mode, send a &amp;quot;[p]&amp;quot; command. You will then receive a &#039;p&#039; character every time a timing pulse is detected. The temporal accuracy of these pulses should be about 1 ms. These &amp;quot;scope trigger&amp;quot; pulses come at the beginning of every slice or the beginning of every volume, depending on how the PSD is configured. For the cni_epi and spiral PSDs, under the &amp;quot;Advanced&amp;quot; tab, you can change the &amp;quot;scope trigger&amp;quot; CV to send pulses for every slice or just for the first slice of each volume. To capture these trigger pulses, you can use this [[saveTriggers.py|python script]].&lt;br /&gt;
&lt;br /&gt;
== Timing pulses as keypresses via fORP ==&lt;br /&gt;
To use the fORP response box system to receive timing pulses from the scanner, set up the system as described in the &#039;Response Box&#039; section above. Note that timing pulses will be received via the same USB connection as subjects&#039; responses, and that no additional USB cables need be plugged into your testing computer. If you have selected a numeric mapping between button presses and keys, the timing pulses sent to your testing laptop will be in the form of a &#039;5&#039;. (Note that use of the 5-button diamond-shaped response box will include the numbers 1-4 and 6, and thus will not include the number 5). Use caution when editing experimental scripts while using this method--if your script is open while the scanner sends pulses, a long series of 5&#039;s will be inserted into your script!&lt;br /&gt;
&lt;br /&gt;
= General information =&lt;br /&gt;
&lt;br /&gt;
==The magnetic field==&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:mr750_gauss_lines_top.png|Gauss-lines for a generic install (top view).&lt;br /&gt;
Image:mr750_gauss_lines_side.png|Gauss-lines for a generic install (side view).&lt;br /&gt;
Image:mr750_gauss_lines_front.png|Gauss-lines for a generic install (front view).&lt;br /&gt;
Image:CNI_MR_fieldlines.png|Sketch of gauss-lines for our particular installation.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
When positioning equipment in the scan room, it&#039;s useful to be aware of the magnetic field lines. All equipment in the CNI scan room is MR-safe, but not all equipment functions properly in very high-field regions. The diagrams show the estimated field lines in the MR suite area.&lt;br /&gt;
&lt;br /&gt;
==Additional/Legacy hardware information==&lt;br /&gt;
See the [[Hardware configuration]] page for some additional and legacy hardware information.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59418</id>
		<title>MR Hardware</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59418"/>
		<updated>2026-03-18T19:58:00Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Biopac measures */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= MR Scanner =&lt;br /&gt;
The MR scanner is in room 065 of the CNI suite in Building 420. It has its [[MR Scanner|own wiki page]].&lt;br /&gt;
&lt;br /&gt;
= Peripheral Device Rack (Laima Box) =&lt;br /&gt;
[[File:LB_Overview_Annotate.jpg|thumb|Overview of Laima Box]]&lt;br /&gt;
As you may guess from the title, the Laima Box came into being on the urging of Laima to find a solution to provide a stable and flexible interface to all the display devices, scanner signals, and other peripheral devices that are commonly used during studies. &lt;br /&gt;
&lt;br /&gt;
From the top rack to the bottom, the devices are (as marked in the photo): &lt;br /&gt;
* Small Monitor (Output 3 on HDMI Matrix, typically used for Eyelink display) and Eyelink keyboard + mouse&lt;br /&gt;
* Hyperion Projector Consoles (left: rear projector, right: side projector); Projector Switch for switching between the two projectors&lt;br /&gt;
* fORP Optical Interface; Serial Trigger Box; Video Flipper ([https://halltechav.com/product/sc-hd-2b/ Hall Research video scaler SC-HD-2B])&lt;br /&gt;
* Main Power to the rack&lt;br /&gt;
* Remote Power Switches for equipments in the magnet room: Eyelink camera, Webcam, DC shim amplifier; Audio Inputs for Avotec channel A &amp;amp; B and OptoAcoustics&lt;br /&gt;
* HDMI Matrix (see detailed Input-Output schematics [[#HDMI Matrix Switch|below]])&lt;br /&gt;
* fORP USB connection; Serial-to-USB connection; Scanner trigger co-ax connections; Video Inputs (Input 4 &amp;amp; 5 on HDMI Matrix)&lt;br /&gt;
&lt;br /&gt;
= Stimulus Presentation =&lt;br /&gt;
&lt;br /&gt;
==Visual System ==&lt;br /&gt;
The CNI offers several display options, depending on your visual stimulus needs. All use a digital interface (DVID or HDMI) and can be connected by selecting the appropriate options on the HDMI matrix switch. The mirror on the Nova 32-channel coil is a double mirror design (see [[32-channel_double_mirror]]), and that on the GE 64-channel coil is a single mirror design. &lt;br /&gt;
&lt;br /&gt;
=== 3D LCD display ===&lt;br /&gt;
We have a 49&amp;quot; 4K 3D LCD display from Resonance Technology. It is placed at the far end of the scanner room behind the scanner&#039;s rear pedestal. Its specs and field of view presented to the scan subjects are as follows: &lt;br /&gt;
 * 640x480@60Hz up to 4096x2160@50Hz resolution&lt;br /&gt;
 * 1000:1 contrast ratio&lt;br /&gt;
 * screen size: 107.2cm high x 60.3cm wide &lt;br /&gt;
 * visual distance from Nova coil: 267cm from mirror2, 6cm mirror2 to mirror1, 15cm from eye to mirror1 = 288cm&lt;br /&gt;
 * visual distance from NFL coil: 263cm from mirror1, 13cm from eye to mirror1 = 276cm &lt;br /&gt;
&lt;br /&gt;
To see 3D effects, subjects will need to wear passive polarized lenses. The screen can, of course, present non-3D stimuli too. &lt;br /&gt;
&lt;br /&gt;
As described in our Slack [https://stanford-cni.slack.com/archives/C011V1M2FRN/p1639611006023100 channel], the TV monitor has varying latency depending on the mode it is in.  We conducted tests using a 1920x1080p@60Hz signal comparing the mirrored display on a laptop while simultaneously viewing the display on the scan room monitor.  By capturing these displays simultaneously with a high-speed video acquisition we were able to calibrate the latency between the laptop and scan room monitor display.  Assuming the laptop display latency is 0, when in General mode the monitor processing creates about 133ms (8 video frames) of latency, as compared to Game mode where the latency is only 33ms or 2 frames. In order to switch modes, the remote control must be used inside the scan room but care must be taken as the batteries are slightly ferromagnetic so be sure to hold on the remote firmly and keep it as far from the scanner as possible.  Choose Options-&amp;gt;Scene Select-&amp;gt;Game in order to select Game mode.  It should be in this mode by default -- we ask any users that switch the monitor mode to please return to Game mode after their experiment. &lt;br /&gt;
&lt;br /&gt;
=== DLP Projector ===&lt;br /&gt;
We also have an MR-compatible rear-projection DLP projector ([https://pstnet.com/products/hyperion/ Hyperion 2-120 Projector]). The new Hyperion 2-120 Control Room Console features an LCD touchscreen to power on/off the projector, mirror the image, show the projector status, and display video input resolution, refresh rate, and synchronization status. This projector can be used by placing the large mirror on the back of the scanner bed in front of the LCD display. You also need to place the rear-projection screen on the head coil. Set-up of this system is a bit more involved than the LCD display, but it offers a much brighter display and a larger field of view. If you need that, let us know and we&#039;ll show you how to set up the projector system.&lt;br /&gt;
&lt;br /&gt;
Here are the specs of the projector:&lt;br /&gt;
 * 1920x1080&lt;br /&gt;
 * 120Hz or 60Hz frame rate&lt;br /&gt;
 * 16:9 and 16:10 widescreen formats (standard 4:3 available)&lt;br /&gt;
 * brighter and larger field of view than the LCD displays&lt;br /&gt;
&lt;br /&gt;
If you try the projector (via HDMI) and nothing happens, you can try cycling power to the [[#The Laima Box|Laima Box]. If this doesn’t work, troubleshoot the projector as you normally would (check the input cable on the projector is connected and cycle inputs etc).&lt;br /&gt;
&lt;br /&gt;
=== HDMI Matrix Switch ===&lt;br /&gt;
[[File:HDMI_Switch_Schematic.jpg|thumb|HDMI switch schematic.]]&lt;br /&gt;
[[File:LB_HDMI_Switch.jpg|thumb|HDMI switch in Laima Box.]]&lt;br /&gt;
We use an 8x8 HDMI Matrix Switch to distribute video signals to all the various displays.  This is a [https://keydigital.org/category/4k-18g-hdmi-matrix-switchers/KD-MS8x8G Key Digital KD-MS8x8G] switch capable of connecting any of 8 input HDMI inputs to any/all of 8 HDMI outputs.  The switch is capable of handling 4K HDCP2.2 video signals.  The [[Media:HDMI_Switch_Schematic.jpg|schematic]] of the switch connections are shown here with all 8 inputs and outputs in use. In order to make a connection to a particular output display, you choose the particular input under the labeled output row of 8 LEDs.  This is done by pressing the button under the labeled output (see HDMI Matrix switch [[Media:LB_HDMI_Switch.jpg|image]]) in order to progress left-to-right through the various inputs.  Unfortunately, the blue LEDs on this switch that show what input is currently connected have been burning out, so it&#039;s sometimes necessary to count your button presses from a visible LED to know what input you are on. &lt;br /&gt;
&lt;br /&gt;
The default output display for each input is nominally the same number as the input.  As you&#039;ll note, we have the GE Host computer and GE Table Driver on inputs 1 &amp;amp; 2 -- this is so we can send the GE Host Display to any other display connected to the HDMI matrix switch, or use the GE Table Monitor to display other output -- such as the Eyelink computer output when adjusting the Eyelink camera at the front of the scanner. &lt;br /&gt;
&lt;br /&gt;
The HDMI matrix switch allows for fairly elaborate configuration as described in the [https://www.keydigital.org/web/content/5839 manual] via a Key Digital PC application that is available on the CNI PC laptop when connected to the internal private ethernet network. &lt;br /&gt;
&lt;br /&gt;
Troubleshooting: The HDMI matrix switch is generally fairly stable but if you&#039;re having odd behavior a good first step is to cycle the main power to the Laima Box -- this will reset the HDMI matrix switch.&lt;br /&gt;
&lt;br /&gt;
=== MRI Compatible Glasses and Lensometer ===&lt;br /&gt;
[[File:mri-glasses.jpg|thumb|mri frames and lenses]]&lt;br /&gt;
For participants who wear glasses, CNI has a set of interchangeable lenses that are used with an MRI compatible plastic frame. The frame and lenses are located in the open shelving above and to the left of where the screening forms are located. We have lenses for both near-sighted (-0.5 to -8.0 in .5 step increments) and far-sighted (+.5 to +8.0 in .5 step increments) vision corrections. The lenses are made of hard polycarbonate plastic and are not breakable. The easiest way to install the lenses into the frame is insert the lens from the back first into the edge by the ear piece and then snap in the lens by the nose. If the participant does not know his/her glasses prescription we have a lensometer that can determine that. Basic instructions for use of the lensometer are in the next section. There is also an eye chart posted on the door to the equipment room where participants can test their vision with the MRI glasses. Have the participant stand right in front of the lensometer (about 10 feet from the chart) to use the chart.&lt;br /&gt;
[[File:eye-chart.jpg|thumb|eye chart]]&lt;br /&gt;
&lt;br /&gt;
To determine glass prescription strengths for MRI participants CNI has the AL200 Auto Lensometer. Is is located in the CNI control room area. There is both a User&#039;s guide and a quick reference sheet next to the lensometer. The lensometer is currently set up to read a single vision lens. There are settings available to read either bifocal or progressive lenses, but they are not typically used as only the distance portion of the lens needs to be measured.&lt;br /&gt;
&lt;br /&gt;
Here is a basic how-to from the Reichert user&#039;s guide.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:Lensometer-parts.png|The key parts of the lensometer.&lt;br /&gt;
Image:Lensometer-back.png|Turn on the lensometer using the switch on the back panel. The AL200 will do a calibration check; do not place any lenses or obstructions in front of the aperture during calibration.&lt;br /&gt;
Image:Step2.png|The AL200’s default measurement mode is Single Vision, Automatic. This mode is used for fast, easy measurement of a pair of single vision spectacle lenses. You&#039;re now ready to measure the right lens, indicated by the &#039;R&#039; on the upper left side of the screen.&lt;br /&gt;
Image:Glass-placement1.jpg|Place the spectacles on the lens table and secure the right lens with the lens holder. Using the table base levers and your hand, move the lens until the large cross is positioned directly over the small cross in the middle of the centering target.&lt;br /&gt;
Image:Glass-placement2.jpg|If you insert a progressive lens in single vision mode, the progressive icon may flash to indicate that the mode should be changed. NOTE: Place the glasses so that lenses are toward the front and the ear pieces toward the back.&lt;br /&gt;
Image:Step3.png|When optical center has been located, the AL200 tone will sound and the measurements will be locked on the screen. Upon removal of the lens the AL200 will automatically switch to the left lens, indicated by the highlighted L on the upper right side of the screen. &lt;br /&gt;
Image:Step4.png|Repeat the measurement process for the left lens. All measurements will remain on the screen until the operator chooses to print or clear the data.&lt;br /&gt;
Image:Lensometer-screen.png|The number that appears in the Sphere location is the correction number that you will use in choosing the lenses for the MRI glasses.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Auditory System ==&lt;br /&gt;
&lt;br /&gt;
=== Avotec System ===&lt;br /&gt;
[[File:Avotec2.jpg|thumb|Avotec Console]]&lt;br /&gt;
[[File:Avotec-headsets.png|thumb|Avotec Headsets]]&lt;br /&gt;
The [https://avotecinc.com/pages/silent-scan Avotec Silent Scan system] provides a maximum of 30dB with the [https://avotecinc.com/products/full-coverage-headset-3000-series Full Coverage] and [https://avotecinc.com/products/conformal-headset-3000-series Conformal] headsets. The conformal headset will fit in any coil and any patient. The system also has a [https://avotecinc.com/products/non-headset-3000-series Flat Headset] with a slim profile (0.5 inch pad) which offers great flexibility and can fit into tight coils. The system provides clear two-way communication with built-in patient-activated alarm. The console and equalizer provide high-fidelity, frequency-balanced sound for a variety of audio inputs. The console also has a built-in radio. &lt;br /&gt;
&lt;br /&gt;
This system is best to use if you need to deliver high quality audio to the subjects, or need to communicate with the subjects frequently during the scans.&lt;br /&gt;
&lt;br /&gt;
We recommend using the Avotec + Flat Headset for most studies as it would fit into the Nova 32ch coil for most participants and is more robust in operation (in comparison to the Conformal headset and the OptoAcoustics system). If the Flat headset does not fit into the head coil, you can also use the Conformal headset. Note that when the participant is wearing the Conformal headset and lying on the patient table, the tube connecting to the headset can sometimes slip and pull the earplugs out of the participant&#039;s ears; if that happens you can tape down the tube to the patient table to prevent it from slipping. For audio input, use Avotec Channel A and B for the Conformal headset and Flat headset respectively.&lt;br /&gt;
&lt;br /&gt;
=== OptoACTIVE Headphone System === &lt;br /&gt;
[[File:OptoACTIVE.jpg|thumb|OptoACTIVE Headphone System control console]]&lt;br /&gt;
The OptoACTIVE Headphone System provides active noise cancellation (ANC) during MR scans. The slim profile headphones are designed to fit into the head coils for most human subjects. Its built-in optical microphones monitor the sound level at the subject&#039;s ears, which enable automatic self-calibration, sound pressure level monitoring and real-time in-ear stereo sound recording. The OptoACTIVE headphones also provide very good airseal around the subject&#039;s ears which results in excellent passive noise reduction as well. In combination with the passive noise reduction and active noise cancellation, the headphone can reach a 60 dB attenuation (95%) of the main EPI resonance noise. It also features the FOMRI-III noise cancelling microphone for the subject, which enables quiet two-way communication during scans. &lt;br /&gt;
&lt;br /&gt;
The control console has an LCD touch-screen and pushbuttons that allow the operator to control initial and ongoing calibrations, real-time active noise cancelling, channel level volume and recording, FORMRI microphone communications, etc. It displays the noise level, stimuli levels and spectrum analysis in real time.&lt;br /&gt;
&lt;br /&gt;
The system is ideal for the study of: sleeping disorders, autism, children suffering from claustrophobia, auditory fMRI and other research areas that were previously impractical or unattainable due to scanner noise.&lt;br /&gt;
&lt;br /&gt;
For step-by-step operation instructions, please see this [[Media:Optoacoustics_How-To.pdf | How-To Guide]], clearly summarized by Prof. Cameron Ellis and Emily Chen.&lt;br /&gt;
&lt;br /&gt;
== CNI Laptops ==&lt;br /&gt;
The CNI has one MacBook and one Windows PC for users to use during their experiments. The MacBook is running OS 10.12 and has MATLAB R2014b with PsychToolbox and PsychoPy 3 installed. The Windows PC is running Windows 11 and has E-Prime 3 installed (CNI also has a license for E-Prime 3). You could also checkout out [[Stimulus|some (old) notes]] shared by previous CNI users on how to set up experiments with these toolboxes.&lt;br /&gt;
&lt;br /&gt;
= Subject measurement =&lt;br /&gt;
&lt;br /&gt;
== fORP Response Box ==&lt;br /&gt;
We have a modular response box system ([http://www.curdes.com/index.php/mainforp/interfaces/fiu-933.html fORP 932]) from [http://www.curdes.com/ Current Designs]. With ths system, you can swap out various response devices. The output from any of these devices is available from the fORP box via USB. The device emulates a USB keyboard. We have confirmed that the fORP 932 USB interface is polled at 1kHz. The device itself has sub-millisecond time resolution (see the [http://www.curdes.com/index.php/support/faqs.html fORP FAQ]). We estimate that this system provides response time measurements with a precision and reliability of about one millisecond. &lt;br /&gt;
&lt;br /&gt;
Note that the fORP can send keypresses every time the scanner acquires a slice (or a volume, if the &amp;quot;scope trigger (User CV3)&amp;quot; is set to &amp;quot;1&amp;quot; in the EPI scans). If you want to receive these keypresses, configure the fORP by selecting a configuration that does *not* say &amp;quot;no 5&amp;quot; (if you are receiving numbers) or &amp;quot;no t&amp;quot; (if you are receiving letters). If you *do not* want to get these pulses (most users actually do not want these), then select a configuration that includes &amp;quot;no 5&amp;quot; or &amp;quot;no t&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The response devices that we currently have are:&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-scrl-1.html scroll-wheel device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-2x4-c.htmlhtml 2X4 bimanual button boxes]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x4-cyl-2.html  4-buttonstick-style response device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x5-d.html 5-button diamond button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/custom.html 5-button curved button box]&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-trk-2.html trackball device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-1x5-n4.html PYKA 5 button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/variabledevices/hhsc-joy-5.html joystick]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/foot-pedal.html foot pedal]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a need for a different response device, just let us know.&lt;br /&gt;
&lt;br /&gt;
To use a response device at the CNI:&lt;br /&gt;
# Plug the desired device into the black fiber-optic connector on the right side of the front of the magnet bore&lt;br /&gt;
# Locate the silver box (labeled fORP) on the peripheral device rack.&lt;br /&gt;
# Push in the knob on the right front side of the fORP box to enter menu mode. For the following instructions, you will turn the knob to scroll through the menu choices, and then push in on the knob to select your choice. (See [https://wiki.curdes.com/bin/view/CdiDocs/932QuickSetup this guide] for more details on using the fORP 932.)&lt;br /&gt;
# Turn the knob until the word &amp;quot;yes&amp;quot; is underlined then push the knob to select &amp;quot;yes&amp;quot;&lt;br /&gt;
# In the &amp;quot;mode select&amp;quot; menu that appears next, you can select &amp;quot;manual config&amp;quot;. We recommend, however, that you pick the AUTOCONFIGURE choice which tells the interface to determine as much as it can about the connected handheld device and the cabling to the host computer. This should simplify the choices that need to be made by you. If you have used the AUTOCONFIGURE option you can skip steps 6 and 7 below and proceed directly to step 8.&lt;br /&gt;
# In the response device menu, turn the knob to scroll through the choices until you find the device that you connected in step 1 (examples include):&lt;br /&gt;
## 4-button cylinder: select HHSC-cyl-5&lt;br /&gt;
## 5-button diamond: select HHSC-1x5-D&lt;br /&gt;
## 5-button curved: select HHSC-1x5-C&lt;br /&gt;
## bi-manual 4-button keypads: select HHSC-2x4c&lt;br /&gt;
## scrollwheel: select HHSC-SCRL1&lt;br /&gt;
## trackball: select HHSC-TRK-2 (for mouse emulation)&lt;br /&gt;
# Select USB in the next display by pushing in the knob.&lt;br /&gt;
# Select the desired output mode. For the cylinder or keypads, this determines the mapping between the buttons and the keypress that is generated. E.g., HID-NAR-12345 will map the 4 cylinder buttons to the four number keys, 1-4, and send a &#039;5&#039; for each scope trigger pulse received by the scanner (if you don&#039;t want these pulses, select the &#039;no 5&#039; mode, as noted above). NAR means &amp;quot;no auto release&amp;quot;. In NAR mode, the keypress is maintained as long as the button is pressed. In the non-NAR mode, a brief keypress is generated, even if the button is held down. We find that NAR mode works better with PsychToolbox. In non-NAR mode, it can miss the very brief keypresses produced by auto release. &lt;br /&gt;
# Setup is now complete.&lt;br /&gt;
&lt;br /&gt;
For more technical details about the fORP, see the [[fORP|fORP wiki page]].&lt;br /&gt;
&lt;br /&gt;
== Eye Tracker ==&lt;br /&gt;
[[File:cni_eye_tracker_camera.jpg|thumb|Eye tracker camera.]]&lt;br /&gt;
[[File:cni_eye_tracker_ir.jpg|thumb|Eye tracker IR illuminator.]]&lt;br /&gt;
&lt;br /&gt;
We have an [https://www.sr-research.com/eyelink-1000-plus/ SR Research EyeLink 1000 Plus] eye tracker with remote optics installed at the CNI. It has a frame rate of up to 2000Hz, up to 1/2 degree accuracy, and is fairly easy to set up and use. We found that the standard IR light source from SR Research did not adequately focus the light onto the subject&#039;s eye, so we use the [https://mrc-systems.de/en/products/mr-compatible-cameras#light-sources LED light source] from MRC Systems. &lt;br /&gt;
&lt;br /&gt;
The camera is mounted on a wood stand placed next to the patient bed at the back of the bore. The camera position and focus should not need to be adjusted if your subject is positioned with their eyes close to isocenter. However, if you have a prescription that is centered far from iso-center, you may need to adjust the focus a bit. To do that, you can use the HDMI matrix to show the eye tracker video on the bore monitor so that you can adjust the camera while seeing what you are doing.&lt;br /&gt;
&lt;br /&gt;
The LED light source is mounted on a blue loc-line stalk that attaches to the head coil and is usually left unattached and hanging on the side of the scanner next to the response devices; you will need to mount it to the head coil using the blue loc-line pliers that you can find under the shelf with all the padding. Once mounted, make sure the light source is directed toward the subject&#039;s eye by aiming it through the gap between the two mirrors.&lt;br /&gt;
&lt;br /&gt;
The eye tracker host computer is mounted in the equipment room. However, the display, keyboard, and mouse for that computer are to the right of the GE console. You can connect to the host computer by a direct TCP connection through the ethernet cable located in the cable bundle next to the GE console. This cable is, not surprisingly, labeled &amp;quot;eye tracker&amp;quot;. If you use psych toolbox for stimulus presentation, you can use the [http://psychtoolbox.org/docs/EyelinkToolbox EyeLink Toolbox]. For those who use python (e.g., [http://www.psychopy.org/ Psychopy]), try the [http://www.psychopy.org/api/hardware/pylink.html PyLink module]. If you use E-Prime, check out the [https://www.sr-support.com/showthread.php?149-E-Prime-integration E-Prime integration info] on the SR Research support site. In any case, the IP address of the Eyelink is on our private network and thus is NOT the default IP, so you need to explicitly set it to 10.0.3.2. This private network has a DHCP server, so your stimulus computer should automatically get assigned an IP address on the same subnet. Please don&#039;t hard-code an IP address for your stimulus computer! Note that older versions of psychtoolbox don&#039;t allow you to specify the IP address, so be sure to get the latest Eyelink mex file from [https://github.com/kleinerm/Psychtoolbox-3/commit/aa04b821e975e0e61978377bb05aa1e216f3382e github].&lt;br /&gt;
&lt;br /&gt;
The data recorded by the EyeLink software is saved in the EyeLink partition (E:\). To transfer the data to your own storage device, you can reboot the EyeLink computer into Windows and connect your own USB drive. Afterwards you can reboot the computer again and get back into the EyeLink system. &lt;br /&gt;
&lt;br /&gt;
For a tutorial and troubleshooting information on the Eyelink system, see the [[EyelinkTracker]] page.&lt;br /&gt;
&lt;br /&gt;
==Physio monitoring==&lt;br /&gt;
[[File:ppg_resp.jpg|thumb|Photo plethesmograph (PPG) and respiration belt.]]&lt;br /&gt;
[[File:Tools_gating.png|thumb|Tools Gating]]&lt;br /&gt;
[[File:Physio_waveforms.png|thumb|Physio Waveforms on Console]]&lt;br /&gt;
[[File:physmon.png|thumb|[[CNI_widgets|CNI PPG pulse detector device]].]]&lt;br /&gt;
The scanner has the standard suite of physiological measures: pulse oximetry, respiration belt, and ECG. These can be used for scan triggering. The digital data from these measurements are saved on the console and backed-up in the Flywheel database. These data are also processed by the [[CNI_widgets|CNI PPG monitoring device]] and used for EEG ballisto-cardiogram artifact removal by the EGI NetStation software. (See also the [http://fmri.ucsd.edu/Howto/3T/physio.html UCSD fMRI group&#039;s site] for more information on using the GE physio files to remove physiological artifacts from fMRI data.) A recent paper is here - [https://doi.org/10.1016/j.jneumeth.2016.10.019 The PhysIO Toolbox for Modeling Physiological Noise in fMRI Data]&lt;br /&gt;
&lt;br /&gt;
===Setting Up Physio Recording===&lt;br /&gt;
&lt;br /&gt;
* Go to “Tools” - &amp;quot;Gating&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* To record respiration/movement of the abdominal wall, select “Respiratory.”&lt;br /&gt;
&lt;br /&gt;
* To record pulse/peripheral gating, select “PG.”&lt;br /&gt;
&lt;br /&gt;
* Outfit your participant with the respiratory bellows and the PG sensor&lt;br /&gt;
&lt;br /&gt;
===Respiratory Bellows===&lt;br /&gt;
&lt;br /&gt;
The respiratory bellows goes around your participant’s diaphragm or abdomen. You will get the best signal in the area where the participant’s breathing motion is most visible when they are lying down. Use the Velcro to adjust the respiratory bellows; it should be snug and not move around much, but stretched as little as possible and not too tight. The bellows should expand and contract approximately 0.5 to 1 inches with the participant’s breathing. Do not place any padding over the respiratory bellows. You should be able to see the recording on the small screen on the scanner. Note that it’ll take about one minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the bellows if necessary. &lt;br /&gt;
&lt;br /&gt;
===Pulse/Peripheral Gating (PPG) ===&lt;br /&gt;
&lt;br /&gt;
The participant’s pulse is monitored by a photopulse sensor that detects blood oxygen levels (pulse oximetry) in the vascular bed of the participant’s finger/thumb or toe. During the measurement, the participant’s hand or foot should remain cool and dry. We recommend that you attach the sensor to the participant’s toe, especially if you are going to ask your participant to use one of the button boxes because hand movements will create noise in your PG signal. &lt;br /&gt;
&lt;br /&gt;
* Recording from the toe: Attach the sensor to the fastener for the toe (with the Velcro). Place the sensor on the vascular bed of the participant’s toe. To keep the sensor in place, tape it and the fastener to the participant’s foot using medical tape. It is also a good idea to tape the cable to the knee pillow or the participant’s leg to reduce the pull on the sensor. &lt;br /&gt;
* Recording from the thumb/finger: Place the sensor on the participant’s finger or thumb. It is a good idea to avoid placing the sensor on the joint (the signal will be much noisier if you place the sensor on the joint). To keep the sensor in place it helps to tape it to the participant’s hand with some medical tape.&lt;br /&gt;
&lt;br /&gt;
You should be able to see the recording on the small screen on the scanner. Note that it’ll take up to a minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the sensor if necessary. &lt;br /&gt;
&lt;br /&gt;
Note: When you are done, please clean the sensor with alcohol wipes as it directly touches the participant’s skin.&lt;br /&gt;
&lt;br /&gt;
===Recording Physio===&lt;br /&gt;
&lt;br /&gt;
The default method for recording the physio is the CV control method (set CV phys_record_flag to 1). With default setting of CV control method, a recording of maximum length (25 minute) will require approximately 3 seconds to save to files to the hard disk after the end of the scan. You need to make sure that the next phys-recording scan starts after the previous recording finishes saving data to files. If the next phys-recording scan starts before the previous recording finishes, the new recording request will be ignored. &lt;br /&gt;
&lt;br /&gt;
===Parsing the physio files===&lt;br /&gt;
&lt;br /&gt;
The physio data from the scanner can include three types of measurements: pulse, respiration, and electrocardiogram (ECG).  The pulse data come from the PPG, the respiration data from the breathing-belt, and the ECG from the specialized electrodes attached to the chest. &lt;br /&gt;
&lt;br /&gt;
The data recorded from these devices are written out into simple text-files. There are three files for each type of measurement.  The file names start with PPG, RESP and ECG for the three types of measurements.  The files have raw data (&#039;Data&#039;), and the times of the local peaks (&#039;Trig&#039;) (and sometimes an empty &#039;PACTrig&#039;). &lt;br /&gt;
&lt;br /&gt;
* The temporal sampling rates differ between the three types of measurements&lt;br /&gt;
** ECG: 1ms, &lt;br /&gt;
** Pulse/Peripheral Gating: 10ms, &lt;br /&gt;
** Respiration: 40ms.&lt;br /&gt;
* The timeseries data&lt;br /&gt;
** start 30 seconds of baseline from before the start scan button was pressed&lt;br /&gt;
** have a variable duration between start scan button press and the actual start (pre-scan delays, external trigger delays, etc.)&lt;br /&gt;
** stop at the same time as the scan&lt;br /&gt;
&lt;br /&gt;
To reiterate-- the physio data stored in the physio files starts 30 seconds &#039;&#039;&#039;before&#039;&#039;&#039; you press the &#039;Scan&#039; button (yes, it&#039;s psychic ;), which is almost always more than 30 seconds before scanning actually starts. It could be substantially longer if you do external triggering. In that case, you&#039;ll get some extra physio data recorded during the time between when you press start scan and you send your trigger. But the recording does stop when the scan stops. So, to synchronize physio and scan data, you can take the end of the physio data and count backward the number of data points to keep using the duration of MR acquisiton and sampling rate of the physio data.&lt;br /&gt;
&lt;br /&gt;
The physio files are zipped and uploaded to Flywheel. A simple Flywheel gear &amp;quot;CNI GE Physio File Converter&amp;quot; is avalible to help extract, visualize, and summarize the data.&lt;br /&gt;
&lt;br /&gt;
===Biopac measures===&lt;br /&gt;
For measuring skin conductance and EMG, we have a Biopac with the [http://www.biopac.com/product/eda-electrodermal-activity-amplifier-for-mri electro-dermal activity amplifier] and [http://www.biopac.com/emg-electromyogram-amplifier EMG amplifier] modules. The data from the Biopac are digitized with a [http://labjack.com/ue9 LabJack UE9] DAQ device and are available directly through a TCP stream (see [http://labjack.com/support/ue9/c-native-tcp-example the UE9 code samples]) or via our linux box voxel2, which can be used to trigger data acquisition that is synchronized with the scanner. The command to run the recording script is &amp;quot;testfix_labjack.py /data/biopac/[your experiment folder]/[run id] [recording duration]&amp;quot;. The recording duration is in seconds. The output is a csv file at /data/biopac/[your experiment folder]/[run id]_[timestamp].csv. The data file records the voltage and raw ADC values. The skin conductance is stored in the second (voltage) and third (raw ADC) columns. You probably want the second column (with numbers like &amp;quot;1.60230098&amp;quot;). The skin conductance amplifier gain is set to five microsiemens per volt. So, if you multiply the numbers in the second column by 5, you will have the skin conductance in microsiemens. The EMG values are in the fourth (voltage) and fifth (raw ADC) columns. The EMG amplifier gain is set to 2000, so dividing the values in the fourth column by 2 will give you the EMG voltage in millivolts.&lt;br /&gt;
&lt;br /&gt;
== Real-time motion tracking ==&lt;br /&gt;
[[File:FIRMM.jpg|thumb|FIRMM tablet]]&lt;br /&gt;
For subject motion tracking, we have a [https://turingmedical.com/firmm/ FIRMM tablet] that can access the scanner&#039;s image database and provide feedback on the subject&#039;s head motion in real-time. FIRMM will automatically plot the motion trace and quality metrics when scanning begins. You can also set protocol-specific parameters like the motion threshold and data quality goals required for your study. It helps monitor the quality metrics in real time so you can adjust your approach. This is mostly useful for fMRI studies. It is also possible to configure the video output so that you can send the real-time motion feedback to the subject via visual display. &lt;br /&gt;
&lt;br /&gt;
The FIRMM tablet is configured to be connected to the scanner by default. If it shows &amp;quot;FIRMM DISCONNECTED&amp;quot;, then we need to check if the firmm_transfer process is running on the scanner, sometimes restarting the process or restarting the FIRMM tablet is needed.&lt;br /&gt;
&lt;br /&gt;
==Subject video==&lt;br /&gt;
You can monitor and record the subject&#039;s face or body using the [https://mrc-systems.de/en/products/mr-compatible-cameras MRI compatable video camera from MRC Systems]. The camera is always on and streaming video to the linux box next to the scan console. An analog video signal is also sent to the large-screen tv in the control room (use the &#039;A/v input&#039;). To use the camera, you can attach it to the head coil using the loc-line connectors. When not in use, the camera should be hung on the side of the scanner along with the response devices. To see the video feed, run the following from the command line: &amp;quot;ffplay -f video4linux2 /dev/video0&amp;quot;. To record the video feed, you can use our video recording scripts. From the command line run &amp;quot;recordSubject 310&amp;quot;, this will record subject video for 5 minutes and 10 seconds; to synchronize the recording to the start of the scan, run &amp;quot;recordSubjectTrigger 310&amp;quot; instead. The data files are saved to the &amp;quot;video&amp;quot; directory. &lt;br /&gt;
&lt;br /&gt;
Troubleshoot: if you get an error &amp;quot;/dev/device0: busy or resource unavailable&amp;quot;, then run &amp;quot;fuser /dev/device0&amp;quot; and you&#039;ll get the PID of the process that is currently occupying the video device. Then run &amp;quot;kill -9 [PID]&amp;quot;. This should kill the process and you should be able to use the video camera again. Occasionally the camera feed fails and the recorded video files are empty. If this happens, check the video device setting with &amp;quot;v4l2-ctl -d /dev/video0 --all&amp;quot; and look for the &amp;quot;Video Standard&amp;quot; section. If it&#039;s something like &amp;quot;Video Standard = 0x000000ff PAL-B/B1/G/H/I/D/D1/K&amp;quot;, then you&#039;ll need to change it to NTSC standard with &amp;quot;v4l2-ctl -d /dev/video0 -s ntsc&amp;quot;. The returned message should be &amp;quot;Standard set to 0000b000 NTSC-M/M-JP/M-KR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scan Triggers =&lt;br /&gt;
[[File:cni_epi_psd_usercvs_ss.png|thumb|UserCVs under the &#039;Advanced&#039; tab for the cni_epi PSD.]]&lt;br /&gt;
The moment when the scanner starts acquiring image data can be controlled from the computer you use to control your experiment. To do this you need to be able to program your computer to send a pulse to the scanner at the planned moment.&lt;br /&gt;
&lt;br /&gt;
At the CNI, we provide a [[CNI widgets|USB-to-Serial port device]], which works well for E-Prime and Presentation. The notes below show how to set up the UserCV so that the scanner listens for the trigger, and how to send a trigger pulse using the USB-to-Serial device.&lt;br /&gt;
&lt;br /&gt;
== Protocol configuration ==&lt;br /&gt;
For BOLD EPI, be sure to use the cni_epi PSD to get the triggering options described here. The same options are also available for the spiral PSD. Under the &#039;Advanced&#039; tab, make sure the &amp;quot;start scan trigger&amp;quot; CV is set to &#039;1&#039;, which tells it to use the external trigger. Other options include &#039;0&#039; for no trigger (scan starts as soon as the scan button is pressed), and &#039;2&#039; for cardiac gating, which will synchronize to the cardiac cycle (measured via either the PPG pulse oximeter or ECG leads).&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial Port Trigger ==&lt;br /&gt;
The CNI also has a USB-to-Serial port device set up to send scan triggers. Just connect the USB cable labeled &amp;quot;EPrime Trigger&amp;quot; to your computer. On OS-X and Linux, the device is automatically recognized as a serial port (under /dev/ttyACM? on linux or /dev/ttyUSB??? on OS-X). On Windows, the device will show up as a COM port. &lt;br /&gt;
&lt;br /&gt;
When configuring the port, note that the device is expecting communication at 57600 bps and the scanner is triggered by sending a three-character string: &amp;quot;[t]&amp;quot; (without the quotes). In E-Prime, you need to add the serial port device to your experiment and then configure it by specifying the device (you can find the COM port number in Windows Device Manager - Ports (COM&amp;amp;LPT)) and setting the baud rate to 57600. (Other settings can be left at their default values.) In your E-Prime script, add the following in-line code to send the trigger string to the port: &lt;br /&gt;
&lt;br /&gt;
 Serial.WriteString &amp;quot;[t]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To use this device from Matlab, try:&lt;br /&gt;
&lt;br /&gt;
 s = serial(&#039;/dev/ttyS0&#039;, &#039;BaudRate&#039;, 57600);&lt;br /&gt;
 fopen(s);&lt;br /&gt;
 fprintf(s, &#039;[t]&#039;);&lt;br /&gt;
 fclose(s);&lt;br /&gt;
&lt;br /&gt;
Note that you will need to replace &#039;/dev/ttyS0&#039; with the correct port on your machine. E.g., if you&#039;re on windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. On a mac,  type &#039;ls -lh /dev/tty.usbmodem*&#039; in a terminal. &lt;br /&gt;
&lt;br /&gt;
If you are using PsychoPy, first make sure the pyserial package is installed (e.g., pip install pyserial). Then create two code blocks:&lt;br /&gt;
&lt;br /&gt;
 # Insert a &#039;Begin Experiment&#039; code block to initialize (e.g., as part of your instructions)&lt;br /&gt;
 import serial&lt;br /&gt;
 import time&lt;br /&gt;
 device = &#039;/dev/ttyACM1&#039;  # NOTE: replace with your device identifier! On windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. &lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(device, 115200, timeout=1)&lt;br /&gt;
         time.sleep(0.1)&lt;br /&gt;
         ser.write(&#039;[t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         pass&lt;br /&gt;
&lt;br /&gt;
 # Insert a &amp;quot;Begin Routine&amp;quot; code block whenever you want to send a trigger:&lt;br /&gt;
 send_trigger()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternate example from Christina Chung: &lt;br /&gt;
 #################################################&lt;br /&gt;
 ### import modules&lt;br /&gt;
 import serial&lt;br /&gt;
 import time &lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 ### Set SCANNER_TRIGGER_NEEDED to False to bypass program abortion when scanner exception is thrown&lt;br /&gt;
 SCANNER_TRIGGER_NEEDED = False&lt;br /&gt;
 DEVICE_ID = &#039;com3&#039;&lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(DEVICE_ID, 57600, timeout=1)&lt;br /&gt;
         time.sleep(2)    ### wait for 2 sec to ensure scanner is ready; CNI wiki default 0.1&lt;br /&gt;
         ser.write(&#039;[t][t][t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         if not SCANNER_TRIGGER_NEEDED:&lt;br /&gt;
             pass&lt;br /&gt;
         else:&lt;br /&gt;
             core.quit()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The construction of our serial trigger device is described on the [[CNI widgets]] page.&lt;br /&gt;
&lt;br /&gt;
= Capturing Scan Timing Pulses =&lt;br /&gt;
Some researchers want to know the precise time when each slice or each volume is acquired. The scanner produces timing pulses that can be used to record this information. Additionally, a pulse sent by the scanner at the beginning of the scan can be used to trigger the start of an experimental task (reversing the direction of triggering discussed above). At the CNI, we have two methods of receiving these timing pulses. One method uses the USB-to-Serial trigger device and the other uses the fORP response box system. These two methods are described in more detail below.&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial timing pulses ==&lt;br /&gt;
The emulated serial port device [[#USB-to-Serial Port Trigger|described above]] can also be used to receive timing pulses from the scanner. To enable this mode, send a &amp;quot;[p]&amp;quot; command. You will then receive a &#039;p&#039; character every time a timing pulse is detected. The temporal accuracy of these pulses should be about 1 ms. These &amp;quot;scope trigger&amp;quot; pulses come at the beginning of every slice or the beginning of every volume, depending on how the PSD is configured. For the cni_epi and spiral PSDs, under the &amp;quot;Advanced&amp;quot; tab, you can change the &amp;quot;scope trigger&amp;quot; CV to send pulses for every slice or just for the first slice of each volume. To capture these trigger pulses, you can use this [[saveTriggers.py|python script]].&lt;br /&gt;
&lt;br /&gt;
== Timing pulses as keypresses via fORP ==&lt;br /&gt;
To use the fORP response box system to receive timing pulses from the scanner, set up the system as described in the &#039;Response Box&#039; section above. Note that timing pulses will be received via the same USB connection as subjects&#039; responses, and that no additional USB cables need be plugged into your testing computer. If you have selected a numeric mapping between button presses and keys, the timing pulses sent to your testing laptop will be in the form of a &#039;5&#039;. (Note that use of the 5-button diamond-shaped response box will include the numbers 1-4 and 6, and thus will not include the number 5). Use caution when editing experimental scripts while using this method--if your script is open while the scanner sends pulses, a long series of 5&#039;s will be inserted into your script!&lt;br /&gt;
&lt;br /&gt;
= General information =&lt;br /&gt;
&lt;br /&gt;
==The magnetic field==&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:mr750_gauss_lines_top.png|Gauss-lines for a generic install (top view).&lt;br /&gt;
Image:mr750_gauss_lines_side.png|Gauss-lines for a generic install (side view).&lt;br /&gt;
Image:mr750_gauss_lines_front.png|Gauss-lines for a generic install (front view).&lt;br /&gt;
Image:CNI_MR_fieldlines.png|Sketch of gauss-lines for our particular installation.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
When positioning equipment in the scan room, it&#039;s useful to be aware of the magnetic field lines. All equipment in the CNI scan room is MR-safe, but not all equipment functions properly in very high-field regions. The diagrams show the estimated field lines in the MR suite area.&lt;br /&gt;
&lt;br /&gt;
==Additional/Legacy hardware information==&lt;br /&gt;
See the [[Hardware configuration]] page for some additional and legacy hardware information.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59417</id>
		<title>MR Hardware</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59417"/>
		<updated>2026-03-18T19:55:54Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Eye Tracker */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= MR Scanner =&lt;br /&gt;
The MR scanner is in room 065 of the CNI suite in Building 420. It has its [[MR Scanner|own wiki page]].&lt;br /&gt;
&lt;br /&gt;
= Peripheral Device Rack (Laima Box) =&lt;br /&gt;
[[File:LB_Overview_Annotate.jpg|thumb|Overview of Laima Box]]&lt;br /&gt;
As you may guess from the title, the Laima Box came into being on the urging of Laima to find a solution to provide a stable and flexible interface to all the display devices, scanner signals, and other peripheral devices that are commonly used during studies. &lt;br /&gt;
&lt;br /&gt;
From the top rack to the bottom, the devices are (as marked in the photo): &lt;br /&gt;
* Small Monitor (Output 3 on HDMI Matrix, typically used for Eyelink display) and Eyelink keyboard + mouse&lt;br /&gt;
* Hyperion Projector Consoles (left: rear projector, right: side projector); Projector Switch for switching between the two projectors&lt;br /&gt;
* fORP Optical Interface; Serial Trigger Box; Video Flipper ([https://halltechav.com/product/sc-hd-2b/ Hall Research video scaler SC-HD-2B])&lt;br /&gt;
* Main Power to the rack&lt;br /&gt;
* Remote Power Switches for equipments in the magnet room: Eyelink camera, Webcam, DC shim amplifier; Audio Inputs for Avotec channel A &amp;amp; B and OptoAcoustics&lt;br /&gt;
* HDMI Matrix (see detailed Input-Output schematics [[#HDMI Matrix Switch|below]])&lt;br /&gt;
* fORP USB connection; Serial-to-USB connection; Scanner trigger co-ax connections; Video Inputs (Input 4 &amp;amp; 5 on HDMI Matrix)&lt;br /&gt;
&lt;br /&gt;
= Stimulus Presentation =&lt;br /&gt;
&lt;br /&gt;
==Visual System ==&lt;br /&gt;
The CNI offers several display options, depending on your visual stimulus needs. All use a digital interface (DVID or HDMI) and can be connected by selecting the appropriate options on the HDMI matrix switch. The mirror on the Nova 32-channel coil is a double mirror design (see [[32-channel_double_mirror]]), and that on the GE 64-channel coil is a single mirror design. &lt;br /&gt;
&lt;br /&gt;
=== 3D LCD display ===&lt;br /&gt;
We have a 49&amp;quot; 4K 3D LCD display from Resonance Technology. It is placed at the far end of the scanner room behind the scanner&#039;s rear pedestal. Its specs and field of view presented to the scan subjects are as follows: &lt;br /&gt;
 * 640x480@60Hz up to 4096x2160@50Hz resolution&lt;br /&gt;
 * 1000:1 contrast ratio&lt;br /&gt;
 * screen size: 107.2cm high x 60.3cm wide &lt;br /&gt;
 * visual distance from Nova coil: 267cm from mirror2, 6cm mirror2 to mirror1, 15cm from eye to mirror1 = 288cm&lt;br /&gt;
 * visual distance from NFL coil: 263cm from mirror1, 13cm from eye to mirror1 = 276cm &lt;br /&gt;
&lt;br /&gt;
To see 3D effects, subjects will need to wear passive polarized lenses. The screen can, of course, present non-3D stimuli too. &lt;br /&gt;
&lt;br /&gt;
As described in our Slack [https://stanford-cni.slack.com/archives/C011V1M2FRN/p1639611006023100 channel], the TV monitor has varying latency depending on the mode it is in.  We conducted tests using a 1920x1080p@60Hz signal comparing the mirrored display on a laptop while simultaneously viewing the display on the scan room monitor.  By capturing these displays simultaneously with a high-speed video acquisition we were able to calibrate the latency between the laptop and scan room monitor display.  Assuming the laptop display latency is 0, when in General mode the monitor processing creates about 133ms (8 video frames) of latency, as compared to Game mode where the latency is only 33ms or 2 frames. In order to switch modes, the remote control must be used inside the scan room but care must be taken as the batteries are slightly ferromagnetic so be sure to hold on the remote firmly and keep it as far from the scanner as possible.  Choose Options-&amp;gt;Scene Select-&amp;gt;Game in order to select Game mode.  It should be in this mode by default -- we ask any users that switch the monitor mode to please return to Game mode after their experiment. &lt;br /&gt;
&lt;br /&gt;
=== DLP Projector ===&lt;br /&gt;
We also have an MR-compatible rear-projection DLP projector ([https://pstnet.com/products/hyperion/ Hyperion 2-120 Projector]). The new Hyperion 2-120 Control Room Console features an LCD touchscreen to power on/off the projector, mirror the image, show the projector status, and display video input resolution, refresh rate, and synchronization status. This projector can be used by placing the large mirror on the back of the scanner bed in front of the LCD display. You also need to place the rear-projection screen on the head coil. Set-up of this system is a bit more involved than the LCD display, but it offers a much brighter display and a larger field of view. If you need that, let us know and we&#039;ll show you how to set up the projector system.&lt;br /&gt;
&lt;br /&gt;
Here are the specs of the projector:&lt;br /&gt;
 * 1920x1080&lt;br /&gt;
 * 120Hz or 60Hz frame rate&lt;br /&gt;
 * 16:9 and 16:10 widescreen formats (standard 4:3 available)&lt;br /&gt;
 * brighter and larger field of view than the LCD displays&lt;br /&gt;
&lt;br /&gt;
If you try the projector (via HDMI) and nothing happens, you can try cycling power to the [[#The Laima Box|Laima Box]. If this doesn’t work, troubleshoot the projector as you normally would (check the input cable on the projector is connected and cycle inputs etc).&lt;br /&gt;
&lt;br /&gt;
=== HDMI Matrix Switch ===&lt;br /&gt;
[[File:HDMI_Switch_Schematic.jpg|thumb|HDMI switch schematic.]]&lt;br /&gt;
[[File:LB_HDMI_Switch.jpg|thumb|HDMI switch in Laima Box.]]&lt;br /&gt;
We use an 8x8 HDMI Matrix Switch to distribute video signals to all the various displays.  This is a [https://keydigital.org/category/4k-18g-hdmi-matrix-switchers/KD-MS8x8G Key Digital KD-MS8x8G] switch capable of connecting any of 8 input HDMI inputs to any/all of 8 HDMI outputs.  The switch is capable of handling 4K HDCP2.2 video signals.  The [[Media:HDMI_Switch_Schematic.jpg|schematic]] of the switch connections are shown here with all 8 inputs and outputs in use. In order to make a connection to a particular output display, you choose the particular input under the labeled output row of 8 LEDs.  This is done by pressing the button under the labeled output (see HDMI Matrix switch [[Media:LB_HDMI_Switch.jpg|image]]) in order to progress left-to-right through the various inputs.  Unfortunately, the blue LEDs on this switch that show what input is currently connected have been burning out, so it&#039;s sometimes necessary to count your button presses from a visible LED to know what input you are on. &lt;br /&gt;
&lt;br /&gt;
The default output display for each input is nominally the same number as the input.  As you&#039;ll note, we have the GE Host computer and GE Table Driver on inputs 1 &amp;amp; 2 -- this is so we can send the GE Host Display to any other display connected to the HDMI matrix switch, or use the GE Table Monitor to display other output -- such as the Eyelink computer output when adjusting the Eyelink camera at the front of the scanner. &lt;br /&gt;
&lt;br /&gt;
The HDMI matrix switch allows for fairly elaborate configuration as described in the [https://www.keydigital.org/web/content/5839 manual] via a Key Digital PC application that is available on the CNI PC laptop when connected to the internal private ethernet network. &lt;br /&gt;
&lt;br /&gt;
Troubleshooting: The HDMI matrix switch is generally fairly stable but if you&#039;re having odd behavior a good first step is to cycle the main power to the Laima Box -- this will reset the HDMI matrix switch.&lt;br /&gt;
&lt;br /&gt;
=== MRI Compatible Glasses and Lensometer ===&lt;br /&gt;
[[File:mri-glasses.jpg|thumb|mri frames and lenses]]&lt;br /&gt;
For participants who wear glasses, CNI has a set of interchangeable lenses that are used with an MRI compatible plastic frame. The frame and lenses are located in the open shelving above and to the left of where the screening forms are located. We have lenses for both near-sighted (-0.5 to -8.0 in .5 step increments) and far-sighted (+.5 to +8.0 in .5 step increments) vision corrections. The lenses are made of hard polycarbonate plastic and are not breakable. The easiest way to install the lenses into the frame is insert the lens from the back first into the edge by the ear piece and then snap in the lens by the nose. If the participant does not know his/her glasses prescription we have a lensometer that can determine that. Basic instructions for use of the lensometer are in the next section. There is also an eye chart posted on the door to the equipment room where participants can test their vision with the MRI glasses. Have the participant stand right in front of the lensometer (about 10 feet from the chart) to use the chart.&lt;br /&gt;
[[File:eye-chart.jpg|thumb|eye chart]]&lt;br /&gt;
&lt;br /&gt;
To determine glass prescription strengths for MRI participants CNI has the AL200 Auto Lensometer. Is is located in the CNI control room area. There is both a User&#039;s guide and a quick reference sheet next to the lensometer. The lensometer is currently set up to read a single vision lens. There are settings available to read either bifocal or progressive lenses, but they are not typically used as only the distance portion of the lens needs to be measured.&lt;br /&gt;
&lt;br /&gt;
Here is a basic how-to from the Reichert user&#039;s guide.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:Lensometer-parts.png|The key parts of the lensometer.&lt;br /&gt;
Image:Lensometer-back.png|Turn on the lensometer using the switch on the back panel. The AL200 will do a calibration check; do not place any lenses or obstructions in front of the aperture during calibration.&lt;br /&gt;
Image:Step2.png|The AL200’s default measurement mode is Single Vision, Automatic. This mode is used for fast, easy measurement of a pair of single vision spectacle lenses. You&#039;re now ready to measure the right lens, indicated by the &#039;R&#039; on the upper left side of the screen.&lt;br /&gt;
Image:Glass-placement1.jpg|Place the spectacles on the lens table and secure the right lens with the lens holder. Using the table base levers and your hand, move the lens until the large cross is positioned directly over the small cross in the middle of the centering target.&lt;br /&gt;
Image:Glass-placement2.jpg|If you insert a progressive lens in single vision mode, the progressive icon may flash to indicate that the mode should be changed. NOTE: Place the glasses so that lenses are toward the front and the ear pieces toward the back.&lt;br /&gt;
Image:Step3.png|When optical center has been located, the AL200 tone will sound and the measurements will be locked on the screen. Upon removal of the lens the AL200 will automatically switch to the left lens, indicated by the highlighted L on the upper right side of the screen. &lt;br /&gt;
Image:Step4.png|Repeat the measurement process for the left lens. All measurements will remain on the screen until the operator chooses to print or clear the data.&lt;br /&gt;
Image:Lensometer-screen.png|The number that appears in the Sphere location is the correction number that you will use in choosing the lenses for the MRI glasses.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Auditory System ==&lt;br /&gt;
&lt;br /&gt;
=== Avotec System ===&lt;br /&gt;
[[File:Avotec2.jpg|thumb|Avotec Console]]&lt;br /&gt;
[[File:Avotec-headsets.png|thumb|Avotec Headsets]]&lt;br /&gt;
The [https://avotecinc.com/pages/silent-scan Avotec Silent Scan system] provides a maximum of 30dB with the [https://avotecinc.com/products/full-coverage-headset-3000-series Full Coverage] and [https://avotecinc.com/products/conformal-headset-3000-series Conformal] headsets. The conformal headset will fit in any coil and any patient. The system also has a [https://avotecinc.com/products/non-headset-3000-series Flat Headset] with a slim profile (0.5 inch pad) which offers great flexibility and can fit into tight coils. The system provides clear two-way communication with built-in patient-activated alarm. The console and equalizer provide high-fidelity, frequency-balanced sound for a variety of audio inputs. The console also has a built-in radio. &lt;br /&gt;
&lt;br /&gt;
This system is best to use if you need to deliver high quality audio to the subjects, or need to communicate with the subjects frequently during the scans.&lt;br /&gt;
&lt;br /&gt;
We recommend using the Avotec + Flat Headset for most studies as it would fit into the Nova 32ch coil for most participants and is more robust in operation (in comparison to the Conformal headset and the OptoAcoustics system). If the Flat headset does not fit into the head coil, you can also use the Conformal headset. Note that when the participant is wearing the Conformal headset and lying on the patient table, the tube connecting to the headset can sometimes slip and pull the earplugs out of the participant&#039;s ears; if that happens you can tape down the tube to the patient table to prevent it from slipping. For audio input, use Avotec Channel A and B for the Conformal headset and Flat headset respectively.&lt;br /&gt;
&lt;br /&gt;
=== OptoACTIVE Headphone System === &lt;br /&gt;
[[File:OptoACTIVE.jpg|thumb|OptoACTIVE Headphone System control console]]&lt;br /&gt;
The OptoACTIVE Headphone System provides active noise cancellation (ANC) during MR scans. The slim profile headphones are designed to fit into the head coils for most human subjects. Its built-in optical microphones monitor the sound level at the subject&#039;s ears, which enable automatic self-calibration, sound pressure level monitoring and real-time in-ear stereo sound recording. The OptoACTIVE headphones also provide very good airseal around the subject&#039;s ears which results in excellent passive noise reduction as well. In combination with the passive noise reduction and active noise cancellation, the headphone can reach a 60 dB attenuation (95%) of the main EPI resonance noise. It also features the FOMRI-III noise cancelling microphone for the subject, which enables quiet two-way communication during scans. &lt;br /&gt;
&lt;br /&gt;
The control console has an LCD touch-screen and pushbuttons that allow the operator to control initial and ongoing calibrations, real-time active noise cancelling, channel level volume and recording, FORMRI microphone communications, etc. It displays the noise level, stimuli levels and spectrum analysis in real time.&lt;br /&gt;
&lt;br /&gt;
The system is ideal for the study of: sleeping disorders, autism, children suffering from claustrophobia, auditory fMRI and other research areas that were previously impractical or unattainable due to scanner noise.&lt;br /&gt;
&lt;br /&gt;
For step-by-step operation instructions, please see this [[Media:Optoacoustics_How-To.pdf | How-To Guide]], clearly summarized by Prof. Cameron Ellis and Emily Chen.&lt;br /&gt;
&lt;br /&gt;
== CNI Laptops ==&lt;br /&gt;
The CNI has one MacBook and one Windows PC for users to use during their experiments. The MacBook is running OS 10.12 and has MATLAB R2014b with PsychToolbox and PsychoPy 3 installed. The Windows PC is running Windows 11 and has E-Prime 3 installed (CNI also has a license for E-Prime 3). You could also checkout out [[Stimulus|some (old) notes]] shared by previous CNI users on how to set up experiments with these toolboxes.&lt;br /&gt;
&lt;br /&gt;
= Subject measurement =&lt;br /&gt;
&lt;br /&gt;
== fORP Response Box ==&lt;br /&gt;
We have a modular response box system ([http://www.curdes.com/index.php/mainforp/interfaces/fiu-933.html fORP 932]) from [http://www.curdes.com/ Current Designs]. With ths system, you can swap out various response devices. The output from any of these devices is available from the fORP box via USB. The device emulates a USB keyboard. We have confirmed that the fORP 932 USB interface is polled at 1kHz. The device itself has sub-millisecond time resolution (see the [http://www.curdes.com/index.php/support/faqs.html fORP FAQ]). We estimate that this system provides response time measurements with a precision and reliability of about one millisecond. &lt;br /&gt;
&lt;br /&gt;
Note that the fORP can send keypresses every time the scanner acquires a slice (or a volume, if the &amp;quot;scope trigger (User CV3)&amp;quot; is set to &amp;quot;1&amp;quot; in the EPI scans). If you want to receive these keypresses, configure the fORP by selecting a configuration that does *not* say &amp;quot;no 5&amp;quot; (if you are receiving numbers) or &amp;quot;no t&amp;quot; (if you are receiving letters). If you *do not* want to get these pulses (most users actually do not want these), then select a configuration that includes &amp;quot;no 5&amp;quot; or &amp;quot;no t&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The response devices that we currently have are:&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-scrl-1.html scroll-wheel device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-2x4-c.htmlhtml 2X4 bimanual button boxes]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x4-cyl-2.html  4-buttonstick-style response device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x5-d.html 5-button diamond button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/custom.html 5-button curved button box]&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-trk-2.html trackball device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-1x5-n4.html PYKA 5 button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/variabledevices/hhsc-joy-5.html joystick]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/foot-pedal.html foot pedal]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a need for a different response device, just let us know.&lt;br /&gt;
&lt;br /&gt;
To use a response device at the CNI:&lt;br /&gt;
# Plug the desired device into the black fiber-optic connector on the right side of the front of the magnet bore&lt;br /&gt;
# Locate the silver box (labeled fORP) on the peripheral device rack.&lt;br /&gt;
# Push in the knob on the right front side of the fORP box to enter menu mode. For the following instructions, you will turn the knob to scroll through the menu choices, and then push in on the knob to select your choice. (See [https://wiki.curdes.com/bin/view/CdiDocs/932QuickSetup this guide] for more details on using the fORP 932.)&lt;br /&gt;
# Turn the knob until the word &amp;quot;yes&amp;quot; is underlined then push the knob to select &amp;quot;yes&amp;quot;&lt;br /&gt;
# In the &amp;quot;mode select&amp;quot; menu that appears next, you can select &amp;quot;manual config&amp;quot;. We recommend, however, that you pick the AUTOCONFIGURE choice which tells the interface to determine as much as it can about the connected handheld device and the cabling to the host computer. This should simplify the choices that need to be made by you. If you have used the AUTOCONFIGURE option you can skip steps 6 and 7 below and proceed directly to step 8.&lt;br /&gt;
# In the response device menu, turn the knob to scroll through the choices until you find the device that you connected in step 1 (examples include):&lt;br /&gt;
## 4-button cylinder: select HHSC-cyl-5&lt;br /&gt;
## 5-button diamond: select HHSC-1x5-D&lt;br /&gt;
## 5-button curved: select HHSC-1x5-C&lt;br /&gt;
## bi-manual 4-button keypads: select HHSC-2x4c&lt;br /&gt;
## scrollwheel: select HHSC-SCRL1&lt;br /&gt;
## trackball: select HHSC-TRK-2 (for mouse emulation)&lt;br /&gt;
# Select USB in the next display by pushing in the knob.&lt;br /&gt;
# Select the desired output mode. For the cylinder or keypads, this determines the mapping between the buttons and the keypress that is generated. E.g., HID-NAR-12345 will map the 4 cylinder buttons to the four number keys, 1-4, and send a &#039;5&#039; for each scope trigger pulse received by the scanner (if you don&#039;t want these pulses, select the &#039;no 5&#039; mode, as noted above). NAR means &amp;quot;no auto release&amp;quot;. In NAR mode, the keypress is maintained as long as the button is pressed. In the non-NAR mode, a brief keypress is generated, even if the button is held down. We find that NAR mode works better with PsychToolbox. In non-NAR mode, it can miss the very brief keypresses produced by auto release. &lt;br /&gt;
# Setup is now complete.&lt;br /&gt;
&lt;br /&gt;
For more technical details about the fORP, see the [[fORP|fORP wiki page]].&lt;br /&gt;
&lt;br /&gt;
== Eye Tracker ==&lt;br /&gt;
[[File:cni_eye_tracker_camera.jpg|thumb|Eye tracker camera.]]&lt;br /&gt;
[[File:cni_eye_tracker_ir.jpg|thumb|Eye tracker IR illuminator.]]&lt;br /&gt;
&lt;br /&gt;
We have an [https://www.sr-research.com/eyelink-1000-plus/ SR Research EyeLink 1000 Plus] eye tracker with remote optics installed at the CNI. It has a frame rate of up to 2000Hz, up to 1/2 degree accuracy, and is fairly easy to set up and use. We found that the standard IR light source from SR Research did not adequately focus the light onto the subject&#039;s eye, so we use the [https://mrc-systems.de/en/products/mr-compatible-cameras#light-sources LED light source] from MRC Systems. &lt;br /&gt;
&lt;br /&gt;
The camera is mounted on a wood stand placed next to the patient bed at the back of the bore. The camera position and focus should not need to be adjusted if your subject is positioned with their eyes close to isocenter. However, if you have a prescription that is centered far from iso-center, you may need to adjust the focus a bit. To do that, you can use the HDMI matrix to show the eye tracker video on the bore monitor so that you can adjust the camera while seeing what you are doing.&lt;br /&gt;
&lt;br /&gt;
The LED light source is mounted on a blue loc-line stalk that attaches to the head coil and is usually left unattached and hanging on the side of the scanner next to the response devices; you will need to mount it to the head coil using the blue loc-line pliers that you can find under the shelf with all the padding. Once mounted, make sure the light source is directed toward the subject&#039;s eye by aiming it through the gap between the two mirrors.&lt;br /&gt;
&lt;br /&gt;
The eye tracker host computer is mounted in the equipment room. However, the display, keyboard, and mouse for that computer are to the right of the GE console. You can connect to the host computer by a direct TCP connection through the ethernet cable located in the cable bundle next to the GE console. This cable is, not surprisingly, labeled &amp;quot;eye tracker&amp;quot;. If you use psych toolbox for stimulus presentation, you can use the [http://psychtoolbox.org/docs/EyelinkToolbox EyeLink Toolbox]. For those who use python (e.g., [http://www.psychopy.org/ Psychopy]), try the [http://www.psychopy.org/api/hardware/pylink.html PyLink module]. If you use E-Prime, check out the [https://www.sr-support.com/showthread.php?149-E-Prime-integration E-Prime integration info] on the SR Research support site. In any case, the IP address of the Eyelink is on our private network and thus is NOT the default IP, so you need to explicitly set it to 10.0.3.2. This private network has a DHCP server, so your stimulus computer should automatically get assigned an IP address on the same subnet. Please don&#039;t hard-code an IP address for your stimulus computer! Note that older versions of psychtoolbox don&#039;t allow you to specify the IP address, so be sure to get the latest Eyelink mex file from [https://github.com/kleinerm/Psychtoolbox-3/commit/aa04b821e975e0e61978377bb05aa1e216f3382e github].&lt;br /&gt;
&lt;br /&gt;
The data recorded by the EyeLink software is saved in the EyeLink partition (E:\). To transfer the data to your own storage device, you can reboot the EyeLink computer into Windows and connect your own USB drive. Afterwards you can reboot the computer again and get back into the EyeLink system. &lt;br /&gt;
&lt;br /&gt;
For a tutorial and troubleshooting information on the Eyelink system, see the [[EyelinkTracker]] page.&lt;br /&gt;
&lt;br /&gt;
==Physio monitoring==&lt;br /&gt;
[[File:ppg_resp.jpg|thumb|Photo plethesmograph (PPG) and respiration belt.]]&lt;br /&gt;
[[File:Tools_gating.png|thumb|Tools Gating]]&lt;br /&gt;
[[File:Physio_waveforms.png|thumb|Physio Waveforms on Console]]&lt;br /&gt;
[[File:physmon.png|thumb|[[CNI_widgets|CNI PPG pulse detector device]].]]&lt;br /&gt;
The scanner has the standard suite of physiological measures: pulse oximetry, respiration belt, and ECG. These can be used for scan triggering. The digital data from these measurements are saved on the console and backed-up in the Flywheel database. These data are also processed by the [[CNI_widgets|CNI PPG monitoring device]] and used for EEG ballisto-cardiogram artifact removal by the EGI NetStation software. (See also the [http://fmri.ucsd.edu/Howto/3T/physio.html UCSD fMRI group&#039;s site] for more information on using the GE physio files to remove physiological artifacts from fMRI data.) A recent paper is here - [https://doi.org/10.1016/j.jneumeth.2016.10.019 The PhysIO Toolbox for Modeling Physiological Noise in fMRI Data]&lt;br /&gt;
&lt;br /&gt;
===Setting Up Physio Recording===&lt;br /&gt;
&lt;br /&gt;
* Go to “Tools” - &amp;quot;Gating&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* To record respiration/movement of the abdominal wall, select “Respiratory.”&lt;br /&gt;
&lt;br /&gt;
* To record pulse/peripheral gating, select “PG.”&lt;br /&gt;
&lt;br /&gt;
* Outfit your participant with the respiratory bellows and the PG sensor&lt;br /&gt;
&lt;br /&gt;
===Respiratory Bellows===&lt;br /&gt;
&lt;br /&gt;
The respiratory bellows goes around your participant’s diaphragm or abdomen. You will get the best signal in the area where the participant’s breathing motion is most visible when they are lying down. Use the Velcro to adjust the respiratory bellows; it should be snug and not move around much, but stretched as little as possible and not too tight. The bellows should expand and contract approximately 0.5 to 1 inches with the participant’s breathing. Do not place any padding over the respiratory bellows. You should be able to see the recording on the small screen on the scanner. Note that it’ll take about one minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the bellows if necessary. &lt;br /&gt;
&lt;br /&gt;
===Pulse/Peripheral Gating (PPG) ===&lt;br /&gt;
&lt;br /&gt;
The participant’s pulse is monitored by a photopulse sensor that detects blood oxygen levels (pulse oximetry) in the vascular bed of the participant’s finger/thumb or toe. During the measurement, the participant’s hand or foot should remain cool and dry. We recommend that you attach the sensor to the participant’s toe, especially if you are going to ask your participant to use one of the button boxes because hand movements will create noise in your PG signal. &lt;br /&gt;
&lt;br /&gt;
* Recording from the toe: Attach the sensor to the fastener for the toe (with the Velcro). Place the sensor on the vascular bed of the participant’s toe. To keep the sensor in place, tape it and the fastener to the participant’s foot using medical tape. It is also a good idea to tape the cable to the knee pillow or the participant’s leg to reduce the pull on the sensor. &lt;br /&gt;
* Recording from the thumb/finger: Place the sensor on the participant’s finger or thumb. It is a good idea to avoid placing the sensor on the joint (the signal will be much noisier if you place the sensor on the joint). To keep the sensor in place it helps to tape it to the participant’s hand with some medical tape.&lt;br /&gt;
&lt;br /&gt;
You should be able to see the recording on the small screen on the scanner. Note that it’ll take up to a minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the sensor if necessary. &lt;br /&gt;
&lt;br /&gt;
Note: When you are done, please clean the sensor with alcohol wipes as it directly touches the participant’s skin.&lt;br /&gt;
&lt;br /&gt;
===Recording Physio===&lt;br /&gt;
&lt;br /&gt;
The default method for recording the physio is the CV control method (set CV phys_record_flag to 1). With default setting of CV control method, a recording of maximum length (25 minute) will require approximately 3 seconds to save to files to the hard disk after the end of the scan. You need to make sure that the next phys-recording scan starts after the previous recording finishes saving data to files. If the next phys-recording scan starts before the previous recording finishes, the new recording request will be ignored. &lt;br /&gt;
&lt;br /&gt;
===Parsing the physio files===&lt;br /&gt;
&lt;br /&gt;
The physio data from the scanner can include three types of measurements: pulse, respiration, and electrocardiogram (ECG).  The pulse data come from the PPG, the respiration data from the breathing-belt, and the ECG from the specialized electrodes attached to the chest. &lt;br /&gt;
&lt;br /&gt;
The data recorded from these devices are written out into simple text-files. There are three files for each type of measurement.  The file names start with PPG, RESP and ECG for the three types of measurements.  The files have raw data (&#039;Data&#039;), and the times of the local peaks (&#039;Trig&#039;) (and sometimes an empty &#039;PACTrig&#039;). &lt;br /&gt;
&lt;br /&gt;
* The temporal sampling rates differ between the three types of measurements&lt;br /&gt;
** ECG: 1ms, &lt;br /&gt;
** Pulse/Peripheral Gating: 10ms, &lt;br /&gt;
** Respiration: 40ms.&lt;br /&gt;
* The timeseries data&lt;br /&gt;
** start 30 seconds of baseline from before the start scan button was pressed&lt;br /&gt;
** have a variable duration between start scan button press and the actual start (pre-scan delays, external trigger delays, etc.)&lt;br /&gt;
** stop at the same time as the scan&lt;br /&gt;
&lt;br /&gt;
To reiterate-- the physio data stored in the physio files starts 30 seconds &#039;&#039;&#039;before&#039;&#039;&#039; you press the &#039;Scan&#039; button (yes, it&#039;s psychic ;), which is almost always more than 30 seconds before scanning actually starts. It could be substantially longer if you do external triggering. In that case, you&#039;ll get some extra physio data recorded during the time between when you press start scan and you send your trigger. But the recording does stop when the scan stops. So, to synchronize physio and scan data, you can take the end of the physio data and count backward the number of data points to keep using the duration of MR acquisiton and sampling rate of the physio data.&lt;br /&gt;
&lt;br /&gt;
The physio files are zipped and uploaded to Flywheel. A simple Flywheel gear &amp;quot;CNI GE Physio File Converter&amp;quot; is avalible to help extract, visualize, and summarize the data.&lt;br /&gt;
&lt;br /&gt;
===Biopac measures===&lt;br /&gt;
For measuring skin conductance and EMG, we have a Biopac with the [http://www.biopac.com/eda-gsr-amplifier-mri electro-dermal activity amplifier] and [http://www.biopac.com/emg-electromyogram-amplifier EMG amplifier] modules. The data from the Biopac are digitized with a [http://labjack.com/ue9 LabJack UE9] DAQ device and are available directly through a TCP stream (see [http://labjack.com/support/ue9/c-native-tcp-example the UE9 code samples]) or via our linux box voxel2, which can be used to trigger data acquisition that is synchronized with the scanner. The command to run the recording script is &amp;quot;testfix_labjack.py /data/biopac/[your experiment folder]/[run id] [recording duration]&amp;quot;. The recording duration is in seconds. The output is a csv file at /data/biopac/[your experiment folder]/[run id]_[timestamp].csv. The data file records the voltage and raw ADC values. The skin conductance is stored in the second (voltage) and third (raw ADC) columns. You probably want the second column (with numbers like &amp;quot;1.60230098&amp;quot;). The skin conductance amplifier gain is set to five microsiemens per volt. So, if you multiply the numbers in the second column by 5, you will have the skin conductance in microsiemens. The EMG values are in the fourth (voltage) and fifth (raw ADC) columns. The EMG amplifier gain is set to 2000, so dividing the values in the fourth column by 2 will give you the EMG voltage in millivolts.&lt;br /&gt;
&lt;br /&gt;
== Real-time motion tracking ==&lt;br /&gt;
[[File:FIRMM.jpg|thumb|FIRMM tablet]]&lt;br /&gt;
For subject motion tracking, we have a [https://turingmedical.com/firmm/ FIRMM tablet] that can access the scanner&#039;s image database and provide feedback on the subject&#039;s head motion in real-time. FIRMM will automatically plot the motion trace and quality metrics when scanning begins. You can also set protocol-specific parameters like the motion threshold and data quality goals required for your study. It helps monitor the quality metrics in real time so you can adjust your approach. This is mostly useful for fMRI studies. It is also possible to configure the video output so that you can send the real-time motion feedback to the subject via visual display. &lt;br /&gt;
&lt;br /&gt;
The FIRMM tablet is configured to be connected to the scanner by default. If it shows &amp;quot;FIRMM DISCONNECTED&amp;quot;, then we need to check if the firmm_transfer process is running on the scanner, sometimes restarting the process or restarting the FIRMM tablet is needed.&lt;br /&gt;
&lt;br /&gt;
==Subject video==&lt;br /&gt;
You can monitor and record the subject&#039;s face or body using the [https://mrc-systems.de/en/products/mr-compatible-cameras MRI compatable video camera from MRC Systems]. The camera is always on and streaming video to the linux box next to the scan console. An analog video signal is also sent to the large-screen tv in the control room (use the &#039;A/v input&#039;). To use the camera, you can attach it to the head coil using the loc-line connectors. When not in use, the camera should be hung on the side of the scanner along with the response devices. To see the video feed, run the following from the command line: &amp;quot;ffplay -f video4linux2 /dev/video0&amp;quot;. To record the video feed, you can use our video recording scripts. From the command line run &amp;quot;recordSubject 310&amp;quot;, this will record subject video for 5 minutes and 10 seconds; to synchronize the recording to the start of the scan, run &amp;quot;recordSubjectTrigger 310&amp;quot; instead. The data files are saved to the &amp;quot;video&amp;quot; directory. &lt;br /&gt;
&lt;br /&gt;
Troubleshoot: if you get an error &amp;quot;/dev/device0: busy or resource unavailable&amp;quot;, then run &amp;quot;fuser /dev/device0&amp;quot; and you&#039;ll get the PID of the process that is currently occupying the video device. Then run &amp;quot;kill -9 [PID]&amp;quot;. This should kill the process and you should be able to use the video camera again. Occasionally the camera feed fails and the recorded video files are empty. If this happens, check the video device setting with &amp;quot;v4l2-ctl -d /dev/video0 --all&amp;quot; and look for the &amp;quot;Video Standard&amp;quot; section. If it&#039;s something like &amp;quot;Video Standard = 0x000000ff PAL-B/B1/G/H/I/D/D1/K&amp;quot;, then you&#039;ll need to change it to NTSC standard with &amp;quot;v4l2-ctl -d /dev/video0 -s ntsc&amp;quot;. The returned message should be &amp;quot;Standard set to 0000b000 NTSC-M/M-JP/M-KR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scan Triggers =&lt;br /&gt;
[[File:cni_epi_psd_usercvs_ss.png|thumb|UserCVs under the &#039;Advanced&#039; tab for the cni_epi PSD.]]&lt;br /&gt;
The moment when the scanner starts acquiring image data can be controlled from the computer you use to control your experiment. To do this you need to be able to program your computer to send a pulse to the scanner at the planned moment.&lt;br /&gt;
&lt;br /&gt;
At the CNI, we provide a [[CNI widgets|USB-to-Serial port device]], which works well for E-Prime and Presentation. The notes below show how to set up the UserCV so that the scanner listens for the trigger, and how to send a trigger pulse using the USB-to-Serial device.&lt;br /&gt;
&lt;br /&gt;
== Protocol configuration ==&lt;br /&gt;
For BOLD EPI, be sure to use the cni_epi PSD to get the triggering options described here. The same options are also available for the spiral PSD. Under the &#039;Advanced&#039; tab, make sure the &amp;quot;start scan trigger&amp;quot; CV is set to &#039;1&#039;, which tells it to use the external trigger. Other options include &#039;0&#039; for no trigger (scan starts as soon as the scan button is pressed), and &#039;2&#039; for cardiac gating, which will synchronize to the cardiac cycle (measured via either the PPG pulse oximeter or ECG leads).&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial Port Trigger ==&lt;br /&gt;
The CNI also has a USB-to-Serial port device set up to send scan triggers. Just connect the USB cable labeled &amp;quot;EPrime Trigger&amp;quot; to your computer. On OS-X and Linux, the device is automatically recognized as a serial port (under /dev/ttyACM? on linux or /dev/ttyUSB??? on OS-X). On Windows, the device will show up as a COM port. &lt;br /&gt;
&lt;br /&gt;
When configuring the port, note that the device is expecting communication at 57600 bps and the scanner is triggered by sending a three-character string: &amp;quot;[t]&amp;quot; (without the quotes). In E-Prime, you need to add the serial port device to your experiment and then configure it by specifying the device (you can find the COM port number in Windows Device Manager - Ports (COM&amp;amp;LPT)) and setting the baud rate to 57600. (Other settings can be left at their default values.) In your E-Prime script, add the following in-line code to send the trigger string to the port: &lt;br /&gt;
&lt;br /&gt;
 Serial.WriteString &amp;quot;[t]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To use this device from Matlab, try:&lt;br /&gt;
&lt;br /&gt;
 s = serial(&#039;/dev/ttyS0&#039;, &#039;BaudRate&#039;, 57600);&lt;br /&gt;
 fopen(s);&lt;br /&gt;
 fprintf(s, &#039;[t]&#039;);&lt;br /&gt;
 fclose(s);&lt;br /&gt;
&lt;br /&gt;
Note that you will need to replace &#039;/dev/ttyS0&#039; with the correct port on your machine. E.g., if you&#039;re on windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. On a mac,  type &#039;ls -lh /dev/tty.usbmodem*&#039; in a terminal. &lt;br /&gt;
&lt;br /&gt;
If you are using PsychoPy, first make sure the pyserial package is installed (e.g., pip install pyserial). Then create two code blocks:&lt;br /&gt;
&lt;br /&gt;
 # Insert a &#039;Begin Experiment&#039; code block to initialize (e.g., as part of your instructions)&lt;br /&gt;
 import serial&lt;br /&gt;
 import time&lt;br /&gt;
 device = &#039;/dev/ttyACM1&#039;  # NOTE: replace with your device identifier! On windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. &lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(device, 115200, timeout=1)&lt;br /&gt;
         time.sleep(0.1)&lt;br /&gt;
         ser.write(&#039;[t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         pass&lt;br /&gt;
&lt;br /&gt;
 # Insert a &amp;quot;Begin Routine&amp;quot; code block whenever you want to send a trigger:&lt;br /&gt;
 send_trigger()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternate example from Christina Chung: &lt;br /&gt;
 #################################################&lt;br /&gt;
 ### import modules&lt;br /&gt;
 import serial&lt;br /&gt;
 import time &lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 ### Set SCANNER_TRIGGER_NEEDED to False to bypass program abortion when scanner exception is thrown&lt;br /&gt;
 SCANNER_TRIGGER_NEEDED = False&lt;br /&gt;
 DEVICE_ID = &#039;com3&#039;&lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(DEVICE_ID, 57600, timeout=1)&lt;br /&gt;
         time.sleep(2)    ### wait for 2 sec to ensure scanner is ready; CNI wiki default 0.1&lt;br /&gt;
         ser.write(&#039;[t][t][t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         if not SCANNER_TRIGGER_NEEDED:&lt;br /&gt;
             pass&lt;br /&gt;
         else:&lt;br /&gt;
             core.quit()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The construction of our serial trigger device is described on the [[CNI widgets]] page.&lt;br /&gt;
&lt;br /&gt;
= Capturing Scan Timing Pulses =&lt;br /&gt;
Some researchers want to know the precise time when each slice or each volume is acquired. The scanner produces timing pulses that can be used to record this information. Additionally, a pulse sent by the scanner at the beginning of the scan can be used to trigger the start of an experimental task (reversing the direction of triggering discussed above). At the CNI, we have two methods of receiving these timing pulses. One method uses the USB-to-Serial trigger device and the other uses the fORP response box system. These two methods are described in more detail below.&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial timing pulses ==&lt;br /&gt;
The emulated serial port device [[#USB-to-Serial Port Trigger|described above]] can also be used to receive timing pulses from the scanner. To enable this mode, send a &amp;quot;[p]&amp;quot; command. You will then receive a &#039;p&#039; character every time a timing pulse is detected. The temporal accuracy of these pulses should be about 1 ms. These &amp;quot;scope trigger&amp;quot; pulses come at the beginning of every slice or the beginning of every volume, depending on how the PSD is configured. For the cni_epi and spiral PSDs, under the &amp;quot;Advanced&amp;quot; tab, you can change the &amp;quot;scope trigger&amp;quot; CV to send pulses for every slice or just for the first slice of each volume. To capture these trigger pulses, you can use this [[saveTriggers.py|python script]].&lt;br /&gt;
&lt;br /&gt;
== Timing pulses as keypresses via fORP ==&lt;br /&gt;
To use the fORP response box system to receive timing pulses from the scanner, set up the system as described in the &#039;Response Box&#039; section above. Note that timing pulses will be received via the same USB connection as subjects&#039; responses, and that no additional USB cables need be plugged into your testing computer. If you have selected a numeric mapping between button presses and keys, the timing pulses sent to your testing laptop will be in the form of a &#039;5&#039;. (Note that use of the 5-button diamond-shaped response box will include the numbers 1-4 and 6, and thus will not include the number 5). Use caution when editing experimental scripts while using this method--if your script is open while the scanner sends pulses, a long series of 5&#039;s will be inserted into your script!&lt;br /&gt;
&lt;br /&gt;
= General information =&lt;br /&gt;
&lt;br /&gt;
==The magnetic field==&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:mr750_gauss_lines_top.png|Gauss-lines for a generic install (top view).&lt;br /&gt;
Image:mr750_gauss_lines_side.png|Gauss-lines for a generic install (side view).&lt;br /&gt;
Image:mr750_gauss_lines_front.png|Gauss-lines for a generic install (front view).&lt;br /&gt;
Image:CNI_MR_fieldlines.png|Sketch of gauss-lines for our particular installation.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
When positioning equipment in the scan room, it&#039;s useful to be aware of the magnetic field lines. All equipment in the CNI scan room is MR-safe, but not all equipment functions properly in very high-field regions. The diagrams show the estimated field lines in the MR suite area.&lt;br /&gt;
&lt;br /&gt;
==Additional/Legacy hardware information==&lt;br /&gt;
See the [[Hardware configuration]] page for some additional and legacy hardware information.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59416</id>
		<title>MR Hardware</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Hardware&amp;diff=59416"/>
		<updated>2026-03-18T19:55:15Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Eye Tracker */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= MR Scanner =&lt;br /&gt;
The MR scanner is in room 065 of the CNI suite in Building 420. It has its [[MR Scanner|own wiki page]].&lt;br /&gt;
&lt;br /&gt;
= Peripheral Device Rack (Laima Box) =&lt;br /&gt;
[[File:LB_Overview_Annotate.jpg|thumb|Overview of Laima Box]]&lt;br /&gt;
As you may guess from the title, the Laima Box came into being on the urging of Laima to find a solution to provide a stable and flexible interface to all the display devices, scanner signals, and other peripheral devices that are commonly used during studies. &lt;br /&gt;
&lt;br /&gt;
From the top rack to the bottom, the devices are (as marked in the photo): &lt;br /&gt;
* Small Monitor (Output 3 on HDMI Matrix, typically used for Eyelink display) and Eyelink keyboard + mouse&lt;br /&gt;
* Hyperion Projector Consoles (left: rear projector, right: side projector); Projector Switch for switching between the two projectors&lt;br /&gt;
* fORP Optical Interface; Serial Trigger Box; Video Flipper ([https://halltechav.com/product/sc-hd-2b/ Hall Research video scaler SC-HD-2B])&lt;br /&gt;
* Main Power to the rack&lt;br /&gt;
* Remote Power Switches for equipments in the magnet room: Eyelink camera, Webcam, DC shim amplifier; Audio Inputs for Avotec channel A &amp;amp; B and OptoAcoustics&lt;br /&gt;
* HDMI Matrix (see detailed Input-Output schematics [[#HDMI Matrix Switch|below]])&lt;br /&gt;
* fORP USB connection; Serial-to-USB connection; Scanner trigger co-ax connections; Video Inputs (Input 4 &amp;amp; 5 on HDMI Matrix)&lt;br /&gt;
&lt;br /&gt;
= Stimulus Presentation =&lt;br /&gt;
&lt;br /&gt;
==Visual System ==&lt;br /&gt;
The CNI offers several display options, depending on your visual stimulus needs. All use a digital interface (DVID or HDMI) and can be connected by selecting the appropriate options on the HDMI matrix switch. The mirror on the Nova 32-channel coil is a double mirror design (see [[32-channel_double_mirror]]), and that on the GE 64-channel coil is a single mirror design. &lt;br /&gt;
&lt;br /&gt;
=== 3D LCD display ===&lt;br /&gt;
We have a 49&amp;quot; 4K 3D LCD display from Resonance Technology. It is placed at the far end of the scanner room behind the scanner&#039;s rear pedestal. Its specs and field of view presented to the scan subjects are as follows: &lt;br /&gt;
 * 640x480@60Hz up to 4096x2160@50Hz resolution&lt;br /&gt;
 * 1000:1 contrast ratio&lt;br /&gt;
 * screen size: 107.2cm high x 60.3cm wide &lt;br /&gt;
 * visual distance from Nova coil: 267cm from mirror2, 6cm mirror2 to mirror1, 15cm from eye to mirror1 = 288cm&lt;br /&gt;
 * visual distance from NFL coil: 263cm from mirror1, 13cm from eye to mirror1 = 276cm &lt;br /&gt;
&lt;br /&gt;
To see 3D effects, subjects will need to wear passive polarized lenses. The screen can, of course, present non-3D stimuli too. &lt;br /&gt;
&lt;br /&gt;
As described in our Slack [https://stanford-cni.slack.com/archives/C011V1M2FRN/p1639611006023100 channel], the TV monitor has varying latency depending on the mode it is in.  We conducted tests using a 1920x1080p@60Hz signal comparing the mirrored display on a laptop while simultaneously viewing the display on the scan room monitor.  By capturing these displays simultaneously with a high-speed video acquisition we were able to calibrate the latency between the laptop and scan room monitor display.  Assuming the laptop display latency is 0, when in General mode the monitor processing creates about 133ms (8 video frames) of latency, as compared to Game mode where the latency is only 33ms or 2 frames. In order to switch modes, the remote control must be used inside the scan room but care must be taken as the batteries are slightly ferromagnetic so be sure to hold on the remote firmly and keep it as far from the scanner as possible.  Choose Options-&amp;gt;Scene Select-&amp;gt;Game in order to select Game mode.  It should be in this mode by default -- we ask any users that switch the monitor mode to please return to Game mode after their experiment. &lt;br /&gt;
&lt;br /&gt;
=== DLP Projector ===&lt;br /&gt;
We also have an MR-compatible rear-projection DLP projector ([https://pstnet.com/products/hyperion/ Hyperion 2-120 Projector]). The new Hyperion 2-120 Control Room Console features an LCD touchscreen to power on/off the projector, mirror the image, show the projector status, and display video input resolution, refresh rate, and synchronization status. This projector can be used by placing the large mirror on the back of the scanner bed in front of the LCD display. You also need to place the rear-projection screen on the head coil. Set-up of this system is a bit more involved than the LCD display, but it offers a much brighter display and a larger field of view. If you need that, let us know and we&#039;ll show you how to set up the projector system.&lt;br /&gt;
&lt;br /&gt;
Here are the specs of the projector:&lt;br /&gt;
 * 1920x1080&lt;br /&gt;
 * 120Hz or 60Hz frame rate&lt;br /&gt;
 * 16:9 and 16:10 widescreen formats (standard 4:3 available)&lt;br /&gt;
 * brighter and larger field of view than the LCD displays&lt;br /&gt;
&lt;br /&gt;
If you try the projector (via HDMI) and nothing happens, you can try cycling power to the [[#The Laima Box|Laima Box]. If this doesn’t work, troubleshoot the projector as you normally would (check the input cable on the projector is connected and cycle inputs etc).&lt;br /&gt;
&lt;br /&gt;
=== HDMI Matrix Switch ===&lt;br /&gt;
[[File:HDMI_Switch_Schematic.jpg|thumb|HDMI switch schematic.]]&lt;br /&gt;
[[File:LB_HDMI_Switch.jpg|thumb|HDMI switch in Laima Box.]]&lt;br /&gt;
We use an 8x8 HDMI Matrix Switch to distribute video signals to all the various displays.  This is a [https://keydigital.org/category/4k-18g-hdmi-matrix-switchers/KD-MS8x8G Key Digital KD-MS8x8G] switch capable of connecting any of 8 input HDMI inputs to any/all of 8 HDMI outputs.  The switch is capable of handling 4K HDCP2.2 video signals.  The [[Media:HDMI_Switch_Schematic.jpg|schematic]] of the switch connections are shown here with all 8 inputs and outputs in use. In order to make a connection to a particular output display, you choose the particular input under the labeled output row of 8 LEDs.  This is done by pressing the button under the labeled output (see HDMI Matrix switch [[Media:LB_HDMI_Switch.jpg|image]]) in order to progress left-to-right through the various inputs.  Unfortunately, the blue LEDs on this switch that show what input is currently connected have been burning out, so it&#039;s sometimes necessary to count your button presses from a visible LED to know what input you are on. &lt;br /&gt;
&lt;br /&gt;
The default output display for each input is nominally the same number as the input.  As you&#039;ll note, we have the GE Host computer and GE Table Driver on inputs 1 &amp;amp; 2 -- this is so we can send the GE Host Display to any other display connected to the HDMI matrix switch, or use the GE Table Monitor to display other output -- such as the Eyelink computer output when adjusting the Eyelink camera at the front of the scanner. &lt;br /&gt;
&lt;br /&gt;
The HDMI matrix switch allows for fairly elaborate configuration as described in the [https://www.keydigital.org/web/content/5839 manual] via a Key Digital PC application that is available on the CNI PC laptop when connected to the internal private ethernet network. &lt;br /&gt;
&lt;br /&gt;
Troubleshooting: The HDMI matrix switch is generally fairly stable but if you&#039;re having odd behavior a good first step is to cycle the main power to the Laima Box -- this will reset the HDMI matrix switch.&lt;br /&gt;
&lt;br /&gt;
=== MRI Compatible Glasses and Lensometer ===&lt;br /&gt;
[[File:mri-glasses.jpg|thumb|mri frames and lenses]]&lt;br /&gt;
For participants who wear glasses, CNI has a set of interchangeable lenses that are used with an MRI compatible plastic frame. The frame and lenses are located in the open shelving above and to the left of where the screening forms are located. We have lenses for both near-sighted (-0.5 to -8.0 in .5 step increments) and far-sighted (+.5 to +8.0 in .5 step increments) vision corrections. The lenses are made of hard polycarbonate plastic and are not breakable. The easiest way to install the lenses into the frame is insert the lens from the back first into the edge by the ear piece and then snap in the lens by the nose. If the participant does not know his/her glasses prescription we have a lensometer that can determine that. Basic instructions for use of the lensometer are in the next section. There is also an eye chart posted on the door to the equipment room where participants can test their vision with the MRI glasses. Have the participant stand right in front of the lensometer (about 10 feet from the chart) to use the chart.&lt;br /&gt;
[[File:eye-chart.jpg|thumb|eye chart]]&lt;br /&gt;
&lt;br /&gt;
To determine glass prescription strengths for MRI participants CNI has the AL200 Auto Lensometer. Is is located in the CNI control room area. There is both a User&#039;s guide and a quick reference sheet next to the lensometer. The lensometer is currently set up to read a single vision lens. There are settings available to read either bifocal or progressive lenses, but they are not typically used as only the distance portion of the lens needs to be measured.&lt;br /&gt;
&lt;br /&gt;
Here is a basic how-to from the Reichert user&#039;s guide.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:Lensometer-parts.png|The key parts of the lensometer.&lt;br /&gt;
Image:Lensometer-back.png|Turn on the lensometer using the switch on the back panel. The AL200 will do a calibration check; do not place any lenses or obstructions in front of the aperture during calibration.&lt;br /&gt;
Image:Step2.png|The AL200’s default measurement mode is Single Vision, Automatic. This mode is used for fast, easy measurement of a pair of single vision spectacle lenses. You&#039;re now ready to measure the right lens, indicated by the &#039;R&#039; on the upper left side of the screen.&lt;br /&gt;
Image:Glass-placement1.jpg|Place the spectacles on the lens table and secure the right lens with the lens holder. Using the table base levers and your hand, move the lens until the large cross is positioned directly over the small cross in the middle of the centering target.&lt;br /&gt;
Image:Glass-placement2.jpg|If you insert a progressive lens in single vision mode, the progressive icon may flash to indicate that the mode should be changed. NOTE: Place the glasses so that lenses are toward the front and the ear pieces toward the back.&lt;br /&gt;
Image:Step3.png|When optical center has been located, the AL200 tone will sound and the measurements will be locked on the screen. Upon removal of the lens the AL200 will automatically switch to the left lens, indicated by the highlighted L on the upper right side of the screen. &lt;br /&gt;
Image:Step4.png|Repeat the measurement process for the left lens. All measurements will remain on the screen until the operator chooses to print or clear the data.&lt;br /&gt;
Image:Lensometer-screen.png|The number that appears in the Sphere location is the correction number that you will use in choosing the lenses for the MRI glasses.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Auditory System ==&lt;br /&gt;
&lt;br /&gt;
=== Avotec System ===&lt;br /&gt;
[[File:Avotec2.jpg|thumb|Avotec Console]]&lt;br /&gt;
[[File:Avotec-headsets.png|thumb|Avotec Headsets]]&lt;br /&gt;
The [https://avotecinc.com/pages/silent-scan Avotec Silent Scan system] provides a maximum of 30dB with the [https://avotecinc.com/products/full-coverage-headset-3000-series Full Coverage] and [https://avotecinc.com/products/conformal-headset-3000-series Conformal] headsets. The conformal headset will fit in any coil and any patient. The system also has a [https://avotecinc.com/products/non-headset-3000-series Flat Headset] with a slim profile (0.5 inch pad) which offers great flexibility and can fit into tight coils. The system provides clear two-way communication with built-in patient-activated alarm. The console and equalizer provide high-fidelity, frequency-balanced sound for a variety of audio inputs. The console also has a built-in radio. &lt;br /&gt;
&lt;br /&gt;
This system is best to use if you need to deliver high quality audio to the subjects, or need to communicate with the subjects frequently during the scans.&lt;br /&gt;
&lt;br /&gt;
We recommend using the Avotec + Flat Headset for most studies as it would fit into the Nova 32ch coil for most participants and is more robust in operation (in comparison to the Conformal headset and the OptoAcoustics system). If the Flat headset does not fit into the head coil, you can also use the Conformal headset. Note that when the participant is wearing the Conformal headset and lying on the patient table, the tube connecting to the headset can sometimes slip and pull the earplugs out of the participant&#039;s ears; if that happens you can tape down the tube to the patient table to prevent it from slipping. For audio input, use Avotec Channel A and B for the Conformal headset and Flat headset respectively.&lt;br /&gt;
&lt;br /&gt;
=== OptoACTIVE Headphone System === &lt;br /&gt;
[[File:OptoACTIVE.jpg|thumb|OptoACTIVE Headphone System control console]]&lt;br /&gt;
The OptoACTIVE Headphone System provides active noise cancellation (ANC) during MR scans. The slim profile headphones are designed to fit into the head coils for most human subjects. Its built-in optical microphones monitor the sound level at the subject&#039;s ears, which enable automatic self-calibration, sound pressure level monitoring and real-time in-ear stereo sound recording. The OptoACTIVE headphones also provide very good airseal around the subject&#039;s ears which results in excellent passive noise reduction as well. In combination with the passive noise reduction and active noise cancellation, the headphone can reach a 60 dB attenuation (95%) of the main EPI resonance noise. It also features the FOMRI-III noise cancelling microphone for the subject, which enables quiet two-way communication during scans. &lt;br /&gt;
&lt;br /&gt;
The control console has an LCD touch-screen and pushbuttons that allow the operator to control initial and ongoing calibrations, real-time active noise cancelling, channel level volume and recording, FORMRI microphone communications, etc. It displays the noise level, stimuli levels and spectrum analysis in real time.&lt;br /&gt;
&lt;br /&gt;
The system is ideal for the study of: sleeping disorders, autism, children suffering from claustrophobia, auditory fMRI and other research areas that were previously impractical or unattainable due to scanner noise.&lt;br /&gt;
&lt;br /&gt;
For step-by-step operation instructions, please see this [[Media:Optoacoustics_How-To.pdf | How-To Guide]], clearly summarized by Prof. Cameron Ellis and Emily Chen.&lt;br /&gt;
&lt;br /&gt;
== CNI Laptops ==&lt;br /&gt;
The CNI has one MacBook and one Windows PC for users to use during their experiments. The MacBook is running OS 10.12 and has MATLAB R2014b with PsychToolbox and PsychoPy 3 installed. The Windows PC is running Windows 11 and has E-Prime 3 installed (CNI also has a license for E-Prime 3). You could also checkout out [[Stimulus|some (old) notes]] shared by previous CNI users on how to set up experiments with these toolboxes.&lt;br /&gt;
&lt;br /&gt;
= Subject measurement =&lt;br /&gt;
&lt;br /&gt;
== fORP Response Box ==&lt;br /&gt;
We have a modular response box system ([http://www.curdes.com/index.php/mainforp/interfaces/fiu-933.html fORP 932]) from [http://www.curdes.com/ Current Designs]. With ths system, you can swap out various response devices. The output from any of these devices is available from the fORP box via USB. The device emulates a USB keyboard. We have confirmed that the fORP 932 USB interface is polled at 1kHz. The device itself has sub-millisecond time resolution (see the [http://www.curdes.com/index.php/support/faqs.html fORP FAQ]). We estimate that this system provides response time measurements with a precision and reliability of about one millisecond. &lt;br /&gt;
&lt;br /&gt;
Note that the fORP can send keypresses every time the scanner acquires a slice (or a volume, if the &amp;quot;scope trigger (User CV3)&amp;quot; is set to &amp;quot;1&amp;quot; in the EPI scans). If you want to receive these keypresses, configure the fORP by selecting a configuration that does *not* say &amp;quot;no 5&amp;quot; (if you are receiving numbers) or &amp;quot;no t&amp;quot; (if you are receiving letters). If you *do not* want to get these pulses (most users actually do not want these), then select a configuration that includes &amp;quot;no 5&amp;quot; or &amp;quot;no t&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The response devices that we currently have are:&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-scrl-1.html scroll-wheel device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-2x4-c.htmlhtml 2X4 bimanual button boxes]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x4-cyl-2.html  4-buttonstick-style response device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/hhsc-1x5-d.html 5-button diamond button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/custom.html 5-button curved button box]&lt;br /&gt;
# [https://www.curdes.com/mainforp/responsedevices/hhsc-trk-2.html trackball device]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/hhsc-1x5-n4.html PYKA 5 button box]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/variabledevices/hhsc-joy-5.html joystick]&lt;br /&gt;
# [http://www.curdes.com/mainforp/responsedevices/buttonboxes/foot-pedal.html foot pedal]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a need for a different response device, just let us know.&lt;br /&gt;
&lt;br /&gt;
To use a response device at the CNI:&lt;br /&gt;
# Plug the desired device into the black fiber-optic connector on the right side of the front of the magnet bore&lt;br /&gt;
# Locate the silver box (labeled fORP) on the peripheral device rack.&lt;br /&gt;
# Push in the knob on the right front side of the fORP box to enter menu mode. For the following instructions, you will turn the knob to scroll through the menu choices, and then push in on the knob to select your choice. (See [https://wiki.curdes.com/bin/view/CdiDocs/932QuickSetup this guide] for more details on using the fORP 932.)&lt;br /&gt;
# Turn the knob until the word &amp;quot;yes&amp;quot; is underlined then push the knob to select &amp;quot;yes&amp;quot;&lt;br /&gt;
# In the &amp;quot;mode select&amp;quot; menu that appears next, you can select &amp;quot;manual config&amp;quot;. We recommend, however, that you pick the AUTOCONFIGURE choice which tells the interface to determine as much as it can about the connected handheld device and the cabling to the host computer. This should simplify the choices that need to be made by you. If you have used the AUTOCONFIGURE option you can skip steps 6 and 7 below and proceed directly to step 8.&lt;br /&gt;
# In the response device menu, turn the knob to scroll through the choices until you find the device that you connected in step 1 (examples include):&lt;br /&gt;
## 4-button cylinder: select HHSC-cyl-5&lt;br /&gt;
## 5-button diamond: select HHSC-1x5-D&lt;br /&gt;
## 5-button curved: select HHSC-1x5-C&lt;br /&gt;
## bi-manual 4-button keypads: select HHSC-2x4c&lt;br /&gt;
## scrollwheel: select HHSC-SCRL1&lt;br /&gt;
## trackball: select HHSC-TRK-2 (for mouse emulation)&lt;br /&gt;
# Select USB in the next display by pushing in the knob.&lt;br /&gt;
# Select the desired output mode. For the cylinder or keypads, this determines the mapping between the buttons and the keypress that is generated. E.g., HID-NAR-12345 will map the 4 cylinder buttons to the four number keys, 1-4, and send a &#039;5&#039; for each scope trigger pulse received by the scanner (if you don&#039;t want these pulses, select the &#039;no 5&#039; mode, as noted above). NAR means &amp;quot;no auto release&amp;quot;. In NAR mode, the keypress is maintained as long as the button is pressed. In the non-NAR mode, a brief keypress is generated, even if the button is held down. We find that NAR mode works better with PsychToolbox. In non-NAR mode, it can miss the very brief keypresses produced by auto release. &lt;br /&gt;
# Setup is now complete.&lt;br /&gt;
&lt;br /&gt;
For more technical details about the fORP, see the [[fORP|fORP wiki page]].&lt;br /&gt;
&lt;br /&gt;
== Eye Tracker ==&lt;br /&gt;
[[File:cni_eye_tracker_camera.jpg|thumb|Eye tracker camera.]]&lt;br /&gt;
[[File:cni_eye_tracker_ir.jpg|thumb|Eye tracker IR illuminator.]]&lt;br /&gt;
&lt;br /&gt;
We have an [https://www.sr-research.com/eyelink-1000-plus/ SR Research EyeLink 1000 Plus] eye tracker with remote optics installed at the CNI. It has a frame rate of up to 2000Hz, up to 1/2 degree accuracy, and is fairly easy to set up and use. We found that the standard IR light source from SR Research did not adequately focus the light onto the subject&#039;s eye, so we use the [https://mrc-systems.de/en/products/mr-compatible-cameras#light-sources LED light source] from MRC Systems. &lt;br /&gt;
&lt;br /&gt;
The camera is mounted on a wood stand placed next to the patient bed at the back of the bore. The camera position and focus should not need to be adjusted if your subject is positioned with their eyes close to isocenter. However, if you have a prescription that is centered far from iso-center, you may need to adjust the focus a bit. To do that, you can use the HDMI matrix to show the eye tracker video on the bore monitor so that you can adjust the camera while seeing what you are doing.&lt;br /&gt;
&lt;br /&gt;
The LED light source is mounted on a blue loc-line stalk that attaches to the head coil and is usually left unattached and hanging on the side of the scanner next to the response devices; you will need to mount it to the head coil using the blue loc-line pliers that you can find under the shelf with all the padding. Once mounted, make sure the light source is directed toward the subject&#039;s eye by aiming it through the gap between the two mirrors.&lt;br /&gt;
&lt;br /&gt;
The eye tracker host computer is mounted in the equipment room. However, the display, keyboard, and mouse for that computer are to the right of the GE console. You can connect to the host computer by a direct TCP connection through the ethernet cable located in the cable bundle next to the GE console. This cable is, not surprisingly, labeled &amp;quot;eye tracker&amp;quot;. If you use psych toolbox for stimulus presentation, you can use the [http://psychtoolbox.org/docs/eyelinktoolbox EyeLink Toolbox]. For those who use python (e.g., [http://www.psychopy.org/ Psychopy]), try the [http://www.psychopy.org/api/hardware/pylink.html PyLink module]. If you use E-Prime, check out the [https://www.sr-support.com/showthread.php?149-E-Prime-integration E-Prime integration info] on the SR Research support site. In any case, the IP address of the Eyelink is on our private network and thus is NOT the default IP, so you need to explicitly set it to 10.0.3.2. This private network has a DHCP server, so your stimulus computer should automatically get assigned an IP address on the same subnet. Please don&#039;t hard-code an IP address for your stimulus computer! Note that older versions of psychtoolbox don&#039;t allow you to specify the IP address, so be sure to get the latest Eyelink mex file from [https://github.com/kleinerm/Psychtoolbox-3/commit/aa04b821e975e0e61978377bb05aa1e216f3382e github].&lt;br /&gt;
&lt;br /&gt;
The data recorded by the EyeLink software is saved in the EyeLink partition (E:\). To transfer the data to your own storage device, you can reboot the EyeLink computer into Windows and connect your own USB drive. Afterwards you can reboot the computer again and get back into the EyeLink system. &lt;br /&gt;
&lt;br /&gt;
For a tutorial and troubleshooting information on the Eyelink system, see the [[EyelinkTracker]] page.&lt;br /&gt;
&lt;br /&gt;
==Physio monitoring==&lt;br /&gt;
[[File:ppg_resp.jpg|thumb|Photo plethesmograph (PPG) and respiration belt.]]&lt;br /&gt;
[[File:Tools_gating.png|thumb|Tools Gating]]&lt;br /&gt;
[[File:Physio_waveforms.png|thumb|Physio Waveforms on Console]]&lt;br /&gt;
[[File:physmon.png|thumb|[[CNI_widgets|CNI PPG pulse detector device]].]]&lt;br /&gt;
The scanner has the standard suite of physiological measures: pulse oximetry, respiration belt, and ECG. These can be used for scan triggering. The digital data from these measurements are saved on the console and backed-up in the Flywheel database. These data are also processed by the [[CNI_widgets|CNI PPG monitoring device]] and used for EEG ballisto-cardiogram artifact removal by the EGI NetStation software. (See also the [http://fmri.ucsd.edu/Howto/3T/physio.html UCSD fMRI group&#039;s site] for more information on using the GE physio files to remove physiological artifacts from fMRI data.) A recent paper is here - [https://doi.org/10.1016/j.jneumeth.2016.10.019 The PhysIO Toolbox for Modeling Physiological Noise in fMRI Data]&lt;br /&gt;
&lt;br /&gt;
===Setting Up Physio Recording===&lt;br /&gt;
&lt;br /&gt;
* Go to “Tools” - &amp;quot;Gating&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* To record respiration/movement of the abdominal wall, select “Respiratory.”&lt;br /&gt;
&lt;br /&gt;
* To record pulse/peripheral gating, select “PG.”&lt;br /&gt;
&lt;br /&gt;
* Outfit your participant with the respiratory bellows and the PG sensor&lt;br /&gt;
&lt;br /&gt;
===Respiratory Bellows===&lt;br /&gt;
&lt;br /&gt;
The respiratory bellows goes around your participant’s diaphragm or abdomen. You will get the best signal in the area where the participant’s breathing motion is most visible when they are lying down. Use the Velcro to adjust the respiratory bellows; it should be snug and not move around much, but stretched as little as possible and not too tight. The bellows should expand and contract approximately 0.5 to 1 inches with the participant’s breathing. Do not place any padding over the respiratory bellows. You should be able to see the recording on the small screen on the scanner. Note that it’ll take about one minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the bellows if necessary. &lt;br /&gt;
&lt;br /&gt;
===Pulse/Peripheral Gating (PPG) ===&lt;br /&gt;
&lt;br /&gt;
The participant’s pulse is monitored by a photopulse sensor that detects blood oxygen levels (pulse oximetry) in the vascular bed of the participant’s finger/thumb or toe. During the measurement, the participant’s hand or foot should remain cool and dry. We recommend that you attach the sensor to the participant’s toe, especially if you are going to ask your participant to use one of the button boxes because hand movements will create noise in your PG signal. &lt;br /&gt;
&lt;br /&gt;
* Recording from the toe: Attach the sensor to the fastener for the toe (with the Velcro). Place the sensor on the vascular bed of the participant’s toe. To keep the sensor in place, tape it and the fastener to the participant’s foot using medical tape. It is also a good idea to tape the cable to the knee pillow or the participant’s leg to reduce the pull on the sensor. &lt;br /&gt;
* Recording from the thumb/finger: Place the sensor on the participant’s finger or thumb. It is a good idea to avoid placing the sensor on the joint (the signal will be much noisier if you place the sensor on the joint). To keep the sensor in place it helps to tape it to the participant’s hand with some medical tape.&lt;br /&gt;
&lt;br /&gt;
You should be able to see the recording on the small screen on the scanner. Note that it’ll take up to a minute for the system to stabilize. Your participant should remain still for the system to adjust. Check that the screen shows you a nice waveform without too much noise, and adjust the sensor if necessary. &lt;br /&gt;
&lt;br /&gt;
Note: When you are done, please clean the sensor with alcohol wipes as it directly touches the participant’s skin.&lt;br /&gt;
&lt;br /&gt;
===Recording Physio===&lt;br /&gt;
&lt;br /&gt;
The default method for recording the physio is the CV control method (set CV phys_record_flag to 1). With default setting of CV control method, a recording of maximum length (25 minute) will require approximately 3 seconds to save to files to the hard disk after the end of the scan. You need to make sure that the next phys-recording scan starts after the previous recording finishes saving data to files. If the next phys-recording scan starts before the previous recording finishes, the new recording request will be ignored. &lt;br /&gt;
&lt;br /&gt;
===Parsing the physio files===&lt;br /&gt;
&lt;br /&gt;
The physio data from the scanner can include three types of measurements: pulse, respiration, and electrocardiogram (ECG).  The pulse data come from the PPG, the respiration data from the breathing-belt, and the ECG from the specialized electrodes attached to the chest. &lt;br /&gt;
&lt;br /&gt;
The data recorded from these devices are written out into simple text-files. There are three files for each type of measurement.  The file names start with PPG, RESP and ECG for the three types of measurements.  The files have raw data (&#039;Data&#039;), and the times of the local peaks (&#039;Trig&#039;) (and sometimes an empty &#039;PACTrig&#039;). &lt;br /&gt;
&lt;br /&gt;
* The temporal sampling rates differ between the three types of measurements&lt;br /&gt;
** ECG: 1ms, &lt;br /&gt;
** Pulse/Peripheral Gating: 10ms, &lt;br /&gt;
** Respiration: 40ms.&lt;br /&gt;
* The timeseries data&lt;br /&gt;
** start 30 seconds of baseline from before the start scan button was pressed&lt;br /&gt;
** have a variable duration between start scan button press and the actual start (pre-scan delays, external trigger delays, etc.)&lt;br /&gt;
** stop at the same time as the scan&lt;br /&gt;
&lt;br /&gt;
To reiterate-- the physio data stored in the physio files starts 30 seconds &#039;&#039;&#039;before&#039;&#039;&#039; you press the &#039;Scan&#039; button (yes, it&#039;s psychic ;), which is almost always more than 30 seconds before scanning actually starts. It could be substantially longer if you do external triggering. In that case, you&#039;ll get some extra physio data recorded during the time between when you press start scan and you send your trigger. But the recording does stop when the scan stops. So, to synchronize physio and scan data, you can take the end of the physio data and count backward the number of data points to keep using the duration of MR acquisiton and sampling rate of the physio data.&lt;br /&gt;
&lt;br /&gt;
The physio files are zipped and uploaded to Flywheel. A simple Flywheel gear &amp;quot;CNI GE Physio File Converter&amp;quot; is avalible to help extract, visualize, and summarize the data.&lt;br /&gt;
&lt;br /&gt;
===Biopac measures===&lt;br /&gt;
For measuring skin conductance and EMG, we have a Biopac with the [http://www.biopac.com/eda-gsr-amplifier-mri electro-dermal activity amplifier] and [http://www.biopac.com/emg-electromyogram-amplifier EMG amplifier] modules. The data from the Biopac are digitized with a [http://labjack.com/ue9 LabJack UE9] DAQ device and are available directly through a TCP stream (see [http://labjack.com/support/ue9/c-native-tcp-example the UE9 code samples]) or via our linux box voxel2, which can be used to trigger data acquisition that is synchronized with the scanner. The command to run the recording script is &amp;quot;testfix_labjack.py /data/biopac/[your experiment folder]/[run id] [recording duration]&amp;quot;. The recording duration is in seconds. The output is a csv file at /data/biopac/[your experiment folder]/[run id]_[timestamp].csv. The data file records the voltage and raw ADC values. The skin conductance is stored in the second (voltage) and third (raw ADC) columns. You probably want the second column (with numbers like &amp;quot;1.60230098&amp;quot;). The skin conductance amplifier gain is set to five microsiemens per volt. So, if you multiply the numbers in the second column by 5, you will have the skin conductance in microsiemens. The EMG values are in the fourth (voltage) and fifth (raw ADC) columns. The EMG amplifier gain is set to 2000, so dividing the values in the fourth column by 2 will give you the EMG voltage in millivolts.&lt;br /&gt;
&lt;br /&gt;
== Real-time motion tracking ==&lt;br /&gt;
[[File:FIRMM.jpg|thumb|FIRMM tablet]]&lt;br /&gt;
For subject motion tracking, we have a [https://turingmedical.com/firmm/ FIRMM tablet] that can access the scanner&#039;s image database and provide feedback on the subject&#039;s head motion in real-time. FIRMM will automatically plot the motion trace and quality metrics when scanning begins. You can also set protocol-specific parameters like the motion threshold and data quality goals required for your study. It helps monitor the quality metrics in real time so you can adjust your approach. This is mostly useful for fMRI studies. It is also possible to configure the video output so that you can send the real-time motion feedback to the subject via visual display. &lt;br /&gt;
&lt;br /&gt;
The FIRMM tablet is configured to be connected to the scanner by default. If it shows &amp;quot;FIRMM DISCONNECTED&amp;quot;, then we need to check if the firmm_transfer process is running on the scanner, sometimes restarting the process or restarting the FIRMM tablet is needed.&lt;br /&gt;
&lt;br /&gt;
==Subject video==&lt;br /&gt;
You can monitor and record the subject&#039;s face or body using the [https://mrc-systems.de/en/products/mr-compatible-cameras MRI compatable video camera from MRC Systems]. The camera is always on and streaming video to the linux box next to the scan console. An analog video signal is also sent to the large-screen tv in the control room (use the &#039;A/v input&#039;). To use the camera, you can attach it to the head coil using the loc-line connectors. When not in use, the camera should be hung on the side of the scanner along with the response devices. To see the video feed, run the following from the command line: &amp;quot;ffplay -f video4linux2 /dev/video0&amp;quot;. To record the video feed, you can use our video recording scripts. From the command line run &amp;quot;recordSubject 310&amp;quot;, this will record subject video for 5 minutes and 10 seconds; to synchronize the recording to the start of the scan, run &amp;quot;recordSubjectTrigger 310&amp;quot; instead. The data files are saved to the &amp;quot;video&amp;quot; directory. &lt;br /&gt;
&lt;br /&gt;
Troubleshoot: if you get an error &amp;quot;/dev/device0: busy or resource unavailable&amp;quot;, then run &amp;quot;fuser /dev/device0&amp;quot; and you&#039;ll get the PID of the process that is currently occupying the video device. Then run &amp;quot;kill -9 [PID]&amp;quot;. This should kill the process and you should be able to use the video camera again. Occasionally the camera feed fails and the recorded video files are empty. If this happens, check the video device setting with &amp;quot;v4l2-ctl -d /dev/video0 --all&amp;quot; and look for the &amp;quot;Video Standard&amp;quot; section. If it&#039;s something like &amp;quot;Video Standard = 0x000000ff PAL-B/B1/G/H/I/D/D1/K&amp;quot;, then you&#039;ll need to change it to NTSC standard with &amp;quot;v4l2-ctl -d /dev/video0 -s ntsc&amp;quot;. The returned message should be &amp;quot;Standard set to 0000b000 NTSC-M/M-JP/M-KR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scan Triggers =&lt;br /&gt;
[[File:cni_epi_psd_usercvs_ss.png|thumb|UserCVs under the &#039;Advanced&#039; tab for the cni_epi PSD.]]&lt;br /&gt;
The moment when the scanner starts acquiring image data can be controlled from the computer you use to control your experiment. To do this you need to be able to program your computer to send a pulse to the scanner at the planned moment.&lt;br /&gt;
&lt;br /&gt;
At the CNI, we provide a [[CNI widgets|USB-to-Serial port device]], which works well for E-Prime and Presentation. The notes below show how to set up the UserCV so that the scanner listens for the trigger, and how to send a trigger pulse using the USB-to-Serial device.&lt;br /&gt;
&lt;br /&gt;
== Protocol configuration ==&lt;br /&gt;
For BOLD EPI, be sure to use the cni_epi PSD to get the triggering options described here. The same options are also available for the spiral PSD. Under the &#039;Advanced&#039; tab, make sure the &amp;quot;start scan trigger&amp;quot; CV is set to &#039;1&#039;, which tells it to use the external trigger. Other options include &#039;0&#039; for no trigger (scan starts as soon as the scan button is pressed), and &#039;2&#039; for cardiac gating, which will synchronize to the cardiac cycle (measured via either the PPG pulse oximeter or ECG leads).&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial Port Trigger ==&lt;br /&gt;
The CNI also has a USB-to-Serial port device set up to send scan triggers. Just connect the USB cable labeled &amp;quot;EPrime Trigger&amp;quot; to your computer. On OS-X and Linux, the device is automatically recognized as a serial port (under /dev/ttyACM? on linux or /dev/ttyUSB??? on OS-X). On Windows, the device will show up as a COM port. &lt;br /&gt;
&lt;br /&gt;
When configuring the port, note that the device is expecting communication at 57600 bps and the scanner is triggered by sending a three-character string: &amp;quot;[t]&amp;quot; (without the quotes). In E-Prime, you need to add the serial port device to your experiment and then configure it by specifying the device (you can find the COM port number in Windows Device Manager - Ports (COM&amp;amp;LPT)) and setting the baud rate to 57600. (Other settings can be left at their default values.) In your E-Prime script, add the following in-line code to send the trigger string to the port: &lt;br /&gt;
&lt;br /&gt;
 Serial.WriteString &amp;quot;[t]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To use this device from Matlab, try:&lt;br /&gt;
&lt;br /&gt;
 s = serial(&#039;/dev/ttyS0&#039;, &#039;BaudRate&#039;, 57600);&lt;br /&gt;
 fopen(s);&lt;br /&gt;
 fprintf(s, &#039;[t]&#039;);&lt;br /&gt;
 fclose(s);&lt;br /&gt;
&lt;br /&gt;
Note that you will need to replace &#039;/dev/ttyS0&#039; with the correct port on your machine. E.g., if you&#039;re on windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. On a mac,  type &#039;ls -lh /dev/tty.usbmodem*&#039; in a terminal. &lt;br /&gt;
&lt;br /&gt;
If you are using PsychoPy, first make sure the pyserial package is installed (e.g., pip install pyserial). Then create two code blocks:&lt;br /&gt;
&lt;br /&gt;
 # Insert a &#039;Begin Experiment&#039; code block to initialize (e.g., as part of your instructions)&lt;br /&gt;
 import serial&lt;br /&gt;
 import time&lt;br /&gt;
 device = &#039;/dev/ttyACM1&#039;  # NOTE: replace with your device identifier! On windows, the port might be &#039;com1&#039;, &#039;com2&#039;, etc. &lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(device, 115200, timeout=1)&lt;br /&gt;
         time.sleep(0.1)&lt;br /&gt;
         ser.write(&#039;[t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         pass&lt;br /&gt;
&lt;br /&gt;
 # Insert a &amp;quot;Begin Routine&amp;quot; code block whenever you want to send a trigger:&lt;br /&gt;
 send_trigger()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternate example from Christina Chung: &lt;br /&gt;
 #################################################&lt;br /&gt;
 ### import modules&lt;br /&gt;
 import serial&lt;br /&gt;
 import time &lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 ### Set SCANNER_TRIGGER_NEEDED to False to bypass program abortion when scanner exception is thrown&lt;br /&gt;
 SCANNER_TRIGGER_NEEDED = False&lt;br /&gt;
 DEVICE_ID = &#039;com3&#039;&lt;br /&gt;
 &lt;br /&gt;
 ### scanner trigger&lt;br /&gt;
 def cni_trigger():&lt;br /&gt;
     try:&lt;br /&gt;
         ser = serial.Serial(DEVICE_ID, 57600, timeout=1)&lt;br /&gt;
         time.sleep(2)    ### wait for 2 sec to ensure scanner is ready; CNI wiki default 0.1&lt;br /&gt;
         ser.write(&#039;[t][t][t]\n&#039;)&lt;br /&gt;
         ser.close()&lt;br /&gt;
     except:&lt;br /&gt;
         if not SCANNER_TRIGGER_NEEDED:&lt;br /&gt;
             pass&lt;br /&gt;
         else:&lt;br /&gt;
             core.quit()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The construction of our serial trigger device is described on the [[CNI widgets]] page.&lt;br /&gt;
&lt;br /&gt;
= Capturing Scan Timing Pulses =&lt;br /&gt;
Some researchers want to know the precise time when each slice or each volume is acquired. The scanner produces timing pulses that can be used to record this information. Additionally, a pulse sent by the scanner at the beginning of the scan can be used to trigger the start of an experimental task (reversing the direction of triggering discussed above). At the CNI, we have two methods of receiving these timing pulses. One method uses the USB-to-Serial trigger device and the other uses the fORP response box system. These two methods are described in more detail below.&lt;br /&gt;
&lt;br /&gt;
== USB-to-Serial timing pulses ==&lt;br /&gt;
The emulated serial port device [[#USB-to-Serial Port Trigger|described above]] can also be used to receive timing pulses from the scanner. To enable this mode, send a &amp;quot;[p]&amp;quot; command. You will then receive a &#039;p&#039; character every time a timing pulse is detected. The temporal accuracy of these pulses should be about 1 ms. These &amp;quot;scope trigger&amp;quot; pulses come at the beginning of every slice or the beginning of every volume, depending on how the PSD is configured. For the cni_epi and spiral PSDs, under the &amp;quot;Advanced&amp;quot; tab, you can change the &amp;quot;scope trigger&amp;quot; CV to send pulses for every slice or just for the first slice of each volume. To capture these trigger pulses, you can use this [[saveTriggers.py|python script]].&lt;br /&gt;
&lt;br /&gt;
== Timing pulses as keypresses via fORP ==&lt;br /&gt;
To use the fORP response box system to receive timing pulses from the scanner, set up the system as described in the &#039;Response Box&#039; section above. Note that timing pulses will be received via the same USB connection as subjects&#039; responses, and that no additional USB cables need be plugged into your testing computer. If you have selected a numeric mapping between button presses and keys, the timing pulses sent to your testing laptop will be in the form of a &#039;5&#039;. (Note that use of the 5-button diamond-shaped response box will include the numbers 1-4 and 6, and thus will not include the number 5). Use caution when editing experimental scripts while using this method--if your script is open while the scanner sends pulses, a long series of 5&#039;s will be inserted into your script!&lt;br /&gt;
&lt;br /&gt;
= General information =&lt;br /&gt;
&lt;br /&gt;
==The magnetic field==&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
Image:mr750_gauss_lines_top.png|Gauss-lines for a generic install (top view).&lt;br /&gt;
Image:mr750_gauss_lines_side.png|Gauss-lines for a generic install (side view).&lt;br /&gt;
Image:mr750_gauss_lines_front.png|Gauss-lines for a generic install (front view).&lt;br /&gt;
Image:CNI_MR_fieldlines.png|Sketch of gauss-lines for our particular installation.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
When positioning equipment in the scan room, it&#039;s useful to be aware of the magnetic field lines. All equipment in the CNI scan room is MR-safe, but not all equipment functions properly in very high-field regions. The diagrams show the estimated field lines in the MR suite area.&lt;br /&gt;
&lt;br /&gt;
==Additional/Legacy hardware information==&lt;br /&gt;
See the [[Hardware configuration]] page for some additional and legacy hardware information.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MediaWiki:Sidebar&amp;diff=59413</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MediaWiki:Sidebar&amp;diff=59413"/>
		<updated>2026-02-25T21:44:56Z</updated>

		<summary type="html">&lt;p&gt;Huawu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* General Info&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** Getting Started|Getting Started&lt;br /&gt;
** Facilities_and_Resources|Facilities and Resources&lt;br /&gt;
** Operations|Operations&lt;br /&gt;
** IRB|IRB Info&lt;br /&gt;
* Collecting Data&lt;br /&gt;
** MR Hardware|MR Hardware&lt;br /&gt;
** MR Protocols|MR Protocols&lt;br /&gt;
** MR Simulator|MR Simulator&lt;br /&gt;
** EyelinkTracker|Eye Tracker&lt;br /&gt;
* Managing Data&lt;br /&gt;
** Data Access|Data Access&lt;br /&gt;
** Flywheel|Flywheel&lt;br /&gt;
** QA|QA Reports&lt;br /&gt;
* Help&lt;br /&gt;
** Troubleshooting| Troubleshooting&lt;br /&gt;
** gallery|Image Gallery&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** helppage|help&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=Operations&amp;diff=59412</id>
		<title>Operations</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=Operations&amp;diff=59412"/>
		<updated>2026-02-25T21:43:38Z</updated>

		<summary type="html">&lt;p&gt;Huawu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[operations]] of the CNI facility are managed to high standards of safety. The [[operations]] procedures are designed to be in strict compliance with key government and university regulations. Information about safety, incidental findings, and training are described on this page. For information about human subjects (IRB) compliance and obtaining IRB approval for new studies at CNI, see the [[IRB|IRB page]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Safety Policy =&lt;br /&gt;
&lt;br /&gt;
The full [[Media:CNI_SOPP.pdf|CNI safe operating procedures and policy]] and the [[Media:CNI_Screening_form.pdf|CNI Subject Screening form]] are available as pdf documents.&lt;br /&gt;
&lt;br /&gt;
The Stanford Center for Cognitive and Neurobiological Imaging (CNI) Committee uses the internationally accepted recommendations from the American College of Radiology to establish Research MR Safety Policies and Procedures. The CNI staff will ensure that all users of the CNI research MR facilities will be well acquainted with these policies and procedures to ensure a safe standard of practice. &lt;br /&gt;
&lt;br /&gt;
Follow [[Getting Started | this Getting Started link]] if you are new to the CNI and would like to learn about the basic facilities, and how to get access and training in using the CNI facilities.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;New Safety Updates will be posted here.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Safety Alert - January 11, 2012. Potential burn issues with &amp;quot;antimicrobial&amp;quot; clothing.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
There is a [[Media:MR_Thermal_burns_clothing_AJNR_2011.pdf|recent article]] describing a sedated subject who received 2nd degree burns during an MRI exam. It appears the burns were caused by her wearing an &amp;quot;antimicrobial&amp;quot; shirt which contained invisible silver-embedded microfibers in the Coolmax/Lycra fabric. The presence of these silver fibers was not indicated on any labels on the shirt. The authors point out these antimicrobial fabrics are becoming more popular, especially in athletic wear, socks, and bras.&lt;br /&gt;
&lt;br /&gt;
We currently recommend that during the screening process, study participants be instructed to wear 100% cotton or wool clothing (or in the words of the article, &amp;quot;other safe non-trade name fabrics&amp;quot;). As of now we are not requiring scan participants to wear scrubs. &lt;br /&gt;
&lt;br /&gt;
We currently also recommend that participants be instructed to inform the scanner operator if they feel any uncomfortable local heating sensations during a scan.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Safety Alert - May 22, 2012 New Magnetic Nail Polish could be a safety issue&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is an information from Melissa Henry, who has come across this with her participants  - &lt;br /&gt;
&lt;br /&gt;
&amp;quot;We&#039;ve been scanning teen girls and there seems to be a new nail polish on the market that is advertised as magnetic, I&#039;m not sure if you&#039;ve heard of it. This may or may not be a hazard but we have begun advising all participants to refrain from using such products on the day of their scan. Just a note on crazy trends that may pose a safety risk.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We currently have nail polish remover available at CNI.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Safety Alert - April 8, 2013 Concerns about colored contact lenses - &lt;br /&gt;
&lt;br /&gt;
Circle contact lenses, also known as color contact lenses and big eye contact lenses, are a type of cosmetic contact lens. It is not generally known that a circle contact lens usually contains iron oxide and other metals, which means their use during magnetic resonance imaging (MRI) is a potential hazard.Case presentation We present a rare case of incidental discovery of circle contact lenses by MRI and MRI images of circle lenses in vitro.&lt;br /&gt;
&lt;br /&gt;
Conclusions: Circle contact lenses usually contain iron oxide, which is a known source of susceptibility artifact on MRI.&lt;br /&gt;
&lt;br /&gt;
Not only radiologists and radiographers but also referring physicians should be familiar with the imaging findings and potential risk of scanning circle contact lenses by MRI.&lt;br /&gt;
&lt;br /&gt;
Author: Hiroyuki TokueAyako Taketomi-TakahashiAzusa TokueYoshito Tsushima&lt;br /&gt;
Credits/Source: BMC Medical Imaging 2013, 13:11&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Safety Alert - June 30, 2014 Concerns about Yoga Pants&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is related to the safety item above dated January 12, 2012.&lt;br /&gt;
&lt;br /&gt;
The comfortable, stretch, barely-there yoga pants all girls know and love have metal mesh built into the fabric, which is what helps keep the body dry during exercise. But it appears that a (seemingly) ordinary pair of yoga pants could end up causing burns in an MRI.&lt;br /&gt;
&lt;br /&gt;
We currently recommend that during the screening process, study participants be instructed to wear 100% cotton or wool clothing (or in the words of the article, &amp;quot;other safe non-trade name fabrics&amp;quot;). As of now we are not requiring scan participants to wear scrubs. &lt;br /&gt;
&lt;br /&gt;
We currently also recommend that participants be instructed to inform the scanner operator if they feel any uncomfortable local heating sensations during a scan.&lt;br /&gt;
&lt;br /&gt;
Intrauterine contraceptive devices (IUD) are in general MR safe, however we currently do not recommend scanning participants with copper IUDs for research projects. Users can refer to [http://www.mrisafety.com/SafetyInfov.asp?SafetyInfoID=181 this webpage] for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Location, Parking Information, Transportation, and Directions=&lt;br /&gt;
&#039;&#039;Location&#039;&#039;&lt;br /&gt;
The Stanford Center for Cognitive and Neurobiological Imaging (CNI) is located in the basement of the Department of Psychology at Stanford University. The official address of the building is 450 Jane Stanford Way, Building 420, Stanford, CA 94305. A map of building and parking locations is [http://maps.google.com/maps/ms?msid=202519136668285068762.0004ae2baafaf7aac0c3d&amp;amp;msa=0 here] and described additionally below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Parking Information for Volunteers/Participants -&#039;&#039; &lt;br /&gt;
&amp;quot;Q&amp;quot; parking passes are available for study participants. Please see the Facility Manager, Laima Baltusis, to obtain these parking passes. There are three parking Q parking spaces and they are currently located at the top of the Oval (same side as Building 420) beside the blue parking spots for the disabled. Please note that the campus map picture shows the old Q parking location and this picture will be updated soon. Parking at the &amp;quot;Q&amp;quot; parking spaces is enforced 24/7. Please fill out or have your participant fill out the &#039;Q&#039; permit with the date of the appointment (month, day, and year) and leave it on the dashboard of the car.&lt;br /&gt;
[[File:Campus map-2.png|thumb|none|Campus Map]]&lt;br /&gt;
[[File:Q parking.png|thumb|none|Q parking space]]&lt;br /&gt;
&lt;br /&gt;
If all &amp;quot;Q&amp;quot; spaces are full, your participant may also park in the visitor spaces on Roth Way by the Cantor Center for the Arts. Note, however, that these are pay spaces and that he/she will need to pay at one of the nearby parking kiosks (no maximum time limit). Payment is by debit/credit cards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Transportation to and from Stanford Hospital to CNI -&#039;&#039; &lt;br /&gt;
Study participants who are coming from the hospital can use the hospital tram (&amp;quot;golf cart&amp;quot; shuttle) to go between the hospital and CNI. Arrangements for pickup and drop off can be made be calling the hospital Patient Guest Services at 650 498 3333. The service is normally available between 7AM and 7PM. Off hour arrangements can be made in advance.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Directions from Highway 101 North or South to CNI&#039;&#039;&lt;br /&gt;
Take the Embarcadero Road exit west towards Stanford University. At El Camino Real, Embarcadero turns into Galvez Rd. Turn Right onto Arboretum Rd. Get into the left-hand lane and turn left onto Palm Dr. CNI is located in Building 420 (Main Quad at the top of the Oval at the end of Palm Drive).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Directions from Highway 280 North or South to CNI&#039;&#039;&lt;br /&gt;
Exit Sand Hill Road east towards Stanford. Continue downhill and turn right on Santa Cruz Ave. Make an immediate left onto Junipero Serra Blvd. Turn left onto Campus Dr West. Continue around Campus Dr West until you reach Palm Drive. Take a right onto Palm Dr. CNI is located in Building 420 (Main Quad at the top of the Oval at the end of Palm Drive).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Directions from El Camino Real to CNI&#039;&#039;&lt;br /&gt;
Exit El Camino Real at University Avenue. Turn towards the hills (away from Palo Alto). Go over the overpass, University becomes Palm Drive. CNI is located in Building 420 (Main Quad at the top of Oval at the end of Palm Drive).&lt;br /&gt;
&lt;br /&gt;
=Incidental Findings=&lt;br /&gt;
On occasion brain images collected during the course of a study may show a potential abnormality. For these cases CNI has a process for the images to be reviewed by a radiologist assigned to CNI. &lt;br /&gt;
&lt;br /&gt;
The current step-by-step process for incidental findings is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The investigator notifies the CNI facility manager, using a Stanford university e-mail address with the word Secure: in the subject line, of a potential incidental finding. The e-mail should contain the following information: the exam date, exam number (if known), the participant&#039;s name, sex, and date of birth and home mailing address, and a short description of the concern. Screen shots of the concern are helpful but are not mandatory. If the participant is a minor (less than 18 yours old), then additionally one of the parent&#039;s name must also be provided.&lt;br /&gt;
&amp;lt;li&amp;gt; If the exam is still on the GE scanner the facility manager burns a DVD of anatomical images additionally generating both axial and coronal images. If the exam is no longer on the scanner, the images must be downloaded from Flywheel to the CNI workstation where generating both axial and coronal images is possible, followed by burning a DVD of all the images.&lt;br /&gt;
&amp;lt;li&amp;gt; The facility manager then brings the DVD to the hospital admissions desk with the medical number request form to either have the MRN number retrieved from the data base or generated. For minors the same process is done at the Children&#039;s hospital admissions desk.&lt;br /&gt;
&amp;lt;li&amp;gt; Once there is a medical record number, the facility manager then brings the DVD and the image upload form to the film library, which is located on the main hospital by the stairs leading down to the atrium level.&lt;br /&gt;
&amp;lt;li&amp;gt; When the images are uploaded, the film library calls the facility manager for the DVD to be picked up.&lt;br /&gt;
&amp;lt;li&amp;gt; The facility manager then e-mails the radiologist to notify him that images have been uploaded and provides in the e-mail the patient name, date of birth, MRN, and summary of the concern.&lt;br /&gt;
&amp;lt;li&amp;gt; The radiologist notifies the facility manager via e-mail when the images have been reviewed.&lt;br /&gt;
&amp;lt;li&amp;gt; The facility manager then logs into the hospital system, sends the radiology report to herself and then forwards the report onto the investigator who initiated the process.&lt;br /&gt;
&amp;lt;li&amp;gt; If communication to the subject is called for, the PI on the study contacts the subject relaying the appropriate information, including the non-clinical/diagnostic nature of the scan and the review. Graduate students, RAs, and postdoctoral fellows should not be for contacting a subject about the review. The PI should generally not attempt to explain to the subject the potential finding or offer medical advice on how to proceed. The report is not an official clinical diagnosis because the research protocol does not qualify as a clinical diagnostic scan. An individual subject can request a DVD of their images if they wish.&lt;br /&gt;
&amp;lt;li&amp;gt; E-mail documentation of exam reviews is kept by the facility manager in an e-mail incidental findings folder.&lt;br /&gt;
&amp;lt;li&amp;gt; Documentation of each exam review is added to a spread sheet of CNI cases to date that is uploaded periodically to a secure Box folder created by the radiologist. The information for each case includes participant&#039;s name, MRN, radiology report download status, exam date, key radiology review points, and followup requirements for the participant.&lt;br /&gt;
&amp;lt;li&amp;gt; For any radiology recommended followup cases, the PI should document in the subject&#039;s study record when and how the information is communicated to the subject, any questions the subject had, and any other relevant information.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Contact Laima Baltusis, the facility manager, for help with this process.&lt;br /&gt;
&lt;br /&gt;
There are three forms for the incidental finding review process (1)[[Media:CNI research studies workflow FINAL.pdf| the CNI process form ]] , which outlines the process described above and can be given to whoever is uploading images into the hospital system if that person is not familiar with the CNI process, (This is important as participants will be sent a bill if information is not entered correctly into the system) (2)[[Media:SHC-LPCH_MRN_Request_Form_4_9_10.pdf| MRN request form ]], and (3)[[Media:Film Libraby Image Upload Form.pdf| the image upload form ]].&lt;br /&gt;
&lt;br /&gt;
= Non-human research =&lt;br /&gt;
[[File:mr_fruit.png|thumb|Volume rendering of three species: Malus domestica, Citrus Sinensis, and Musa acuminata. (3D CUBE T2 scan from the CNI 3T GE MR750.)]]&lt;br /&gt;
The CNI is intended solely for studies of human subjects. Non-human animal research is not permitted.  Please contact the Facility Manager (Laima Baltusis, laimab@stanford.edu) or the Research Director (Adam Kerr, akerr@stanford.edu) for all research, IRB concerns and questions. &lt;br /&gt;
&lt;br /&gt;
During training, users often hone their safety skills on non-human material. Fruits and vegetables may be scanned without prior approval ;).&lt;br /&gt;
&lt;br /&gt;
= Communications =&lt;br /&gt;
This wiki is the primary method for the staff CNI to disseminate knowledge about CNI operations, equipment, and scan protocols. The CNI staff also holds semi-regular [[CNI_Seminars|seminars]].&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=Operations&amp;diff=59411</id>
		<title>Operations</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=Operations&amp;diff=59411"/>
		<updated>2026-02-25T21:42:54Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Facility and Resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[operations]] of the CNI facility are managed to high standards of safety. The [[operations]] procedures are designed to be in strict compliance with key government and university regulations. Information about safety, incidental findings, and training are described on this page. For information about human subjects (IRB) compliance and obtaining IRB approval for new studies at CNI, see the [[IRB|IRB page]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Safety Policy =&lt;br /&gt;
&lt;br /&gt;
The full [[Media:CNI_SOPP.pdf|CNI safe operating procedures and policy]] and the [[Media:CNI_Screening_form.pdf|CNI Subject Screening form]] are available as pdf documents.&lt;br /&gt;
&lt;br /&gt;
The Stanford Center for Cognitive and Neurobiological Imaging (CNI) Committee uses the internationally accepted recommendations from the American College of Radiology to establish Research MR Safety Policies and Procedures. The CNI staff will ensure that all users of the CNI research MR facilities will be well acquainted with these policies and procedures to ensure a safe standard of practice. &lt;br /&gt;
&lt;br /&gt;
Follow [[Getting Started | this Getting Started link]] if you are new to the CNI and would like to learn about the basic facilities, and how to get access and training in using the CNI facilities.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;New Safety Updates will be posted here.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Safety Alert - January 11, 2012. Potential burn issues with &amp;quot;antimicrobial&amp;quot; clothing.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
There is a [[Media:MR_Thermal_burns_clothing_AJNR_2011.pdf|recent article]] describing a sedated subject who received 2nd degree burns during an MRI exam. It appears the burns were caused by her wearing an &amp;quot;antimicrobial&amp;quot; shirt which contained invisible silver-embedded microfibers in the Coolmax/Lycra fabric. The presence of these silver fibers was not indicated on any labels on the shirt. The authors point out these antimicrobial fabrics are becoming more popular, especially in athletic wear, socks, and bras.&lt;br /&gt;
&lt;br /&gt;
We currently recommend that during the screening process, study participants be instructed to wear 100% cotton or wool clothing (or in the words of the article, &amp;quot;other safe non-trade name fabrics&amp;quot;). As of now we are not requiring scan participants to wear scrubs. &lt;br /&gt;
&lt;br /&gt;
We currently also recommend that participants be instructed to inform the scanner operator if they feel any uncomfortable local heating sensations during a scan.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Safety Alert - May 22, 2012 New Magnetic Nail Polish could be a safety issue&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is an information from Melissa Henry, who has come across this with her participants  - &lt;br /&gt;
&lt;br /&gt;
&amp;quot;We&#039;ve been scanning teen girls and there seems to be a new nail polish on the market that is advertised as magnetic, I&#039;m not sure if you&#039;ve heard of it. This may or may not be a hazard but we have begun advising all participants to refrain from using such products on the day of their scan. Just a note on crazy trends that may pose a safety risk.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We currently have nail polish remover available at CNI.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Safety Alert - April 8, 2013 Concerns about colored contact lenses - &lt;br /&gt;
&lt;br /&gt;
Circle contact lenses, also known as color contact lenses and big eye contact lenses, are a type of cosmetic contact lens. It is not generally known that a circle contact lens usually contains iron oxide and other metals, which means their use during magnetic resonance imaging (MRI) is a potential hazard.Case presentation We present a rare case of incidental discovery of circle contact lenses by MRI and MRI images of circle lenses in vitro.&lt;br /&gt;
&lt;br /&gt;
Conclusions: Circle contact lenses usually contain iron oxide, which is a known source of susceptibility artifact on MRI.&lt;br /&gt;
&lt;br /&gt;
Not only radiologists and radiographers but also referring physicians should be familiar with the imaging findings and potential risk of scanning circle contact lenses by MRI.&lt;br /&gt;
&lt;br /&gt;
Author: Hiroyuki TokueAyako Taketomi-TakahashiAzusa TokueYoshito Tsushima&lt;br /&gt;
Credits/Source: BMC Medical Imaging 2013, 13:11&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Safety Alert - June 30, 2014 Concerns about Yoga Pants&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is related to the safety item above dated January 12, 2012.&lt;br /&gt;
&lt;br /&gt;
The comfortable, stretch, barely-there yoga pants all girls know and love have metal mesh built into the fabric, which is what helps keep the body dry during exercise. But it appears that a (seemingly) ordinary pair of yoga pants could end up causing burns in an MRI.&lt;br /&gt;
&lt;br /&gt;
We currently recommend that during the screening process, study participants be instructed to wear 100% cotton or wool clothing (or in the words of the article, &amp;quot;other safe non-trade name fabrics&amp;quot;). As of now we are not requiring scan participants to wear scrubs. &lt;br /&gt;
&lt;br /&gt;
We currently also recommend that participants be instructed to inform the scanner operator if they feel any uncomfortable local heating sensations during a scan.&lt;br /&gt;
&lt;br /&gt;
Intrauterine contraceptive devices (IUD) are in general MR safe, however we currently do not recommend scanning participants with copper IUDs for research projects. Users can refer to [http://www.mrisafety.com/SafetyInfov.asp?SafetyInfoID=181 this webpage] for more information.&lt;br /&gt;
&lt;br /&gt;
=Facility and Resources =&lt;br /&gt;
We think you will find the page [[Facilities and Resources | Facilities and Resources]] useful when preparing sections of NIH or other grants.&lt;br /&gt;
&lt;br /&gt;
=Location, Parking Information, Transportation, and Directions=&lt;br /&gt;
&#039;&#039;Location&#039;&#039;&lt;br /&gt;
The Stanford Center for Cognitive and Neurobiological Imaging (CNI) is located in the basement of the Department of Psychology at Stanford University. The official address of the building is 450 Jane Stanford Way, Building 420, Stanford, CA 94305. A map of building and parking locations is [http://maps.google.com/maps/ms?msid=202519136668285068762.0004ae2baafaf7aac0c3d&amp;amp;msa=0 here] and described additionally below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Parking Information for Volunteers/Participants -&#039;&#039; &lt;br /&gt;
&amp;quot;Q&amp;quot; parking passes are available for study participants. Please see the Facility Manager, Laima Baltusis, to obtain these parking passes. There are three parking Q parking spaces and they are currently located at the top of the Oval (same side as Building 420) beside the blue parking spots for the disabled. Please note that the campus map picture shows the old Q parking location and this picture will be updated soon. Parking at the &amp;quot;Q&amp;quot; parking spaces is enforced 24/7. Please fill out or have your participant fill out the &#039;Q&#039; permit with the date of the appointment (month, day, and year) and leave it on the dashboard of the car.&lt;br /&gt;
[[File:Campus map-2.png|thumb|none|Campus Map]]&lt;br /&gt;
[[File:Q parking.png|thumb|none|Q parking space]]&lt;br /&gt;
&lt;br /&gt;
If all &amp;quot;Q&amp;quot; spaces are full, your participant may also park in the visitor spaces on Roth Way by the Cantor Center for the Arts. Note, however, that these are pay spaces and that he/she will need to pay at one of the nearby parking kiosks (no maximum time limit). Payment is by debit/credit cards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Transportation to and from Stanford Hospital to CNI -&#039;&#039; &lt;br /&gt;
Study participants who are coming from the hospital can use the hospital tram (&amp;quot;golf cart&amp;quot; shuttle) to go between the hospital and CNI. Arrangements for pickup and drop off can be made be calling the hospital Patient Guest Services at 650 498 3333. The service is normally available between 7AM and 7PM. Off hour arrangements can be made in advance.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Directions from Highway 101 North or South to CNI&#039;&#039;&lt;br /&gt;
Take the Embarcadero Road exit west towards Stanford University. At El Camino Real, Embarcadero turns into Galvez Rd. Turn Right onto Arboretum Rd. Get into the left-hand lane and turn left onto Palm Dr. CNI is located in Building 420 (Main Quad at the top of the Oval at the end of Palm Drive).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Directions from Highway 280 North or South to CNI&#039;&#039;&lt;br /&gt;
Exit Sand Hill Road east towards Stanford. Continue downhill and turn right on Santa Cruz Ave. Make an immediate left onto Junipero Serra Blvd. Turn left onto Campus Dr West. Continue around Campus Dr West until you reach Palm Drive. Take a right onto Palm Dr. CNI is located in Building 420 (Main Quad at the top of the Oval at the end of Palm Drive).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Directions from El Camino Real to CNI&#039;&#039;&lt;br /&gt;
Exit El Camino Real at University Avenue. Turn towards the hills (away from Palo Alto). Go over the overpass, University becomes Palm Drive. CNI is located in Building 420 (Main Quad at the top of Oval at the end of Palm Drive).&lt;br /&gt;
&lt;br /&gt;
=Incidental Findings=&lt;br /&gt;
On occasion brain images collected during the course of a study may show a potential abnormality. For these cases CNI has a process for the images to be reviewed by a radiologist assigned to CNI. &lt;br /&gt;
&lt;br /&gt;
The current step-by-step process for incidental findings is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The investigator notifies the CNI facility manager, using a Stanford university e-mail address with the word Secure: in the subject line, of a potential incidental finding. The e-mail should contain the following information: the exam date, exam number (if known), the participant&#039;s name, sex, and date of birth and home mailing address, and a short description of the concern. Screen shots of the concern are helpful but are not mandatory. If the participant is a minor (less than 18 yours old), then additionally one of the parent&#039;s name must also be provided.&lt;br /&gt;
&amp;lt;li&amp;gt; If the exam is still on the GE scanner the facility manager burns a DVD of anatomical images additionally generating both axial and coronal images. If the exam is no longer on the scanner, the images must be downloaded from Flywheel to the CNI workstation where generating both axial and coronal images is possible, followed by burning a DVD of all the images.&lt;br /&gt;
&amp;lt;li&amp;gt; The facility manager then brings the DVD to the hospital admissions desk with the medical number request form to either have the MRN number retrieved from the data base or generated. For minors the same process is done at the Children&#039;s hospital admissions desk.&lt;br /&gt;
&amp;lt;li&amp;gt; Once there is a medical record number, the facility manager then brings the DVD and the image upload form to the film library, which is located on the main hospital by the stairs leading down to the atrium level.&lt;br /&gt;
&amp;lt;li&amp;gt; When the images are uploaded, the film library calls the facility manager for the DVD to be picked up.&lt;br /&gt;
&amp;lt;li&amp;gt; The facility manager then e-mails the radiologist to notify him that images have been uploaded and provides in the e-mail the patient name, date of birth, MRN, and summary of the concern.&lt;br /&gt;
&amp;lt;li&amp;gt; The radiologist notifies the facility manager via e-mail when the images have been reviewed.&lt;br /&gt;
&amp;lt;li&amp;gt; The facility manager then logs into the hospital system, sends the radiology report to herself and then forwards the report onto the investigator who initiated the process.&lt;br /&gt;
&amp;lt;li&amp;gt; If communication to the subject is called for, the PI on the study contacts the subject relaying the appropriate information, including the non-clinical/diagnostic nature of the scan and the review. Graduate students, RAs, and postdoctoral fellows should not be for contacting a subject about the review. The PI should generally not attempt to explain to the subject the potential finding or offer medical advice on how to proceed. The report is not an official clinical diagnosis because the research protocol does not qualify as a clinical diagnostic scan. An individual subject can request a DVD of their images if they wish.&lt;br /&gt;
&amp;lt;li&amp;gt; E-mail documentation of exam reviews is kept by the facility manager in an e-mail incidental findings folder.&lt;br /&gt;
&amp;lt;li&amp;gt; Documentation of each exam review is added to a spread sheet of CNI cases to date that is uploaded periodically to a secure Box folder created by the radiologist. The information for each case includes participant&#039;s name, MRN, radiology report download status, exam date, key radiology review points, and followup requirements for the participant.&lt;br /&gt;
&amp;lt;li&amp;gt; For any radiology recommended followup cases, the PI should document in the subject&#039;s study record when and how the information is communicated to the subject, any questions the subject had, and any other relevant information.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Contact Laima Baltusis, the facility manager, for help with this process.&lt;br /&gt;
&lt;br /&gt;
There are three forms for the incidental finding review process (1)[[Media:CNI research studies workflow FINAL.pdf| the CNI process form ]] , which outlines the process described above and can be given to whoever is uploading images into the hospital system if that person is not familiar with the CNI process, (This is important as participants will be sent a bill if information is not entered correctly into the system) (2)[[Media:SHC-LPCH_MRN_Request_Form_4_9_10.pdf| MRN request form ]], and (3)[[Media:Film Libraby Image Upload Form.pdf| the image upload form ]].&lt;br /&gt;
&lt;br /&gt;
= Non-human research =&lt;br /&gt;
[[File:mr_fruit.png|thumb|Volume rendering of three species: Malus domestica, Citrus Sinensis, and Musa acuminata. (3D CUBE T2 scan from the CNI 3T GE MR750.)]]&lt;br /&gt;
The CNI is intended solely for studies of human subjects. Non-human animal research is not permitted.  Please contact the Facility Manager (Laima Baltusis, laimab@stanford.edu) or the Research Director (Adam Kerr, akerr@stanford.edu) for all research, IRB concerns and questions. &lt;br /&gt;
&lt;br /&gt;
During training, users often hone their safety skills on non-human material. Fruits and vegetables may be scanned without prior approval ;).&lt;br /&gt;
&lt;br /&gt;
= Communications =&lt;br /&gt;
This wiki is the primary method for the staff CNI to disseminate knowledge about CNI operations, equipment, and scan protocols. The CNI staff also holds semi-regular [[CNI_Seminars|seminars]].&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=QA&amp;diff=59405</id>
		<title>QA</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=QA&amp;diff=59405"/>
		<updated>2026-02-12T00:44:12Z</updated>

		<summary type="html">&lt;p&gt;Huawu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quality Assurance (QA) reports are generated for all functional MR data acquired at the CNI. These reports should appear in the file list for an acquisition on Flywheel within an hour after the scan finishes. &lt;br /&gt;
&lt;br /&gt;
=Finding the QA report=&lt;br /&gt;
&lt;br /&gt;
[[File:Flywheel_QA.png|thumb|QA reports appear in the file list for an acquisition on Flywheel.]]&lt;br /&gt;
&lt;br /&gt;
The QA reports take anywhere from a few minutes to an hour to compute, depending on the scan resolution and duration. To view the report, use Flywheel&#039;s built-in viewer to open the motion and spike plots, as well as the global QA values in the json file.&lt;br /&gt;
&lt;br /&gt;
=What&#039;s in the QA report=&lt;br /&gt;
&lt;br /&gt;
==Temporal SNR==&lt;br /&gt;
This is the median tSNR of all brain voxels (as defined by the [http://nipy.org/dipy/examples_built/brain_extraction_dwi.html median_otsu algorithm]). The tSNR is computed after the data have been motion-corrected (details below) and the slow-drift has been removed using a 3rd-order polynomial. Note that tSNR is very sensitive to voxel size, with bigger voxels generally producing higher tSNR. The acceleration factor will also affect tSNR (both inplane acceleration and slice multiplex acceleration), with more acceleration leading to lower tSNR. It is also somewhat sensitive to the TR (with longer TRs producing slightly higher tSNR). So it&#039;s a useful metric for comparison across scans with the same voxel size, TR and acceleration, but not useful for comparing across scans with different parameters.&lt;br /&gt;
&lt;br /&gt;
==Spike count==&lt;br /&gt;
The number of &amp;quot;spikes&amp;quot; detected. The spikes are detected by a simple threshold of the time series z-score plot (details below). The threshold is currently set to 6. This is somewhat arbitrary (and thus why we show the full plots), but we&#039;ve found that spikes of this magnitude are generally indicative of a problem, such as excessive subject motion or scan hardware issues.&lt;br /&gt;
&lt;br /&gt;
==Subject Motion== &lt;br /&gt;
Subject motion is estimated using [http://nipy.org/nipy/stable/api/generated/nipy.algorithms.registration.groupwise_registration.html FmriRealign4d] (without slice-time correction). A plot of the mean displacement, both absolute and relative, is presented. Absolute displacement is the mean displacement relative to the middle frame. Relative displacement is the mean displacement relative to the previous frame. (Mean displacement is computed using [http://www.fmrib.ox.ac.uk/analysis/techrep/tr99mj1/tr99mj1/index.html Mark Jenkinson&#039;s algorithm].)&lt;br /&gt;
&lt;br /&gt;
==Timeseries z-score==&lt;br /&gt;
A plot of the mean signal (in z-score units) from each slice of the brain. This last plot is useful for detecting spikes in your data, and for determining if the spikes are caused by your subject (e.g., motion) or by a possible problem with the scanner (e.g., white-pixel noise). When a subject moves, even a little, you will often see spikes that span several or all slices. But a white-pixel noise problem typically only affects one slice at a time. Note that the first few time points are ignored for the spike plot.&lt;br /&gt;
&lt;br /&gt;
For this plot (as well as the motion plot) you can get the exact value of any datapoint by hovering your mouse over one of the curves. Also note that the frame numbers start at zero rather than one. Some examples of QA reports are shown below.&lt;br /&gt;
&lt;br /&gt;
=Artifacts that you may find=&lt;br /&gt;
==Subject Motion==&lt;br /&gt;
This is by far the dominant cause of spike-like artifacts in most datasets. Even a small relative head displacement can lead to a signal drop and/or increase. Motion usually affects many slices.&lt;br /&gt;
&lt;br /&gt;
==White-pixel noise==&lt;br /&gt;
Spike noise is a common and insidious problem with MR, often caused by a loose screw on the scanner or some small stay piece of metal in the scan room that accumulates energy and then discharges randomly, creating broad-band RF noise at some point during the signal read-out. When this happens, one spot in k-space will have an abnormally  high intensity and show up as a &amp;quot;white pixel&amp;quot;. In the image domain, it will often manifest as an abrupt signal drop in one slice at one time-point (a &#039;spike&#039; in the time series). The problem is particularly acute for EPI scans because of all the gradient blipping during the read-out. &lt;br /&gt;
&lt;br /&gt;
If you see a lot of spike-noise in your data (either motion-induced or from a white-pixel noise problem), there are various tools available to specifically clean up spike-noise artifacts (like AFNI&#039;s 3dDespike). FSL&#039;s Melodic can also be used to remove artifacts in general (see [http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/MELODIC#fsl_regfilt_command-line_program fsl_regfit]). You can also try adding the spikes to your GLM as nuisance regressors. If you see a couple of spikes here and there, you might be able to safely ignore them, as they will not have a big effect on most GLM-type analyses. But even one or two spikes can affect certain kinds of correlation analyses, so for that you will have to be more careful.&lt;br /&gt;
&lt;br /&gt;
=Examples of QA reports=&lt;br /&gt;
A good subject and well-behaved scanner:&lt;br /&gt;
[[Image: qa_good.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
A bad subject and well-behaved scanner:&lt;br /&gt;
[[Image: qa_motion.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
A good subject and spikey scanner:&lt;br /&gt;
[[Image: qa_spikes.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
=Technical Details=&lt;br /&gt;
The QA report generation code is part of the NIMS codebase and is [https://github.com/cni/nims/blob/master/nimsproc/qa_report.py available on Github].&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=QA&amp;diff=59404</id>
		<title>QA</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=QA&amp;diff=59404"/>
		<updated>2026-02-12T00:43:46Z</updated>

		<summary type="html">&lt;p&gt;Huawu: Undo revision 59403 by Huawu (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quality Assurance (QA) reports are generated for all functional MR data acquired at the CNI. These reports should appear in the file list for an acquisition on Flwwheel within an hour after the scan finishes. &lt;br /&gt;
&lt;br /&gt;
=Finding the QA report=&lt;br /&gt;
&lt;br /&gt;
[[File:Flywheel_QA.png|thumb|QA reports appear in the file list for an acquisition on Flwwheel.]]&lt;br /&gt;
&lt;br /&gt;
The QA reports take anywhere from a few minutes to an hour to compute, depending on the scan resolution and duration. To view the report, use Flywheel&#039;s built-in viewer to open the motion and spike plots, as well as the global QA values in the json file.&lt;br /&gt;
&lt;br /&gt;
=What&#039;s in the QA report=&lt;br /&gt;
&lt;br /&gt;
==Temporal SNR==&lt;br /&gt;
This is the median tSNR of all brain voxels (as defined by the [http://nipy.org/dipy/examples_built/brain_extraction_dwi.html median_otsu algorithm]). The tSNR is computed after the data have been motion-corrected (details below) and the slow-drift has been removed using a 3rd-order polynomial. Note that tSNR is very sensitive to voxel size, with bigger voxels generally producing higher tSNR. The acceleration factor will also affect tSNR (both inplane acceleration and slice multiplex acceleration), with more acceleration leading to lower tSNR. It is also somewhat sensitive to the TR (with longer TRs producing slightly higher tSNR). So it&#039;s a useful metric for comparison across scans with the same voxel size, TR and acceleration, but not useful for comparing across scans with different parameters.&lt;br /&gt;
&lt;br /&gt;
==Spike count==&lt;br /&gt;
The number of &amp;quot;spikes&amp;quot; detected. The spikes are detected by a simple threshold of the time series z-score plot (details below). The threshold is currently set to 6. This is somewhat arbitrary (and thus why we show the full plots), but we&#039;ve found that spikes of this magnitude are generally indicative of a problem, such as excessive subject motion or scan hardware issues.&lt;br /&gt;
&lt;br /&gt;
==Subject Motion== &lt;br /&gt;
Subject motion is estimated using [http://nipy.org/nipy/stable/api/generated/nipy.algorithms.registration.groupwise_registration.html FmriRealign4d] (without slice-time correction). A plot of the mean displacement, both absolute and relative, is presented. Absolute displacement is the mean displacement relative to the middle frame. Relative displacement is the mean displacement relative to the previous frame. (Mean displacement is computed using [http://www.fmrib.ox.ac.uk/analysis/techrep/tr99mj1/tr99mj1/index.html Mark Jenkinson&#039;s algorithm].)&lt;br /&gt;
&lt;br /&gt;
==Timeseries z-score==&lt;br /&gt;
A plot of the mean signal (in z-score units) from each slice of the brain. This last plot is useful for detecting spikes in your data, and for determining if the spikes are caused by your subject (e.g., motion) or by a possible problem with the scanner (e.g., white-pixel noise). When a subject moves, even a little, you will often see spikes that span several or all slices. But a white-pixel noise problem typically only affects one slice at a time. Note that the first few time points are ignored for the spike plot.&lt;br /&gt;
&lt;br /&gt;
For this plot (as well as the motion plot) you can get the exact value of any datapoint by hovering your mouse over one of the curves. Also note that the frame numbers start at zero rather than one. Some examples of QA reports are shown below.&lt;br /&gt;
&lt;br /&gt;
=Artifacts that you may find=&lt;br /&gt;
==Subject Motion==&lt;br /&gt;
This is by far the dominant cause of spike-like artifacts in most datasets. Even a small relative head displacement can lead to a signal drop and/or increase. Motion usually affects many slices.&lt;br /&gt;
&lt;br /&gt;
==White-pixel noise==&lt;br /&gt;
Spike noise is a common and insidious problem with MR, often caused by a loose screw on the scanner or some small stay piece of metal in the scan room that accumulates energy and then discharges randomly, creating broad-band RF noise at some point during the signal read-out. When this happens, one spot in k-space will have an abnormally  high intensity and show up as a &amp;quot;white pixel&amp;quot;. In the image domain, it will often manifest as an abrupt signal drop in one slice at one time-point (a &#039;spike&#039; in the time series). The problem is particularly acute for EPI scans because of all the gradient blipping during the read-out. &lt;br /&gt;
&lt;br /&gt;
If you see a lot of spike-noise in your data (either motion-induced or from a white-pixel noise problem), there are various tools available to specifically clean up spike-noise artifacts (like AFNI&#039;s 3dDespike). FSL&#039;s Melodic can also be used to remove artifacts in general (see [http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/MELODIC#fsl_regfilt_command-line_program fsl_regfit]). You can also try adding the spikes to your GLM as nuisance regressors. If you see a couple of spikes here and there, you might be able to safely ignore them, as they will not have a big effect on most GLM-type analyses. But even one or two spikes can affect certain kinds of correlation analyses, so for that you will have to be more careful.&lt;br /&gt;
&lt;br /&gt;
=Examples of QA reports=&lt;br /&gt;
A good subject and well-behaved scanner:&lt;br /&gt;
[[Image: qa_good.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
A bad subject and well-behaved scanner:&lt;br /&gt;
[[Image: qa_motion.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
A good subject and spikey scanner:&lt;br /&gt;
[[Image: qa_spikes.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
=Technical Details=&lt;br /&gt;
The QA report generation code is part of the NIMS codebase and is [https://github.com/cni/nims/blob/master/nimsproc/qa_report.py available on Github].&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=QA&amp;diff=59403</id>
		<title>QA</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=QA&amp;diff=59403"/>
		<updated>2026-02-12T00:43:11Z</updated>

		<summary type="html">&lt;p&gt;Huawu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quality Assurance (QA) reports are generated for all functional MR data acquired at the CNI. These reports should appear in the &amp;quot;datasets&amp;quot; column in the NIMS browser page within an hour after the scan finishes. &lt;br /&gt;
&lt;br /&gt;
=Finding the QA report=&lt;br /&gt;
&lt;br /&gt;
[[File:Flywheel_QA.png|thumb|QA reports appear in the file list for an acquisition on Flwwheel.]]&lt;br /&gt;
&lt;br /&gt;
The QA reports take anywhere from a few minutes to an hour to compute, depending on the scan resolution and duration. To view the report, double-click the QA dataset and a pop-over will open showing the motion and spike plots, as well as some global QA values.&lt;br /&gt;
&lt;br /&gt;
=What&#039;s in the QA report=&lt;br /&gt;
The QA code is still under active development, so we will likely be adding more metrics to the report in the near future. Right now, the report will give you the QA version number (the version of the QA script that was used to generate the report), as well as the following information:&lt;br /&gt;
&lt;br /&gt;
==Temporal SNR==&lt;br /&gt;
This is the median tSNR of all brain voxels (as defined by the [http://nipy.org/dipy/examples_built/brain_extraction_dwi.html median_otsu algorithm]). The tSNR is computed after the data have been motion-corrected (details below) and the slow-drift has been removed using a 3rd-order polynomial. Note that tSNR is very sensitive to voxel size, with bigger voxels generally producing higher tSNR. The acceleration factor will also affect tSNR (both inplane acceleration and slice multiplex acceleration), with more acceleration leading to lower tSNR. It is also somewhat sensitive to the TR (with longer TRs producing slightly higher tSNR). So it&#039;s a useful metric for comparison across scans with the same voxel size, TR and acceleration, but not useful for comparing across scans with different parameters.&lt;br /&gt;
&lt;br /&gt;
==Spike count==&lt;br /&gt;
The number of &amp;quot;spikes&amp;quot; detected. The spikes are detected by a simple threshold of the time series z-score plot (details below). The threshold is currently set to 6. This is somewhat arbitrary (and thus why we show the full plots), but we&#039;ve found that spikes of this magnitude are generally indicative of a problem, such as excessive subject motion or scan hardware issues.&lt;br /&gt;
&lt;br /&gt;
==Subject Motion== &lt;br /&gt;
Subject motion is estimated using [http://nipy.org/nipy/stable/api/generated/nipy.algorithms.registration.groupwise_registration.html FmriRealign4d] (without slice-time correction). A plot of the mean displacement, both absolute and relative, is presented. Absolute displacement is the mean displacement relative to the middle frame. Relative displacement is the mean displacement relative to the previous frame. (Mean displacement is computed using [http://www.fmrib.ox.ac.uk/analysis/techrep/tr99mj1/tr99mj1/index.html Mark Jenkinson&#039;s algorithm].)&lt;br /&gt;
&lt;br /&gt;
==Timeseries z-score==&lt;br /&gt;
A plot of the mean signal (in z-score units) from each slice of the brain. This last plot is useful for detecting spikes in your data, and for determining if the spikes are caused by your subject (e.g., motion) or by a possible problem with the scanner (e.g., white-pixel noise). When a subject moves, even a little, you will often see spikes that span several or all slices. But a white-pixel noise problem typically only affects one slice at a time. Note that the first few time points are ignored for the spike plot.&lt;br /&gt;
&lt;br /&gt;
For this plot (as well as the motion plot) you can get the exact value of any datapoint by hovering your mouse over one of the curves. Also note that the frame numbers start at zero rather than one. Some examples of QA reports are shown below.&lt;br /&gt;
&lt;br /&gt;
=Artifacts that you may find=&lt;br /&gt;
==Subject Motion==&lt;br /&gt;
This is by far the dominant cause of spike-like artifacts in most datasets. Even a small relative head displacement can lead to a signal drop and/or increase. Motion usually affects many slices.&lt;br /&gt;
&lt;br /&gt;
==White-pixel noise==&lt;br /&gt;
Spike noise is a common and insidious problem with MR, often caused by a loose screw on the scanner or some small stay piece of metal in the scan room that accumulates energy and then discharges randomly, creating broad-band RF noise at some point during the signal read-out. When this happens, one spot in k-space will have an abnormally  high intensity and show up as a &amp;quot;white pixel&amp;quot;. In the image domain, it will often manifest as an abrupt signal drop in one slice at one time-point (a &#039;spike&#039; in the time series). The problem is particularly acute for EPI scans because of all the gradient blipping during the read-out. &lt;br /&gt;
&lt;br /&gt;
If you see a lot of spike-noise in your data (either motion-induced or from a white-pixel noise problem), there are various tools available to specifically clean up spike-noise artifacts (like AFNI&#039;s 3dDespike). FSL&#039;s Melodic can also be used to remove artifacts in general (see [http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/MELODIC#fsl_regfilt_command-line_program fsl_regfit]). You can also try adding the spikes to your GLM as nuisance regressors. If you see a couple of spikes here and there, you might be able to safely ignore them, as they will not have a big effect on most GLM-type analyses. But even one or two spikes can affect certain kinds of correlation analyses, so for that you will have to be more careful.&lt;br /&gt;
&lt;br /&gt;
=Examples of QA reports=&lt;br /&gt;
A good subject and well-behaved scanner:&lt;br /&gt;
[[Image: qa_good.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
A bad subject and well-behaved scanner:&lt;br /&gt;
[[Image: qa_motion.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
A good subject and spikey scanner:&lt;br /&gt;
[[Image: qa_spikes.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
=Technical Details=&lt;br /&gt;
The QA report generation code is part of the NIMS codebase and is [https://github.com/cni/nims/blob/master/nimsproc/qa_report.py available on Github].&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=QA&amp;diff=59402</id>
		<title>QA</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=QA&amp;diff=59402"/>
		<updated>2026-02-12T00:42:46Z</updated>

		<summary type="html">&lt;p&gt;Huawu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quality Assurance (QA) reports are generated for all functional MR data acquired at the CNI. These reports should appear in the file list for an acquisition on Flwwheel within an hour after the scan finishes. &lt;br /&gt;
&lt;br /&gt;
=Finding the QA report=&lt;br /&gt;
&lt;br /&gt;
[[File:Flywheel_QA.png|thumb|QA reports appear in the file list for an acquisition on Flwwheel.]]&lt;br /&gt;
&lt;br /&gt;
The QA reports take anywhere from a few minutes to an hour to compute, depending on the scan resolution and duration. To view the report, use Flywheel&#039;s built-in viewer to open the motion and spike plots, as well as the global QA values in the json file.&lt;br /&gt;
&lt;br /&gt;
=What&#039;s in the QA report=&lt;br /&gt;
&lt;br /&gt;
==Temporal SNR==&lt;br /&gt;
This is the median tSNR of all brain voxels (as defined by the [http://nipy.org/dipy/examples_built/brain_extraction_dwi.html median_otsu algorithm]). The tSNR is computed after the data have been motion-corrected (details below) and the slow-drift has been removed using a 3rd-order polynomial. Note that tSNR is very sensitive to voxel size, with bigger voxels generally producing higher tSNR. The acceleration factor will also affect tSNR (both inplane acceleration and slice multiplex acceleration), with more acceleration leading to lower tSNR. It is also somewhat sensitive to the TR (with longer TRs producing slightly higher tSNR). So it&#039;s a useful metric for comparison across scans with the same voxel size, TR and acceleration, but not useful for comparing across scans with different parameters.&lt;br /&gt;
&lt;br /&gt;
==Spike count==&lt;br /&gt;
The number of &amp;quot;spikes&amp;quot; detected. The spikes are detected by a simple threshold of the time series z-score plot (details below). The threshold is currently set to 6. This is somewhat arbitrary (and thus why we show the full plots), but we&#039;ve found that spikes of this magnitude are generally indicative of a problem, such as excessive subject motion or scan hardware issues.&lt;br /&gt;
&lt;br /&gt;
==Subject Motion== &lt;br /&gt;
Subject motion is estimated using [http://nipy.org/nipy/stable/api/generated/nipy.algorithms.registration.groupwise_registration.html FmriRealign4d] (without slice-time correction). A plot of the mean displacement, both absolute and relative, is presented. Absolute displacement is the mean displacement relative to the middle frame. Relative displacement is the mean displacement relative to the previous frame. (Mean displacement is computed using [http://www.fmrib.ox.ac.uk/analysis/techrep/tr99mj1/tr99mj1/index.html Mark Jenkinson&#039;s algorithm].)&lt;br /&gt;
&lt;br /&gt;
==Timeseries z-score==&lt;br /&gt;
A plot of the mean signal (in z-score units) from each slice of the brain. This last plot is useful for detecting spikes in your data, and for determining if the spikes are caused by your subject (e.g., motion) or by a possible problem with the scanner (e.g., white-pixel noise). When a subject moves, even a little, you will often see spikes that span several or all slices. But a white-pixel noise problem typically only affects one slice at a time. Note that the first few time points are ignored for the spike plot.&lt;br /&gt;
&lt;br /&gt;
For this plot (as well as the motion plot) you can get the exact value of any datapoint by hovering your mouse over one of the curves. Also note that the frame numbers start at zero rather than one. Some examples of QA reports are shown below.&lt;br /&gt;
&lt;br /&gt;
=Artifacts that you may find=&lt;br /&gt;
==Subject Motion==&lt;br /&gt;
This is by far the dominant cause of spike-like artifacts in most datasets. Even a small relative head displacement can lead to a signal drop and/or increase. Motion usually affects many slices.&lt;br /&gt;
&lt;br /&gt;
==White-pixel noise==&lt;br /&gt;
Spike noise is a common and insidious problem with MR, often caused by a loose screw on the scanner or some small stay piece of metal in the scan room that accumulates energy and then discharges randomly, creating broad-band RF noise at some point during the signal read-out. When this happens, one spot in k-space will have an abnormally  high intensity and show up as a &amp;quot;white pixel&amp;quot;. In the image domain, it will often manifest as an abrupt signal drop in one slice at one time-point (a &#039;spike&#039; in the time series). The problem is particularly acute for EPI scans because of all the gradient blipping during the read-out. &lt;br /&gt;
&lt;br /&gt;
If you see a lot of spike-noise in your data (either motion-induced or from a white-pixel noise problem), there are various tools available to specifically clean up spike-noise artifacts (like AFNI&#039;s 3dDespike). FSL&#039;s Melodic can also be used to remove artifacts in general (see [http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/MELODIC#fsl_regfilt_command-line_program fsl_regfit]). You can also try adding the spikes to your GLM as nuisance regressors. If you see a couple of spikes here and there, you might be able to safely ignore them, as they will not have a big effect on most GLM-type analyses. But even one or two spikes can affect certain kinds of correlation analyses, so for that you will have to be more careful.&lt;br /&gt;
&lt;br /&gt;
=Examples of QA reports=&lt;br /&gt;
A good subject and well-behaved scanner:&lt;br /&gt;
[[Image: qa_good.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
A bad subject and well-behaved scanner:&lt;br /&gt;
[[Image: qa_motion.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
A good subject and spikey scanner:&lt;br /&gt;
[[Image: qa_spikes.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
=Technical Details=&lt;br /&gt;
The QA report generation code is part of the NIMS codebase and is [https://github.com/cni/nims/blob/master/nimsproc/qa_report.py available on Github].&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=QA&amp;diff=59401</id>
		<title>QA</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=QA&amp;diff=59401"/>
		<updated>2026-02-12T00:11:25Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Finding the QA report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quality Assurance (QA) reports are generated for all functional MR data acquired at the CNI. These reports should appear in the &amp;quot;datasets&amp;quot; column in the NIMS browser page within an hour after the scan finishes. &lt;br /&gt;
&lt;br /&gt;
=Finding the QA report=&lt;br /&gt;
&lt;br /&gt;
[[File:Flywheel_QA.png|thumb|QA reports appear in the file list for an acquisition on Flwwheel.]]&lt;br /&gt;
&lt;br /&gt;
The QA reports take anywhere from a few minutes to an hour to compute, depending on the scan resolution and duration. To view the report, double-click the QA dataset and a pop-over will open showing the motion and spike plots, as well as some global QA values.&lt;br /&gt;
&lt;br /&gt;
=What&#039;s in the QA report=&lt;br /&gt;
The QA code is still under active development, so we will likely be adding more metrics to the report in the near future. Right now, the report will give you the QA version number (the version of the QA script that was used to generate the report), as well as the following information:&lt;br /&gt;
&lt;br /&gt;
==Temporal SNR==&lt;br /&gt;
This is the median tSNR of all brain voxels (as defined by the [http://nipy.org/dipy/examples_built/brain_extraction_dwi.html median_otsu algorithm]). The tSNR is computed after the data have been motion-corrected (details below) and the slow-drift has been removed using a 3rd-order polynomial. Note that tSNR is very sensitive to voxel size, with bigger voxels generally producing higher tSNR. The acceleration factor will also affect tSNR (both inplane acceleration and slice multiplex acceleration), with more acceleration leading to lower tSNR. It is also somewhat sensitive to the TR (with longer TRs producing slightly higher tSNR). So it&#039;s a useful metric for comparison across scans with the same voxel size, TR and acceleration, but not useful for comparing across scans with different parameters.&lt;br /&gt;
&lt;br /&gt;
==Spike count==&lt;br /&gt;
The number of &amp;quot;spikes&amp;quot; detected. The spikes are detected by a simple threshold of the time series z-score plot (details below). The threshold is currently set to 6. This is somewhat arbitrary (and thus why we show the full plots), but we&#039;ve found that spikes of this magnitude are generally indicative of a problem, such as excessive subject motion or scan hardware issues.&lt;br /&gt;
&lt;br /&gt;
==Subject Motion== &lt;br /&gt;
Subject motion is estimated using [http://nipy.org/nipy/stable/api/generated/nipy.algorithms.registration.groupwise_registration.html FmriRealign4d] (without slice-time correction). A plot of the mean displacement, both absolute and relative, is presented. Absolute displacement is the mean displacement relative to the middle frame. Relative displacement is the mean displacement relative to the previous frame. (Mean displacement is computed using [http://www.fmrib.ox.ac.uk/analysis/techrep/tr99mj1/tr99mj1/index.html Mark Jenkinson&#039;s algorithm].)&lt;br /&gt;
&lt;br /&gt;
==Timeseries z-score==&lt;br /&gt;
A plot of the mean signal (in z-score units) from each slice of the brain. This last plot is useful for detecting spikes in your data, and for determining if the spikes are caused by your subject (e.g., motion) or by a possible problem with the scanner (e.g., white-pixel noise). When a subject moves, even a little, you will often see spikes that span several or all slices. But a white-pixel noise problem typically only affects one slice at a time. Note that the first few time points are ignored for the spike plot.&lt;br /&gt;
&lt;br /&gt;
For this plot (as well as the motion plot) you can get the exact value of any datapoint by hovering your mouse over one of the curves. Also note that the frame numbers start at zero rather than one. Some examples of QA reports are shown below.&lt;br /&gt;
&lt;br /&gt;
=Artifacts that you may find=&lt;br /&gt;
==Subject Motion==&lt;br /&gt;
This is by far the dominant cause of spike-like artifacts in most datasets. Even a small relative head displacement can lead to a signal drop and/or increase. Motion usually affects many slices.&lt;br /&gt;
&lt;br /&gt;
==White-pixel noise==&lt;br /&gt;
Spike noise is a common and insidious problem with MR, often caused by a loose screw on the scanner or some small stay piece of metal in the scan room that accumulates energy and then discharges randomly, creating broad-band RF noise at some point during the signal read-out. When this happens, one spot in k-space will have an abnormally  high intensity and show up as a &amp;quot;white pixel&amp;quot;. In the image domain, it will often manifest as an abrupt signal drop in one slice at one time-point (a &#039;spike&#039; in the time series). The problem is particularly acute for EPI scans because of all the gradient blipping during the read-out. &lt;br /&gt;
&lt;br /&gt;
If you see a lot of spike-noise in your data (either motion-induced or from a white-pixel noise problem), there are various tools available to specifically clean up spike-noise artifacts (like AFNI&#039;s 3dDespike). FSL&#039;s Melodic can also be used to remove artifacts in general (see [http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/MELODIC#fsl_regfilt_command-line_program fsl_regfit]). You can also try adding the spikes to your GLM as nuisance regressors. If you see a couple of spikes here and there, you might be able to safely ignore them, as they will not have a big effect on most GLM-type analyses. But even one or two spikes can affect certain kinds of correlation analyses, so for that you will have to be more careful.&lt;br /&gt;
&lt;br /&gt;
=Examples of QA reports=&lt;br /&gt;
A good subject and well-behaved scanner:&lt;br /&gt;
[[Image: qa_good.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
A bad subject and well-behaved scanner:&lt;br /&gt;
[[Image: qa_motion.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
A good subject and spikey scanner:&lt;br /&gt;
[[Image: qa_spikes.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
=Technical Details=&lt;br /&gt;
The QA report generation code is part of the NIMS codebase and is [https://github.com/cni/nims/blob/master/nimsproc/qa_report.py available on Github].&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=File:Flywheel_QA.png&amp;diff=59400</id>
		<title>File:Flywheel QA.png</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=File:Flywheel_QA.png&amp;diff=59400"/>
		<updated>2026-02-12T00:09:20Z</updated>

		<summary type="html">&lt;p&gt;Huawu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=QA&amp;diff=59399</id>
		<title>QA</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=QA&amp;diff=59399"/>
		<updated>2026-02-12T00:08:38Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Finding the QA report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quality Assurance (QA) reports are generated for all functional MR data acquired at the CNI. These reports should appear in the &amp;quot;datasets&amp;quot; column in the NIMS browser page within an hour after the scan finishes. &lt;br /&gt;
&lt;br /&gt;
=Finding the QA report=&lt;br /&gt;
&lt;br /&gt;
[[File:Flywheel_QA.png|thumb|QA reports appear in the datasets column of NIMS.]]&lt;br /&gt;
&lt;br /&gt;
The QA reports take anywhere from a few minutes to an hour to compute, depending on the scan resolution and duration. To view the report, double-click the QA dataset and a pop-over will open showing the motion and spike plots, as well as some global QA values.&lt;br /&gt;
&lt;br /&gt;
=What&#039;s in the QA report=&lt;br /&gt;
The QA code is still under active development, so we will likely be adding more metrics to the report in the near future. Right now, the report will give you the QA version number (the version of the QA script that was used to generate the report), as well as the following information:&lt;br /&gt;
&lt;br /&gt;
==Temporal SNR==&lt;br /&gt;
This is the median tSNR of all brain voxels (as defined by the [http://nipy.org/dipy/examples_built/brain_extraction_dwi.html median_otsu algorithm]). The tSNR is computed after the data have been motion-corrected (details below) and the slow-drift has been removed using a 3rd-order polynomial. Note that tSNR is very sensitive to voxel size, with bigger voxels generally producing higher tSNR. The acceleration factor will also affect tSNR (both inplane acceleration and slice multiplex acceleration), with more acceleration leading to lower tSNR. It is also somewhat sensitive to the TR (with longer TRs producing slightly higher tSNR). So it&#039;s a useful metric for comparison across scans with the same voxel size, TR and acceleration, but not useful for comparing across scans with different parameters.&lt;br /&gt;
&lt;br /&gt;
==Spike count==&lt;br /&gt;
The number of &amp;quot;spikes&amp;quot; detected. The spikes are detected by a simple threshold of the time series z-score plot (details below). The threshold is currently set to 6. This is somewhat arbitrary (and thus why we show the full plots), but we&#039;ve found that spikes of this magnitude are generally indicative of a problem, such as excessive subject motion or scan hardware issues.&lt;br /&gt;
&lt;br /&gt;
==Subject Motion== &lt;br /&gt;
Subject motion is estimated using [http://nipy.org/nipy/stable/api/generated/nipy.algorithms.registration.groupwise_registration.html FmriRealign4d] (without slice-time correction). A plot of the mean displacement, both absolute and relative, is presented. Absolute displacement is the mean displacement relative to the middle frame. Relative displacement is the mean displacement relative to the previous frame. (Mean displacement is computed using [http://www.fmrib.ox.ac.uk/analysis/techrep/tr99mj1/tr99mj1/index.html Mark Jenkinson&#039;s algorithm].)&lt;br /&gt;
&lt;br /&gt;
==Timeseries z-score==&lt;br /&gt;
A plot of the mean signal (in z-score units) from each slice of the brain. This last plot is useful for detecting spikes in your data, and for determining if the spikes are caused by your subject (e.g., motion) or by a possible problem with the scanner (e.g., white-pixel noise). When a subject moves, even a little, you will often see spikes that span several or all slices. But a white-pixel noise problem typically only affects one slice at a time. Note that the first few time points are ignored for the spike plot.&lt;br /&gt;
&lt;br /&gt;
For this plot (as well as the motion plot) you can get the exact value of any datapoint by hovering your mouse over one of the curves. Also note that the frame numbers start at zero rather than one. Some examples of QA reports are shown below.&lt;br /&gt;
&lt;br /&gt;
=Artifacts that you may find=&lt;br /&gt;
==Subject Motion==&lt;br /&gt;
This is by far the dominant cause of spike-like artifacts in most datasets. Even a small relative head displacement can lead to a signal drop and/or increase. Motion usually affects many slices.&lt;br /&gt;
&lt;br /&gt;
==White-pixel noise==&lt;br /&gt;
Spike noise is a common and insidious problem with MR, often caused by a loose screw on the scanner or some small stay piece of metal in the scan room that accumulates energy and then discharges randomly, creating broad-band RF noise at some point during the signal read-out. When this happens, one spot in k-space will have an abnormally  high intensity and show up as a &amp;quot;white pixel&amp;quot;. In the image domain, it will often manifest as an abrupt signal drop in one slice at one time-point (a &#039;spike&#039; in the time series). The problem is particularly acute for EPI scans because of all the gradient blipping during the read-out. &lt;br /&gt;
&lt;br /&gt;
If you see a lot of spike-noise in your data (either motion-induced or from a white-pixel noise problem), there are various tools available to specifically clean up spike-noise artifacts (like AFNI&#039;s 3dDespike). FSL&#039;s Melodic can also be used to remove artifacts in general (see [http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/MELODIC#fsl_regfilt_command-line_program fsl_regfit]). You can also try adding the spikes to your GLM as nuisance regressors. If you see a couple of spikes here and there, you might be able to safely ignore them, as they will not have a big effect on most GLM-type analyses. But even one or two spikes can affect certain kinds of correlation analyses, so for that you will have to be more careful.&lt;br /&gt;
&lt;br /&gt;
=Examples of QA reports=&lt;br /&gt;
A good subject and well-behaved scanner:&lt;br /&gt;
[[Image: qa_good.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
A bad subject and well-behaved scanner:&lt;br /&gt;
[[Image: qa_motion.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
A good subject and spikey scanner:&lt;br /&gt;
[[Image: qa_spikes.png| 650px]]&lt;br /&gt;
&lt;br /&gt;
=Technical Details=&lt;br /&gt;
The QA report generation code is part of the NIMS codebase and is [https://github.com/cni/nims/blob/master/nimsproc/qa_report.py available on Github].&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MediaWiki:Sidebar&amp;diff=59398</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MediaWiki:Sidebar&amp;diff=59398"/>
		<updated>2026-02-11T21:28:35Z</updated>

		<summary type="html">&lt;p&gt;Huawu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* General Info&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** Getting Started|Getting Started&lt;br /&gt;
** Operations|Operations&lt;br /&gt;
** IRB|IRB Info&lt;br /&gt;
* Collecting Data&lt;br /&gt;
** MR Hardware|MR Hardware&lt;br /&gt;
** MR Protocols|MR Protocols&lt;br /&gt;
** MR Simulator|MR Simulator&lt;br /&gt;
** EyelinkTracker|Eye Tracker&lt;br /&gt;
* Managing Data&lt;br /&gt;
** Data Access|Data Access&lt;br /&gt;
** Flywheel|Flywheel&lt;br /&gt;
** QA|QA Reports&lt;br /&gt;
* Help&lt;br /&gt;
** Troubleshooting| Troubleshooting&lt;br /&gt;
** gallery|Image Gallery&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** helppage|help&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Protocols&amp;diff=59397</id>
		<title>MR Protocols</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Protocols&amp;diff=59397"/>
		<updated>2026-02-11T21:28:20Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Technical notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page offers advice about how to set up your scan protocols and save the information.  The wiki pages take you through the template protocols we think are most widely used. These protocols can be found on the the scanner console, saved under “CNI/head” within the protocol pool.&lt;br /&gt;
&lt;br /&gt;
Screenshots to remind you about how to set specific MRI protocols can be found on the page [[Setting up protocols page | Setting up protocols]]&lt;br /&gt;
&lt;br /&gt;
= General =&lt;br /&gt;
&lt;br /&gt;
== Setting up an MR scan protocol ==&lt;br /&gt;
A basic MR scan session usually starts with the following scans:&lt;br /&gt;
* &#039;&#039;&#039;Localizer&#039;&#039;&#039; - a 3-plane localizer or &#039;scout&#039; scan meant to find the subject&#039;s head. It is also be used for prescription for the subsequent scans. Doing some sort of localizer is necessary, and the &#039;3planeloc SSFSE&#039; (single shot fast spin echo) is the standard work-horse used by most CNI users.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Anatomical&#039;&#039;&#039; - usually a 3D T1-weighted scan at 0.9mm or 1mm isotropic resolution. It is essential for image alignment and anatomical analysis. More choices of anatomical scans are listed in the Anatomical imaging section.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Higher-order shim&#039;&#039;&#039; - measures the magnetic field inhomogeneity and corrects it with polynomial gradients up to 2nd order. It should be run before fieldmap, fMRI or diffusion scans.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Field map&#039;&#039;&#039; - measures the magnetic field inhomogeneity that cannot be corrected by the shim and saves the inhomogeneity in a field map. It should be run immediately before or after the fMRI scan.&lt;br /&gt;
&lt;br /&gt;
At this point you will want to add a number of &#039;&#039;&#039;functional&#039;&#039;&#039; scans, &#039;&#039;&#039;diffusion&#039;&#039;&#039; scans or other type of scans based on your experiment. In the [[#MRI Protocol Templates | next section]] we describe templates for different categories of MRI protocols. The protocol templates are organized by category.  One set is based on conventional multislice (2D) or 3D methods, a second set is based on the new simultaneous multislice (SMS) protocols (also called mux or multiband), and a third set are some special methods (spectroscopy and qMRI).&lt;br /&gt;
&lt;br /&gt;
You can get help in customizing the parameters from the CNI staff (ask Hua, Adam, or Laima).&lt;br /&gt;
&lt;br /&gt;
== Saving your protocol parameters ==&lt;br /&gt;
=== Save screen-shots ===&lt;br /&gt;
At the GE console, you can save screen shots of the GE interface to show the main parameters that you have set in a protocol. Just get to the screen that you want to save, then press the &#039;Prnt Scrn&#039; button on the keyboard. A little dialog will show up. You can choose to print, which will print on paper to the Laser printer in the control room. However, we strongly suggest that you save some trees and the toxic ink chemicals by saving a digital copy instead. To do this, type ina reasonable name in the filename field (default is &#039;screen&#039;) and hit the &#039;PNG&amp;quot; button. A PNG image will then magically appear in the &#039;screensaves&#039; folder on the linux machine next to the console (cnirt). From there, you can email the images to yourself. Or, even better, create your own personal wiki page here that describes your protocol (just log in with your SUNet ID) and put the images in there. Then, you will always have them available when needed! THis is also a great way to share protocol information with your colleagues.&lt;br /&gt;
=== Get a PDF of all protocol parameters ===&lt;br /&gt;
&lt;br /&gt;
You can get a complete PDF of all your protocol info with a few clicks of the mouse. It&#039;s not quite as easy as a screensave, so we outline the procedure here. Note - There is a change on figure 4 - The pdf file will now appear with some viewing options at the top of the pdf file. By clicking on the 4th option from the right (a square with three parallel lines) the drop down menu will display a &amp;quot;save a copy&amp;quot; option which will result in the pdf being saved in the screensaves folder on the Linux machine (voxel2) next to the scanner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=5&amp;gt;&lt;br /&gt;
Image:Export_protocol_button.png|Click the &amp;quot;Protocol Exchange&amp;quot; button under the Image Management tab.&lt;br /&gt;
Image:ExportMode.png|Select &amp;quot;Export Mode&amp;quot; and click OK in the dialog that comes up.&lt;br /&gt;
Image:ProtocolSelection.png|Find your protocol in the next dialog, drag it to the &amp;quot;Protocol Selection&amp;quot; panel, and make sure it is selected. Then press the &amp;quot;preview&amp;quot; button.&lt;br /&gt;
Image:SavePdf.png|You&#039;ll then see the PDF of your protocol. Right-click anywhere within the pdf and select &amp;quot;Save as...&amp;quot; from the drop-down menu.&lt;br /&gt;
Image:SaveAs.png|Type the path and filename. Be sure that the path is /usr/g/mrraw/screensaves/ so it&#039;ll magically appear in the &amp;quot;screensaves&amp;quot; directory on the linux box.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MRI protocol templates ==&lt;br /&gt;
The CNI has stored example protocols for anatomical, fMRI, diffusion, spectroscopy and quantitative MR scans (named as &amp;quot;CNI Examples&amp;quot;, stored under &amp;quot;CNI / Head&amp;quot;). Depending on the user&#039;s needs, there are several ways to run a scan session. The stored protocols are meant to be used as a &#039;menu&#039; from which you select the sequence that you want, based on your needs. While there are many variations stored there, here we just highlight a couple of the most common versions. A detailed list of all parameters for all scans can be found in the PDF files for each protocol. Some suggested ways of selecting from and set up these scans for your own scan session are described below.&lt;br /&gt;
&lt;br /&gt;
== Moving protocols from CNI to Lucas ==&lt;br /&gt;
If you plan to transfer scan protocols from the CNI to Lucas Center, please contact Hua and follow the steps below:&lt;br /&gt;
&lt;br /&gt;
* Let CNI staff know the (a) name of the protocol(s) to transfer and (b) which Lucas scanner. It would be useful if you could include a list of scans in your protocol too. We will help transfer the protocol files over to Lucas. &lt;br /&gt;
&lt;br /&gt;
* If your protocol contains pulse sequences provided by researchers outside CNI, then please let them know about the transfer so that they can prepare the sequences for you at Lucas. For example, if you run any spectroscopy sequences, then please let [mailto:mgu@stanford.edu Dr Meng Gu] know about the transfer plan. &lt;br /&gt;
&lt;br /&gt;
* Follow up with Lucas staff about setting up peripheral devices, e.g. response box, scanner trigger, visual display, physio recording, etc. The visual display at both Lucas scanners uses a projector and a screen mounted on the head coil. Another thing to keep in mind is that &#039;&#039;&#039;Lucas scanners do not send out scan triggers in the same way as the CNI scanner does&#039;&#039;&#039;, so it’s preferred to let the stimulation program trigger the scanner by writing out a byte through the usb-serial port. Lucas also provides their version of the functional sequences that send out triggers to the computer, if you prefer to let the scanner trigger your stimulation. For more details please seek advice from the Lucas staff. &lt;br /&gt;
&lt;br /&gt;
* The Lucas center has its own instance of Flywheel [http://lucascenter.flywheel.io lucascenter.flywheel.io]. &#039;&#039;&#039;Prior to scanning at Lucas, please be sure to coordinate with Tom Brosnan, or [mailto:lmperry@stanford.edu Michael Perry], to have your group’s accounts and projects configured.&#039;&#039;&#039; Michael can help you make sure your projects have the correct gear rules configured to process your data, which is an important consideration to maintain consistency across the two sites. As a good first approximation you can map existing project gear rules at CNI to your new projects at Lucas. Our goal is to make the same gears available at Lucas as are available at CNI. This is a work in progress.&lt;br /&gt;
&lt;br /&gt;
= Anatomical imaging = &lt;br /&gt;
&lt;br /&gt;
==T1 weighted ==&lt;br /&gt;
All the suggested T1-weighted scans use GE&#039;s &amp;quot;BRAVO&amp;quot; sequence. It is an IR-prep, fast SPGR sequence with parameters tuned to optimize brain tissue contrast. Unless you have good reason to do so, you probably don&#039;t want to play with any parameters other than slice orientation, voxel size, and bandwidth. And for those, most users just pick one of the suggested configurations:&lt;br /&gt;
&lt;br /&gt;
* T1w 1mm ax (3:22): T1-weighted, 1mm^3 voxel size, 3D Bravo, axial slices. A single scan gives good signal-to-noise quality. If you just want a basic, fast, axial T1 weighted scan, go with this.  &lt;br /&gt;
&lt;br /&gt;
* T1w 1mm sag (3:43): T1-weighted, 1mm^3 voxel size, 3D Bravo, sagittal slices. A single scan gives good signal-to-noise quality. This is similar to the 1mm axial, but with sagittal slice orientation. Compared to axial, this orientation is slightly less efficient because you need a full phase FOV, but sagittal slices usually do better than axial with artifacts from large blood vessels (e.g., carotid artifacts land in non-brain regions rather than the temporal lobes) and with fat-shift artifacts, because the shifted scalp signal usually misses the brain while with axial it can sometimes overlap the occipital lobe gray matter, causing tissue segmentation problems.&lt;br /&gt;
&lt;br /&gt;
* T1w 0.9mm sag (4:49) T1-weighted, 0.9mm^3 voxel size, 3D Bravo, sagittal slices. A single scan gives good signal-to-noise quality. As with the above scan, but a little higher spatial resolution. If you can afford to take 5 minutes for a T1 scan, this one is a great choice. This is our work-horse. Note: to get true .9 isotropic voxels, enter &#039;23.04&#039; for the FOV. The scanner GUI will display this as &#039;23.0&#039;, but will store and use the full-precision that you type!&lt;br /&gt;
&lt;br /&gt;
* T1w 0.8mm sag (4:57 X 2): T1-weighted, 0.8mm^3 voxels, 3D Bravo, sagittal slices. Two scans (averaged in post-processing) are advised for good signal-to-noise quality. If you want to get better resolution, do two of these.&lt;br /&gt;
&lt;br /&gt;
* T1w 0.7mm sag (5:41 X 3): T1-weighted, 0.7mm^3 voxels, 3D Bravo, sagittal slices. 3-4 scans (averaged in post-processing) are advised for good signal-to-noise quality. If you can afford the time, and make use of high-quality anatomical images, this is the sequence to use.&lt;br /&gt;
&lt;br /&gt;
== T2 weighted ==&lt;br /&gt;
&lt;br /&gt;
* 3D T2 (5:03): T2-weighted, 0.8mm^3 voxel size, 3D Cube T2, sagittal slices. A single scan gives good signal-to-noise quality. &lt;br /&gt;
&lt;br /&gt;
* 3D T2 FLAIR (6:17): T2-weighted, 1 mm^3 voxel size, 3D Cube T2, sagittal slices. An additional inversion-recovery pulse is applied in the 3D T2 CUBE sequence to suppress the CSF signal in the T2 weighted images.&lt;br /&gt;
&lt;br /&gt;
* 3D T2 PROMO (5:42): T2-weighted, 0.8mm^3 voxel size, 3D Cube T2, sagittal slices. PROMO (PROspective MOtion correction) adjusts the scan parameters during the scan to prospectively correct for patient motion and thus reducing the image artifacts. &lt;br /&gt;
&lt;br /&gt;
== T2w/PDw ==&lt;br /&gt;
&lt;br /&gt;
2D T2w/PDw FSE (4:25): A standard 2D T2-weighted scan. You also get a bonus proton-density scan. Note that the two datasets will be interleaved; you&#039;ll want to separate them in post-processing.&lt;br /&gt;
&lt;br /&gt;
== Technical Notes ==&lt;br /&gt;
&lt;br /&gt;
In general, using a higher pixel bandwidth can help reduce chemical shift effects that push the fat signal from the scalp into the brain.&lt;br /&gt;
&lt;br /&gt;
The 3D Geometry Correction option uses a 3D correction for gradient non-linearity, over the 2D correction that is performed when the option is not checked. By including the slice direction in the correction, the resulting images are closer to geometric truth. The model used to represent gradient nonlinearity is the same as the 2D correction (&amp;quot;gradwarp&amp;quot;) and it uses the same cubic interpolation function as the 2D correction.&lt;br /&gt;
&lt;br /&gt;
= Functional imaging =&lt;br /&gt;
&lt;br /&gt;
== BOLD EPI (Full brain) ==&lt;br /&gt;
&lt;br /&gt;
BOLD EPI 2.9mm 2sec: gradient echo EPI, 2.9mm^3 voxel size, 45 slices (~13 cm), TR/TE 2s/30ms, 2x in-plane acceleration. This sequence gives you full coverage of the brain. The 2x in-plane acceleration reduces the EPI distortion. This is a standard sequence for fMRI scans.&lt;br /&gt;
&lt;br /&gt;
== BOLD EPI (High resolution, partial brain) ==&lt;br /&gt;
&lt;br /&gt;
BOLD EPI 1.8mm 2sec (partial coverage): gradient echo EPI, 1.8mm^3 voxel size, 25 slices (~4.5 cm), TR/TE 2s/30ms, 2x in-plane acceleration. This sequence gives you partial coverage of the brain at a higher resolution. It is a good choice if you are interested in a particular part of the brain.&lt;br /&gt;
&lt;br /&gt;
== Technical Notes ==&lt;br /&gt;
=== CNI&#039;s BOLD EPI Sequence ===&lt;br /&gt;
CNI&#039;s gradient-echo EPI sequence for BOLD fMRI imaging is a modified version of the stock EPI sequence provided by GE. Some useful information about this sequence:&lt;br /&gt;
* The name of the custom PSD is &#039;&#039;&#039;cni_epi&#039;&#039;&#039;.&lt;br /&gt;
* Slice order: The slices are acquired interleaved by default, with odd slices first, then even slices. Be sure to take this into account when doing slice timing correction. You can use the &amp;quot;TriggerTime&amp;quot; field in the DICOM head to confirm the slice acquisition timing. Also note that the time points at which slices are acquired are equally spaced within the TR.&lt;br /&gt;
* Triggering: There is a UserCV to control the acquisition trigger. You can have no special triggering (scan starts when you hit &#039;Scan&#039;), external trigger to start the scan (see [[MR Hardware#Scan Triggers]] for details), or cardiac gating. &lt;br /&gt;
* Image reconstruction size: By default, the images are reconstructed at the native image size instead of being zero-padded up to the next higher power of two. This results in faster recons, smaller files, and no image interpolation, so it is generally preferred. But, if you want power-of-two image sizes, you can change this UserCV to get that behavior.&lt;br /&gt;
* Phase encoding gradient: To use FSL&#039;s TOPUP for EPI distortion correction, you need to acquire a pair of EPI scans with the same prescription except for the reversed phase encoding gradient polarity. There is a UserCV to control the PE polarity (called &amp;quot;pepolar&amp;quot; in GE&#039;s term). In most common cases, the phase encoding gradient is along AP/PA direction, and when pepolar = 0, the encoding goes from posterior to anterior (&amp;quot;j&amp;quot; in BIDS convension), and when pepolar = 1, the encoding goes from anterior to posterior (&amp;quot;j-&amp;quot; in BIDS convension).&lt;br /&gt;
&lt;br /&gt;
=== Optimizing Scan Parameters ===&lt;br /&gt;
If your protocol has multiple long-duration functional scans, you may consider doing additional field map measurements between the functional scans to access any field drift. See the [[Improving EPI]] page for information on fixing some common image problems with EPI images.&lt;br /&gt;
&lt;br /&gt;
There is a field map template protocol within the CNI/Head/CNI Example fMRI: Spiral fieldmap (0:27): 2D spiral, 1.75 x 1.75 x 2mm^3 voxel size. Copy the slice coverage of the BOLD scan. This scan generates a B0 field map in Hz (along with a magnitude image).&lt;br /&gt;
&lt;br /&gt;
The optimal echo time (TE) for BOLD fMRI at 3T is 30ms, where the difference in T2* decay of oxy/deoxy hemoglobin gives the highest contrast in the measured MR signals between the oxy/deoxy-genated blood.&lt;br /&gt;
&lt;br /&gt;
When doing BOLD fMRI, we prefer reading out the data at the optimal echo time quickly. When the TR (the repetition time) is shorter than the longitudinal relaxation time (T1) of the tissue of interest, we want to adjust the flip angle to optimize the SNR by maximizing the magnetization recovery along the z-axis (T1) during successive excitations of the same tissue. The optimal flip-angle is found by the Ernst equation:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;flip-angle = acos(exp(-TR/T1)) &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[Note: this formula will return values in radians, which then need to be converted to degrees. Alternatively, if using Matlab, use the acosd function which will return degrees.]&lt;br /&gt;
&lt;br /&gt;
* A typical T1 value for gray matter is (3T): 1.33 seconds (Kruger, et al, 2001). (At 1.5T, it is closer to 0.9 seconds.) &lt;br /&gt;
&lt;br /&gt;
*Or use the following values for typical TRs at 3T:&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: right&amp;quot;| &#039;&#039;&#039;TR (s):&#039;&#039;&#039;&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 1&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 1.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 2.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 3&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 3.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 4&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 6&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 7&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: right&amp;quot;| &#039;&#039;&#039;flip (deg):&#039;&#039;&#039;&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 61.9&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 71.1&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 77.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 81.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 84.0&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 85.9&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 87.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 88.7&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 89.4&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 89.7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Diffusion weighted imaging =&lt;br /&gt;
&lt;br /&gt;
== DTI ==&lt;br /&gt;
* DTI 2mm b1000 60dir (9:21): 2mm^2 voxel size, 60-70 axial slices, b-value 1000, 60 diffusion directions. &lt;br /&gt;
&lt;br /&gt;
== HARDI ==&lt;br /&gt;
* DTI 2mm b2500 96dir (16:58): 2mm^2 voxel size, 60-70 axial slices, b-value 2500, 96 diffusion directions. &lt;br /&gt;
If you are pressed for time, you can drop the b-value to 2000 and/or reduce the number of directions to 80:&lt;br /&gt;
* DTI 2mm b2000 96dir (16:26): 2mm^2 voxel size, 60-70 axial slices, b-value 2000, 96 diffusion directions. &lt;br /&gt;
* DTI 2mm b2000 80dir (12:37): 2mm^2 voxel size, 60-70 axial slices, b-value 2000, 80 diffusion directions.&lt;br /&gt;
&lt;br /&gt;
== Technical Notes ==&lt;br /&gt;
Diffusion imaging at the CNI uses a modified version of GE&#039;s DW-EPI sequence. The sequence was modified so that for dual-spin-echo scans, the polarity of the second 180 degree pulse is inverted relative to the first 180. This causes off-resonance signal from fat to get defocused and thus help reduce fat-shift artifacts (See Sarlls et. al. Robust fat suppression at 3T in&lt;br /&gt;
high-resolution diffusion-weighted single-shot echo-planar imaging of human brain. MRM 2011, PubMed PMID: [http://www.ncbi.nlm.nih.gov/pubmed/21604298 21604298] and Reese et. al. Reduction of eddy-current-induced distortion in diffusion MRI using a twice-refocused spin echo. MRM 2003, PubMed PMID: [http://www.ncbi.nlm.nih.gov/pubmed/12509835 12509835]).&lt;br /&gt;
&lt;br /&gt;
To decide on an optimal High Angular Resolution Diffusion Imaging (HARDI) acquisition protocol, see:&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/19603409 White and Dale (2009)] Optimal diffusion MRI acquisition for fiber orientation density estimation: an analytic approach. HBM. (Calculated optimal b-values for maximum FOD estimation efficiency with SH expansion orders of L = 2, 4, 6, and 8 to be approximately b = 1,500, 3,000, 4,600, and 6,200 s/mm^2; demonstrated how scanner-specific hardware limitations generally lead to optimal b-values that are slightly lower than the ideal b-values.)&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/18583153 Tournier et al. (2008)] Resolving crossing fibres using constrained spherical deconvolution: validation using diffusion-weighted imaging phantom data. NeuroImage. (For a 45 degrees crossing, the minimum b-value required to resolve the fibre orientations was ... 2000 s/mm^2 for CSD, and 1000 s/mm^2 for super-CSD.)&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/17379540 Tournier et al. (2007)] Robust determination of the fibre orientation distribution in diffusion MRI: non-negativity constrained super-resolved spherical deconvolution. NeuroImage.&lt;br /&gt;
&lt;br /&gt;
HARDI data analysis tools include Camino, dipy, mrTrix etc.&lt;br /&gt;
&lt;br /&gt;
We use a modified version of the stock GE DWI-EPI pulse sequence. The resulting dicoms contain the diffusion parameters in these fields:&lt;br /&gt;
* b-value (in sec/mm^2): 0043 1039 (GEMS_PARMS_01 block, item 1039)&lt;br /&gt;
* gradient direction: [0019 10bb, 0019 10bc, 0019 10bd] (GEMS_ACQU_01 block, items 10bb - 10bd)&lt;br /&gt;
In mrTrix (mapper.cpp), the following code is used to convert the dicom gradient values to the saved gradient directions:&lt;br /&gt;
&lt;br /&gt;
 // M is the image transform&lt;br /&gt;
 M(0,0) = -image.orientation_x[0];&lt;br /&gt;
 M(1,0) = -image.orientation_x[1];&lt;br /&gt;
 M(2,0) =  image.orientation_x[2];&lt;br /&gt;
 M(0,1) = -image.orientation_y[0];&lt;br /&gt;
 M(1,1) = -image.orientation_y[1];&lt;br /&gt;
 M(2,1) =  image.orientation_y[2];&lt;br /&gt;
 M(0,2) = -image.orientation_z[0];&lt;br /&gt;
 M(1,2) = -image.orientation_z[1];&lt;br /&gt;
 M(2,2) =  image.orientation_z[2];&lt;br /&gt;
 M(0,3) = -image.position_vector[0];&lt;br /&gt;
 M(1,3) = -image.position_vector[1];&lt;br /&gt;
 M(2,3) =  image.position_vector[2];&lt;br /&gt;
 M(3,0) = 0.0; M(3,1) = 0.0; M(3,2) = 0.0; M(3,3) = 1.0;&lt;br /&gt;
 H.DW_scheme(s, 0) = M(0,0)*d[0] + M(0,1)*d[1] - M(0,2)*d[2];&lt;br /&gt;
 H.DW_scheme(s, 1) = M(1,0)*d[0] + M(1,1)*d[1] - M(1,2)*d[2];&lt;br /&gt;
 H.DW_scheme(s, 2) = M(2,0)*d[0] + M(2,1)*d[1] - M(2,2)*d[2];&lt;br /&gt;
&lt;br /&gt;
If you get the data from the CNI Neurobiological Image Management System (NIMS), then the b-values and b-vectors have already been extracted for you and are provided along with the NIFTI file containing your data. These three files (the NIFTI, bvals, and bvecs files) can be send directly into most diffusion data analysis packages, such as the Stanford Vita Lab [[http://vistalab.stanford.edu/newlm/index.php/MrDiffusion mrDiffusion]] or FSL&#039;s [[http://www.fmrib.ox.ac.uk/fsl/fdt/index.html FDT]]. The b-values file contains a set of numbers (one for each acquired volume) that describe the b-value of the corresponding volume. The b-vecs file contains a triplet of numbers for each acquired volume, describing the diffusion-weighting direction for the corresponding volume. E.g., if you run our 60-direction scan, you will get 6 non-DW volumes followed by 60-DW volumes. Thus, you nifti file will contain 66 volumes. The b-vals file will contain 66 numbers (six 0&#039;s, fllowed by 60 1000&#039;s) and the b-vecs files will contain 66 triplets describing the DW directions for each volume (the triplets for the first 6 non-DW volumes are meaningless and can be ignored).&lt;br /&gt;
&lt;br /&gt;
=Simultaneous Multi-Slice (SMS)=&lt;br /&gt;
The CNI, in collaboration with GE, implemented [http://www.sciencedirect.com/science/article/pii/S1090780713000311 simultaneous multi-slice EPI] (also known as multiband EPI). GE has integrated the SMS EPI into its product software platform, and since CNI&#039;s scanner upgrade to the UHP system, the SMS sequence is available as part of the GE product sequences, called the Hyperband. The Hyperband option is available for both BOLD EPI and diffusion EPI. &lt;br /&gt;
&lt;br /&gt;
Previously CNI has provided the SMS sequence using our research PSD, the one we referred to as the &amp;quot;mux&amp;quot; sequence. We recommend everyone who has been using the &amp;quot;mux&amp;quot; sequence to transition to the Hyperband sequence. For a comparison of features and performances between the &amp;quot;mux&amp;quot; and Hyperband sequence, please see this CNI blog [http://cni.stanford.edu/hyperband-transition/ Hyperband transition]. More information about the legacy &amp;quot;mux&amp;quot; sequence is described on the [[MUX EPI]] page. &lt;br /&gt;
&lt;br /&gt;
== SMS fMRI ==&lt;br /&gt;
The Hyperband sequence uses a calibration process that is integrated in the prescan. It is not necessary to set up a separate calibration scan or account for additional calibration volumes in the EPI time series. The calibration data is not saved in the final images. By default all the volumes in the EPI time series are reconstructed and saved in the final images, so the number of volumes in NIFTI is exactly the same amount as specified in the protocol (in the Multi-Phase page). However, the first few volumes in the time series may have different intensity because the spin magnetization has not yet reached steady state. In the BOLD analysis it may be necessary to discard the first few volumes in order to get to the steady state. Alternatively, there is an option in the Hyperband sequence to allow users to specify a number of dummy volumes, in which case the scanner will not reconstruct the first few volumes, but the scan timing is still the same, i.e. data acquisition starts right after the scan trigger. &lt;br /&gt;
&lt;br /&gt;
=== BOLD EPI ===&lt;br /&gt;
* Hyperband 6, voxel size 2.4mm^3, FOV 21.6cm, number of slices 60, TR 710ms (scan protocol in the Connectome project)&lt;br /&gt;
* Hyperband 6, voxel size 1.8mm^3, FOV 23.0cm, number of slices 81, TR 1386ms&lt;br /&gt;
* Hyperband 8, voxel size 3.0mm^3, FOV 22.2cm, number of slices 48, TR 415ms&lt;br /&gt;
* Hyperband 8, voxel size 2.0mm^3, FOV 22.0cm, number of slices 72, TR 760ms&lt;br /&gt;
&lt;br /&gt;
=== Multi-echo EPI ===&lt;br /&gt;
* Hyperband 3, 2x in-plane acceleration, 3 EPI echoes, voxel size 2.8mm^3, FOV 22.4cm, number of slices 51, TR 1.49s, shortest TE 14.6ms, TE interval 23ms&lt;br /&gt;
&lt;br /&gt;
== SMS DWI ==&lt;br /&gt;
For SMS diffusion scans we generally recommend 2x to 3x slice acceleration, which will bring down the scan time by 2 to 3 times while maintaining the SNR of the diffusion weighted images. Partial Fourier acquisition is usually used to keep the TE as short as possible. The in-plane acceleration in addition to the slice acceleration is not always recommended because even though it can further reduce the EPI distortion but the SNR loss can be harmful for diffusion model fitting.&lt;br /&gt;
&lt;br /&gt;
Diffusion Spectrum Imaging (DSI) ([http://onlinelibrary.wiley.com/doi/10.1002/mrm.20642/full Magn. Reson. Med., 2005, 54: 1377–1386]) and multi-shell diffusion ([http://onlinelibrary.wiley.com/doi/10.1002/mrm.24736/full Magn. Reson. Med., 2013, 69: 1534–1540]) scans can be realized by designing gradient tables that specify direction and amplitude of the b-vectors. We set up a several customized gradient tables that are optimized for DTI, HARDI, 2 or 3-shell diffusion scans. Consult with us if you would like to set up your own diffusion gradient scheme. &lt;br /&gt;
&lt;br /&gt;
=== HARDI ===&lt;br /&gt;
* DTI 80dir 2mm (4:45): SMS factor 3, axial slices, 2mm^3 voxel size, number of slices 69, b-value 2500, 80 diffusion directions, 8 b=0 images &lt;br /&gt;
* DTI 96dir 2mm (5:50): SMS factor 3, axial slices, 2mm^3 voxel size, number of slices 69, b-value 3000, 96 diffusion directions, 10 b=0 images&lt;br /&gt;
&lt;br /&gt;
=== Multi-shell diffusion ===&lt;br /&gt;
* DTI g79/81 b3k 2-shell (4:33+4:40): 2-shell with 10 b=0 images, 75 directions at b=1500, 75 directions at b=3000. SMS factor 4, voxel size 1.5mm^3, number of slices 84 (scan protocol in the Connectome project)&lt;br /&gt;
* DTI g103 b2k 2-shell (4:50): 2-shell with 9 b=0 images, 30 directions at b=700, 64 directions at b=2000. SMS factor 3, 2x in-plane acceleration, voxel size 2mm^3, number of slices 75&lt;br /&gt;
* DTI g150 b3k 3-shell (6:15): 3-shell with 10 b=0 images, 30 direction at b=1000, 45 direction at b=2000, 65 direction at b=3000. SMS factor 3, 2x in-plane acceleration, voxel size 2mm^3, number of slices 63&lt;br /&gt;
&lt;br /&gt;
= Scientific Protocols for Tissue and Chemistry =&lt;br /&gt;
&lt;br /&gt;
== Quantitative MR ==&lt;br /&gt;
These template protocols make quantitative measurements of MR parameters (e.g. T1 in seconds, and proton density (PD) as a fraction of the voxel) of brain tissue.  Some 1 - PD is called the macromolecular tissue volume.&lt;br /&gt;
&lt;br /&gt;
=== T1 map ===&lt;br /&gt;
The SS-SMS T1 scan is a quantitative T1 scan using slice-shuffled inversion-recovery SMS EPI sequence. This scan gives you a T1 measurement at 2mm isotropic resolution in a minimum time. It uses in-plane acceleration therefore it&#039;s not necessary to run a separate pe1 scan for distortion correction unless you have enough time. For processing the NIFTI file from either pe0 or pe1 scan to get the T1 map, you can use [http://github.com/cni/t1fit/blob/master/t1_fitter.py this Python script]. If you acquired both pe0 and pe1, then you can use [http://github.com/cni/t1fit/blob/master/t1fit_unwarp.py this script] to process both NIFTI files to get the T1 map -- this includes an extra step for distortion correction using FSL&#039;s TOPUP before fitting the T1 relaxation. &lt;br /&gt;
&lt;br /&gt;
* SS-SMS T1 pe0 (pe1) (2:03): Gradient echo IR EPI, 2mm^3 voxel size, number of muxed slices 25 (75 unmuxed slices, 15cm), SMS factor 3, 2x in-plane acceleration, TR 3s.&lt;br /&gt;
&lt;br /&gt;
=== T1 map + PD map ===&lt;br /&gt;
The four SPGR scans, together with the four IR EPI scans, are set up for calculating T1 and PD maps using the [http://github.com/mezera/mrQ mrQ analysis package]. If you want a high resolution T1 map, or if you are interested in getting PD in addition to T1, then you should use this group of scans. &lt;br /&gt;
&lt;br /&gt;
* SPGR 1mm 30(4/10/20) deg (5:19 X 4): 3D SPGR, 1mm^3 voxel size, flip angle 30/4/10/20. The first scan should be run with Auto Prescan + Scan, and the following three should be run using Manual Prescan (do not change any parameters) + Scan.&lt;br /&gt;
&lt;br /&gt;
* IR EPI TI=50(400/1200/2400) (1:15 X 4): Gradient echo IR EPI, 1.875 x 1.875 x 4mm^3 voxel size, 2x in-plane acceleration. The first scan should be run with Auto Prescan + Scan, and the following three should be run using Manual Prescan (do not change any parameters) + Scan.&lt;br /&gt;
&lt;br /&gt;
Note that you could also choose to use only the four IR EPI scans to get a quantitative T1 map at a lower resolution. The working principle and model fitting procedure is explained [http://www-mrsrl.stanford.edu/~jbarral/t1map.html here].&lt;br /&gt;
&lt;br /&gt;
== Arterial-Spin Labeling (ASL) ==&lt;br /&gt;
The newest ASL sequence from GE is a pseudo-continuous sequence called 3DASL. By default it is set to create a Cerebral Bloodflow (CBF) volume as a post-processing task (reported in ml/100gm/min). Separate from post-processing, the sequence produces 2 volumes, a perfusion-weighted (PW) volume and a PD volume. The PW volume is created from subtracting the tagged volume from the control volume during the scan sequence.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ASL-specific considerations&#039;&#039;&#039;:&lt;br /&gt;
* &#039;&#039;Post-Label Delay (PLD)&#039;&#039;: default is 2025ms&lt;br /&gt;
** This should be edited to reflect population being studied. Populations with faster heart rates (such as children) should have a shorter post-label delay (e.g. healthy teens can be successfully scanned at 1525ms)&lt;br /&gt;
** PLD is saved as inversion time (TI) in the dicom headers&lt;br /&gt;
* &#039;&#039;Labeling time (LT)&#039;&#039;: default is 1450ms&lt;br /&gt;
* &#039;&#039;Slice thickness&#039;&#039;: default is 4mm&lt;br /&gt;
** minimum is 2mm&lt;br /&gt;
* &#039;&#039;Spiral arms&#039;&#039;: default is 8&lt;br /&gt;
** This is most significant means of adjusting spatial resolution. More arms = better spatial resolution in each slice.&lt;br /&gt;
* &#039;&#039;Prescription&#039;&#039;: The inferior edge of the prescription box must align with the base of the cerebellum.  This ensure the labeling plane (which is just inferior to the prescription box) is aligned to tag the blood passing through the carotid arteries in the neck before entering the brain.&lt;br /&gt;
** It is very important that the subject&#039;s head is aligned straight in the scanner. Tilting can result in poor labeling or artifacts in the PW volume (and subsequently the CBF volume).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Processing ASL Data&#039;&#039;&#039;:&lt;br /&gt;
Analyses can be conducted on the CBF volume or on the  PW volume. The CBF volume already has CBF quantified (naturally) based on the below information. This volume can be spatially normalized and analyzed in a similar way as processed fMRI data.&lt;br /&gt;
&lt;br /&gt;
* Homogeneous blood/brain partition coefficient for water is 0.9 ml/g&lt;br /&gt;
* Labeling inversion efficiency is 80% for a 3T scanner&lt;br /&gt;
* T1 of blood is 1.6s at a 3T scanner&lt;br /&gt;
* Saturation time is 2s&lt;br /&gt;
* Overall efficiency is 0.6&lt;br /&gt;
* The PD volume is used as a reference image&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can quantify CBF yourself from the PW volume if you&#039;d like to use different parameters or would like to perform additional spatial/intensity corrections before CBF quantification.&lt;br /&gt;
&lt;br /&gt;
== Spectroscopy ==&lt;br /&gt;
In-vivo spectroscopy sequences and analysis methods available and used at CNI are described [[GABA spectro | on this CNI spectroscopy page]].&lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
== Device specific processing ==&lt;br /&gt;
The [[GE Processing | GE processing]] includes various steps that can influence the signal-to-noise of your data.  We explain what we have learned about this and how to control it in this page.&lt;br /&gt;
&lt;br /&gt;
== Technical notes ==&lt;br /&gt;
* [[Data_Processing|Some old notes]] from the former CNI staff/users on data processing and resources&lt;br /&gt;
* [[media:Bob_spatialRes_111216.pdf|Slides on spatial resolution]] from CNI tutorial&lt;br /&gt;
* [[MR Signal Equations]]&lt;br /&gt;
&lt;br /&gt;
== Session Running Script ==&lt;br /&gt;
&lt;br /&gt;
We advise you to put together a session running script that outlines set up of the scanner and peripherals and positioning of and communications with the participant. You can find an example [[media:Session_Running_Script.pdf|here]] (courtesy of Nanna Notthoff, Carstensen Lab).&lt;br /&gt;
&lt;br /&gt;
== CNI&#039;s Quality Assurance protocol ==&lt;br /&gt;
Weekly QA scans include: &lt;br /&gt;
# BOLD EPI sequence (analyze mean and variance over time)&lt;br /&gt;
# DW EPI sequence (analyze eddy current distortion stability)&lt;br /&gt;
# Spiral field map (analyze long-term B0 stability)&lt;br /&gt;
All QA scans are done on the fBIRN agar phantom. The phantom is positioned in the same orientation with the same padding each week. The landmark must be set to the same. The Rx should be not touched (use the same stored Rx). We should do HO shim and set the shim VOI to exactly cover the sphere.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Protocols&amp;diff=59396</id>
		<title>MR Protocols</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Protocols&amp;diff=59396"/>
		<updated>2026-02-11T21:27:53Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Technical notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page offers advice about how to set up your scan protocols and save the information.  The wiki pages take you through the template protocols we think are most widely used. These protocols can be found on the the scanner console, saved under “CNI/head” within the protocol pool.&lt;br /&gt;
&lt;br /&gt;
Screenshots to remind you about how to set specific MRI protocols can be found on the page [[Setting up protocols page | Setting up protocols]]&lt;br /&gt;
&lt;br /&gt;
= General =&lt;br /&gt;
&lt;br /&gt;
== Setting up an MR scan protocol ==&lt;br /&gt;
A basic MR scan session usually starts with the following scans:&lt;br /&gt;
* &#039;&#039;&#039;Localizer&#039;&#039;&#039; - a 3-plane localizer or &#039;scout&#039; scan meant to find the subject&#039;s head. It is also be used for prescription for the subsequent scans. Doing some sort of localizer is necessary, and the &#039;3planeloc SSFSE&#039; (single shot fast spin echo) is the standard work-horse used by most CNI users.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Anatomical&#039;&#039;&#039; - usually a 3D T1-weighted scan at 0.9mm or 1mm isotropic resolution. It is essential for image alignment and anatomical analysis. More choices of anatomical scans are listed in the Anatomical imaging section.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Higher-order shim&#039;&#039;&#039; - measures the magnetic field inhomogeneity and corrects it with polynomial gradients up to 2nd order. It should be run before fieldmap, fMRI or diffusion scans.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Field map&#039;&#039;&#039; - measures the magnetic field inhomogeneity that cannot be corrected by the shim and saves the inhomogeneity in a field map. It should be run immediately before or after the fMRI scan.&lt;br /&gt;
&lt;br /&gt;
At this point you will want to add a number of &#039;&#039;&#039;functional&#039;&#039;&#039; scans, &#039;&#039;&#039;diffusion&#039;&#039;&#039; scans or other type of scans based on your experiment. In the [[#MRI Protocol Templates | next section]] we describe templates for different categories of MRI protocols. The protocol templates are organized by category.  One set is based on conventional multislice (2D) or 3D methods, a second set is based on the new simultaneous multislice (SMS) protocols (also called mux or multiband), and a third set are some special methods (spectroscopy and qMRI).&lt;br /&gt;
&lt;br /&gt;
You can get help in customizing the parameters from the CNI staff (ask Hua, Adam, or Laima).&lt;br /&gt;
&lt;br /&gt;
== Saving your protocol parameters ==&lt;br /&gt;
=== Save screen-shots ===&lt;br /&gt;
At the GE console, you can save screen shots of the GE interface to show the main parameters that you have set in a protocol. Just get to the screen that you want to save, then press the &#039;Prnt Scrn&#039; button on the keyboard. A little dialog will show up. You can choose to print, which will print on paper to the Laser printer in the control room. However, we strongly suggest that you save some trees and the toxic ink chemicals by saving a digital copy instead. To do this, type ina reasonable name in the filename field (default is &#039;screen&#039;) and hit the &#039;PNG&amp;quot; button. A PNG image will then magically appear in the &#039;screensaves&#039; folder on the linux machine next to the console (cnirt). From there, you can email the images to yourself. Or, even better, create your own personal wiki page here that describes your protocol (just log in with your SUNet ID) and put the images in there. Then, you will always have them available when needed! THis is also a great way to share protocol information with your colleagues.&lt;br /&gt;
=== Get a PDF of all protocol parameters ===&lt;br /&gt;
&lt;br /&gt;
You can get a complete PDF of all your protocol info with a few clicks of the mouse. It&#039;s not quite as easy as a screensave, so we outline the procedure here. Note - There is a change on figure 4 - The pdf file will now appear with some viewing options at the top of the pdf file. By clicking on the 4th option from the right (a square with three parallel lines) the drop down menu will display a &amp;quot;save a copy&amp;quot; option which will result in the pdf being saved in the screensaves folder on the Linux machine (voxel2) next to the scanner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=5&amp;gt;&lt;br /&gt;
Image:Export_protocol_button.png|Click the &amp;quot;Protocol Exchange&amp;quot; button under the Image Management tab.&lt;br /&gt;
Image:ExportMode.png|Select &amp;quot;Export Mode&amp;quot; and click OK in the dialog that comes up.&lt;br /&gt;
Image:ProtocolSelection.png|Find your protocol in the next dialog, drag it to the &amp;quot;Protocol Selection&amp;quot; panel, and make sure it is selected. Then press the &amp;quot;preview&amp;quot; button.&lt;br /&gt;
Image:SavePdf.png|You&#039;ll then see the PDF of your protocol. Right-click anywhere within the pdf and select &amp;quot;Save as...&amp;quot; from the drop-down menu.&lt;br /&gt;
Image:SaveAs.png|Type the path and filename. Be sure that the path is /usr/g/mrraw/screensaves/ so it&#039;ll magically appear in the &amp;quot;screensaves&amp;quot; directory on the linux box.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MRI protocol templates ==&lt;br /&gt;
The CNI has stored example protocols for anatomical, fMRI, diffusion, spectroscopy and quantitative MR scans (named as &amp;quot;CNI Examples&amp;quot;, stored under &amp;quot;CNI / Head&amp;quot;). Depending on the user&#039;s needs, there are several ways to run a scan session. The stored protocols are meant to be used as a &#039;menu&#039; from which you select the sequence that you want, based on your needs. While there are many variations stored there, here we just highlight a couple of the most common versions. A detailed list of all parameters for all scans can be found in the PDF files for each protocol. Some suggested ways of selecting from and set up these scans for your own scan session are described below.&lt;br /&gt;
&lt;br /&gt;
== Moving protocols from CNI to Lucas ==&lt;br /&gt;
If you plan to transfer scan protocols from the CNI to Lucas Center, please contact Hua and follow the steps below:&lt;br /&gt;
&lt;br /&gt;
* Let CNI staff know the (a) name of the protocol(s) to transfer and (b) which Lucas scanner. It would be useful if you could include a list of scans in your protocol too. We will help transfer the protocol files over to Lucas. &lt;br /&gt;
&lt;br /&gt;
* If your protocol contains pulse sequences provided by researchers outside CNI, then please let them know about the transfer so that they can prepare the sequences for you at Lucas. For example, if you run any spectroscopy sequences, then please let [mailto:mgu@stanford.edu Dr Meng Gu] know about the transfer plan. &lt;br /&gt;
&lt;br /&gt;
* Follow up with Lucas staff about setting up peripheral devices, e.g. response box, scanner trigger, visual display, physio recording, etc. The visual display at both Lucas scanners uses a projector and a screen mounted on the head coil. Another thing to keep in mind is that &#039;&#039;&#039;Lucas scanners do not send out scan triggers in the same way as the CNI scanner does&#039;&#039;&#039;, so it’s preferred to let the stimulation program trigger the scanner by writing out a byte through the usb-serial port. Lucas also provides their version of the functional sequences that send out triggers to the computer, if you prefer to let the scanner trigger your stimulation. For more details please seek advice from the Lucas staff. &lt;br /&gt;
&lt;br /&gt;
* The Lucas center has its own instance of Flywheel [http://lucascenter.flywheel.io lucascenter.flywheel.io]. &#039;&#039;&#039;Prior to scanning at Lucas, please be sure to coordinate with Tom Brosnan, or [mailto:lmperry@stanford.edu Michael Perry], to have your group’s accounts and projects configured.&#039;&#039;&#039; Michael can help you make sure your projects have the correct gear rules configured to process your data, which is an important consideration to maintain consistency across the two sites. As a good first approximation you can map existing project gear rules at CNI to your new projects at Lucas. Our goal is to make the same gears available at Lucas as are available at CNI. This is a work in progress.&lt;br /&gt;
&lt;br /&gt;
= Anatomical imaging = &lt;br /&gt;
&lt;br /&gt;
==T1 weighted ==&lt;br /&gt;
All the suggested T1-weighted scans use GE&#039;s &amp;quot;BRAVO&amp;quot; sequence. It is an IR-prep, fast SPGR sequence with parameters tuned to optimize brain tissue contrast. Unless you have good reason to do so, you probably don&#039;t want to play with any parameters other than slice orientation, voxel size, and bandwidth. And for those, most users just pick one of the suggested configurations:&lt;br /&gt;
&lt;br /&gt;
* T1w 1mm ax (3:22): T1-weighted, 1mm^3 voxel size, 3D Bravo, axial slices. A single scan gives good signal-to-noise quality. If you just want a basic, fast, axial T1 weighted scan, go with this.  &lt;br /&gt;
&lt;br /&gt;
* T1w 1mm sag (3:43): T1-weighted, 1mm^3 voxel size, 3D Bravo, sagittal slices. A single scan gives good signal-to-noise quality. This is similar to the 1mm axial, but with sagittal slice orientation. Compared to axial, this orientation is slightly less efficient because you need a full phase FOV, but sagittal slices usually do better than axial with artifacts from large blood vessels (e.g., carotid artifacts land in non-brain regions rather than the temporal lobes) and with fat-shift artifacts, because the shifted scalp signal usually misses the brain while with axial it can sometimes overlap the occipital lobe gray matter, causing tissue segmentation problems.&lt;br /&gt;
&lt;br /&gt;
* T1w 0.9mm sag (4:49) T1-weighted, 0.9mm^3 voxel size, 3D Bravo, sagittal slices. A single scan gives good signal-to-noise quality. As with the above scan, but a little higher spatial resolution. If you can afford to take 5 minutes for a T1 scan, this one is a great choice. This is our work-horse. Note: to get true .9 isotropic voxels, enter &#039;23.04&#039; for the FOV. The scanner GUI will display this as &#039;23.0&#039;, but will store and use the full-precision that you type!&lt;br /&gt;
&lt;br /&gt;
* T1w 0.8mm sag (4:57 X 2): T1-weighted, 0.8mm^3 voxels, 3D Bravo, sagittal slices. Two scans (averaged in post-processing) are advised for good signal-to-noise quality. If you want to get better resolution, do two of these.&lt;br /&gt;
&lt;br /&gt;
* T1w 0.7mm sag (5:41 X 3): T1-weighted, 0.7mm^3 voxels, 3D Bravo, sagittal slices. 3-4 scans (averaged in post-processing) are advised for good signal-to-noise quality. If you can afford the time, and make use of high-quality anatomical images, this is the sequence to use.&lt;br /&gt;
&lt;br /&gt;
== T2 weighted ==&lt;br /&gt;
&lt;br /&gt;
* 3D T2 (5:03): T2-weighted, 0.8mm^3 voxel size, 3D Cube T2, sagittal slices. A single scan gives good signal-to-noise quality. &lt;br /&gt;
&lt;br /&gt;
* 3D T2 FLAIR (6:17): T2-weighted, 1 mm^3 voxel size, 3D Cube T2, sagittal slices. An additional inversion-recovery pulse is applied in the 3D T2 CUBE sequence to suppress the CSF signal in the T2 weighted images.&lt;br /&gt;
&lt;br /&gt;
* 3D T2 PROMO (5:42): T2-weighted, 0.8mm^3 voxel size, 3D Cube T2, sagittal slices. PROMO (PROspective MOtion correction) adjusts the scan parameters during the scan to prospectively correct for patient motion and thus reducing the image artifacts. &lt;br /&gt;
&lt;br /&gt;
== T2w/PDw ==&lt;br /&gt;
&lt;br /&gt;
2D T2w/PDw FSE (4:25): A standard 2D T2-weighted scan. You also get a bonus proton-density scan. Note that the two datasets will be interleaved; you&#039;ll want to separate them in post-processing.&lt;br /&gt;
&lt;br /&gt;
== Technical Notes ==&lt;br /&gt;
&lt;br /&gt;
In general, using a higher pixel bandwidth can help reduce chemical shift effects that push the fat signal from the scalp into the brain.&lt;br /&gt;
&lt;br /&gt;
The 3D Geometry Correction option uses a 3D correction for gradient non-linearity, over the 2D correction that is performed when the option is not checked. By including the slice direction in the correction, the resulting images are closer to geometric truth. The model used to represent gradient nonlinearity is the same as the 2D correction (&amp;quot;gradwarp&amp;quot;) and it uses the same cubic interpolation function as the 2D correction.&lt;br /&gt;
&lt;br /&gt;
= Functional imaging =&lt;br /&gt;
&lt;br /&gt;
== BOLD EPI (Full brain) ==&lt;br /&gt;
&lt;br /&gt;
BOLD EPI 2.9mm 2sec: gradient echo EPI, 2.9mm^3 voxel size, 45 slices (~13 cm), TR/TE 2s/30ms, 2x in-plane acceleration. This sequence gives you full coverage of the brain. The 2x in-plane acceleration reduces the EPI distortion. This is a standard sequence for fMRI scans.&lt;br /&gt;
&lt;br /&gt;
== BOLD EPI (High resolution, partial brain) ==&lt;br /&gt;
&lt;br /&gt;
BOLD EPI 1.8mm 2sec (partial coverage): gradient echo EPI, 1.8mm^3 voxel size, 25 slices (~4.5 cm), TR/TE 2s/30ms, 2x in-plane acceleration. This sequence gives you partial coverage of the brain at a higher resolution. It is a good choice if you are interested in a particular part of the brain.&lt;br /&gt;
&lt;br /&gt;
== Technical Notes ==&lt;br /&gt;
=== CNI&#039;s BOLD EPI Sequence ===&lt;br /&gt;
CNI&#039;s gradient-echo EPI sequence for BOLD fMRI imaging is a modified version of the stock EPI sequence provided by GE. Some useful information about this sequence:&lt;br /&gt;
* The name of the custom PSD is &#039;&#039;&#039;cni_epi&#039;&#039;&#039;.&lt;br /&gt;
* Slice order: The slices are acquired interleaved by default, with odd slices first, then even slices. Be sure to take this into account when doing slice timing correction. You can use the &amp;quot;TriggerTime&amp;quot; field in the DICOM head to confirm the slice acquisition timing. Also note that the time points at which slices are acquired are equally spaced within the TR.&lt;br /&gt;
* Triggering: There is a UserCV to control the acquisition trigger. You can have no special triggering (scan starts when you hit &#039;Scan&#039;), external trigger to start the scan (see [[MR Hardware#Scan Triggers]] for details), or cardiac gating. &lt;br /&gt;
* Image reconstruction size: By default, the images are reconstructed at the native image size instead of being zero-padded up to the next higher power of two. This results in faster recons, smaller files, and no image interpolation, so it is generally preferred. But, if you want power-of-two image sizes, you can change this UserCV to get that behavior.&lt;br /&gt;
* Phase encoding gradient: To use FSL&#039;s TOPUP for EPI distortion correction, you need to acquire a pair of EPI scans with the same prescription except for the reversed phase encoding gradient polarity. There is a UserCV to control the PE polarity (called &amp;quot;pepolar&amp;quot; in GE&#039;s term). In most common cases, the phase encoding gradient is along AP/PA direction, and when pepolar = 0, the encoding goes from posterior to anterior (&amp;quot;j&amp;quot; in BIDS convension), and when pepolar = 1, the encoding goes from anterior to posterior (&amp;quot;j-&amp;quot; in BIDS convension).&lt;br /&gt;
&lt;br /&gt;
=== Optimizing Scan Parameters ===&lt;br /&gt;
If your protocol has multiple long-duration functional scans, you may consider doing additional field map measurements between the functional scans to access any field drift. See the [[Improving EPI]] page for information on fixing some common image problems with EPI images.&lt;br /&gt;
&lt;br /&gt;
There is a field map template protocol within the CNI/Head/CNI Example fMRI: Spiral fieldmap (0:27): 2D spiral, 1.75 x 1.75 x 2mm^3 voxel size. Copy the slice coverage of the BOLD scan. This scan generates a B0 field map in Hz (along with a magnitude image).&lt;br /&gt;
&lt;br /&gt;
The optimal echo time (TE) for BOLD fMRI at 3T is 30ms, where the difference in T2* decay of oxy/deoxy hemoglobin gives the highest contrast in the measured MR signals between the oxy/deoxy-genated blood.&lt;br /&gt;
&lt;br /&gt;
When doing BOLD fMRI, we prefer reading out the data at the optimal echo time quickly. When the TR (the repetition time) is shorter than the longitudinal relaxation time (T1) of the tissue of interest, we want to adjust the flip angle to optimize the SNR by maximizing the magnetization recovery along the z-axis (T1) during successive excitations of the same tissue. The optimal flip-angle is found by the Ernst equation:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;flip-angle = acos(exp(-TR/T1)) &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[Note: this formula will return values in radians, which then need to be converted to degrees. Alternatively, if using Matlab, use the acosd function which will return degrees.]&lt;br /&gt;
&lt;br /&gt;
* A typical T1 value for gray matter is (3T): 1.33 seconds (Kruger, et al, 2001). (At 1.5T, it is closer to 0.9 seconds.) &lt;br /&gt;
&lt;br /&gt;
*Or use the following values for typical TRs at 3T:&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: right&amp;quot;| &#039;&#039;&#039;TR (s):&#039;&#039;&#039;&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 1&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 1.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 2.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 3&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 3.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 4&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 6&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 7&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: right&amp;quot;| &#039;&#039;&#039;flip (deg):&#039;&#039;&#039;&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 61.9&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 71.1&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 77.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 81.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 84.0&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 85.9&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 87.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 88.7&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 89.4&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 89.7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Diffusion weighted imaging =&lt;br /&gt;
&lt;br /&gt;
== DTI ==&lt;br /&gt;
* DTI 2mm b1000 60dir (9:21): 2mm^2 voxel size, 60-70 axial slices, b-value 1000, 60 diffusion directions. &lt;br /&gt;
&lt;br /&gt;
== HARDI ==&lt;br /&gt;
* DTI 2mm b2500 96dir (16:58): 2mm^2 voxel size, 60-70 axial slices, b-value 2500, 96 diffusion directions. &lt;br /&gt;
If you are pressed for time, you can drop the b-value to 2000 and/or reduce the number of directions to 80:&lt;br /&gt;
* DTI 2mm b2000 96dir (16:26): 2mm^2 voxel size, 60-70 axial slices, b-value 2000, 96 diffusion directions. &lt;br /&gt;
* DTI 2mm b2000 80dir (12:37): 2mm^2 voxel size, 60-70 axial slices, b-value 2000, 80 diffusion directions.&lt;br /&gt;
&lt;br /&gt;
== Technical Notes ==&lt;br /&gt;
Diffusion imaging at the CNI uses a modified version of GE&#039;s DW-EPI sequence. The sequence was modified so that for dual-spin-echo scans, the polarity of the second 180 degree pulse is inverted relative to the first 180. This causes off-resonance signal from fat to get defocused and thus help reduce fat-shift artifacts (See Sarlls et. al. Robust fat suppression at 3T in&lt;br /&gt;
high-resolution diffusion-weighted single-shot echo-planar imaging of human brain. MRM 2011, PubMed PMID: [http://www.ncbi.nlm.nih.gov/pubmed/21604298 21604298] and Reese et. al. Reduction of eddy-current-induced distortion in diffusion MRI using a twice-refocused spin echo. MRM 2003, PubMed PMID: [http://www.ncbi.nlm.nih.gov/pubmed/12509835 12509835]).&lt;br /&gt;
&lt;br /&gt;
To decide on an optimal High Angular Resolution Diffusion Imaging (HARDI) acquisition protocol, see:&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/19603409 White and Dale (2009)] Optimal diffusion MRI acquisition for fiber orientation density estimation: an analytic approach. HBM. (Calculated optimal b-values for maximum FOD estimation efficiency with SH expansion orders of L = 2, 4, 6, and 8 to be approximately b = 1,500, 3,000, 4,600, and 6,200 s/mm^2; demonstrated how scanner-specific hardware limitations generally lead to optimal b-values that are slightly lower than the ideal b-values.)&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/18583153 Tournier et al. (2008)] Resolving crossing fibres using constrained spherical deconvolution: validation using diffusion-weighted imaging phantom data. NeuroImage. (For a 45 degrees crossing, the minimum b-value required to resolve the fibre orientations was ... 2000 s/mm^2 for CSD, and 1000 s/mm^2 for super-CSD.)&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/17379540 Tournier et al. (2007)] Robust determination of the fibre orientation distribution in diffusion MRI: non-negativity constrained super-resolved spherical deconvolution. NeuroImage.&lt;br /&gt;
&lt;br /&gt;
HARDI data analysis tools include Camino, dipy, mrTrix etc.&lt;br /&gt;
&lt;br /&gt;
We use a modified version of the stock GE DWI-EPI pulse sequence. The resulting dicoms contain the diffusion parameters in these fields:&lt;br /&gt;
* b-value (in sec/mm^2): 0043 1039 (GEMS_PARMS_01 block, item 1039)&lt;br /&gt;
* gradient direction: [0019 10bb, 0019 10bc, 0019 10bd] (GEMS_ACQU_01 block, items 10bb - 10bd)&lt;br /&gt;
In mrTrix (mapper.cpp), the following code is used to convert the dicom gradient values to the saved gradient directions:&lt;br /&gt;
&lt;br /&gt;
 // M is the image transform&lt;br /&gt;
 M(0,0) = -image.orientation_x[0];&lt;br /&gt;
 M(1,0) = -image.orientation_x[1];&lt;br /&gt;
 M(2,0) =  image.orientation_x[2];&lt;br /&gt;
 M(0,1) = -image.orientation_y[0];&lt;br /&gt;
 M(1,1) = -image.orientation_y[1];&lt;br /&gt;
 M(2,1) =  image.orientation_y[2];&lt;br /&gt;
 M(0,2) = -image.orientation_z[0];&lt;br /&gt;
 M(1,2) = -image.orientation_z[1];&lt;br /&gt;
 M(2,2) =  image.orientation_z[2];&lt;br /&gt;
 M(0,3) = -image.position_vector[0];&lt;br /&gt;
 M(1,3) = -image.position_vector[1];&lt;br /&gt;
 M(2,3) =  image.position_vector[2];&lt;br /&gt;
 M(3,0) = 0.0; M(3,1) = 0.0; M(3,2) = 0.0; M(3,3) = 1.0;&lt;br /&gt;
 H.DW_scheme(s, 0) = M(0,0)*d[0] + M(0,1)*d[1] - M(0,2)*d[2];&lt;br /&gt;
 H.DW_scheme(s, 1) = M(1,0)*d[0] + M(1,1)*d[1] - M(1,2)*d[2];&lt;br /&gt;
 H.DW_scheme(s, 2) = M(2,0)*d[0] + M(2,1)*d[1] - M(2,2)*d[2];&lt;br /&gt;
&lt;br /&gt;
If you get the data from the CNI Neurobiological Image Management System (NIMS), then the b-values and b-vectors have already been extracted for you and are provided along with the NIFTI file containing your data. These three files (the NIFTI, bvals, and bvecs files) can be send directly into most diffusion data analysis packages, such as the Stanford Vita Lab [[http://vistalab.stanford.edu/newlm/index.php/MrDiffusion mrDiffusion]] or FSL&#039;s [[http://www.fmrib.ox.ac.uk/fsl/fdt/index.html FDT]]. The b-values file contains a set of numbers (one for each acquired volume) that describe the b-value of the corresponding volume. The b-vecs file contains a triplet of numbers for each acquired volume, describing the diffusion-weighting direction for the corresponding volume. E.g., if you run our 60-direction scan, you will get 6 non-DW volumes followed by 60-DW volumes. Thus, you nifti file will contain 66 volumes. The b-vals file will contain 66 numbers (six 0&#039;s, fllowed by 60 1000&#039;s) and the b-vecs files will contain 66 triplets describing the DW directions for each volume (the triplets for the first 6 non-DW volumes are meaningless and can be ignored).&lt;br /&gt;
&lt;br /&gt;
=Simultaneous Multi-Slice (SMS)=&lt;br /&gt;
The CNI, in collaboration with GE, implemented [http://www.sciencedirect.com/science/article/pii/S1090780713000311 simultaneous multi-slice EPI] (also known as multiband EPI). GE has integrated the SMS EPI into its product software platform, and since CNI&#039;s scanner upgrade to the UHP system, the SMS sequence is available as part of the GE product sequences, called the Hyperband. The Hyperband option is available for both BOLD EPI and diffusion EPI. &lt;br /&gt;
&lt;br /&gt;
Previously CNI has provided the SMS sequence using our research PSD, the one we referred to as the &amp;quot;mux&amp;quot; sequence. We recommend everyone who has been using the &amp;quot;mux&amp;quot; sequence to transition to the Hyperband sequence. For a comparison of features and performances between the &amp;quot;mux&amp;quot; and Hyperband sequence, please see this CNI blog [http://cni.stanford.edu/hyperband-transition/ Hyperband transition]. More information about the legacy &amp;quot;mux&amp;quot; sequence is described on the [[MUX EPI]] page. &lt;br /&gt;
&lt;br /&gt;
== SMS fMRI ==&lt;br /&gt;
The Hyperband sequence uses a calibration process that is integrated in the prescan. It is not necessary to set up a separate calibration scan or account for additional calibration volumes in the EPI time series. The calibration data is not saved in the final images. By default all the volumes in the EPI time series are reconstructed and saved in the final images, so the number of volumes in NIFTI is exactly the same amount as specified in the protocol (in the Multi-Phase page). However, the first few volumes in the time series may have different intensity because the spin magnetization has not yet reached steady state. In the BOLD analysis it may be necessary to discard the first few volumes in order to get to the steady state. Alternatively, there is an option in the Hyperband sequence to allow users to specify a number of dummy volumes, in which case the scanner will not reconstruct the first few volumes, but the scan timing is still the same, i.e. data acquisition starts right after the scan trigger. &lt;br /&gt;
&lt;br /&gt;
=== BOLD EPI ===&lt;br /&gt;
* Hyperband 6, voxel size 2.4mm^3, FOV 21.6cm, number of slices 60, TR 710ms (scan protocol in the Connectome project)&lt;br /&gt;
* Hyperband 6, voxel size 1.8mm^3, FOV 23.0cm, number of slices 81, TR 1386ms&lt;br /&gt;
* Hyperband 8, voxel size 3.0mm^3, FOV 22.2cm, number of slices 48, TR 415ms&lt;br /&gt;
* Hyperband 8, voxel size 2.0mm^3, FOV 22.0cm, number of slices 72, TR 760ms&lt;br /&gt;
&lt;br /&gt;
=== Multi-echo EPI ===&lt;br /&gt;
* Hyperband 3, 2x in-plane acceleration, 3 EPI echoes, voxel size 2.8mm^3, FOV 22.4cm, number of slices 51, TR 1.49s, shortest TE 14.6ms, TE interval 23ms&lt;br /&gt;
&lt;br /&gt;
== SMS DWI ==&lt;br /&gt;
For SMS diffusion scans we generally recommend 2x to 3x slice acceleration, which will bring down the scan time by 2 to 3 times while maintaining the SNR of the diffusion weighted images. Partial Fourier acquisition is usually used to keep the TE as short as possible. The in-plane acceleration in addition to the slice acceleration is not always recommended because even though it can further reduce the EPI distortion but the SNR loss can be harmful for diffusion model fitting.&lt;br /&gt;
&lt;br /&gt;
Diffusion Spectrum Imaging (DSI) ([http://onlinelibrary.wiley.com/doi/10.1002/mrm.20642/full Magn. Reson. Med., 2005, 54: 1377–1386]) and multi-shell diffusion ([http://onlinelibrary.wiley.com/doi/10.1002/mrm.24736/full Magn. Reson. Med., 2013, 69: 1534–1540]) scans can be realized by designing gradient tables that specify direction and amplitude of the b-vectors. We set up a several customized gradient tables that are optimized for DTI, HARDI, 2 or 3-shell diffusion scans. Consult with us if you would like to set up your own diffusion gradient scheme. &lt;br /&gt;
&lt;br /&gt;
=== HARDI ===&lt;br /&gt;
* DTI 80dir 2mm (4:45): SMS factor 3, axial slices, 2mm^3 voxel size, number of slices 69, b-value 2500, 80 diffusion directions, 8 b=0 images &lt;br /&gt;
* DTI 96dir 2mm (5:50): SMS factor 3, axial slices, 2mm^3 voxel size, number of slices 69, b-value 3000, 96 diffusion directions, 10 b=0 images&lt;br /&gt;
&lt;br /&gt;
=== Multi-shell diffusion ===&lt;br /&gt;
* DTI g79/81 b3k 2-shell (4:33+4:40): 2-shell with 10 b=0 images, 75 directions at b=1500, 75 directions at b=3000. SMS factor 4, voxel size 1.5mm^3, number of slices 84 (scan protocol in the Connectome project)&lt;br /&gt;
* DTI g103 b2k 2-shell (4:50): 2-shell with 9 b=0 images, 30 directions at b=700, 64 directions at b=2000. SMS factor 3, 2x in-plane acceleration, voxel size 2mm^3, number of slices 75&lt;br /&gt;
* DTI g150 b3k 3-shell (6:15): 3-shell with 10 b=0 images, 30 direction at b=1000, 45 direction at b=2000, 65 direction at b=3000. SMS factor 3, 2x in-plane acceleration, voxel size 2mm^3, number of slices 63&lt;br /&gt;
&lt;br /&gt;
= Scientific Protocols for Tissue and Chemistry =&lt;br /&gt;
&lt;br /&gt;
== Quantitative MR ==&lt;br /&gt;
These template protocols make quantitative measurements of MR parameters (e.g. T1 in seconds, and proton density (PD) as a fraction of the voxel) of brain tissue.  Some 1 - PD is called the macromolecular tissue volume.&lt;br /&gt;
&lt;br /&gt;
=== T1 map ===&lt;br /&gt;
The SS-SMS T1 scan is a quantitative T1 scan using slice-shuffled inversion-recovery SMS EPI sequence. This scan gives you a T1 measurement at 2mm isotropic resolution in a minimum time. It uses in-plane acceleration therefore it&#039;s not necessary to run a separate pe1 scan for distortion correction unless you have enough time. For processing the NIFTI file from either pe0 or pe1 scan to get the T1 map, you can use [http://github.com/cni/t1fit/blob/master/t1_fitter.py this Python script]. If you acquired both pe0 and pe1, then you can use [http://github.com/cni/t1fit/blob/master/t1fit_unwarp.py this script] to process both NIFTI files to get the T1 map -- this includes an extra step for distortion correction using FSL&#039;s TOPUP before fitting the T1 relaxation. &lt;br /&gt;
&lt;br /&gt;
* SS-SMS T1 pe0 (pe1) (2:03): Gradient echo IR EPI, 2mm^3 voxel size, number of muxed slices 25 (75 unmuxed slices, 15cm), SMS factor 3, 2x in-plane acceleration, TR 3s.&lt;br /&gt;
&lt;br /&gt;
=== T1 map + PD map ===&lt;br /&gt;
The four SPGR scans, together with the four IR EPI scans, are set up for calculating T1 and PD maps using the [http://github.com/mezera/mrQ mrQ analysis package]. If you want a high resolution T1 map, or if you are interested in getting PD in addition to T1, then you should use this group of scans. &lt;br /&gt;
&lt;br /&gt;
* SPGR 1mm 30(4/10/20) deg (5:19 X 4): 3D SPGR, 1mm^3 voxel size, flip angle 30/4/10/20. The first scan should be run with Auto Prescan + Scan, and the following three should be run using Manual Prescan (do not change any parameters) + Scan.&lt;br /&gt;
&lt;br /&gt;
* IR EPI TI=50(400/1200/2400) (1:15 X 4): Gradient echo IR EPI, 1.875 x 1.875 x 4mm^3 voxel size, 2x in-plane acceleration. The first scan should be run with Auto Prescan + Scan, and the following three should be run using Manual Prescan (do not change any parameters) + Scan.&lt;br /&gt;
&lt;br /&gt;
Note that you could also choose to use only the four IR EPI scans to get a quantitative T1 map at a lower resolution. The working principle and model fitting procedure is explained [http://www-mrsrl.stanford.edu/~jbarral/t1map.html here].&lt;br /&gt;
&lt;br /&gt;
== Arterial-Spin Labeling (ASL) ==&lt;br /&gt;
The newest ASL sequence from GE is a pseudo-continuous sequence called 3DASL. By default it is set to create a Cerebral Bloodflow (CBF) volume as a post-processing task (reported in ml/100gm/min). Separate from post-processing, the sequence produces 2 volumes, a perfusion-weighted (PW) volume and a PD volume. The PW volume is created from subtracting the tagged volume from the control volume during the scan sequence.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ASL-specific considerations&#039;&#039;&#039;:&lt;br /&gt;
* &#039;&#039;Post-Label Delay (PLD)&#039;&#039;: default is 2025ms&lt;br /&gt;
** This should be edited to reflect population being studied. Populations with faster heart rates (such as children) should have a shorter post-label delay (e.g. healthy teens can be successfully scanned at 1525ms)&lt;br /&gt;
** PLD is saved as inversion time (TI) in the dicom headers&lt;br /&gt;
* &#039;&#039;Labeling time (LT)&#039;&#039;: default is 1450ms&lt;br /&gt;
* &#039;&#039;Slice thickness&#039;&#039;: default is 4mm&lt;br /&gt;
** minimum is 2mm&lt;br /&gt;
* &#039;&#039;Spiral arms&#039;&#039;: default is 8&lt;br /&gt;
** This is most significant means of adjusting spatial resolution. More arms = better spatial resolution in each slice.&lt;br /&gt;
* &#039;&#039;Prescription&#039;&#039;: The inferior edge of the prescription box must align with the base of the cerebellum.  This ensure the labeling plane (which is just inferior to the prescription box) is aligned to tag the blood passing through the carotid arteries in the neck before entering the brain.&lt;br /&gt;
** It is very important that the subject&#039;s head is aligned straight in the scanner. Tilting can result in poor labeling or artifacts in the PW volume (and subsequently the CBF volume).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Processing ASL Data&#039;&#039;&#039;:&lt;br /&gt;
Analyses can be conducted on the CBF volume or on the  PW volume. The CBF volume already has CBF quantified (naturally) based on the below information. This volume can be spatially normalized and analyzed in a similar way as processed fMRI data.&lt;br /&gt;
&lt;br /&gt;
* Homogeneous blood/brain partition coefficient for water is 0.9 ml/g&lt;br /&gt;
* Labeling inversion efficiency is 80% for a 3T scanner&lt;br /&gt;
* T1 of blood is 1.6s at a 3T scanner&lt;br /&gt;
* Saturation time is 2s&lt;br /&gt;
* Overall efficiency is 0.6&lt;br /&gt;
* The PD volume is used as a reference image&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can quantify CBF yourself from the PW volume if you&#039;d like to use different parameters or would like to perform additional spatial/intensity corrections before CBF quantification.&lt;br /&gt;
&lt;br /&gt;
== Spectroscopy ==&lt;br /&gt;
In-vivo spectroscopy sequences and analysis methods available and used at CNI are described [[GABA spectro | on this CNI spectroscopy page]].&lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
== Device specific processing ==&lt;br /&gt;
The [[GE Processing | GE processing]] includes various steps that can influence the signal-to-noise of your data.  We explain what we have learned about this and how to control it in this page.&lt;br /&gt;
&lt;br /&gt;
== Technical notes ==&lt;br /&gt;
* [[Data_Processing|Some old notes]] from the former CNI staff/users on data processing and resources.&lt;br /&gt;
* [[media:Bob_spatialRes_111216.pdf|Slides on spatial resolution]] from CNI tutorial&lt;br /&gt;
* [[MR Signal Equations]]&lt;br /&gt;
&lt;br /&gt;
== Session Running Script ==&lt;br /&gt;
&lt;br /&gt;
We advise you to put together a session running script that outlines set up of the scanner and peripherals and positioning of and communications with the participant. You can find an example [[media:Session_Running_Script.pdf|here]] (courtesy of Nanna Notthoff, Carstensen Lab).&lt;br /&gt;
&lt;br /&gt;
== CNI&#039;s Quality Assurance protocol ==&lt;br /&gt;
Weekly QA scans include: &lt;br /&gt;
# BOLD EPI sequence (analyze mean and variance over time)&lt;br /&gt;
# DW EPI sequence (analyze eddy current distortion stability)&lt;br /&gt;
# Spiral field map (analyze long-term B0 stability)&lt;br /&gt;
All QA scans are done on the fBIRN agar phantom. The phantom is positioned in the same orientation with the same padding each week. The landmark must be set to the same. The Rx should be not touched (use the same stored Rx). We should do HO shim and set the shim VOI to exactly cover the sphere.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=Data_Processing&amp;diff=59395</id>
		<title>Data Processing</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=Data_Processing&amp;diff=59395"/>
		<updated>2026-02-11T21:23:12Z</updated>

		<summary type="html">&lt;p&gt;Huawu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most data processing is done in individual laboratories and tailored to specific data sets.  There are certain general processing methods that are provided by the CNI staff.  These methods are intended to improve the quality of specific data acquired with certain protocols (EPI, Spiral, Diffusion) within the CNI facility.  This [[Data Processing]] page first defines these CNI-specific methods.  This is followed by links to external sites either at Stanford or elsewhere that offer software for processing MRI and EEG data.&lt;br /&gt;
&lt;br /&gt;
= CNI Data processing =&lt;br /&gt;
&lt;br /&gt;
See [[Linux notes]] for random notes on using the linux machines at the CNI. For a nice description of the various parameters involved in field map unwarping, see [http://support.brainvoyager.com/functional-analysis-preparation/27-pre-processing/459-epi-distortion-correction-echo-spacing.html this page].&lt;br /&gt;
&lt;br /&gt;
== Field map estimation ==&lt;br /&gt;
All MR data is subject to distortions arising from imperfections in the mean magnetic field (B0). All centers make an effort to correct for these imperfections. The CNI community is developing methods to [[GE_Processing#Fieldmaps | assess the field map imperfections]] during the measurement process and corresponding [[Preprocessfmri | pre-processing software]] that corrects for these imperfections during the reconstruction process.&lt;br /&gt;
&lt;br /&gt;
==Gradient-reversal Unwarping (&#039;pepolar&#039;)==&lt;br /&gt;
Some of the CNI pulse sequences support reversing the gradient read-out direction (GE calls this &#039;pepolar&#039; for &#039;phase-encode polarity&#039;). If you acquire fMRI or diffusion data with one pepolar direction (e.g., pepolar=0, the default readout direction) and another dataset with the reversed direction (e.g., pepolar=1), then you can use the two sets of images to estimate the fieldmap and unwarp the data. For our multiband (&#039;mux&#039;, aka SMS-EPI) pulse sequences, the gradient read-out direction can be set as a user CV. &lt;br /&gt;
&lt;br /&gt;
To unwarp the data, we suggest that you use the FSL [http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/topup topup] tools. The echo train length (etl) needed in the acquisition parameter text file can be calculated using the echo spacing multiplied by the phase encoding matrix size. Both parameters can be found in the image metadata (for example, EffectiveEchoSpacing and AcquisitionMatrixPE in the json file produced by dcm2niix). For fMRI data, you can then do something like this:&lt;br /&gt;
&lt;br /&gt;
    echo &#039;0 1 0 [etl]&#039; &amp;gt; acq_params.txt&lt;br /&gt;
    echo &#039;0 -1 0 [etl]&#039; &amp;gt;&amp;gt; acq_params.txt&lt;br /&gt;
    fsl5.0-fslroi rs_pe0.nii.gz bu 1 1&lt;br /&gt;
    fsl5.0-fslroi rs_pe1.nii.gz bd 1 1&lt;br /&gt;
    fsl5.0-fslmerge -t bud bu bd&lt;br /&gt;
    fsl5.0-topup --imain=bud --datain=acq_params.txt --config=b02b0.cnf --out=rs_topup&lt;br /&gt;
    fsl5.0-applytopup --imain=rs_pe0 --inindex=1 --method=jac --datain=acq_params.txt --topup=rs_topup --out=rs0_unwarped&lt;br /&gt;
    fsl5.0-applytopup --imain=rs_pe1 --inindex=2 --method=jac --datain=acq_params.txt --topup=rs_topup --out=rs1_unwarped&lt;br /&gt;
&lt;br /&gt;
For diffusion data, have a look at this code: https://github.com/cni/nims/blob/master/scripts/pepolar_unwarp.py&lt;br /&gt;
&lt;br /&gt;
If you need to add a slice (topup requires even numbers for x, y and z), the run this before running the lines above:&lt;br /&gt;
&lt;br /&gt;
    mv rs_pe0.nii.gz rs_pe0_ORIG.nii.gz&lt;br /&gt;
    mv rs_pe1.nii.gz rs_pe1_ORIG.nii.gz&lt;br /&gt;
    fsl5.0-fslroi rs_pe0.nii.gz /tmp/pe0 0 -1 0 -1 0 1 0 -1&lt;br /&gt;
    fsl5.0-fslroi rs_pe1.nii.gz /tmp/pe1 0 -1 0 -1 0 1 0 -1&lt;br /&gt;
    fsl5.0-fslmerge -z rs_pe1 /tmp/pe1 rs_pe1_ORIG.nii.gz&lt;br /&gt;
    fsl5.0-fslmerge -z rs_pe0 /tmp/pe0 rs_pe0_ORIG.nii.gz&lt;br /&gt;
&lt;br /&gt;
Then, after topup finishes, you can remove the extra slice:&lt;br /&gt;
&lt;br /&gt;
    fsl5.0-fslroi rs_pe0_unwarped.nii.gz rs_pe0_unwarped_resize.nii.gz 0 -1 0 -1 1 -1 0 -1&lt;br /&gt;
    fsl5.0-fslroi rs_pe1_unwarped.nii.gz rs_pe1_unwarped_resize.nii.gz 0 -1 0 -1 1 -1 0 -1&lt;br /&gt;
&lt;br /&gt;
Complete procedure for mux qT1 data:&lt;br /&gt;
&lt;br /&gt;
    fslroi 9619_22_pe1.nii.gz /tmp/pe1 0 -1 0 -1 0 1 0 -1&lt;br /&gt;
    fslroi 9619_23_pe0.nii.gz /tmp/pe0 0 -1 0 -1 0 1 0 -1&lt;br /&gt;
    fslmerge -z pe1 /tmp/pe1.nii.gz 9619_22_pe1.nii.gz &lt;br /&gt;
    fslmerge -z pe0 /tmp/pe0.nii.gz 9619_23_pe0.nii.gz &lt;br /&gt;
    fslroi pe0 bu 1 1&lt;br /&gt;
    fslroi pe1 bd 1 1&lt;br /&gt;
    fslmerge -t bud bu bd&lt;br /&gt;
    topup --imain=bud --datain=acq_params.txt --config=b02b0.cnf --out=topup&lt;br /&gt;
    applytopup --imain=pe0 --inindex=1 --method=jac --datain=acq_params.txt --topup=topup --out=pe0_unwarped&lt;br /&gt;
    applytopup --imain=pe1 --inindex=2 --method=jac --datain=acq_params.txt --topup=topup --out=pe1_unwarped&lt;br /&gt;
    fslmaths pe0_unwarped.nii.gz -add pe1_unwarped.nii.gz /tmp/unwarped&lt;br /&gt;
    fslroi /tmp/unwarped.nii.gz unwarped 0 -1 0 -1 1 -1 0 -1&lt;br /&gt;
    bet unwarped.nii.gz brain -m&lt;br /&gt;
    ~/git/t1fit/t1_fitter.py -u -t 30 -m brain_mask.nii.gz unwarped.nii.gz qt1&lt;br /&gt;
&lt;br /&gt;
= MRI data processing resources =&lt;br /&gt;
==CNI LX Containers (virtual machines)==&lt;br /&gt;
The CNI has received funding from [http://biox.stanford.edu/biox/neuro.html Neuro Ventures] for a high-powered compute server which will be used to provide computational resources to CNI users. Please visit the [[LXC]] page for more information. &lt;br /&gt;
&lt;br /&gt;
== Stanford laboratories ==&lt;br /&gt;
&lt;br /&gt;
The [http://white.stanford.edu/newlm Wandell lab wiki] describes a large collection of software for processing and visualizing anatomical, functional, and diffusion-weighted MR data.&lt;br /&gt;
&lt;br /&gt;
Other lab sites could to be listed here.&lt;br /&gt;
&lt;br /&gt;
Some online analysis notes for the [[Phillips lab]].&lt;br /&gt;
&lt;br /&gt;
Notes for the [[CHIMe lab]].&lt;br /&gt;
&lt;br /&gt;
[[General data processing notes]].&lt;br /&gt;
&lt;br /&gt;
[[Compute environment notes]]&lt;br /&gt;
&lt;br /&gt;
== Worldwide ==&lt;br /&gt;
&lt;br /&gt;
* SPM&lt;br /&gt;
* FSL&lt;br /&gt;
* BrainVoyager&lt;br /&gt;
* Camino&lt;br /&gt;
* AFNI&lt;br /&gt;
* BrainVisa&lt;br /&gt;
* NiPy&lt;br /&gt;
&lt;br /&gt;
= EEG data processing resources =&lt;br /&gt;
&lt;br /&gt;
Something about the Norcia lab here.&lt;br /&gt;
&lt;br /&gt;
== Stanford laboratories ==&lt;br /&gt;
&lt;br /&gt;
== Worldwide resources ==&lt;br /&gt;
MATLAB based: SPM, EEGLAB&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Protocols&amp;diff=59394</id>
		<title>MR Protocols</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Protocols&amp;diff=59394"/>
		<updated>2026-02-11T21:21:44Z</updated>

		<summary type="html">&lt;p&gt;Huawu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page offers advice about how to set up your scan protocols and save the information.  The wiki pages take you through the template protocols we think are most widely used. These protocols can be found on the the scanner console, saved under “CNI/head” within the protocol pool.&lt;br /&gt;
&lt;br /&gt;
Screenshots to remind you about how to set specific MRI protocols can be found on the page [[Setting up protocols page | Setting up protocols]]&lt;br /&gt;
&lt;br /&gt;
= General =&lt;br /&gt;
&lt;br /&gt;
== Setting up an MR scan protocol ==&lt;br /&gt;
A basic MR scan session usually starts with the following scans:&lt;br /&gt;
* &#039;&#039;&#039;Localizer&#039;&#039;&#039; - a 3-plane localizer or &#039;scout&#039; scan meant to find the subject&#039;s head. It is also be used for prescription for the subsequent scans. Doing some sort of localizer is necessary, and the &#039;3planeloc SSFSE&#039; (single shot fast spin echo) is the standard work-horse used by most CNI users.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Anatomical&#039;&#039;&#039; - usually a 3D T1-weighted scan at 0.9mm or 1mm isotropic resolution. It is essential for image alignment and anatomical analysis. More choices of anatomical scans are listed in the Anatomical imaging section.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Higher-order shim&#039;&#039;&#039; - measures the magnetic field inhomogeneity and corrects it with polynomial gradients up to 2nd order. It should be run before fieldmap, fMRI or diffusion scans.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Field map&#039;&#039;&#039; - measures the magnetic field inhomogeneity that cannot be corrected by the shim and saves the inhomogeneity in a field map. It should be run immediately before or after the fMRI scan.&lt;br /&gt;
&lt;br /&gt;
At this point you will want to add a number of &#039;&#039;&#039;functional&#039;&#039;&#039; scans, &#039;&#039;&#039;diffusion&#039;&#039;&#039; scans or other type of scans based on your experiment. In the [[#MRI Protocol Templates | next section]] we describe templates for different categories of MRI protocols. The protocol templates are organized by category.  One set is based on conventional multislice (2D) or 3D methods, a second set is based on the new simultaneous multislice (SMS) protocols (also called mux or multiband), and a third set are some special methods (spectroscopy and qMRI).&lt;br /&gt;
&lt;br /&gt;
You can get help in customizing the parameters from the CNI staff (ask Hua, Adam, or Laima).&lt;br /&gt;
&lt;br /&gt;
== Saving your protocol parameters ==&lt;br /&gt;
=== Save screen-shots ===&lt;br /&gt;
At the GE console, you can save screen shots of the GE interface to show the main parameters that you have set in a protocol. Just get to the screen that you want to save, then press the &#039;Prnt Scrn&#039; button on the keyboard. A little dialog will show up. You can choose to print, which will print on paper to the Laser printer in the control room. However, we strongly suggest that you save some trees and the toxic ink chemicals by saving a digital copy instead. To do this, type ina reasonable name in the filename field (default is &#039;screen&#039;) and hit the &#039;PNG&amp;quot; button. A PNG image will then magically appear in the &#039;screensaves&#039; folder on the linux machine next to the console (cnirt). From there, you can email the images to yourself. Or, even better, create your own personal wiki page here that describes your protocol (just log in with your SUNet ID) and put the images in there. Then, you will always have them available when needed! THis is also a great way to share protocol information with your colleagues.&lt;br /&gt;
=== Get a PDF of all protocol parameters ===&lt;br /&gt;
&lt;br /&gt;
You can get a complete PDF of all your protocol info with a few clicks of the mouse. It&#039;s not quite as easy as a screensave, so we outline the procedure here. Note - There is a change on figure 4 - The pdf file will now appear with some viewing options at the top of the pdf file. By clicking on the 4th option from the right (a square with three parallel lines) the drop down menu will display a &amp;quot;save a copy&amp;quot; option which will result in the pdf being saved in the screensaves folder on the Linux machine (voxel2) next to the scanner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=5&amp;gt;&lt;br /&gt;
Image:Export_protocol_button.png|Click the &amp;quot;Protocol Exchange&amp;quot; button under the Image Management tab.&lt;br /&gt;
Image:ExportMode.png|Select &amp;quot;Export Mode&amp;quot; and click OK in the dialog that comes up.&lt;br /&gt;
Image:ProtocolSelection.png|Find your protocol in the next dialog, drag it to the &amp;quot;Protocol Selection&amp;quot; panel, and make sure it is selected. Then press the &amp;quot;preview&amp;quot; button.&lt;br /&gt;
Image:SavePdf.png|You&#039;ll then see the PDF of your protocol. Right-click anywhere within the pdf and select &amp;quot;Save as...&amp;quot; from the drop-down menu.&lt;br /&gt;
Image:SaveAs.png|Type the path and filename. Be sure that the path is /usr/g/mrraw/screensaves/ so it&#039;ll magically appear in the &amp;quot;screensaves&amp;quot; directory on the linux box.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MRI protocol templates ==&lt;br /&gt;
The CNI has stored example protocols for anatomical, fMRI, diffusion, spectroscopy and quantitative MR scans (named as &amp;quot;CNI Examples&amp;quot;, stored under &amp;quot;CNI / Head&amp;quot;). Depending on the user&#039;s needs, there are several ways to run a scan session. The stored protocols are meant to be used as a &#039;menu&#039; from which you select the sequence that you want, based on your needs. While there are many variations stored there, here we just highlight a couple of the most common versions. A detailed list of all parameters for all scans can be found in the PDF files for each protocol. Some suggested ways of selecting from and set up these scans for your own scan session are described below.&lt;br /&gt;
&lt;br /&gt;
== Moving protocols from CNI to Lucas ==&lt;br /&gt;
If you plan to transfer scan protocols from the CNI to Lucas Center, please contact Hua and follow the steps below:&lt;br /&gt;
&lt;br /&gt;
* Let CNI staff know the (a) name of the protocol(s) to transfer and (b) which Lucas scanner. It would be useful if you could include a list of scans in your protocol too. We will help transfer the protocol files over to Lucas. &lt;br /&gt;
&lt;br /&gt;
* If your protocol contains pulse sequences provided by researchers outside CNI, then please let them know about the transfer so that they can prepare the sequences for you at Lucas. For example, if you run any spectroscopy sequences, then please let [mailto:mgu@stanford.edu Dr Meng Gu] know about the transfer plan. &lt;br /&gt;
&lt;br /&gt;
* Follow up with Lucas staff about setting up peripheral devices, e.g. response box, scanner trigger, visual display, physio recording, etc. The visual display at both Lucas scanners uses a projector and a screen mounted on the head coil. Another thing to keep in mind is that &#039;&#039;&#039;Lucas scanners do not send out scan triggers in the same way as the CNI scanner does&#039;&#039;&#039;, so it’s preferred to let the stimulation program trigger the scanner by writing out a byte through the usb-serial port. Lucas also provides their version of the functional sequences that send out triggers to the computer, if you prefer to let the scanner trigger your stimulation. For more details please seek advice from the Lucas staff. &lt;br /&gt;
&lt;br /&gt;
* The Lucas center has its own instance of Flywheel [http://lucascenter.flywheel.io lucascenter.flywheel.io]. &#039;&#039;&#039;Prior to scanning at Lucas, please be sure to coordinate with Tom Brosnan, or [mailto:lmperry@stanford.edu Michael Perry], to have your group’s accounts and projects configured.&#039;&#039;&#039; Michael can help you make sure your projects have the correct gear rules configured to process your data, which is an important consideration to maintain consistency across the two sites. As a good first approximation you can map existing project gear rules at CNI to your new projects at Lucas. Our goal is to make the same gears available at Lucas as are available at CNI. This is a work in progress.&lt;br /&gt;
&lt;br /&gt;
= Anatomical imaging = &lt;br /&gt;
&lt;br /&gt;
==T1 weighted ==&lt;br /&gt;
All the suggested T1-weighted scans use GE&#039;s &amp;quot;BRAVO&amp;quot; sequence. It is an IR-prep, fast SPGR sequence with parameters tuned to optimize brain tissue contrast. Unless you have good reason to do so, you probably don&#039;t want to play with any parameters other than slice orientation, voxel size, and bandwidth. And for those, most users just pick one of the suggested configurations:&lt;br /&gt;
&lt;br /&gt;
* T1w 1mm ax (3:22): T1-weighted, 1mm^3 voxel size, 3D Bravo, axial slices. A single scan gives good signal-to-noise quality. If you just want a basic, fast, axial T1 weighted scan, go with this.  &lt;br /&gt;
&lt;br /&gt;
* T1w 1mm sag (3:43): T1-weighted, 1mm^3 voxel size, 3D Bravo, sagittal slices. A single scan gives good signal-to-noise quality. This is similar to the 1mm axial, but with sagittal slice orientation. Compared to axial, this orientation is slightly less efficient because you need a full phase FOV, but sagittal slices usually do better than axial with artifacts from large blood vessels (e.g., carotid artifacts land in non-brain regions rather than the temporal lobes) and with fat-shift artifacts, because the shifted scalp signal usually misses the brain while with axial it can sometimes overlap the occipital lobe gray matter, causing tissue segmentation problems.&lt;br /&gt;
&lt;br /&gt;
* T1w 0.9mm sag (4:49) T1-weighted, 0.9mm^3 voxel size, 3D Bravo, sagittal slices. A single scan gives good signal-to-noise quality. As with the above scan, but a little higher spatial resolution. If you can afford to take 5 minutes for a T1 scan, this one is a great choice. This is our work-horse. Note: to get true .9 isotropic voxels, enter &#039;23.04&#039; for the FOV. The scanner GUI will display this as &#039;23.0&#039;, but will store and use the full-precision that you type!&lt;br /&gt;
&lt;br /&gt;
* T1w 0.8mm sag (4:57 X 2): T1-weighted, 0.8mm^3 voxels, 3D Bravo, sagittal slices. Two scans (averaged in post-processing) are advised for good signal-to-noise quality. If you want to get better resolution, do two of these.&lt;br /&gt;
&lt;br /&gt;
* T1w 0.7mm sag (5:41 X 3): T1-weighted, 0.7mm^3 voxels, 3D Bravo, sagittal slices. 3-4 scans (averaged in post-processing) are advised for good signal-to-noise quality. If you can afford the time, and make use of high-quality anatomical images, this is the sequence to use.&lt;br /&gt;
&lt;br /&gt;
== T2 weighted ==&lt;br /&gt;
&lt;br /&gt;
* 3D T2 (5:03): T2-weighted, 0.8mm^3 voxel size, 3D Cube T2, sagittal slices. A single scan gives good signal-to-noise quality. &lt;br /&gt;
&lt;br /&gt;
* 3D T2 FLAIR (6:17): T2-weighted, 1 mm^3 voxel size, 3D Cube T2, sagittal slices. An additional inversion-recovery pulse is applied in the 3D T2 CUBE sequence to suppress the CSF signal in the T2 weighted images.&lt;br /&gt;
&lt;br /&gt;
* 3D T2 PROMO (5:42): T2-weighted, 0.8mm^3 voxel size, 3D Cube T2, sagittal slices. PROMO (PROspective MOtion correction) adjusts the scan parameters during the scan to prospectively correct for patient motion and thus reducing the image artifacts. &lt;br /&gt;
&lt;br /&gt;
== T2w/PDw ==&lt;br /&gt;
&lt;br /&gt;
2D T2w/PDw FSE (4:25): A standard 2D T2-weighted scan. You also get a bonus proton-density scan. Note that the two datasets will be interleaved; you&#039;ll want to separate them in post-processing.&lt;br /&gt;
&lt;br /&gt;
== Technical Notes ==&lt;br /&gt;
&lt;br /&gt;
In general, using a higher pixel bandwidth can help reduce chemical shift effects that push the fat signal from the scalp into the brain.&lt;br /&gt;
&lt;br /&gt;
The 3D Geometry Correction option uses a 3D correction for gradient non-linearity, over the 2D correction that is performed when the option is not checked. By including the slice direction in the correction, the resulting images are closer to geometric truth. The model used to represent gradient nonlinearity is the same as the 2D correction (&amp;quot;gradwarp&amp;quot;) and it uses the same cubic interpolation function as the 2D correction.&lt;br /&gt;
&lt;br /&gt;
= Functional imaging =&lt;br /&gt;
&lt;br /&gt;
== BOLD EPI (Full brain) ==&lt;br /&gt;
&lt;br /&gt;
BOLD EPI 2.9mm 2sec: gradient echo EPI, 2.9mm^3 voxel size, 45 slices (~13 cm), TR/TE 2s/30ms, 2x in-plane acceleration. This sequence gives you full coverage of the brain. The 2x in-plane acceleration reduces the EPI distortion. This is a standard sequence for fMRI scans.&lt;br /&gt;
&lt;br /&gt;
== BOLD EPI (High resolution, partial brain) ==&lt;br /&gt;
&lt;br /&gt;
BOLD EPI 1.8mm 2sec (partial coverage): gradient echo EPI, 1.8mm^3 voxel size, 25 slices (~4.5 cm), TR/TE 2s/30ms, 2x in-plane acceleration. This sequence gives you partial coverage of the brain at a higher resolution. It is a good choice if you are interested in a particular part of the brain.&lt;br /&gt;
&lt;br /&gt;
== Technical Notes ==&lt;br /&gt;
=== CNI&#039;s BOLD EPI Sequence ===&lt;br /&gt;
CNI&#039;s gradient-echo EPI sequence for BOLD fMRI imaging is a modified version of the stock EPI sequence provided by GE. Some useful information about this sequence:&lt;br /&gt;
* The name of the custom PSD is &#039;&#039;&#039;cni_epi&#039;&#039;&#039;.&lt;br /&gt;
* Slice order: The slices are acquired interleaved by default, with odd slices first, then even slices. Be sure to take this into account when doing slice timing correction. You can use the &amp;quot;TriggerTime&amp;quot; field in the DICOM head to confirm the slice acquisition timing. Also note that the time points at which slices are acquired are equally spaced within the TR.&lt;br /&gt;
* Triggering: There is a UserCV to control the acquisition trigger. You can have no special triggering (scan starts when you hit &#039;Scan&#039;), external trigger to start the scan (see [[MR Hardware#Scan Triggers]] for details), or cardiac gating. &lt;br /&gt;
* Image reconstruction size: By default, the images are reconstructed at the native image size instead of being zero-padded up to the next higher power of two. This results in faster recons, smaller files, and no image interpolation, so it is generally preferred. But, if you want power-of-two image sizes, you can change this UserCV to get that behavior.&lt;br /&gt;
* Phase encoding gradient: To use FSL&#039;s TOPUP for EPI distortion correction, you need to acquire a pair of EPI scans with the same prescription except for the reversed phase encoding gradient polarity. There is a UserCV to control the PE polarity (called &amp;quot;pepolar&amp;quot; in GE&#039;s term). In most common cases, the phase encoding gradient is along AP/PA direction, and when pepolar = 0, the encoding goes from posterior to anterior (&amp;quot;j&amp;quot; in BIDS convension), and when pepolar = 1, the encoding goes from anterior to posterior (&amp;quot;j-&amp;quot; in BIDS convension).&lt;br /&gt;
&lt;br /&gt;
=== Optimizing Scan Parameters ===&lt;br /&gt;
If your protocol has multiple long-duration functional scans, you may consider doing additional field map measurements between the functional scans to access any field drift. See the [[Improving EPI]] page for information on fixing some common image problems with EPI images.&lt;br /&gt;
&lt;br /&gt;
There is a field map template protocol within the CNI/Head/CNI Example fMRI: Spiral fieldmap (0:27): 2D spiral, 1.75 x 1.75 x 2mm^3 voxel size. Copy the slice coverage of the BOLD scan. This scan generates a B0 field map in Hz (along with a magnitude image).&lt;br /&gt;
&lt;br /&gt;
The optimal echo time (TE) for BOLD fMRI at 3T is 30ms, where the difference in T2* decay of oxy/deoxy hemoglobin gives the highest contrast in the measured MR signals between the oxy/deoxy-genated blood.&lt;br /&gt;
&lt;br /&gt;
When doing BOLD fMRI, we prefer reading out the data at the optimal echo time quickly. When the TR (the repetition time) is shorter than the longitudinal relaxation time (T1) of the tissue of interest, we want to adjust the flip angle to optimize the SNR by maximizing the magnetization recovery along the z-axis (T1) during successive excitations of the same tissue. The optimal flip-angle is found by the Ernst equation:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;flip-angle = acos(exp(-TR/T1)) &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[Note: this formula will return values in radians, which then need to be converted to degrees. Alternatively, if using Matlab, use the acosd function which will return degrees.]&lt;br /&gt;
&lt;br /&gt;
* A typical T1 value for gray matter is (3T): 1.33 seconds (Kruger, et al, 2001). (At 1.5T, it is closer to 0.9 seconds.) &lt;br /&gt;
&lt;br /&gt;
*Or use the following values for typical TRs at 3T:&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: right&amp;quot;| &#039;&#039;&#039;TR (s):&#039;&#039;&#039;&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 1&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 1.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 2.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 3&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 3.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 4&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 6&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 7&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: right&amp;quot;| &#039;&#039;&#039;flip (deg):&#039;&#039;&#039;&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 61.9&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 71.1&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 77.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 81.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 84.0&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 85.9&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 87.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 88.7&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 89.4&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 89.7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Diffusion weighted imaging =&lt;br /&gt;
&lt;br /&gt;
== DTI ==&lt;br /&gt;
* DTI 2mm b1000 60dir (9:21): 2mm^2 voxel size, 60-70 axial slices, b-value 1000, 60 diffusion directions. &lt;br /&gt;
&lt;br /&gt;
== HARDI ==&lt;br /&gt;
* DTI 2mm b2500 96dir (16:58): 2mm^2 voxel size, 60-70 axial slices, b-value 2500, 96 diffusion directions. &lt;br /&gt;
If you are pressed for time, you can drop the b-value to 2000 and/or reduce the number of directions to 80:&lt;br /&gt;
* DTI 2mm b2000 96dir (16:26): 2mm^2 voxel size, 60-70 axial slices, b-value 2000, 96 diffusion directions. &lt;br /&gt;
* DTI 2mm b2000 80dir (12:37): 2mm^2 voxel size, 60-70 axial slices, b-value 2000, 80 diffusion directions.&lt;br /&gt;
&lt;br /&gt;
== Technical Notes ==&lt;br /&gt;
Diffusion imaging at the CNI uses a modified version of GE&#039;s DW-EPI sequence. The sequence was modified so that for dual-spin-echo scans, the polarity of the second 180 degree pulse is inverted relative to the first 180. This causes off-resonance signal from fat to get defocused and thus help reduce fat-shift artifacts (See Sarlls et. al. Robust fat suppression at 3T in&lt;br /&gt;
high-resolution diffusion-weighted single-shot echo-planar imaging of human brain. MRM 2011, PubMed PMID: [http://www.ncbi.nlm.nih.gov/pubmed/21604298 21604298] and Reese et. al. Reduction of eddy-current-induced distortion in diffusion MRI using a twice-refocused spin echo. MRM 2003, PubMed PMID: [http://www.ncbi.nlm.nih.gov/pubmed/12509835 12509835]).&lt;br /&gt;
&lt;br /&gt;
To decide on an optimal High Angular Resolution Diffusion Imaging (HARDI) acquisition protocol, see:&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/19603409 White and Dale (2009)] Optimal diffusion MRI acquisition for fiber orientation density estimation: an analytic approach. HBM. (Calculated optimal b-values for maximum FOD estimation efficiency with SH expansion orders of L = 2, 4, 6, and 8 to be approximately b = 1,500, 3,000, 4,600, and 6,200 s/mm^2; demonstrated how scanner-specific hardware limitations generally lead to optimal b-values that are slightly lower than the ideal b-values.)&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/18583153 Tournier et al. (2008)] Resolving crossing fibres using constrained spherical deconvolution: validation using diffusion-weighted imaging phantom data. NeuroImage. (For a 45 degrees crossing, the minimum b-value required to resolve the fibre orientations was ... 2000 s/mm^2 for CSD, and 1000 s/mm^2 for super-CSD.)&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/17379540 Tournier et al. (2007)] Robust determination of the fibre orientation distribution in diffusion MRI: non-negativity constrained super-resolved spherical deconvolution. NeuroImage.&lt;br /&gt;
&lt;br /&gt;
HARDI data analysis tools include Camino, dipy, mrTrix etc.&lt;br /&gt;
&lt;br /&gt;
We use a modified version of the stock GE DWI-EPI pulse sequence. The resulting dicoms contain the diffusion parameters in these fields:&lt;br /&gt;
* b-value (in sec/mm^2): 0043 1039 (GEMS_PARMS_01 block, item 1039)&lt;br /&gt;
* gradient direction: [0019 10bb, 0019 10bc, 0019 10bd] (GEMS_ACQU_01 block, items 10bb - 10bd)&lt;br /&gt;
In mrTrix (mapper.cpp), the following code is used to convert the dicom gradient values to the saved gradient directions:&lt;br /&gt;
&lt;br /&gt;
 // M is the image transform&lt;br /&gt;
 M(0,0) = -image.orientation_x[0];&lt;br /&gt;
 M(1,0) = -image.orientation_x[1];&lt;br /&gt;
 M(2,0) =  image.orientation_x[2];&lt;br /&gt;
 M(0,1) = -image.orientation_y[0];&lt;br /&gt;
 M(1,1) = -image.orientation_y[1];&lt;br /&gt;
 M(2,1) =  image.orientation_y[2];&lt;br /&gt;
 M(0,2) = -image.orientation_z[0];&lt;br /&gt;
 M(1,2) = -image.orientation_z[1];&lt;br /&gt;
 M(2,2) =  image.orientation_z[2];&lt;br /&gt;
 M(0,3) = -image.position_vector[0];&lt;br /&gt;
 M(1,3) = -image.position_vector[1];&lt;br /&gt;
 M(2,3) =  image.position_vector[2];&lt;br /&gt;
 M(3,0) = 0.0; M(3,1) = 0.0; M(3,2) = 0.0; M(3,3) = 1.0;&lt;br /&gt;
 H.DW_scheme(s, 0) = M(0,0)*d[0] + M(0,1)*d[1] - M(0,2)*d[2];&lt;br /&gt;
 H.DW_scheme(s, 1) = M(1,0)*d[0] + M(1,1)*d[1] - M(1,2)*d[2];&lt;br /&gt;
 H.DW_scheme(s, 2) = M(2,0)*d[0] + M(2,1)*d[1] - M(2,2)*d[2];&lt;br /&gt;
&lt;br /&gt;
If you get the data from the CNI Neurobiological Image Management System (NIMS), then the b-values and b-vectors have already been extracted for you and are provided along with the NIFTI file containing your data. These three files (the NIFTI, bvals, and bvecs files) can be send directly into most diffusion data analysis packages, such as the Stanford Vita Lab [[http://vistalab.stanford.edu/newlm/index.php/MrDiffusion mrDiffusion]] or FSL&#039;s [[http://www.fmrib.ox.ac.uk/fsl/fdt/index.html FDT]]. The b-values file contains a set of numbers (one for each acquired volume) that describe the b-value of the corresponding volume. The b-vecs file contains a triplet of numbers for each acquired volume, describing the diffusion-weighting direction for the corresponding volume. E.g., if you run our 60-direction scan, you will get 6 non-DW volumes followed by 60-DW volumes. Thus, you nifti file will contain 66 volumes. The b-vals file will contain 66 numbers (six 0&#039;s, fllowed by 60 1000&#039;s) and the b-vecs files will contain 66 triplets describing the DW directions for each volume (the triplets for the first 6 non-DW volumes are meaningless and can be ignored).&lt;br /&gt;
&lt;br /&gt;
=Simultaneous Multi-Slice (SMS)=&lt;br /&gt;
The CNI, in collaboration with GE, implemented [http://www.sciencedirect.com/science/article/pii/S1090780713000311 simultaneous multi-slice EPI] (also known as multiband EPI). GE has integrated the SMS EPI into its product software platform, and since CNI&#039;s scanner upgrade to the UHP system, the SMS sequence is available as part of the GE product sequences, called the Hyperband. The Hyperband option is available for both BOLD EPI and diffusion EPI. &lt;br /&gt;
&lt;br /&gt;
Previously CNI has provided the SMS sequence using our research PSD, the one we referred to as the &amp;quot;mux&amp;quot; sequence. We recommend everyone who has been using the &amp;quot;mux&amp;quot; sequence to transition to the Hyperband sequence. For a comparison of features and performances between the &amp;quot;mux&amp;quot; and Hyperband sequence, please see this CNI blog [http://cni.stanford.edu/hyperband-transition/ Hyperband transition]. More information about the legacy &amp;quot;mux&amp;quot; sequence is described on the [[MUX EPI]] page. &lt;br /&gt;
&lt;br /&gt;
== SMS fMRI ==&lt;br /&gt;
The Hyperband sequence uses a calibration process that is integrated in the prescan. It is not necessary to set up a separate calibration scan or account for additional calibration volumes in the EPI time series. The calibration data is not saved in the final images. By default all the volumes in the EPI time series are reconstructed and saved in the final images, so the number of volumes in NIFTI is exactly the same amount as specified in the protocol (in the Multi-Phase page). However, the first few volumes in the time series may have different intensity because the spin magnetization has not yet reached steady state. In the BOLD analysis it may be necessary to discard the first few volumes in order to get to the steady state. Alternatively, there is an option in the Hyperband sequence to allow users to specify a number of dummy volumes, in which case the scanner will not reconstruct the first few volumes, but the scan timing is still the same, i.e. data acquisition starts right after the scan trigger. &lt;br /&gt;
&lt;br /&gt;
=== BOLD EPI ===&lt;br /&gt;
* Hyperband 6, voxel size 2.4mm^3, FOV 21.6cm, number of slices 60, TR 710ms (scan protocol in the Connectome project)&lt;br /&gt;
* Hyperband 6, voxel size 1.8mm^3, FOV 23.0cm, number of slices 81, TR 1386ms&lt;br /&gt;
* Hyperband 8, voxel size 3.0mm^3, FOV 22.2cm, number of slices 48, TR 415ms&lt;br /&gt;
* Hyperband 8, voxel size 2.0mm^3, FOV 22.0cm, number of slices 72, TR 760ms&lt;br /&gt;
&lt;br /&gt;
=== Multi-echo EPI ===&lt;br /&gt;
* Hyperband 3, 2x in-plane acceleration, 3 EPI echoes, voxel size 2.8mm^3, FOV 22.4cm, number of slices 51, TR 1.49s, shortest TE 14.6ms, TE interval 23ms&lt;br /&gt;
&lt;br /&gt;
== SMS DWI ==&lt;br /&gt;
For SMS diffusion scans we generally recommend 2x to 3x slice acceleration, which will bring down the scan time by 2 to 3 times while maintaining the SNR of the diffusion weighted images. Partial Fourier acquisition is usually used to keep the TE as short as possible. The in-plane acceleration in addition to the slice acceleration is not always recommended because even though it can further reduce the EPI distortion but the SNR loss can be harmful for diffusion model fitting.&lt;br /&gt;
&lt;br /&gt;
Diffusion Spectrum Imaging (DSI) ([http://onlinelibrary.wiley.com/doi/10.1002/mrm.20642/full Magn. Reson. Med., 2005, 54: 1377–1386]) and multi-shell diffusion ([http://onlinelibrary.wiley.com/doi/10.1002/mrm.24736/full Magn. Reson. Med., 2013, 69: 1534–1540]) scans can be realized by designing gradient tables that specify direction and amplitude of the b-vectors. We set up a several customized gradient tables that are optimized for DTI, HARDI, 2 or 3-shell diffusion scans. Consult with us if you would like to set up your own diffusion gradient scheme. &lt;br /&gt;
&lt;br /&gt;
=== HARDI ===&lt;br /&gt;
* DTI 80dir 2mm (4:45): SMS factor 3, axial slices, 2mm^3 voxel size, number of slices 69, b-value 2500, 80 diffusion directions, 8 b=0 images &lt;br /&gt;
* DTI 96dir 2mm (5:50): SMS factor 3, axial slices, 2mm^3 voxel size, number of slices 69, b-value 3000, 96 diffusion directions, 10 b=0 images&lt;br /&gt;
&lt;br /&gt;
=== Multi-shell diffusion ===&lt;br /&gt;
* DTI g79/81 b3k 2-shell (4:33+4:40): 2-shell with 10 b=0 images, 75 directions at b=1500, 75 directions at b=3000. SMS factor 4, voxel size 1.5mm^3, number of slices 84 (scan protocol in the Connectome project)&lt;br /&gt;
* DTI g103 b2k 2-shell (4:50): 2-shell with 9 b=0 images, 30 directions at b=700, 64 directions at b=2000. SMS factor 3, 2x in-plane acceleration, voxel size 2mm^3, number of slices 75&lt;br /&gt;
* DTI g150 b3k 3-shell (6:15): 3-shell with 10 b=0 images, 30 direction at b=1000, 45 direction at b=2000, 65 direction at b=3000. SMS factor 3, 2x in-plane acceleration, voxel size 2mm^3, number of slices 63&lt;br /&gt;
&lt;br /&gt;
= Scientific Protocols for Tissue and Chemistry =&lt;br /&gt;
&lt;br /&gt;
== Quantitative MR ==&lt;br /&gt;
These template protocols make quantitative measurements of MR parameters (e.g. T1 in seconds, and proton density (PD) as a fraction of the voxel) of brain tissue.  Some 1 - PD is called the macromolecular tissue volume.&lt;br /&gt;
&lt;br /&gt;
=== T1 map ===&lt;br /&gt;
The SS-SMS T1 scan is a quantitative T1 scan using slice-shuffled inversion-recovery SMS EPI sequence. This scan gives you a T1 measurement at 2mm isotropic resolution in a minimum time. It uses in-plane acceleration therefore it&#039;s not necessary to run a separate pe1 scan for distortion correction unless you have enough time. For processing the NIFTI file from either pe0 or pe1 scan to get the T1 map, you can use [http://github.com/cni/t1fit/blob/master/t1_fitter.py this Python script]. If you acquired both pe0 and pe1, then you can use [http://github.com/cni/t1fit/blob/master/t1fit_unwarp.py this script] to process both NIFTI files to get the T1 map -- this includes an extra step for distortion correction using FSL&#039;s TOPUP before fitting the T1 relaxation. &lt;br /&gt;
&lt;br /&gt;
* SS-SMS T1 pe0 (pe1) (2:03): Gradient echo IR EPI, 2mm^3 voxel size, number of muxed slices 25 (75 unmuxed slices, 15cm), SMS factor 3, 2x in-plane acceleration, TR 3s.&lt;br /&gt;
&lt;br /&gt;
=== T1 map + PD map ===&lt;br /&gt;
The four SPGR scans, together with the four IR EPI scans, are set up for calculating T1 and PD maps using the [http://github.com/mezera/mrQ mrQ analysis package]. If you want a high resolution T1 map, or if you are interested in getting PD in addition to T1, then you should use this group of scans. &lt;br /&gt;
&lt;br /&gt;
* SPGR 1mm 30(4/10/20) deg (5:19 X 4): 3D SPGR, 1mm^3 voxel size, flip angle 30/4/10/20. The first scan should be run with Auto Prescan + Scan, and the following three should be run using Manual Prescan (do not change any parameters) + Scan.&lt;br /&gt;
&lt;br /&gt;
* IR EPI TI=50(400/1200/2400) (1:15 X 4): Gradient echo IR EPI, 1.875 x 1.875 x 4mm^3 voxel size, 2x in-plane acceleration. The first scan should be run with Auto Prescan + Scan, and the following three should be run using Manual Prescan (do not change any parameters) + Scan.&lt;br /&gt;
&lt;br /&gt;
Note that you could also choose to use only the four IR EPI scans to get a quantitative T1 map at a lower resolution. The working principle and model fitting procedure is explained [http://www-mrsrl.stanford.edu/~jbarral/t1map.html here].&lt;br /&gt;
&lt;br /&gt;
== Arterial-Spin Labeling (ASL) ==&lt;br /&gt;
The newest ASL sequence from GE is a pseudo-continuous sequence called 3DASL. By default it is set to create a Cerebral Bloodflow (CBF) volume as a post-processing task (reported in ml/100gm/min). Separate from post-processing, the sequence produces 2 volumes, a perfusion-weighted (PW) volume and a PD volume. The PW volume is created from subtracting the tagged volume from the control volume during the scan sequence.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ASL-specific considerations&#039;&#039;&#039;:&lt;br /&gt;
* &#039;&#039;Post-Label Delay (PLD)&#039;&#039;: default is 2025ms&lt;br /&gt;
** This should be edited to reflect population being studied. Populations with faster heart rates (such as children) should have a shorter post-label delay (e.g. healthy teens can be successfully scanned at 1525ms)&lt;br /&gt;
** PLD is saved as inversion time (TI) in the dicom headers&lt;br /&gt;
* &#039;&#039;Labeling time (LT)&#039;&#039;: default is 1450ms&lt;br /&gt;
* &#039;&#039;Slice thickness&#039;&#039;: default is 4mm&lt;br /&gt;
** minimum is 2mm&lt;br /&gt;
* &#039;&#039;Spiral arms&#039;&#039;: default is 8&lt;br /&gt;
** This is most significant means of adjusting spatial resolution. More arms = better spatial resolution in each slice.&lt;br /&gt;
* &#039;&#039;Prescription&#039;&#039;: The inferior edge of the prescription box must align with the base of the cerebellum.  This ensure the labeling plane (which is just inferior to the prescription box) is aligned to tag the blood passing through the carotid arteries in the neck before entering the brain.&lt;br /&gt;
** It is very important that the subject&#039;s head is aligned straight in the scanner. Tilting can result in poor labeling or artifacts in the PW volume (and subsequently the CBF volume).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Processing ASL Data&#039;&#039;&#039;:&lt;br /&gt;
Analyses can be conducted on the CBF volume or on the  PW volume. The CBF volume already has CBF quantified (naturally) based on the below information. This volume can be spatially normalized and analyzed in a similar way as processed fMRI data.&lt;br /&gt;
&lt;br /&gt;
* Homogeneous blood/brain partition coefficient for water is 0.9 ml/g&lt;br /&gt;
* Labeling inversion efficiency is 80% for a 3T scanner&lt;br /&gt;
* T1 of blood is 1.6s at a 3T scanner&lt;br /&gt;
* Saturation time is 2s&lt;br /&gt;
* Overall efficiency is 0.6&lt;br /&gt;
* The PD volume is used as a reference image&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can quantify CBF yourself from the PW volume if you&#039;d like to use different parameters or would like to perform additional spatial/intensity corrections before CBF quantification.&lt;br /&gt;
&lt;br /&gt;
== Spectroscopy ==&lt;br /&gt;
In-vivo spectroscopy sequences and analysis methods available and used at CNI are described [[GABA spectro | on this CNI spectroscopy page]].&lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
== Device specific processing ==&lt;br /&gt;
The [[GE Processing | GE processing]] includes various steps that can influence the signal-to-noise of your data.  We explain what we have learned about this and how to control it in this page.&lt;br /&gt;
&lt;br /&gt;
== Technical notes ==&lt;br /&gt;
* [[media:Bob_spatialRes_111216.pdf|Slides on spatial resolution]] from CNI tutorial&lt;br /&gt;
* [[MR Signal Equations]]&lt;br /&gt;
&lt;br /&gt;
== Session Running Script ==&lt;br /&gt;
&lt;br /&gt;
We advise you to put together a session running script that outlines set up of the scanner and peripherals and positioning of and communications with the participant. You can find an example [[media:Session_Running_Script.pdf|here]] (courtesy of Nanna Notthoff, Carstensen Lab).&lt;br /&gt;
&lt;br /&gt;
== CNI&#039;s Quality Assurance protocol ==&lt;br /&gt;
Weekly QA scans include: &lt;br /&gt;
# BOLD EPI sequence (analyze mean and variance over time)&lt;br /&gt;
# DW EPI sequence (analyze eddy current distortion stability)&lt;br /&gt;
# Spiral field map (analyze long-term B0 stability)&lt;br /&gt;
All QA scans are done on the fBIRN agar phantom. The phantom is positioned in the same orientation with the same padding each week. The landmark must be set to the same. The Rx should be not touched (use the same stored Rx). We should do HO shim and set the shim VOI to exactly cover the sphere.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Protocols&amp;diff=59393</id>
		<title>MR Protocols</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Protocols&amp;diff=59393"/>
		<updated>2026-02-11T21:16:24Z</updated>

		<summary type="html">&lt;p&gt;Huawu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page offers advice about how to set up your scan protocols and save the information.  The wiki pages take you through the template protocols we think are most widely used. These protocols can be found on the the scanner console, saved under “CNI/head” within the protocol pool.&lt;br /&gt;
&lt;br /&gt;
Screenshots to remind you about how to set specific MRI protocols can be found on the page [[Setting up protocols page | Setting up protocols]]&lt;br /&gt;
&lt;br /&gt;
= General =&lt;br /&gt;
&lt;br /&gt;
== Setting up an MR scan protocol ==&lt;br /&gt;
A basic MR scan session usually starts with the following scans:&lt;br /&gt;
* &#039;&#039;&#039;Localizer&#039;&#039;&#039; - a 3-plane localizer or &#039;scout&#039; scan meant to find the subject&#039;s head. It is also be used for prescription for the subsequent scans. Doing some sort of localizer is necessary, and the &#039;3planeloc SSFSE&#039; (single shot fast spin echo) is the standard work-horse used by most CNI users.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Anatomical&#039;&#039;&#039; - usually a 3D T1-weighted scan at 0.9mm or 1mm isotropic resolution. It is essential for image alignment and anatomical analysis. More choices of anatomical scans are listed in the Anatomical imaging section.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Higher-order shim&#039;&#039;&#039; - measures the magnetic field inhomogeneity and corrects it with polynomial gradients up to 2nd order. It should be run before fieldmap, fMRI or diffusion scans.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Field map&#039;&#039;&#039; - measures the magnetic field inhomogeneity that cannot be corrected by the shim and saves the inhomogeneity in a field map. It should be run immediately before or after the fMRI scan.&lt;br /&gt;
&lt;br /&gt;
At this point you will want to add a number of &#039;&#039;&#039;functional&#039;&#039;&#039; scans, &#039;&#039;&#039;diffusion&#039;&#039;&#039; scans or other type of scans based on your experiment. In the [[#MRI Protocol Templates | next section]] we describe templates for different categories of MRI protocols. The protocol templates are organized by category.  One set is based on conventional multislice (2D) or 3D methods, a second set is based on the new simultaneous multislice (SMS) protocols (also called mux or multiband), and a third set are some special methods (spectroscopy and qMRI).&lt;br /&gt;
&lt;br /&gt;
You can get help in customizing the parameters from the CNI staff (ask Hua, Adam, or Laima).&lt;br /&gt;
&lt;br /&gt;
== Saving your protocol parameters ==&lt;br /&gt;
=== Save screen-shots ===&lt;br /&gt;
At the GE console, you can save screen shots of the GE interface to show the main parameters that you have set in a protocol. Just get to the screen that you want to save, then press the &#039;Prnt Scrn&#039; button on the keyboard. A little dialog will show up. You can choose to print, which will print on paper to the Laser printer in the control room. However, we strongly suggest that you save some trees and the toxic ink chemicals by saving a digital copy instead. To do this, type ina reasonable name in the filename field (default is &#039;screen&#039;) and hit the &#039;PNG&amp;quot; button. A PNG image will then magically appear in the &#039;screensaves&#039; folder on the linux machine next to the console (cnirt). From there, you can email the images to yourself. Or, even better, create your own personal wiki page here that describes your protocol (just log in with your SUNet ID) and put the images in there. Then, you will always have them available when needed! THis is also a great way to share protocol information with your colleagues.&lt;br /&gt;
=== Get a PDF of all protocol parameters ===&lt;br /&gt;
&lt;br /&gt;
You can get a complete PDF of all your protocol info with a few clicks of the mouse. It&#039;s not quite as easy as a screensave, so we outline the procedure here. Note - There is a change on figure 4 - The pdf file will now appear with some viewing options at the top of the pdf file. By clicking on the 4th option from the right (a square with three parallel lines) the drop down menu will display a &amp;quot;save a copy&amp;quot; option which will result in the pdf being saved in the screensaves folder on the Linux machine (voxel2) next to the scanner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=5&amp;gt;&lt;br /&gt;
Image:Export_protocol_button.png|Click the &amp;quot;Protocol Exchange&amp;quot; button under the Image Management tab.&lt;br /&gt;
Image:ExportMode.png|Select &amp;quot;Export Mode&amp;quot; and click OK in the dialog that comes up.&lt;br /&gt;
Image:ProtocolSelection.png|Find your protocol in the next dialog, drag it to the &amp;quot;Protocol Selection&amp;quot; panel, and make sure it is selected. Then press the &amp;quot;preview&amp;quot; button.&lt;br /&gt;
Image:SavePdf.png|You&#039;ll then see the PDF of your protocol. Right-click anywhere within the pdf and select &amp;quot;Save as...&amp;quot; from the drop-down menu.&lt;br /&gt;
Image:SaveAs.png|Type the path and filename. Be sure that the path is /usr/g/mrraw/screensaves/ so it&#039;ll magically appear in the &amp;quot;screensaves&amp;quot; directory on the linux box.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MRI protocol templates ==&lt;br /&gt;
The CNI has stored example protocols for anatomical, fMRI, diffusion, spectroscopy and quantitative MR scans (named as &amp;quot;CNI Examples&amp;quot;, stored under &amp;quot;CNI / Head&amp;quot;). Depending on the user&#039;s needs, there are several ways to run a scan session. The stored protocols are meant to be used as a &#039;menu&#039; from which you select the sequence that you want, based on your needs. While there are many variations stored there, here we just highlight a couple of the most common versions. A detailed list of all parameters for all scans can be found in the PDF files for each protocol. Some suggested ways of selecting from and set up these scans for your own scan session are described below.&lt;br /&gt;
&lt;br /&gt;
== Moving protocols from CNI to Lucas ==&lt;br /&gt;
If you plan to transfer scan protocols from the CNI to Lucas Center, please contact Hua and follow the steps below:&lt;br /&gt;
&lt;br /&gt;
* Let CNI staff know the (a) name of the protocol(s) to transfer and (b) which Lucas scanner. It would be useful if you could include a list of scans in your protocol too. We will help transfer the protocol files over to Lucas. &lt;br /&gt;
&lt;br /&gt;
* If your protocol contains pulse sequences provided by researchers outside CNI, then please let them know about the transfer so that they can prepare the sequences for you at Lucas. For example, if you run any spectroscopy sequences, then please let [mailto:mgu@stanford.edu Dr Meng Gu] know about the transfer plan. &lt;br /&gt;
&lt;br /&gt;
* Follow up with Lucas staff about setting up peripheral devices, e.g. response box, scanner trigger, visual display, physio recording, etc. The visual display at both Lucas scanners uses a projector and a screen mounted on the head coil. Another thing to keep in mind is that &#039;&#039;&#039;Lucas scanners do not send out scan triggers in the same way as the CNI scanner does&#039;&#039;&#039;, so it’s preferred to let the stimulation program trigger the scanner by writing out a byte through the usb-serial port. Lucas also provides their version of the functional sequences that send out triggers to the computer, if you prefer to let the scanner trigger your stimulation. For more details please seek advice from the Lucas staff. &lt;br /&gt;
&lt;br /&gt;
* The Lucas center has its own instance of Flywheel [http://lucascenter.flywheel.io lucascenter.flywheel.io]. &#039;&#039;&#039;Prior to scanning at Lucas, please be sure to coordinate with Tom Brosnan, or [mailto:lmperry@stanford.edu Michael Perry], to have your group’s accounts and projects configured.&#039;&#039;&#039; Michael can help you make sure your projects have the correct gear rules configured to process your data, which is an important consideration to maintain consistency across the two sites. As a good first approximation you can map existing project gear rules at CNI to your new projects at Lucas. Our goal is to make the same gears available at Lucas as are available at CNI. This is a work in progress.&lt;br /&gt;
&lt;br /&gt;
= Anatomical imaging = &lt;br /&gt;
&lt;br /&gt;
==T1 weighted ==&lt;br /&gt;
All the suggested T1-weighted scans use GE&#039;s &amp;quot;BRAVO&amp;quot; sequence. It is an IR-prep, fast SPGR sequence with parameters tuned to optimize brain tissue contrast. Unless you have good reason to do so, you probably don&#039;t want to play with any parameters other than slice orientation, voxel size, and bandwidth. And for those, most users just pick one of the suggested configurations:&lt;br /&gt;
&lt;br /&gt;
* T1w 1mm ax (3:22): T1-weighted, 1mm^3 voxel size, 3D Bravo, axial slices. A single scan gives good signal-to-noise quality. If you just want a basic, fast, axial T1 weighted scan, go with this.  &lt;br /&gt;
&lt;br /&gt;
* T1w 1mm sag (3:43): T1-weighted, 1mm^3 voxel size, 3D Bravo, sagittal slices. A single scan gives good signal-to-noise quality. This is similar to the 1mm axial, but with sagittal slice orientation. Compared to axial, this orientation is slightly less efficient because you need a full phase FOV, but sagittal slices usually do better than axial with artifacts from large blood vessels (e.g., carotid artifacts land in non-brain regions rather than the temporal lobes) and with fat-shift artifacts, because the shifted scalp signal usually misses the brain while with axial it can sometimes overlap the occipital lobe gray matter, causing tissue segmentation problems.&lt;br /&gt;
&lt;br /&gt;
* T1w 0.9mm sag (4:49) T1-weighted, 0.9mm^3 voxel size, 3D Bravo, sagittal slices. A single scan gives good signal-to-noise quality. As with the above scan, but a little higher spatial resolution. If you can afford to take 5 minutes for a T1 scan, this one is a great choice. This is our work-horse. Note: to get true .9 isotropic voxels, enter &#039;23.04&#039; for the FOV. The scanner GUI will display this as &#039;23.0&#039;, but will store and use the full-precision that you type!&lt;br /&gt;
&lt;br /&gt;
* T1w 0.8mm sag (4:57 X 2): T1-weighted, 0.8mm^3 voxels, 3D Bravo, sagittal slices. Two scans (averaged in post-processing) are advised for good signal-to-noise quality. If you want to get better resolution, do two of these.&lt;br /&gt;
&lt;br /&gt;
* T1w 0.7mm sag (5:41 X 3): T1-weighted, 0.7mm^3 voxels, 3D Bravo, sagittal slices. 3-4 scans (averaged in post-processing) are advised for good signal-to-noise quality. If you can afford the time, and make use of high-quality anatomical images, this is the sequence to use.&lt;br /&gt;
&lt;br /&gt;
== T2 weighted ==&lt;br /&gt;
&lt;br /&gt;
* 3D T2 (5:03): T2-weighted, 0.8mm^3 voxel size, 3D Cube T2, sagittal slices. A single scan gives good signal-to-noise quality. &lt;br /&gt;
&lt;br /&gt;
* 3D T2 FLAIR (6:17): T2-weighted, 1 mm^3 voxel size, 3D Cube T2, sagittal slices. An additional inversion-recovery pulse is applied in the 3D T2 CUBE sequence to suppress the CSF signal in the T2 weighted images.&lt;br /&gt;
&lt;br /&gt;
* 3D T2 PROMO (5:42): T2-weighted, 0.8mm^3 voxel size, 3D Cube T2, sagittal slices. PROMO (PROspective MOtion correction) adjusts the scan parameters during the scan to prospectively correct for patient motion and thus reducing the image artifacts. &lt;br /&gt;
&lt;br /&gt;
== T2w/PDw ==&lt;br /&gt;
&lt;br /&gt;
2D T2w/PDw FSE (4:25): A standard 2D T2-weighted scan. You also get a bonus proton-density scan. Note that the two datasets will be interleaved; you&#039;ll want to separate them in post-processing.&lt;br /&gt;
&lt;br /&gt;
== Technical Notes ==&lt;br /&gt;
&lt;br /&gt;
In general, using a higher pixel bandwidth can help reduce chemical shift effects that push the fat signal from the scalp into the brain.&lt;br /&gt;
&lt;br /&gt;
The 3D Geometry Correction option uses a 3D correction for gradient non-linearity, over the 2D correction that is performed when the option is not checked. By including the slice direction in the correction, the resulting images are closer to geometric truth. The model used to represent gradient nonlinearity is the same as the 2D correction (&amp;quot;gradwarp&amp;quot;) and it uses the same cubic interpolation function as the 2D correction.&lt;br /&gt;
&lt;br /&gt;
= Functional imaging =&lt;br /&gt;
&lt;br /&gt;
== BOLD EPI (Full brain) ==&lt;br /&gt;
&lt;br /&gt;
BOLD EPI 2.9mm 2sec: gradient echo EPI, 2.9mm^3 voxel size, 45 slices (~13 cm), TR/TE 2s/30ms, 2x in-plane acceleration. This sequence gives you full coverage of the brain. The 2x in-plane acceleration reduces the EPI distortion. This is a standard sequence for fMRI scans.&lt;br /&gt;
&lt;br /&gt;
== BOLD EPI (High resolution, partial brain) ==&lt;br /&gt;
&lt;br /&gt;
BOLD EPI 1.8mm 2sec (partial coverage): gradient echo EPI, 1.8mm^3 voxel size, 25 slices (~4.5 cm), TR/TE 2s/30ms, 2x in-plane acceleration. This sequence gives you partial coverage of the brain at a higher resolution. It is a good choice if you are interested in a particular part of the brain.&lt;br /&gt;
&lt;br /&gt;
== Technical Notes ==&lt;br /&gt;
If your protocol has multiple long-duration functional scans, you may consider doing additional field map measurements between the functional scans to access any field drift. See the [[Improving EPI]] page for information on fixing some common image problems with EPI images.&lt;br /&gt;
&lt;br /&gt;
There is a field map template protocol within the CNI/Head/CNI Example fMRI: Spiral fieldmap (0:27): 2D spiral, 1.75 x 1.75 x 2mm^3 voxel size. Copy the slice coverage of the BOLD scan. This scan generates a B0 field map in Hz (along with a magnitude image).&lt;br /&gt;
&lt;br /&gt;
The optimal echo time (TE) for BOLD fMRI at 3T is 30ms, where the difference in T2* decay of oxy/deoxy hemoglobin gives the highest contrast in the measured MR signals between the oxy/deoxy-genated blood.&lt;br /&gt;
&lt;br /&gt;
When doing BOLD fMRI, we prefer reading out the data at the optimal echo time quickly. When the TR (the repetition time) is shorter than the longitudinal relaxation time (T1) of the tissue of interest, we want to adjust the flip angle to optimize the SNR by maximizing the magnetization recovery along the z-axis (T1) during successive excitations of the same tissue. The optimal flip-angle is found by the Ernst equation:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;flip-angle = acos(exp(-TR/T1)) &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[Note: this formula will return values in radians, which then need to be converted to degrees. Alternatively, if using Matlab, use the acosd function which will return degrees.]&lt;br /&gt;
&lt;br /&gt;
* A typical T1 value for gray matter is (3T): 1.33 seconds (Kruger, et al, 2001). (At 1.5T, it is closer to 0.9 seconds.) &lt;br /&gt;
&lt;br /&gt;
*Or use the following values for typical TRs at 3T:&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: right&amp;quot;| &#039;&#039;&#039;TR (s):&#039;&#039;&#039;&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 1&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 1.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 2.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 3&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 3.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 4&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 6&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 7&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: right&amp;quot;| &#039;&#039;&#039;flip (deg):&#039;&#039;&#039;&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 61.9&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 71.1&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 77.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 81.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 84.0&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 85.9&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 87.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 88.7&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 89.4&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 89.7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Diffusion weighted imaging =&lt;br /&gt;
&lt;br /&gt;
== DTI ==&lt;br /&gt;
* DTI 2mm b1000 60dir (9:21): 2mm^2 voxel size, 60-70 axial slices, b-value 1000, 60 diffusion directions. &lt;br /&gt;
&lt;br /&gt;
== HARDI ==&lt;br /&gt;
* DTI 2mm b2500 96dir (16:58): 2mm^2 voxel size, 60-70 axial slices, b-value 2500, 96 diffusion directions. &lt;br /&gt;
If you are pressed for time, you can drop the b-value to 2000 and/or reduce the number of directions to 80:&lt;br /&gt;
* DTI 2mm b2000 96dir (16:26): 2mm^2 voxel size, 60-70 axial slices, b-value 2000, 96 diffusion directions. &lt;br /&gt;
* DTI 2mm b2000 80dir (12:37): 2mm^2 voxel size, 60-70 axial slices, b-value 2000, 80 diffusion directions.&lt;br /&gt;
&lt;br /&gt;
== Technical Notes ==&lt;br /&gt;
Diffusion imaging at the CNI uses a modified version of GE&#039;s DW-EPI sequence. The sequence was modified so that for dual-spin-echo scans, the polarity of the second 180 degree pulse is inverted relative to the first 180. This causes off-resonance signal from fat to get defocused and thus help reduce fat-shift artifacts (See Sarlls et. al. Robust fat suppression at 3T in&lt;br /&gt;
high-resolution diffusion-weighted single-shot echo-planar imaging of human brain. MRM 2011, PubMed PMID: [http://www.ncbi.nlm.nih.gov/pubmed/21604298 21604298] and Reese et. al. Reduction of eddy-current-induced distortion in diffusion MRI using a twice-refocused spin echo. MRM 2003, PubMed PMID: [http://www.ncbi.nlm.nih.gov/pubmed/12509835 12509835]).&lt;br /&gt;
&lt;br /&gt;
To decide on an optimal High Angular Resolution Diffusion Imaging (HARDI) acquisition protocol, see:&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/19603409 White and Dale (2009)] Optimal diffusion MRI acquisition for fiber orientation density estimation: an analytic approach. HBM. (Calculated optimal b-values for maximum FOD estimation efficiency with SH expansion orders of L = 2, 4, 6, and 8 to be approximately b = 1,500, 3,000, 4,600, and 6,200 s/mm^2; demonstrated how scanner-specific hardware limitations generally lead to optimal b-values that are slightly lower than the ideal b-values.)&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/18583153 Tournier et al. (2008)] Resolving crossing fibres using constrained spherical deconvolution: validation using diffusion-weighted imaging phantom data. NeuroImage. (For a 45 degrees crossing, the minimum b-value required to resolve the fibre orientations was ... 2000 s/mm^2 for CSD, and 1000 s/mm^2 for super-CSD.)&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/17379540 Tournier et al. (2007)] Robust determination of the fibre orientation distribution in diffusion MRI: non-negativity constrained super-resolved spherical deconvolution. NeuroImage.&lt;br /&gt;
&lt;br /&gt;
HARDI data analysis tools include Camino, dipy, mrTrix etc.&lt;br /&gt;
&lt;br /&gt;
We use a modified version of the stock GE DWI-EPI pulse sequence. The resulting dicoms contain the diffusion parameters in these fields:&lt;br /&gt;
* b-value (in sec/mm^2): 0043 1039 (GEMS_PARMS_01 block, item 1039)&lt;br /&gt;
* gradient direction: [0019 10bb, 0019 10bc, 0019 10bd] (GEMS_ACQU_01 block, items 10bb - 10bd)&lt;br /&gt;
In mrTrix (mapper.cpp), the following code is used to convert the dicom gradient values to the saved gradient directions:&lt;br /&gt;
&lt;br /&gt;
 // M is the image transform&lt;br /&gt;
 M(0,0) = -image.orientation_x[0];&lt;br /&gt;
 M(1,0) = -image.orientation_x[1];&lt;br /&gt;
 M(2,0) =  image.orientation_x[2];&lt;br /&gt;
 M(0,1) = -image.orientation_y[0];&lt;br /&gt;
 M(1,1) = -image.orientation_y[1];&lt;br /&gt;
 M(2,1) =  image.orientation_y[2];&lt;br /&gt;
 M(0,2) = -image.orientation_z[0];&lt;br /&gt;
 M(1,2) = -image.orientation_z[1];&lt;br /&gt;
 M(2,2) =  image.orientation_z[2];&lt;br /&gt;
 M(0,3) = -image.position_vector[0];&lt;br /&gt;
 M(1,3) = -image.position_vector[1];&lt;br /&gt;
 M(2,3) =  image.position_vector[2];&lt;br /&gt;
 M(3,0) = 0.0; M(3,1) = 0.0; M(3,2) = 0.0; M(3,3) = 1.0;&lt;br /&gt;
 H.DW_scheme(s, 0) = M(0,0)*d[0] + M(0,1)*d[1] - M(0,2)*d[2];&lt;br /&gt;
 H.DW_scheme(s, 1) = M(1,0)*d[0] + M(1,1)*d[1] - M(1,2)*d[2];&lt;br /&gt;
 H.DW_scheme(s, 2) = M(2,0)*d[0] + M(2,1)*d[1] - M(2,2)*d[2];&lt;br /&gt;
&lt;br /&gt;
If you get the data from the CNI Neurobiological Image Management System (NIMS), then the b-values and b-vectors have already been extracted for you and are provided along with the NIFTI file containing your data. These three files (the NIFTI, bvals, and bvecs files) can be send directly into most diffusion data analysis packages, such as the Stanford Vita Lab [[http://vistalab.stanford.edu/newlm/index.php/MrDiffusion mrDiffusion]] or FSL&#039;s [[http://www.fmrib.ox.ac.uk/fsl/fdt/index.html FDT]]. The b-values file contains a set of numbers (one for each acquired volume) that describe the b-value of the corresponding volume. The b-vecs file contains a triplet of numbers for each acquired volume, describing the diffusion-weighting direction for the corresponding volume. E.g., if you run our 60-direction scan, you will get 6 non-DW volumes followed by 60-DW volumes. Thus, you nifti file will contain 66 volumes. The b-vals file will contain 66 numbers (six 0&#039;s, fllowed by 60 1000&#039;s) and the b-vecs files will contain 66 triplets describing the DW directions for each volume (the triplets for the first 6 non-DW volumes are meaningless and can be ignored).&lt;br /&gt;
&lt;br /&gt;
=Simultaneous Multi-Slice (SMS)=&lt;br /&gt;
The CNI, in collaboration with GE, implemented [http://www.sciencedirect.com/science/article/pii/S1090780713000311 simultaneous multi-slice EPI] (also known as multiband EPI). GE has integrated the SMS EPI into its product software platform, and since CNI&#039;s scanner upgrade to the UHP system, the SMS sequence is available as part of the GE product sequences, called the Hyperband. The Hyperband option is available for both BOLD EPI and diffusion EPI. &lt;br /&gt;
&lt;br /&gt;
Previously CNI has provided the SMS sequence using our research PSD, the one we referred to as the &amp;quot;mux&amp;quot; sequence. We recommend everyone who has been using the &amp;quot;mux&amp;quot; sequence to transition to the Hyperband sequence. For a comparison of features and performances between the &amp;quot;mux&amp;quot; and Hyperband sequence, please see this CNI blog [http://cni.stanford.edu/hyperband-transition/ Hyperband transition]. More information about the legacy &amp;quot;mux&amp;quot; sequence is described on the [[MUX EPI]] page. &lt;br /&gt;
&lt;br /&gt;
== SMS fMRI ==&lt;br /&gt;
The Hyperband sequence uses a calibration process that is integrated in the prescan. It is not necessary to set up a separate calibration scan or account for additional calibration volumes in the EPI time series. The calibration data is not saved in the final images. By default all the volumes in the EPI time series are reconstructed and saved in the final images, so the number of volumes in NIFTI is exactly the same amount as specified in the protocol (in the Multi-Phase page). However, the first few volumes in the time series may have different intensity because the spin magnetization has not yet reached steady state. In the BOLD analysis it may be necessary to discard the first few volumes in order to get to the steady state. Alternatively, there is an option in the Hyperband sequence to allow users to specify a number of dummy volumes, in which case the scanner will not reconstruct the first few volumes, but the scan timing is still the same, i.e. data acquisition starts right after the scan trigger. &lt;br /&gt;
&lt;br /&gt;
=== BOLD EPI ===&lt;br /&gt;
* Hyperband 6, voxel size 2.4mm^3, FOV 21.6cm, number of slices 60, TR 710ms (scan protocol in the Connectome project)&lt;br /&gt;
* Hyperband 6, voxel size 1.8mm^3, FOV 23.0cm, number of slices 81, TR 1386ms&lt;br /&gt;
* Hyperband 8, voxel size 3.0mm^3, FOV 22.2cm, number of slices 48, TR 415ms&lt;br /&gt;
* Hyperband 8, voxel size 2.0mm^3, FOV 22.0cm, number of slices 72, TR 760ms&lt;br /&gt;
&lt;br /&gt;
=== Multi-echo EPI ===&lt;br /&gt;
* Hyperband 3, 2x in-plane acceleration, 3 EPI echoes, voxel size 2.8mm^3, FOV 22.4cm, number of slices 51, TR 1.49s, shortest TE 14.6ms, TE interval 23ms&lt;br /&gt;
&lt;br /&gt;
== SMS DWI ==&lt;br /&gt;
For SMS diffusion scans we generally recommend 2x to 3x slice acceleration, which will bring down the scan time by 2 to 3 times while maintaining the SNR of the diffusion weighted images. Partial Fourier acquisition is usually used to keep the TE as short as possible. The in-plane acceleration in addition to the slice acceleration is not always recommended because even though it can further reduce the EPI distortion but the SNR loss can be harmful for diffusion model fitting.&lt;br /&gt;
&lt;br /&gt;
Diffusion Spectrum Imaging (DSI) ([http://onlinelibrary.wiley.com/doi/10.1002/mrm.20642/full Magn. Reson. Med., 2005, 54: 1377–1386]) and multi-shell diffusion ([http://onlinelibrary.wiley.com/doi/10.1002/mrm.24736/full Magn. Reson. Med., 2013, 69: 1534–1540]) scans can be realized by designing gradient tables that specify direction and amplitude of the b-vectors. We set up a several customized gradient tables that are optimized for DTI, HARDI, 2 or 3-shell diffusion scans. Consult with us if you would like to set up your own diffusion gradient scheme. &lt;br /&gt;
&lt;br /&gt;
=== HARDI ===&lt;br /&gt;
* DTI 80dir 2mm (4:45): SMS factor 3, axial slices, 2mm^3 voxel size, number of slices 69, b-value 2500, 80 diffusion directions, 8 b=0 images &lt;br /&gt;
* DTI 96dir 2mm (5:50): SMS factor 3, axial slices, 2mm^3 voxel size, number of slices 69, b-value 3000, 96 diffusion directions, 10 b=0 images&lt;br /&gt;
&lt;br /&gt;
=== Multi-shell diffusion ===&lt;br /&gt;
* DTI g79/81 b3k 2-shell (4:33+4:40): 2-shell with 10 b=0 images, 75 directions at b=1500, 75 directions at b=3000. SMS factor 4, voxel size 1.5mm^3, number of slices 84 (scan protocol in the Connectome project)&lt;br /&gt;
* DTI g103 b2k 2-shell (4:50): 2-shell with 9 b=0 images, 30 directions at b=700, 64 directions at b=2000. SMS factor 3, 2x in-plane acceleration, voxel size 2mm^3, number of slices 75&lt;br /&gt;
* DTI g150 b3k 3-shell (6:15): 3-shell with 10 b=0 images, 30 direction at b=1000, 45 direction at b=2000, 65 direction at b=3000. SMS factor 3, 2x in-plane acceleration, voxel size 2mm^3, number of slices 63&lt;br /&gt;
&lt;br /&gt;
= Scientific Protocols for Tissue and Chemistry =&lt;br /&gt;
&lt;br /&gt;
== Quantitative MR ==&lt;br /&gt;
These template protocols make quantitative measurements of MR parameters (e.g. T1 in seconds, and proton density (PD) as a fraction of the voxel) of brain tissue.  Some 1 - PD is called the macromolecular tissue volume.&lt;br /&gt;
&lt;br /&gt;
=== T1 map ===&lt;br /&gt;
The SS-SMS T1 scan is a quantitative T1 scan using slice-shuffled inversion-recovery SMS EPI sequence. This scan gives you a T1 measurement at 2mm isotropic resolution in a minimum time. It uses in-plane acceleration therefore it&#039;s not necessary to run a separate pe1 scan for distortion correction unless you have enough time. For processing the NIFTI file from either pe0 or pe1 scan to get the T1 map, you can use [http://github.com/cni/t1fit/blob/master/t1_fitter.py this Python script]. If you acquired both pe0 and pe1, then you can use [http://github.com/cni/t1fit/blob/master/t1fit_unwarp.py this script] to process both NIFTI files to get the T1 map -- this includes an extra step for distortion correction using FSL&#039;s TOPUP before fitting the T1 relaxation. &lt;br /&gt;
&lt;br /&gt;
* SS-SMS T1 pe0 (pe1) (2:03): Gradient echo IR EPI, 2mm^3 voxel size, number of muxed slices 25 (75 unmuxed slices, 15cm), SMS factor 3, 2x in-plane acceleration, TR 3s.&lt;br /&gt;
&lt;br /&gt;
=== T1 map + PD map ===&lt;br /&gt;
The four SPGR scans, together with the four IR EPI scans, are set up for calculating T1 and PD maps using the [http://github.com/mezera/mrQ mrQ analysis package]. If you want a high resolution T1 map, or if you are interested in getting PD in addition to T1, then you should use this group of scans. &lt;br /&gt;
&lt;br /&gt;
* SPGR 1mm 30(4/10/20) deg (5:19 X 4): 3D SPGR, 1mm^3 voxel size, flip angle 30/4/10/20. The first scan should be run with Auto Prescan + Scan, and the following three should be run using Manual Prescan (do not change any parameters) + Scan.&lt;br /&gt;
&lt;br /&gt;
* IR EPI TI=50(400/1200/2400) (1:15 X 4): Gradient echo IR EPI, 1.875 x 1.875 x 4mm^3 voxel size, 2x in-plane acceleration. The first scan should be run with Auto Prescan + Scan, and the following three should be run using Manual Prescan (do not change any parameters) + Scan.&lt;br /&gt;
&lt;br /&gt;
Note that you could also choose to use only the four IR EPI scans to get a quantitative T1 map at a lower resolution. The working principle and model fitting procedure is explained [http://www-mrsrl.stanford.edu/~jbarral/t1map.html here].&lt;br /&gt;
&lt;br /&gt;
== Spectroscopy ==&lt;br /&gt;
In-vivo spectroscopy sequences and analysis methods available and used at CNI are described [[GABA spectro | on this CNI spectroscopy page]].&lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
== Device specific processing ==&lt;br /&gt;
The [[GE Processing | GE processing]] includes various steps that can influence the signal-to-noise of your data.  We explain what we have learned about this and how to control it in this page.&lt;br /&gt;
&lt;br /&gt;
== Technical notes ==&lt;br /&gt;
=== CNI&#039;s Gradient-echo EPI ===&lt;br /&gt;
CNI&#039;s gradient-echo EPI sequence for BOLD fMRI imaging is a modified version of the stock EPI sequence provided by GE. Some useful information about this sequence:&lt;br /&gt;
* The name of the custom PSD is &#039;&#039;&#039;cni_epi&#039;&#039;&#039;.&lt;br /&gt;
* Slice order: The slices are acquired interleaved by default, with odd slices first, then even slices. Be sure to take this into account when doing slice timing correction. You can use the &amp;quot;TriggerTime&amp;quot; field in the DICOM head to confirm the slice acquisition timing. Also note that the time points at which slices are acquired are equally spaced within the TR.&lt;br /&gt;
* Triggering: There is a UserCV to control the acquisition trigger. You can have no special triggering (scan starts when you hit &#039;Scan&#039;), external trigger to start the scan (see [[MR Hardware#Scan Triggers]] for details), or cardiac gating. &lt;br /&gt;
* Image reconstruction size: By default, the images are reconstructed at the native image size instead of being zero-padded up to the next higher power of two. This results in faster recons, smaller files, and no image interpolation, so it is generally preferred. But, if you want power-of-two image sizes, you can change this UserCV to get that behavior.&lt;br /&gt;
* Phase encoding gradient: To use FSL&#039;s TOPUP for EPI distortion correction, you need to acquire a pair of EPI scans with the same prescription except for the reversed phase encoding gradient polarity. There is a UserCV to control the PE polarity (called &amp;quot;pepolar&amp;quot; in GE&#039;s term). In most common cases, the phase encoding gradient is along AP/PA direction, and when pepolar = 0, the encoding goes from posterior to anterior (&amp;quot;j&amp;quot; in BIDS convension), and when pepolar = 1, the encoding goes from anterior to posterior (&amp;quot;j-&amp;quot; in BIDS convension).&lt;br /&gt;
&lt;br /&gt;
=== Arterial-Spin Labeling (ASL) ===&lt;br /&gt;
The newest ASL sequence from GE is a pseudo-continuous sequence called 3DASL. By default it is set to create a Cerebral Bloodflow (CBF) volume as a post-processing task (reported in ml/100gm/min). Separate from post-processing, the sequence produces 2 volumes, a perfusion-weighted (PW) volume and a PD volume. The PW volume is created from subtracting the tagged volume from the control volume during the scan sequence.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ASL-specific considerations&#039;&#039;&#039;:&lt;br /&gt;
* &#039;&#039;Post-Label Delay (PLD)&#039;&#039;: default is 2025ms&lt;br /&gt;
** This should be edited to reflect population being studied. Populations with faster heart rates (such as children) should have a shorter post-label delay (e.g. healthy teens can be successfully scanned at 1525ms)&lt;br /&gt;
** PLD is saved as inversion time (TI) in the dicom headers&lt;br /&gt;
* &#039;&#039;Labeling time (LT)&#039;&#039;: default is 1450ms&lt;br /&gt;
* &#039;&#039;Slice thickness&#039;&#039;: default is 4mm&lt;br /&gt;
** minimum is 2mm&lt;br /&gt;
* &#039;&#039;Spiral arms&#039;&#039;: default is 8&lt;br /&gt;
** This is most significant means of adjusting spatial resolution. More arms = better spatial resolution in each slice.&lt;br /&gt;
* &#039;&#039;Prescription&#039;&#039;: The inferior edge of the prescription box must align with the base of the cerebellum.  This ensure the labeling plane (which is just inferior to the prescription box) is aligned to tag the blood passing through the carotid arteries in the neck before entering the brain.&lt;br /&gt;
** It is very important that the subject&#039;s head is aligned straight in the scanner. Tilting can result in poor labeling or artifacts in the PW volume (and subsequently the CBF volume).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Processing ASL Data&#039;&#039;&#039;:&lt;br /&gt;
Analyses can be conducted on the CBF volume or on the  PW volume. The CBF volume already has CBF quantified (naturally) based on the below information. This volume can be spatially normalized and analyzed in a similar way as processed fMRI data.&lt;br /&gt;
&lt;br /&gt;
* Homogeneous blood/brain partition coefficient for water is 0.9 ml/g&lt;br /&gt;
* Labeling inversion efficiency is 80% for a 3T scanner&lt;br /&gt;
* T1 of blood is 1.6s at a 3T scanner&lt;br /&gt;
* Saturation time is 2s&lt;br /&gt;
* Overall efficiency is 0.6&lt;br /&gt;
* The PD volume is used as a reference image&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can quantify CBF yourself from the PW volume if you&#039;d like to use different parameters or would like to perform additional spatial/intensity corrections before CBF quantification.&lt;br /&gt;
&lt;br /&gt;
=== Additional ===&lt;br /&gt;
* [[media:Bob_spatialRes_111216.pdf|Slides on spatial resolution]] from CNI tutorial&lt;br /&gt;
* [[MR Signal Equations]]&lt;br /&gt;
&lt;br /&gt;
== Session Running Script ==&lt;br /&gt;
&lt;br /&gt;
We advise you to put together a session running script that outlines set up of the scanner and peripherals and positioning of and communications with the participant. You can find an example [[media:Session_Running_Script.pdf|here]] (courtesy of Nanna Notthoff, Carstensen Lab).&lt;br /&gt;
&lt;br /&gt;
== CNI&#039;s Quality Assurance protocol ==&lt;br /&gt;
Weekly QA scans include: &lt;br /&gt;
# BOLD EPI sequence (analyze mean and variance over time)&lt;br /&gt;
# DW EPI sequence (analyze eddy current distortion stability)&lt;br /&gt;
# Spiral field map (analyze long-term B0 stability)&lt;br /&gt;
All QA scans are done on the fBIRN agar phantom. The phantom is positioned in the same orientation with the same padding each week. The landmark must be set to the same. The Rx should be not touched (use the same stored Rx). We should do HO shim and set the shim VOI to exactly cover the sphere.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Protocols&amp;diff=59392</id>
		<title>MR Protocols</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Protocols&amp;diff=59392"/>
		<updated>2026-02-11T21:13:09Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Technical notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page offers advice about how to set up your scan protocols and save the information.  The wiki pages take you through the template protocols we think are most widely used. These protocols can be found on the the scanner console, saved under “CNI/head” within the protocol pool.&lt;br /&gt;
&lt;br /&gt;
Screenshots to remind you about how to set specific MRI protocols can be found on the page [[Setting up protocols page | Setting up protocols]]&lt;br /&gt;
&lt;br /&gt;
= General =&lt;br /&gt;
&lt;br /&gt;
== Setting up an MR scan protocol ==&lt;br /&gt;
A basic MR scan session usually starts with the following scans:&lt;br /&gt;
* &#039;&#039;&#039;Localizer&#039;&#039;&#039; - a 3-plane localizer or &#039;scout&#039; scan meant to find the subject&#039;s head. It is also be used for prescription for the subsequent scans. Doing some sort of localizer is necessary, and the &#039;3planeloc SSFSE&#039; (single shot fast spin echo) is the standard work-horse used by most CNI users.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Anatomical&#039;&#039;&#039; - usually a 3D T1-weighted scan at 0.9mm or 1mm isotropic resolution. It is essential for image alignment and anatomical analysis. More choices of anatomical scans are listed in the Anatomical imaging section.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Higher-order shim&#039;&#039;&#039; - measures the magnetic field inhomogeneity and corrects it with polynomial gradients up to 2nd order. It should be run before fieldmap, fMRI or diffusion scans.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Field map&#039;&#039;&#039; - measures the magnetic field inhomogeneity that cannot be corrected by the shim and saves the inhomogeneity in a field map. It should be run immediately before or after the fMRI scan.&lt;br /&gt;
&lt;br /&gt;
At this point you will want to add a number of &#039;&#039;&#039;functional&#039;&#039;&#039; scans, &#039;&#039;&#039;diffusion&#039;&#039;&#039; scans or other type of scans based on your experiment. In the [[#MRI Protocol Templates | next section]] we describe templates for different categories of MRI protocols. The protocol templates are organized by category.  One set is based on conventional multislice (2D) or 3D methods, a second set is based on the new simultaneous multislice (SMS) protocols (also called mux or multiband), and a third set are some special methods (spectroscopy and qMRI).&lt;br /&gt;
&lt;br /&gt;
You can get help in customizing the parameters from the CNI staff (ask Hua, Adam, or Laima).&lt;br /&gt;
&lt;br /&gt;
== Saving your protocol parameters ==&lt;br /&gt;
=== Save screen-shots ===&lt;br /&gt;
At the GE console, you can save screen shots of the GE interface to show the main parameters that you have set in a protocol. Just get to the screen that you want to save, then press the &#039;Prnt Scrn&#039; button on the keyboard. A little dialog will show up. You can choose to print, which will print on paper to the Laser printer in the control room. However, we strongly suggest that you save some trees and the toxic ink chemicals by saving a digital copy instead. To do this, type ina reasonable name in the filename field (default is &#039;screen&#039;) and hit the &#039;PNG&amp;quot; button. A PNG image will then magically appear in the &#039;screensaves&#039; folder on the linux machine next to the console (cnirt). From there, you can email the images to yourself. Or, even better, create your own personal wiki page here that describes your protocol (just log in with your SUNet ID) and put the images in there. Then, you will always have them available when needed! THis is also a great way to share protocol information with your colleagues.&lt;br /&gt;
=== Get a PDF of all protocol parameters ===&lt;br /&gt;
&lt;br /&gt;
You can get a complete PDF of all your protocol info with a few clicks of the mouse. It&#039;s not quite as easy as a screensave, so we outline the procedure here. Note - There is a change on figure 4 - The pdf file will now appear with some viewing options at the top of the pdf file. By clicking on the 4th option from the right (a square with three parallel lines) the drop down menu will display a &amp;quot;save a copy&amp;quot; option which will result in the pdf being saved in the screensaves folder on the Linux machine (voxel2) next to the scanner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=5&amp;gt;&lt;br /&gt;
Image:Export_protocol_button.png|Click the &amp;quot;Protocol Exchange&amp;quot; button under the Image Management tab.&lt;br /&gt;
Image:ExportMode.png|Select &amp;quot;Export Mode&amp;quot; and click OK in the dialog that comes up.&lt;br /&gt;
Image:ProtocolSelection.png|Find your protocol in the next dialog, drag it to the &amp;quot;Protocol Selection&amp;quot; panel, and make sure it is selected. Then press the &amp;quot;preview&amp;quot; button.&lt;br /&gt;
Image:SavePdf.png|You&#039;ll then see the PDF of your protocol. Right-click anywhere within the pdf and select &amp;quot;Save as...&amp;quot; from the drop-down menu.&lt;br /&gt;
Image:SaveAs.png|Type the path and filename. Be sure that the path is /usr/g/mrraw/screensaves/ so it&#039;ll magically appear in the &amp;quot;screensaves&amp;quot; directory on the linux box.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MRI protocol templates ==&lt;br /&gt;
The CNI has stored example protocols for anatomical, fMRI, diffusion, spectroscopy and quantitative MR scans (named as &amp;quot;CNI Examples&amp;quot;, stored under &amp;quot;CNI / Head&amp;quot;). Depending on the user&#039;s needs, there are several ways to run a scan session. The stored protocols are meant to be used as a &#039;menu&#039; from which you select the sequence that you want, based on your needs. While there are many variations stored there, here we just highlight a couple of the most common versions. A detailed list of all parameters for all scans can be found in the PDF files for each protocol. Some suggested ways of selecting from and set up these scans for your own scan session are described below.&lt;br /&gt;
&lt;br /&gt;
== Moving protocols from CNI to Lucas ==&lt;br /&gt;
If you plan to transfer scan protocols from the CNI to Lucas Center, please contact Hua and follow the steps below:&lt;br /&gt;
&lt;br /&gt;
* Let CNI staff know the (a) name of the protocol(s) to transfer and (b) which Lucas scanner. It would be useful if you could include a list of scans in your protocol too. We will help transfer the protocol files over to Lucas. &lt;br /&gt;
&lt;br /&gt;
* If your protocol contains pulse sequences provided by researchers outside CNI, then please let them know about the transfer so that they can prepare the sequences for you at Lucas. For example, if you run any spectroscopy sequences, then please let [mailto:mgu@stanford.edu Dr Meng Gu] know about the transfer plan. &lt;br /&gt;
&lt;br /&gt;
* Follow up with Lucas staff about setting up peripheral devices, e.g. response box, scanner trigger, visual display, physio recording, etc. The visual display at both Lucas scanners uses a projector and a screen mounted on the head coil. Another thing to keep in mind is that &#039;&#039;&#039;Lucas scanners do not send out scan triggers in the same way as the CNI scanner does&#039;&#039;&#039;, so it’s preferred to let the stimulation program trigger the scanner by writing out a byte through the usb-serial port. Lucas also provides their version of the functional sequences that send out triggers to the computer, if you prefer to let the scanner trigger your stimulation. For more details please seek advice from the Lucas staff. &lt;br /&gt;
&lt;br /&gt;
* The Lucas center has its own instance of Flywheel [http://lucascenter.flywheel.io lucascenter.flywheel.io]. &#039;&#039;&#039;Prior to scanning at Lucas, please be sure to coordinate with Tom Brosnan, or [mailto:lmperry@stanford.edu Michael Perry], to have your group’s accounts and projects configured.&#039;&#039;&#039; Michael can help you make sure your projects have the correct gear rules configured to process your data, which is an important consideration to maintain consistency across the two sites. As a good first approximation you can map existing project gear rules at CNI to your new projects at Lucas. Our goal is to make the same gears available at Lucas as are available at CNI. This is a work in progress.&lt;br /&gt;
&lt;br /&gt;
= Conventional imaging =&lt;br /&gt;
&lt;br /&gt;
== Anatomical imaging == &lt;br /&gt;
&lt;br /&gt;
===T1 weighted ===&lt;br /&gt;
All the suggested T1-weighted scans use GE&#039;s &amp;quot;BRAVO&amp;quot; sequence. It is an IR-prep, fast SPGR sequence with parameters tuned to optimize brain tissue contrast. Unless you have good reason to do so, you probably don&#039;t want to play with any parameters other than slice orientation, voxel size, and bandwidth. And for those, most users just pick one of the suggested configurations:&lt;br /&gt;
&lt;br /&gt;
* T1w 1mm ax (3:22): T1-weighted, 1mm^3 voxel size, 3D Bravo, axial slices. A single scan gives good signal-to-noise quality. If you just want a basic, fast, axial T1 weighted scan, go with this.  &lt;br /&gt;
&lt;br /&gt;
* T1w 1mm sag (3:43): T1-weighted, 1mm^3 voxel size, 3D Bravo, sagittal slices. A single scan gives good signal-to-noise quality. This is similar to the 1mm axial, but with sagittal slice orientation. Compared to axial, this orientation is slightly less efficient because you need a full phase FOV, but sagittal slices usually do better than axial with artifacts from large blood vessels (e.g., carotid artifacts land in non-brain regions rather than the temporal lobes) and with fat-shift artifacts, because the shifted scalp signal usually misses the brain while with axial it can sometimes overlap the occipital lobe gray matter, causing tissue segmentation problems.&lt;br /&gt;
&lt;br /&gt;
* T1w 0.9mm sag (4:49) T1-weighted, 0.9mm^3 voxel size, 3D Bravo, sagittal slices. A single scan gives good signal-to-noise quality. As with the above scan, but a little higher spatial resolution. If you can afford to take 5 minutes for a T1 scan, this one is a great choice. This is our work-horse. Note: to get true .9 isotropic voxels, enter &#039;23.04&#039; for the FOV. The scanner GUI will display this as &#039;23.0&#039;, but will store and use the full-precision that you type!&lt;br /&gt;
&lt;br /&gt;
* T1w 0.8mm sag (4:57 X 2): T1-weighted, 0.8mm^3 voxels, 3D Bravo, sagittal slices. Two scans (averaged in post-processing) are advised for good signal-to-noise quality. If you want to get better resolution, do two of these.&lt;br /&gt;
&lt;br /&gt;
* T1w 0.7mm sag (5:41 X 3): T1-weighted, 0.7mm^3 voxels, 3D Bravo, sagittal slices. 3-4 scans (averaged in post-processing) are advised for good signal-to-noise quality. If you can afford the time, and make use of high-quality anatomical images, this is the sequence to use.&lt;br /&gt;
&lt;br /&gt;
===T2 weighted ===&lt;br /&gt;
&lt;br /&gt;
* 3D T2 (5:03): T2-weighted, 0.8mm^3 voxel size, 3D Cube T2, sagittal slices. A single scan gives good signal-to-noise quality. &lt;br /&gt;
&lt;br /&gt;
* 3D T2 FLAIR (6:17): T2-weighted, 1 mm^3 voxel size, 3D Cube T2, sagittal slices. An additional inversion-recovery pulse is applied in the 3D T2 CUBE sequence to suppress the CSF signal in the T2 weighted images.&lt;br /&gt;
&lt;br /&gt;
* 3D T2 PROMO (5:42): T2-weighted, 0.8mm^3 voxel size, 3D Cube T2, sagittal slices. PROMO (PROspective MOtion correction) adjusts the scan parameters during the scan to prospectively correct for patient motion and thus reducing the image artifacts. &lt;br /&gt;
&lt;br /&gt;
=== T2w/PDw ===&lt;br /&gt;
&lt;br /&gt;
2D T2w/PDw FSE (4:25): A standard 2D T2-weighted scan. You also get a bonus proton-density scan. Note that the two datasets will be interleaved; you&#039;ll want to separate them in post-processing.&lt;br /&gt;
&lt;br /&gt;
=== Technical Notes ===&lt;br /&gt;
&lt;br /&gt;
In general, using a higher pixel bandwidth can help reduce chemical shift effects that push the fat signal from the scalp into the brain.&lt;br /&gt;
&lt;br /&gt;
The 3D Geometry Correction option uses a 3D correction for gradient non-linearity, over the 2D correction that is performed when the option is not checked. By including the slice direction in the correction, the resulting images are closer to geometric truth. The model used to represent gradient nonlinearity is the same as the 2D correction (&amp;quot;gradwarp&amp;quot;) and it uses the same cubic interpolation function as the 2D correction.&lt;br /&gt;
&lt;br /&gt;
== Functional imaging ==&lt;br /&gt;
&lt;br /&gt;
=== BOLD EPI (Full brain) ===&lt;br /&gt;
&lt;br /&gt;
BOLD EPI 2.9mm 2sec: gradient echo EPI, 2.9mm^3 voxel size, 45 slices (~13 cm), TR/TE 2s/30ms, 2x in-plane acceleration. This sequence gives you full coverage of the brain. The 2x in-plane acceleration reduces the EPI distortion. This is a standard sequence for fMRI scans.&lt;br /&gt;
&lt;br /&gt;
=== BOLD EPI (High resolution, partial brain) ===&lt;br /&gt;
&lt;br /&gt;
BOLD EPI 1.8mm 2sec (partial coverage): gradient echo EPI, 1.8mm^3 voxel size, 25 slices (~4.5 cm), TR/TE 2s/30ms, 2x in-plane acceleration. This sequence gives you partial coverage of the brain at a higher resolution. It is a good choice if you are interested in a particular part of the brain.&lt;br /&gt;
&lt;br /&gt;
===Technical Notes ===&lt;br /&gt;
If your protocol has multiple long-duration functional scans, you may consider doing additional field map measurements between the functional scans to access any field drift. See the [[Improving EPI]] page for information on fixing some common image problems with EPI images.&lt;br /&gt;
&lt;br /&gt;
There is a field map template protocol within the CNI/Head/CNI Example fMRI: Spiral fieldmap (0:27): 2D spiral, 1.75 x 1.75 x 2mm^3 voxel size. Copy the slice coverage of the BOLD scan. This scan generates a B0 field map in Hz (along with a magnitude image).&lt;br /&gt;
&lt;br /&gt;
The optimal echo time (TE) for BOLD fMRI at 3T is 30ms, where the difference in T2* decay of oxy/deoxy hemoglobin gives the highest contrast in the measured MR signals between the oxy/deoxy-genated blood.&lt;br /&gt;
&lt;br /&gt;
When doing BOLD fMRI, we prefer reading out the data at the optimal echo time quickly. When the TR (the repetition time) is shorter than the longitudinal relaxation time (T1) of the tissue of interest, we want to adjust the flip angle to optimize the SNR by maximizing the magnetization recovery along the z-axis (T1) during successive excitations of the same tissue. The optimal flip-angle is found by the Ernst equation:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;flip-angle = acos(exp(-TR/T1)) &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[Note: this formula will return values in radians, which then need to be converted to degrees. Alternatively, if using Matlab, use the acosd function which will return degrees.]&lt;br /&gt;
&lt;br /&gt;
* A typical T1 value for gray matter is (3T): 1.33 seconds (Kruger, et al, 2001). (At 1.5T, it is closer to 0.9 seconds.) &lt;br /&gt;
&lt;br /&gt;
*Or use the following values for typical TRs at 3T:&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: right&amp;quot;| &#039;&#039;&#039;TR (s):&#039;&#039;&#039;&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 1&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 1.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 2.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 3&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 3.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 4&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 6&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 7&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: right&amp;quot;| &#039;&#039;&#039;flip (deg):&#039;&#039;&#039;&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 61.9&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 71.1&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 77.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 81.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 84.0&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 85.9&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 87.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 88.7&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 89.4&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 89.7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Diffusion weighted imaging ==&lt;br /&gt;
&lt;br /&gt;
=== DTI ===&lt;br /&gt;
* DTI 2mm b1000 60dir (9:21): 2mm^2 voxel size, 60-70 axial slices, b-value 1000, 60 diffusion directions. &lt;br /&gt;
&lt;br /&gt;
=== HARDI ===&lt;br /&gt;
* DTI 2mm b2500 96dir (16:58): 2mm^2 voxel size, 60-70 axial slices, b-value 2500, 96 diffusion directions. &lt;br /&gt;
If you are pressed for time, you can drop the b-value to 2000 and/or reduce the number of directions to 80:&lt;br /&gt;
* DTI 2mm b2000 96dir (16:26): 2mm^2 voxel size, 60-70 axial slices, b-value 2000, 96 diffusion directions. &lt;br /&gt;
* DTI 2mm b2000 80dir (12:37): 2mm^2 voxel size, 60-70 axial slices, b-value 2000, 80 diffusion directions.&lt;br /&gt;
&lt;br /&gt;
=== Technical Notes ===&lt;br /&gt;
Diffusion imaging at the CNI uses a modified version of GE&#039;s DW-EPI sequence. The sequence was modified so that for dual-spin-echo scans, the polarity of the second 180 degree pulse is inverted relative to the first 180. This causes off-resonance signal from fat to get defocused and thus help reduce fat-shift artifacts (See Sarlls et. al. Robust fat suppression at 3T in&lt;br /&gt;
high-resolution diffusion-weighted single-shot echo-planar imaging of human brain. MRM 2011, PubMed PMID: [http://www.ncbi.nlm.nih.gov/pubmed/21604298 21604298] and Reese et. al. Reduction of eddy-current-induced distortion in diffusion MRI using a twice-refocused spin echo. MRM 2003, PubMed PMID: [http://www.ncbi.nlm.nih.gov/pubmed/12509835 12509835]).&lt;br /&gt;
&lt;br /&gt;
To decide on an optimal High Angular Resolution Diffusion Imaging (HARDI) acquisition protocol, see:&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/19603409 White and Dale (2009)] Optimal diffusion MRI acquisition for fiber orientation density estimation: an analytic approach. HBM. (Calculated optimal b-values for maximum FOD estimation efficiency with SH expansion orders of L = 2, 4, 6, and 8 to be approximately b = 1,500, 3,000, 4,600, and 6,200 s/mm^2; demonstrated how scanner-specific hardware limitations generally lead to optimal b-values that are slightly lower than the ideal b-values.)&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/18583153 Tournier et al. (2008)] Resolving crossing fibres using constrained spherical deconvolution: validation using diffusion-weighted imaging phantom data. NeuroImage. (For a 45 degrees crossing, the minimum b-value required to resolve the fibre orientations was ... 2000 s/mm^2 for CSD, and 1000 s/mm^2 for super-CSD.)&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/17379540 Tournier et al. (2007)] Robust determination of the fibre orientation distribution in diffusion MRI: non-negativity constrained super-resolved spherical deconvolution. NeuroImage.&lt;br /&gt;
&lt;br /&gt;
HARDI data analysis tools include Camino, dipy, mrTrix etc.&lt;br /&gt;
&lt;br /&gt;
We use a modified version of the stock GE DWI-EPI pulse sequence. The resulting dicoms contain the diffusion parameters in these fields:&lt;br /&gt;
* b-value (in sec/mm^2): 0043 1039 (GEMS_PARMS_01 block, item 1039)&lt;br /&gt;
* gradient direction: [0019 10bb, 0019 10bc, 0019 10bd] (GEMS_ACQU_01 block, items 10bb - 10bd)&lt;br /&gt;
In mrTrix (mapper.cpp), the following code is used to convert the dicom gradient values to the saved gradient directions:&lt;br /&gt;
&lt;br /&gt;
 // M is the image transform&lt;br /&gt;
 M(0,0) = -image.orientation_x[0];&lt;br /&gt;
 M(1,0) = -image.orientation_x[1];&lt;br /&gt;
 M(2,0) =  image.orientation_x[2];&lt;br /&gt;
 M(0,1) = -image.orientation_y[0];&lt;br /&gt;
 M(1,1) = -image.orientation_y[1];&lt;br /&gt;
 M(2,1) =  image.orientation_y[2];&lt;br /&gt;
 M(0,2) = -image.orientation_z[0];&lt;br /&gt;
 M(1,2) = -image.orientation_z[1];&lt;br /&gt;
 M(2,2) =  image.orientation_z[2];&lt;br /&gt;
 M(0,3) = -image.position_vector[0];&lt;br /&gt;
 M(1,3) = -image.position_vector[1];&lt;br /&gt;
 M(2,3) =  image.position_vector[2];&lt;br /&gt;
 M(3,0) = 0.0; M(3,1) = 0.0; M(3,2) = 0.0; M(3,3) = 1.0;&lt;br /&gt;
 H.DW_scheme(s, 0) = M(0,0)*d[0] + M(0,1)*d[1] - M(0,2)*d[2];&lt;br /&gt;
 H.DW_scheme(s, 1) = M(1,0)*d[0] + M(1,1)*d[1] - M(1,2)*d[2];&lt;br /&gt;
 H.DW_scheme(s, 2) = M(2,0)*d[0] + M(2,1)*d[1] - M(2,2)*d[2];&lt;br /&gt;
&lt;br /&gt;
If you get the data from the CNI Neurobiological Image Management System (NIMS), then the b-values and b-vectors have already been extracted for you and are provided along with the NIFTI file containing your data. These three files (the NIFTI, bvals, and bvecs files) can be send directly into most diffusion data analysis packages, such as the Stanford Vita Lab [[http://vistalab.stanford.edu/newlm/index.php/MrDiffusion mrDiffusion]] or FSL&#039;s [[http://www.fmrib.ox.ac.uk/fsl/fdt/index.html FDT]]. The b-values file contains a set of numbers (one for each acquired volume) that describe the b-value of the corresponding volume. The b-vecs file contains a triplet of numbers for each acquired volume, describing the diffusion-weighting direction for the corresponding volume. E.g., if you run our 60-direction scan, you will get 6 non-DW volumes followed by 60-DW volumes. Thus, you nifti file will contain 66 volumes. The b-vals file will contain 66 numbers (six 0&#039;s, fllowed by 60 1000&#039;s) and the b-vecs files will contain 66 triplets describing the DW directions for each volume (the triplets for the first 6 non-DW volumes are meaningless and can be ignored).&lt;br /&gt;
&lt;br /&gt;
=Simultaneous Multi-Slice (SMS)=&lt;br /&gt;
The CNI, in collaboration with GE, implemented [http://www.sciencedirect.com/science/article/pii/S1090780713000311 simultaneous multi-slice EPI] (also known as multiband EPI). GE has integrated the SMS EPI into its product software platform, and since CNI&#039;s scanner upgrade to the UHP system, the SMS sequence is available as part of the GE product sequences, called the Hyperband. The Hyperband option is available for both BOLD EPI and diffusion EPI. &lt;br /&gt;
&lt;br /&gt;
Previously CNI has provided the SMS sequence using our research PSD, the one we referred to as the &amp;quot;mux&amp;quot; sequence. We recommend everyone who has been using the &amp;quot;mux&amp;quot; sequence to transition to the Hyperband sequence. For a comparison of features and performances between the &amp;quot;mux&amp;quot; and Hyperband sequence, please see this CNI blog [http://cni.stanford.edu/hyperband-transition/ Hyperband transition]. More information about the legacy &amp;quot;mux&amp;quot; sequence is described on the [[MUX EPI]] page. &lt;br /&gt;
&lt;br /&gt;
== SMS fMRI ==&lt;br /&gt;
The Hyperband sequence uses a calibration process that is integrated in the prescan. It is not necessary to set up a separate calibration scan or account for additional calibration volumes in the EPI time series. The calibration data is not saved in the final images. By default all the volumes in the EPI time series are reconstructed and saved in the final images, so the number of volumes in NIFTI is exactly the same amount as specified in the protocol (in the Multi-Phase page). However, the first few volumes in the time series may have different intensity because the spin magnetization has not yet reached steady state. In the BOLD analysis it may be necessary to discard the first few volumes in order to get to the steady state. Alternatively, there is an option in the Hyperband sequence to allow users to specify a number of dummy volumes, in which case the scanner will not reconstruct the first few volumes, but the scan timing is still the same, i.e. data acquisition starts right after the scan trigger. &lt;br /&gt;
&lt;br /&gt;
=== BOLD EPI ===&lt;br /&gt;
* Hyperband 6, voxel size 2.4mm^3, FOV 21.6cm, number of slices 60, TR 710ms (scan protocol in the Connectome project)&lt;br /&gt;
* Hyperband 6, voxel size 1.8mm^3, FOV 23.0cm, number of slices 81, TR 1386ms&lt;br /&gt;
* Hyperband 8, voxel size 3.0mm^3, FOV 22.2cm, number of slices 48, TR 415ms&lt;br /&gt;
* Hyperband 8, voxel size 2.0mm^3, FOV 22.0cm, number of slices 72, TR 760ms&lt;br /&gt;
&lt;br /&gt;
=== Multi-echo EPI ===&lt;br /&gt;
* Hyperband 3, 2x in-plane acceleration, 3 EPI echoes, voxel size 2.8mm^3, FOV 22.4cm, number of slices 51, TR 1.49s, shortest TE 14.6ms, TE interval 23ms&lt;br /&gt;
&lt;br /&gt;
== SMS DWI ==&lt;br /&gt;
For SMS diffusion scans we generally recommend 2x to 3x slice acceleration, which will bring down the scan time by 2 to 3 times while maintaining the SNR of the diffusion weighted images. Partial Fourier acquisition is usually used to keep the TE as short as possible. The in-plane acceleration in addition to the slice acceleration is not always recommended because even though it can further reduce the EPI distortion but the SNR loss can be harmful for diffusion model fitting.&lt;br /&gt;
&lt;br /&gt;
Diffusion Spectrum Imaging (DSI) ([http://onlinelibrary.wiley.com/doi/10.1002/mrm.20642/full Magn. Reson. Med., 2005, 54: 1377–1386]) and multi-shell diffusion ([http://onlinelibrary.wiley.com/doi/10.1002/mrm.24736/full Magn. Reson. Med., 2013, 69: 1534–1540]) scans can be realized by designing gradient tables that specify direction and amplitude of the b-vectors. We set up a several customized gradient tables that are optimized for DTI, HARDI, 2 or 3-shell diffusion scans. Consult with us if you would like to set up your own diffusion gradient scheme. &lt;br /&gt;
&lt;br /&gt;
=== HARDI ===&lt;br /&gt;
* DTI 80dir 2mm (4:45): SMS factor 3, axial slices, 2mm^3 voxel size, number of slices 69, b-value 2500, 80 diffusion directions, 8 b=0 images &lt;br /&gt;
* DTI 96dir 2mm (5:50): SMS factor 3, axial slices, 2mm^3 voxel size, number of slices 69, b-value 3000, 96 diffusion directions, 10 b=0 images&lt;br /&gt;
&lt;br /&gt;
=== Multi-shell diffusion ===&lt;br /&gt;
* DTI g79/81 b3k 2-shell (4:33+4:40): 2-shell with 10 b=0 images, 75 directions at b=1500, 75 directions at b=3000. SMS factor 4, voxel size 1.5mm^3, number of slices 84 (scan protocol in the Connectome project)&lt;br /&gt;
* DTI g103 b2k 2-shell (4:50): 2-shell with 9 b=0 images, 30 directions at b=700, 64 directions at b=2000. SMS factor 3, 2x in-plane acceleration, voxel size 2mm^3, number of slices 75&lt;br /&gt;
* DTI g150 b3k 3-shell (6:15): 3-shell with 10 b=0 images, 30 direction at b=1000, 45 direction at b=2000, 65 direction at b=3000. SMS factor 3, 2x in-plane acceleration, voxel size 2mm^3, number of slices 63&lt;br /&gt;
&lt;br /&gt;
= Scientific Protocols for Tissue and Chemistry =&lt;br /&gt;
&lt;br /&gt;
== Quantitative MR ==&lt;br /&gt;
These template protocols make quantitative measurements of MR parameters (e.g. T1 in seconds, and proton density (PD) as a fraction of the voxel) of brain tissue.  Some 1 - PD is called the macromolecular tissue volume.&lt;br /&gt;
&lt;br /&gt;
=== T1 map ===&lt;br /&gt;
The SS-SMS T1 scan is a quantitative T1 scan using slice-shuffled inversion-recovery SMS EPI sequence. This scan gives you a T1 measurement at 2mm isotropic resolution in a minimum time. It uses in-plane acceleration therefore it&#039;s not necessary to run a separate pe1 scan for distortion correction unless you have enough time. For processing the NIFTI file from either pe0 or pe1 scan to get the T1 map, you can use [http://github.com/cni/t1fit/blob/master/t1_fitter.py this Python script]. If you acquired both pe0 and pe1, then you can use [http://github.com/cni/t1fit/blob/master/t1fit_unwarp.py this script] to process both NIFTI files to get the T1 map -- this includes an extra step for distortion correction using FSL&#039;s TOPUP before fitting the T1 relaxation. &lt;br /&gt;
&lt;br /&gt;
* SS-SMS T1 pe0 (pe1) (2:03): Gradient echo IR EPI, 2mm^3 voxel size, number of muxed slices 25 (75 unmuxed slices, 15cm), SMS factor 3, 2x in-plane acceleration, TR 3s.&lt;br /&gt;
&lt;br /&gt;
=== T1 map + PD map ===&lt;br /&gt;
The four SPGR scans, together with the four IR EPI scans, are set up for calculating T1 and PD maps using the [http://github.com/mezera/mrQ mrQ analysis package]. If you want a high resolution T1 map, or if you are interested in getting PD in addition to T1, then you should use this group of scans. &lt;br /&gt;
&lt;br /&gt;
* SPGR 1mm 30(4/10/20) deg (5:19 X 4): 3D SPGR, 1mm^3 voxel size, flip angle 30/4/10/20. The first scan should be run with Auto Prescan + Scan, and the following three should be run using Manual Prescan (do not change any parameters) + Scan.&lt;br /&gt;
&lt;br /&gt;
* IR EPI TI=50(400/1200/2400) (1:15 X 4): Gradient echo IR EPI, 1.875 x 1.875 x 4mm^3 voxel size, 2x in-plane acceleration. The first scan should be run with Auto Prescan + Scan, and the following three should be run using Manual Prescan (do not change any parameters) + Scan.&lt;br /&gt;
&lt;br /&gt;
Note that you could also choose to use only the four IR EPI scans to get a quantitative T1 map at a lower resolution. The working principle and model fitting procedure is explained [http://www-mrsrl.stanford.edu/~jbarral/t1map.html here].&lt;br /&gt;
&lt;br /&gt;
== Spectroscopy ==&lt;br /&gt;
In-vivo spectroscopy sequences and analysis methods available and used at CNI are described [[GABA spectro | on this CNI spectroscopy page]].&lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
== Device specific processing ==&lt;br /&gt;
The [[GE Processing | GE processing]] includes various steps that can influence the signal-to-noise of your data.  We explain what we have learned about this and how to control it in this page.&lt;br /&gt;
&lt;br /&gt;
== Technical notes ==&lt;br /&gt;
=== CNI&#039;s Gradient-echo EPI ===&lt;br /&gt;
CNI&#039;s gradient-echo EPI sequence for BOLD fMRI imaging is a modified version of the stock EPI sequence provided by GE. Some useful information about this sequence:&lt;br /&gt;
* The name of the custom PSD is &#039;&#039;&#039;cni_epi&#039;&#039;&#039;.&lt;br /&gt;
* Slice order: The slices are acquired interleaved by default, with odd slices first, then even slices. Be sure to take this into account when doing slice timing correction. You can use the &amp;quot;TriggerTime&amp;quot; field in the DICOM head to confirm the slice acquisition timing. Also note that the time points at which slices are acquired are equally spaced within the TR.&lt;br /&gt;
* Triggering: There is a UserCV to control the acquisition trigger. You can have no special triggering (scan starts when you hit &#039;Scan&#039;), external trigger to start the scan (see [[MR Hardware#Scan Triggers]] for details), or cardiac gating. &lt;br /&gt;
* Image reconstruction size: By default, the images are reconstructed at the native image size instead of being zero-padded up to the next higher power of two. This results in faster recons, smaller files, and no image interpolation, so it is generally preferred. But, if you want power-of-two image sizes, you can change this UserCV to get that behavior.&lt;br /&gt;
* Phase encoding gradient: To use FSL&#039;s TOPUP for EPI distortion correction, you need to acquire a pair of EPI scans with the same prescription except for the reversed phase encoding gradient polarity. There is a UserCV to control the PE polarity (called &amp;quot;pepolar&amp;quot; in GE&#039;s term). In most common cases, the phase encoding gradient is along AP/PA direction, and when pepolar = 0, the encoding goes from posterior to anterior (&amp;quot;j&amp;quot; in BIDS convension), and when pepolar = 1, the encoding goes from anterior to posterior (&amp;quot;j-&amp;quot; in BIDS convension).&lt;br /&gt;
&lt;br /&gt;
=== Arterial-Spin Labeling (ASL) ===&lt;br /&gt;
The newest ASL sequence from GE is a pseudo-continuous sequence called 3DASL. By default it is set to create a Cerebral Bloodflow (CBF) volume as a post-processing task (reported in ml/100gm/min). Separate from post-processing, the sequence produces 2 volumes, a perfusion-weighted (PW) volume and a PD volume. The PW volume is created from subtracting the tagged volume from the control volume during the scan sequence.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ASL-specific considerations&#039;&#039;&#039;:&lt;br /&gt;
* &#039;&#039;Post-Label Delay (PLD)&#039;&#039;: default is 2025ms&lt;br /&gt;
** This should be edited to reflect population being studied. Populations with faster heart rates (such as children) should have a shorter post-label delay (e.g. healthy teens can be successfully scanned at 1525ms)&lt;br /&gt;
** PLD is saved as inversion time (TI) in the dicom headers&lt;br /&gt;
* &#039;&#039;Labeling time (LT)&#039;&#039;: default is 1450ms&lt;br /&gt;
* &#039;&#039;Slice thickness&#039;&#039;: default is 4mm&lt;br /&gt;
** minimum is 2mm&lt;br /&gt;
* &#039;&#039;Spiral arms&#039;&#039;: default is 8&lt;br /&gt;
** This is most significant means of adjusting spatial resolution. More arms = better spatial resolution in each slice.&lt;br /&gt;
* &#039;&#039;Prescription&#039;&#039;: The inferior edge of the prescription box must align with the base of the cerebellum.  This ensure the labeling plane (which is just inferior to the prescription box) is aligned to tag the blood passing through the carotid arteries in the neck before entering the brain.&lt;br /&gt;
** It is very important that the subject&#039;s head is aligned straight in the scanner. Tilting can result in poor labeling or artifacts in the PW volume (and subsequently the CBF volume).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Processing ASL Data&#039;&#039;&#039;:&lt;br /&gt;
Analyses can be conducted on the CBF volume or on the  PW volume. The CBF volume already has CBF quantified (naturally) based on the below information. This volume can be spatially normalized and analyzed in a similar way as processed fMRI data.&lt;br /&gt;
&lt;br /&gt;
* Homogeneous blood/brain partition coefficient for water is 0.9 ml/g&lt;br /&gt;
* Labeling inversion efficiency is 80% for a 3T scanner&lt;br /&gt;
* T1 of blood is 1.6s at a 3T scanner&lt;br /&gt;
* Saturation time is 2s&lt;br /&gt;
* Overall efficiency is 0.6&lt;br /&gt;
* The PD volume is used as a reference image&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can quantify CBF yourself from the PW volume if you&#039;d like to use different parameters or would like to perform additional spatial/intensity corrections before CBF quantification.&lt;br /&gt;
&lt;br /&gt;
=== Additional ===&lt;br /&gt;
* [[media:Bob_spatialRes_111216.pdf|Slides on spatial resolution]] from CNI tutorial&lt;br /&gt;
* [[MR Signal Equations]]&lt;br /&gt;
&lt;br /&gt;
== Session Running Script ==&lt;br /&gt;
&lt;br /&gt;
We advise you to put together a session running script that outlines set up of the scanner and peripherals and positioning of and communications with the participant. You can find an example [[media:Session_Running_Script.pdf|here]] (courtesy of Nanna Notthoff, Carstensen Lab).&lt;br /&gt;
&lt;br /&gt;
== CNI&#039;s Quality Assurance protocol ==&lt;br /&gt;
Weekly QA scans include: &lt;br /&gt;
# BOLD EPI sequence (analyze mean and variance over time)&lt;br /&gt;
# DW EPI sequence (analyze eddy current distortion stability)&lt;br /&gt;
# Spiral field map (analyze long-term B0 stability)&lt;br /&gt;
All QA scans are done on the fBIRN agar phantom. The phantom is positioned in the same orientation with the same padding each week. The landmark must be set to the same. The Rx should be not touched (use the same stored Rx). We should do HO shim and set the shim VOI to exactly cover the sphere.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Protocols&amp;diff=59391</id>
		<title>MR Protocols</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Protocols&amp;diff=59391"/>
		<updated>2026-02-11T21:08:44Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Technical notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page offers advice about how to set up your scan protocols and save the information.  The wiki pages take you through the template protocols we think are most widely used. These protocols can be found on the the scanner console, saved under “CNI/head” within the protocol pool.&lt;br /&gt;
&lt;br /&gt;
Screenshots to remind you about how to set specific MRI protocols can be found on the page [[Setting up protocols page | Setting up protocols]]&lt;br /&gt;
&lt;br /&gt;
= General =&lt;br /&gt;
&lt;br /&gt;
== Setting up an MR scan protocol ==&lt;br /&gt;
A basic MR scan session usually starts with the following scans:&lt;br /&gt;
* &#039;&#039;&#039;Localizer&#039;&#039;&#039; - a 3-plane localizer or &#039;scout&#039; scan meant to find the subject&#039;s head. It is also be used for prescription for the subsequent scans. Doing some sort of localizer is necessary, and the &#039;3planeloc SSFSE&#039; (single shot fast spin echo) is the standard work-horse used by most CNI users.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Anatomical&#039;&#039;&#039; - usually a 3D T1-weighted scan at 0.9mm or 1mm isotropic resolution. It is essential for image alignment and anatomical analysis. More choices of anatomical scans are listed in the Anatomical imaging section.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Higher-order shim&#039;&#039;&#039; - measures the magnetic field inhomogeneity and corrects it with polynomial gradients up to 2nd order. It should be run before fieldmap, fMRI or diffusion scans.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Field map&#039;&#039;&#039; - measures the magnetic field inhomogeneity that cannot be corrected by the shim and saves the inhomogeneity in a field map. It should be run immediately before or after the fMRI scan.&lt;br /&gt;
&lt;br /&gt;
At this point you will want to add a number of &#039;&#039;&#039;functional&#039;&#039;&#039; scans, &#039;&#039;&#039;diffusion&#039;&#039;&#039; scans or other type of scans based on your experiment. In the [[#MRI Protocol Templates | next section]] we describe templates for different categories of MRI protocols. The protocol templates are organized by category.  One set is based on conventional multislice (2D) or 3D methods, a second set is based on the new simultaneous multislice (SMS) protocols (also called mux or multiband), and a third set are some special methods (spectroscopy and qMRI).&lt;br /&gt;
&lt;br /&gt;
You can get help in customizing the parameters from the CNI staff (ask Hua, Adam, or Laima).&lt;br /&gt;
&lt;br /&gt;
== Saving your protocol parameters ==&lt;br /&gt;
=== Save screen-shots ===&lt;br /&gt;
At the GE console, you can save screen shots of the GE interface to show the main parameters that you have set in a protocol. Just get to the screen that you want to save, then press the &#039;Prnt Scrn&#039; button on the keyboard. A little dialog will show up. You can choose to print, which will print on paper to the Laser printer in the control room. However, we strongly suggest that you save some trees and the toxic ink chemicals by saving a digital copy instead. To do this, type ina reasonable name in the filename field (default is &#039;screen&#039;) and hit the &#039;PNG&amp;quot; button. A PNG image will then magically appear in the &#039;screensaves&#039; folder on the linux machine next to the console (cnirt). From there, you can email the images to yourself. Or, even better, create your own personal wiki page here that describes your protocol (just log in with your SUNet ID) and put the images in there. Then, you will always have them available when needed! THis is also a great way to share protocol information with your colleagues.&lt;br /&gt;
=== Get a PDF of all protocol parameters ===&lt;br /&gt;
&lt;br /&gt;
You can get a complete PDF of all your protocol info with a few clicks of the mouse. It&#039;s not quite as easy as a screensave, so we outline the procedure here. Note - There is a change on figure 4 - The pdf file will now appear with some viewing options at the top of the pdf file. By clicking on the 4th option from the right (a square with three parallel lines) the drop down menu will display a &amp;quot;save a copy&amp;quot; option which will result in the pdf being saved in the screensaves folder on the Linux machine (voxel2) next to the scanner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=5&amp;gt;&lt;br /&gt;
Image:Export_protocol_button.png|Click the &amp;quot;Protocol Exchange&amp;quot; button under the Image Management tab.&lt;br /&gt;
Image:ExportMode.png|Select &amp;quot;Export Mode&amp;quot; and click OK in the dialog that comes up.&lt;br /&gt;
Image:ProtocolSelection.png|Find your protocol in the next dialog, drag it to the &amp;quot;Protocol Selection&amp;quot; panel, and make sure it is selected. Then press the &amp;quot;preview&amp;quot; button.&lt;br /&gt;
Image:SavePdf.png|You&#039;ll then see the PDF of your protocol. Right-click anywhere within the pdf and select &amp;quot;Save as...&amp;quot; from the drop-down menu.&lt;br /&gt;
Image:SaveAs.png|Type the path and filename. Be sure that the path is /usr/g/mrraw/screensaves/ so it&#039;ll magically appear in the &amp;quot;screensaves&amp;quot; directory on the linux box.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MRI protocol templates ==&lt;br /&gt;
The CNI has stored example protocols for anatomical, fMRI, diffusion, spectroscopy and quantitative MR scans (named as &amp;quot;CNI Examples&amp;quot;, stored under &amp;quot;CNI / Head&amp;quot;). Depending on the user&#039;s needs, there are several ways to run a scan session. The stored protocols are meant to be used as a &#039;menu&#039; from which you select the sequence that you want, based on your needs. While there are many variations stored there, here we just highlight a couple of the most common versions. A detailed list of all parameters for all scans can be found in the PDF files for each protocol. Some suggested ways of selecting from and set up these scans for your own scan session are described below.&lt;br /&gt;
&lt;br /&gt;
== Moving protocols from CNI to Lucas ==&lt;br /&gt;
If you plan to transfer scan protocols from the CNI to Lucas Center, please contact Hua and follow the steps below:&lt;br /&gt;
&lt;br /&gt;
* Let CNI staff know the (a) name of the protocol(s) to transfer and (b) which Lucas scanner. It would be useful if you could include a list of scans in your protocol too. We will help transfer the protocol files over to Lucas. &lt;br /&gt;
&lt;br /&gt;
* If your protocol contains pulse sequences provided by researchers outside CNI, then please let them know about the transfer so that they can prepare the sequences for you at Lucas. For example, if you run any spectroscopy sequences, then please let [mailto:mgu@stanford.edu Dr Meng Gu] know about the transfer plan. &lt;br /&gt;
&lt;br /&gt;
* Follow up with Lucas staff about setting up peripheral devices, e.g. response box, scanner trigger, visual display, physio recording, etc. The visual display at both Lucas scanners uses a projector and a screen mounted on the head coil. Another thing to keep in mind is that &#039;&#039;&#039;Lucas scanners do not send out scan triggers in the same way as the CNI scanner does&#039;&#039;&#039;, so it’s preferred to let the stimulation program trigger the scanner by writing out a byte through the usb-serial port. Lucas also provides their version of the functional sequences that send out triggers to the computer, if you prefer to let the scanner trigger your stimulation. For more details please seek advice from the Lucas staff. &lt;br /&gt;
&lt;br /&gt;
* The Lucas center has its own instance of Flywheel [http://lucascenter.flywheel.io lucascenter.flywheel.io]. &#039;&#039;&#039;Prior to scanning at Lucas, please be sure to coordinate with Tom Brosnan, or [mailto:lmperry@stanford.edu Michael Perry], to have your group’s accounts and projects configured.&#039;&#039;&#039; Michael can help you make sure your projects have the correct gear rules configured to process your data, which is an important consideration to maintain consistency across the two sites. As a good first approximation you can map existing project gear rules at CNI to your new projects at Lucas. Our goal is to make the same gears available at Lucas as are available at CNI. This is a work in progress.&lt;br /&gt;
&lt;br /&gt;
= Conventional imaging =&lt;br /&gt;
&lt;br /&gt;
== Anatomical imaging == &lt;br /&gt;
&lt;br /&gt;
===T1 weighted ===&lt;br /&gt;
All the suggested T1-weighted scans use GE&#039;s &amp;quot;BRAVO&amp;quot; sequence. It is an IR-prep, fast SPGR sequence with parameters tuned to optimize brain tissue contrast. Unless you have good reason to do so, you probably don&#039;t want to play with any parameters other than slice orientation, voxel size, and bandwidth. And for those, most users just pick one of the suggested configurations:&lt;br /&gt;
&lt;br /&gt;
* T1w 1mm ax (3:22): T1-weighted, 1mm^3 voxel size, 3D Bravo, axial slices. A single scan gives good signal-to-noise quality. If you just want a basic, fast, axial T1 weighted scan, go with this.  &lt;br /&gt;
&lt;br /&gt;
* T1w 1mm sag (3:43): T1-weighted, 1mm^3 voxel size, 3D Bravo, sagittal slices. A single scan gives good signal-to-noise quality. This is similar to the 1mm axial, but with sagittal slice orientation. Compared to axial, this orientation is slightly less efficient because you need a full phase FOV, but sagittal slices usually do better than axial with artifacts from large blood vessels (e.g., carotid artifacts land in non-brain regions rather than the temporal lobes) and with fat-shift artifacts, because the shifted scalp signal usually misses the brain while with axial it can sometimes overlap the occipital lobe gray matter, causing tissue segmentation problems.&lt;br /&gt;
&lt;br /&gt;
* T1w 0.9mm sag (4:49) T1-weighted, 0.9mm^3 voxel size, 3D Bravo, sagittal slices. A single scan gives good signal-to-noise quality. As with the above scan, but a little higher spatial resolution. If you can afford to take 5 minutes for a T1 scan, this one is a great choice. This is our work-horse. Note: to get true .9 isotropic voxels, enter &#039;23.04&#039; for the FOV. The scanner GUI will display this as &#039;23.0&#039;, but will store and use the full-precision that you type!&lt;br /&gt;
&lt;br /&gt;
* T1w 0.8mm sag (4:57 X 2): T1-weighted, 0.8mm^3 voxels, 3D Bravo, sagittal slices. Two scans (averaged in post-processing) are advised for good signal-to-noise quality. If you want to get better resolution, do two of these.&lt;br /&gt;
&lt;br /&gt;
* T1w 0.7mm sag (5:41 X 3): T1-weighted, 0.7mm^3 voxels, 3D Bravo, sagittal slices. 3-4 scans (averaged in post-processing) are advised for good signal-to-noise quality. If you can afford the time, and make use of high-quality anatomical images, this is the sequence to use.&lt;br /&gt;
&lt;br /&gt;
===T2 weighted ===&lt;br /&gt;
&lt;br /&gt;
* 3D T2 (5:03): T2-weighted, 0.8mm^3 voxel size, 3D Cube T2, sagittal slices. A single scan gives good signal-to-noise quality. &lt;br /&gt;
&lt;br /&gt;
* 3D T2 FLAIR (6:17): T2-weighted, 1 mm^3 voxel size, 3D Cube T2, sagittal slices. An additional inversion-recovery pulse is applied in the 3D T2 CUBE sequence to suppress the CSF signal in the T2 weighted images.&lt;br /&gt;
&lt;br /&gt;
* 3D T2 PROMO (5:42): T2-weighted, 0.8mm^3 voxel size, 3D Cube T2, sagittal slices. PROMO (PROspective MOtion correction) adjusts the scan parameters during the scan to prospectively correct for patient motion and thus reducing the image artifacts. &lt;br /&gt;
&lt;br /&gt;
=== T2w/PDw ===&lt;br /&gt;
&lt;br /&gt;
2D T2w/PDw FSE (4:25): A standard 2D T2-weighted scan. You also get a bonus proton-density scan. Note that the two datasets will be interleaved; you&#039;ll want to separate them in post-processing.&lt;br /&gt;
&lt;br /&gt;
=== Technical Notes ===&lt;br /&gt;
&lt;br /&gt;
In general, using a higher pixel bandwidth can help reduce chemical shift effects that push the fat signal from the scalp into the brain.&lt;br /&gt;
&lt;br /&gt;
The 3D Geometry Correction option uses a 3D correction for gradient non-linearity, over the 2D correction that is performed when the option is not checked. By including the slice direction in the correction, the resulting images are closer to geometric truth. The model used to represent gradient nonlinearity is the same as the 2D correction (&amp;quot;gradwarp&amp;quot;) and it uses the same cubic interpolation function as the 2D correction.&lt;br /&gt;
&lt;br /&gt;
== Functional imaging ==&lt;br /&gt;
&lt;br /&gt;
=== BOLD EPI (Full brain) ===&lt;br /&gt;
&lt;br /&gt;
BOLD EPI 2.9mm 2sec: gradient echo EPI, 2.9mm^3 voxel size, 45 slices (~13 cm), TR/TE 2s/30ms, 2x in-plane acceleration. This sequence gives you full coverage of the brain. The 2x in-plane acceleration reduces the EPI distortion. This is a standard sequence for fMRI scans.&lt;br /&gt;
&lt;br /&gt;
=== BOLD EPI (High resolution, partial brain) ===&lt;br /&gt;
&lt;br /&gt;
BOLD EPI 1.8mm 2sec (partial coverage): gradient echo EPI, 1.8mm^3 voxel size, 25 slices (~4.5 cm), TR/TE 2s/30ms, 2x in-plane acceleration. This sequence gives you partial coverage of the brain at a higher resolution. It is a good choice if you are interested in a particular part of the brain.&lt;br /&gt;
&lt;br /&gt;
===Technical Notes ===&lt;br /&gt;
If your protocol has multiple long-duration functional scans, you may consider doing additional field map measurements between the functional scans to access any field drift. See the [[Improving EPI]] page for information on fixing some common image problems with EPI images.&lt;br /&gt;
&lt;br /&gt;
There is a field map template protocol within the CNI/Head/CNI Example fMRI: Spiral fieldmap (0:27): 2D spiral, 1.75 x 1.75 x 2mm^3 voxel size. Copy the slice coverage of the BOLD scan. This scan generates a B0 field map in Hz (along with a magnitude image).&lt;br /&gt;
&lt;br /&gt;
The optimal echo time (TE) for BOLD fMRI at 3T is 30ms, where the difference in T2* decay of oxy/deoxy hemoglobin gives the highest contrast in the measured MR signals between the oxy/deoxy-genated blood.&lt;br /&gt;
&lt;br /&gt;
When doing BOLD fMRI, we prefer reading out the data at the optimal echo time quickly. When the TR (the repetition time) is shorter than the longitudinal relaxation time (T1) of the tissue of interest, we want to adjust the flip angle to optimize the SNR by maximizing the magnetization recovery along the z-axis (T1) during successive excitations of the same tissue. The optimal flip-angle is found by the Ernst equation:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;flip-angle = acos(exp(-TR/T1)) &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[Note: this formula will return values in radians, which then need to be converted to degrees. Alternatively, if using Matlab, use the acosd function which will return degrees.]&lt;br /&gt;
&lt;br /&gt;
* A typical T1 value for gray matter is (3T): 1.33 seconds (Kruger, et al, 2001). (At 1.5T, it is closer to 0.9 seconds.) &lt;br /&gt;
&lt;br /&gt;
*Or use the following values for typical TRs at 3T:&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: right&amp;quot;| &#039;&#039;&#039;TR (s):&#039;&#039;&#039;&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 1&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 1.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 2.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 3&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 3.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 4&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 6&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 7&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: right&amp;quot;| &#039;&#039;&#039;flip (deg):&#039;&#039;&#039;&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 61.9&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 71.1&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 77.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 81.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 84.0&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 85.9&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 87.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 88.7&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 89.4&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 89.7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Diffusion weighted imaging ==&lt;br /&gt;
&lt;br /&gt;
=== DTI ===&lt;br /&gt;
* DTI 2mm b1000 60dir (9:21): 2mm^2 voxel size, 60-70 axial slices, b-value 1000, 60 diffusion directions. &lt;br /&gt;
&lt;br /&gt;
=== HARDI ===&lt;br /&gt;
* DTI 2mm b2500 96dir (16:58): 2mm^2 voxel size, 60-70 axial slices, b-value 2500, 96 diffusion directions. &lt;br /&gt;
If you are pressed for time, you can drop the b-value to 2000 and/or reduce the number of directions to 80:&lt;br /&gt;
* DTI 2mm b2000 96dir (16:26): 2mm^2 voxel size, 60-70 axial slices, b-value 2000, 96 diffusion directions. &lt;br /&gt;
* DTI 2mm b2000 80dir (12:37): 2mm^2 voxel size, 60-70 axial slices, b-value 2000, 80 diffusion directions.&lt;br /&gt;
&lt;br /&gt;
=== Technical Notes ===&lt;br /&gt;
Diffusion imaging at the CNI uses a modified version of GE&#039;s DW-EPI sequence. The sequence was modified so that for dual-spin-echo scans, the polarity of the second 180 degree pulse is inverted relative to the first 180. This causes off-resonance signal from fat to get defocused and thus help reduce fat-shift artifacts (See Sarlls et. al. Robust fat suppression at 3T in&lt;br /&gt;
high-resolution diffusion-weighted single-shot echo-planar imaging of human brain. MRM 2011, PubMed PMID: [http://www.ncbi.nlm.nih.gov/pubmed/21604298 21604298] and Reese et. al. Reduction of eddy-current-induced distortion in diffusion MRI using a twice-refocused spin echo. MRM 2003, PubMed PMID: [http://www.ncbi.nlm.nih.gov/pubmed/12509835 12509835]).&lt;br /&gt;
&lt;br /&gt;
To decide on an optimal High Angular Resolution Diffusion Imaging (HARDI) acquisition protocol, see:&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/19603409 White and Dale (2009)] Optimal diffusion MRI acquisition for fiber orientation density estimation: an analytic approach. HBM. (Calculated optimal b-values for maximum FOD estimation efficiency with SH expansion orders of L = 2, 4, 6, and 8 to be approximately b = 1,500, 3,000, 4,600, and 6,200 s/mm^2; demonstrated how scanner-specific hardware limitations generally lead to optimal b-values that are slightly lower than the ideal b-values.)&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/18583153 Tournier et al. (2008)] Resolving crossing fibres using constrained spherical deconvolution: validation using diffusion-weighted imaging phantom data. NeuroImage. (For a 45 degrees crossing, the minimum b-value required to resolve the fibre orientations was ... 2000 s/mm^2 for CSD, and 1000 s/mm^2 for super-CSD.)&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/17379540 Tournier et al. (2007)] Robust determination of the fibre orientation distribution in diffusion MRI: non-negativity constrained super-resolved spherical deconvolution. NeuroImage.&lt;br /&gt;
&lt;br /&gt;
HARDI data analysis tools include Camino, dipy, mrTrix etc.&lt;br /&gt;
&lt;br /&gt;
We use a modified version of the stock GE DWI-EPI pulse sequence. The resulting dicoms contain the diffusion parameters in these fields:&lt;br /&gt;
* b-value (in sec/mm^2): 0043 1039 (GEMS_PARMS_01 block, item 1039)&lt;br /&gt;
* gradient direction: [0019 10bb, 0019 10bc, 0019 10bd] (GEMS_ACQU_01 block, items 10bb - 10bd)&lt;br /&gt;
In mrTrix (mapper.cpp), the following code is used to convert the dicom gradient values to the saved gradient directions:&lt;br /&gt;
&lt;br /&gt;
 // M is the image transform&lt;br /&gt;
 M(0,0) = -image.orientation_x[0];&lt;br /&gt;
 M(1,0) = -image.orientation_x[1];&lt;br /&gt;
 M(2,0) =  image.orientation_x[2];&lt;br /&gt;
 M(0,1) = -image.orientation_y[0];&lt;br /&gt;
 M(1,1) = -image.orientation_y[1];&lt;br /&gt;
 M(2,1) =  image.orientation_y[2];&lt;br /&gt;
 M(0,2) = -image.orientation_z[0];&lt;br /&gt;
 M(1,2) = -image.orientation_z[1];&lt;br /&gt;
 M(2,2) =  image.orientation_z[2];&lt;br /&gt;
 M(0,3) = -image.position_vector[0];&lt;br /&gt;
 M(1,3) = -image.position_vector[1];&lt;br /&gt;
 M(2,3) =  image.position_vector[2];&lt;br /&gt;
 M(3,0) = 0.0; M(3,1) = 0.0; M(3,2) = 0.0; M(3,3) = 1.0;&lt;br /&gt;
 H.DW_scheme(s, 0) = M(0,0)*d[0] + M(0,1)*d[1] - M(0,2)*d[2];&lt;br /&gt;
 H.DW_scheme(s, 1) = M(1,0)*d[0] + M(1,1)*d[1] - M(1,2)*d[2];&lt;br /&gt;
 H.DW_scheme(s, 2) = M(2,0)*d[0] + M(2,1)*d[1] - M(2,2)*d[2];&lt;br /&gt;
&lt;br /&gt;
If you get the data from the CNI Neurobiological Image Management System (NIMS), then the b-values and b-vectors have already been extracted for you and are provided along with the NIFTI file containing your data. These three files (the NIFTI, bvals, and bvecs files) can be send directly into most diffusion data analysis packages, such as the Stanford Vita Lab [[http://vistalab.stanford.edu/newlm/index.php/MrDiffusion mrDiffusion]] or FSL&#039;s [[http://www.fmrib.ox.ac.uk/fsl/fdt/index.html FDT]]. The b-values file contains a set of numbers (one for each acquired volume) that describe the b-value of the corresponding volume. The b-vecs file contains a triplet of numbers for each acquired volume, describing the diffusion-weighting direction for the corresponding volume. E.g., if you run our 60-direction scan, you will get 6 non-DW volumes followed by 60-DW volumes. Thus, you nifti file will contain 66 volumes. The b-vals file will contain 66 numbers (six 0&#039;s, fllowed by 60 1000&#039;s) and the b-vecs files will contain 66 triplets describing the DW directions for each volume (the triplets for the first 6 non-DW volumes are meaningless and can be ignored).&lt;br /&gt;
&lt;br /&gt;
=Simultaneous Multi-Slice (SMS)=&lt;br /&gt;
The CNI, in collaboration with GE, implemented [http://www.sciencedirect.com/science/article/pii/S1090780713000311 simultaneous multi-slice EPI] (also known as multiband EPI). GE has integrated the SMS EPI into its product software platform, and since CNI&#039;s scanner upgrade to the UHP system, the SMS sequence is available as part of the GE product sequences, called the Hyperband. The Hyperband option is available for both BOLD EPI and diffusion EPI. &lt;br /&gt;
&lt;br /&gt;
Previously CNI has provided the SMS sequence using our research PSD, the one we referred to as the &amp;quot;mux&amp;quot; sequence. We recommend everyone who has been using the &amp;quot;mux&amp;quot; sequence to transition to the Hyperband sequence. For a comparison of features and performances between the &amp;quot;mux&amp;quot; and Hyperband sequence, please see this CNI blog [http://cni.stanford.edu/hyperband-transition/ Hyperband transition]. More information about the legacy &amp;quot;mux&amp;quot; sequence is described on the [[MUX EPI]] page. &lt;br /&gt;
&lt;br /&gt;
== SMS fMRI ==&lt;br /&gt;
The Hyperband sequence uses a calibration process that is integrated in the prescan. It is not necessary to set up a separate calibration scan or account for additional calibration volumes in the EPI time series. The calibration data is not saved in the final images. By default all the volumes in the EPI time series are reconstructed and saved in the final images, so the number of volumes in NIFTI is exactly the same amount as specified in the protocol (in the Multi-Phase page). However, the first few volumes in the time series may have different intensity because the spin magnetization has not yet reached steady state. In the BOLD analysis it may be necessary to discard the first few volumes in order to get to the steady state. Alternatively, there is an option in the Hyperband sequence to allow users to specify a number of dummy volumes, in which case the scanner will not reconstruct the first few volumes, but the scan timing is still the same, i.e. data acquisition starts right after the scan trigger. &lt;br /&gt;
&lt;br /&gt;
=== BOLD EPI ===&lt;br /&gt;
* Hyperband 6, voxel size 2.4mm^3, FOV 21.6cm, number of slices 60, TR 710ms (scan protocol in the Connectome project)&lt;br /&gt;
* Hyperband 6, voxel size 1.8mm^3, FOV 23.0cm, number of slices 81, TR 1386ms&lt;br /&gt;
* Hyperband 8, voxel size 3.0mm^3, FOV 22.2cm, number of slices 48, TR 415ms&lt;br /&gt;
* Hyperband 8, voxel size 2.0mm^3, FOV 22.0cm, number of slices 72, TR 760ms&lt;br /&gt;
&lt;br /&gt;
=== Multi-echo EPI ===&lt;br /&gt;
* Hyperband 3, 2x in-plane acceleration, 3 EPI echoes, voxel size 2.8mm^3, FOV 22.4cm, number of slices 51, TR 1.49s, shortest TE 14.6ms, TE interval 23ms&lt;br /&gt;
&lt;br /&gt;
== SMS DWI ==&lt;br /&gt;
For SMS diffusion scans we generally recommend 2x to 3x slice acceleration, which will bring down the scan time by 2 to 3 times while maintaining the SNR of the diffusion weighted images. Partial Fourier acquisition is usually used to keep the TE as short as possible. The in-plane acceleration in addition to the slice acceleration is not always recommended because even though it can further reduce the EPI distortion but the SNR loss can be harmful for diffusion model fitting.&lt;br /&gt;
&lt;br /&gt;
Diffusion Spectrum Imaging (DSI) ([http://onlinelibrary.wiley.com/doi/10.1002/mrm.20642/full Magn. Reson. Med., 2005, 54: 1377–1386]) and multi-shell diffusion ([http://onlinelibrary.wiley.com/doi/10.1002/mrm.24736/full Magn. Reson. Med., 2013, 69: 1534–1540]) scans can be realized by designing gradient tables that specify direction and amplitude of the b-vectors. We set up a several customized gradient tables that are optimized for DTI, HARDI, 2 or 3-shell diffusion scans. Consult with us if you would like to set up your own diffusion gradient scheme. &lt;br /&gt;
&lt;br /&gt;
=== HARDI ===&lt;br /&gt;
* DTI 80dir 2mm (4:45): SMS factor 3, axial slices, 2mm^3 voxel size, number of slices 69, b-value 2500, 80 diffusion directions, 8 b=0 images &lt;br /&gt;
* DTI 96dir 2mm (5:50): SMS factor 3, axial slices, 2mm^3 voxel size, number of slices 69, b-value 3000, 96 diffusion directions, 10 b=0 images&lt;br /&gt;
&lt;br /&gt;
=== Multi-shell diffusion ===&lt;br /&gt;
* DTI g79/81 b3k 2-shell (4:33+4:40): 2-shell with 10 b=0 images, 75 directions at b=1500, 75 directions at b=3000. SMS factor 4, voxel size 1.5mm^3, number of slices 84 (scan protocol in the Connectome project)&lt;br /&gt;
* DTI g103 b2k 2-shell (4:50): 2-shell with 9 b=0 images, 30 directions at b=700, 64 directions at b=2000. SMS factor 3, 2x in-plane acceleration, voxel size 2mm^3, number of slices 75&lt;br /&gt;
* DTI g150 b3k 3-shell (6:15): 3-shell with 10 b=0 images, 30 direction at b=1000, 45 direction at b=2000, 65 direction at b=3000. SMS factor 3, 2x in-plane acceleration, voxel size 2mm^3, number of slices 63&lt;br /&gt;
&lt;br /&gt;
= Scientific Protocols for Tissue and Chemistry =&lt;br /&gt;
&lt;br /&gt;
== Quantitative MR ==&lt;br /&gt;
These template protocols make quantitative measurements of MR parameters (e.g. T1 in seconds, and proton density (PD) as a fraction of the voxel) of brain tissue.  Some 1 - PD is called the macromolecular tissue volume.&lt;br /&gt;
&lt;br /&gt;
=== T1 map ===&lt;br /&gt;
The SS-SMS T1 scan is a quantitative T1 scan using slice-shuffled inversion-recovery SMS EPI sequence. This scan gives you a T1 measurement at 2mm isotropic resolution in a minimum time. It uses in-plane acceleration therefore it&#039;s not necessary to run a separate pe1 scan for distortion correction unless you have enough time. For processing the NIFTI file from either pe0 or pe1 scan to get the T1 map, you can use [http://github.com/cni/t1fit/blob/master/t1_fitter.py this Python script]. If you acquired both pe0 and pe1, then you can use [http://github.com/cni/t1fit/blob/master/t1fit_unwarp.py this script] to process both NIFTI files to get the T1 map -- this includes an extra step for distortion correction using FSL&#039;s TOPUP before fitting the T1 relaxation. &lt;br /&gt;
&lt;br /&gt;
* SS-SMS T1 pe0 (pe1) (2:03): Gradient echo IR EPI, 2mm^3 voxel size, number of muxed slices 25 (75 unmuxed slices, 15cm), SMS factor 3, 2x in-plane acceleration, TR 3s.&lt;br /&gt;
&lt;br /&gt;
=== T1 map + PD map ===&lt;br /&gt;
The four SPGR scans, together with the four IR EPI scans, are set up for calculating T1 and PD maps using the [http://github.com/mezera/mrQ mrQ analysis package]. If you want a high resolution T1 map, or if you are interested in getting PD in addition to T1, then you should use this group of scans. &lt;br /&gt;
&lt;br /&gt;
* SPGR 1mm 30(4/10/20) deg (5:19 X 4): 3D SPGR, 1mm^3 voxel size, flip angle 30/4/10/20. The first scan should be run with Auto Prescan + Scan, and the following three should be run using Manual Prescan (do not change any parameters) + Scan.&lt;br /&gt;
&lt;br /&gt;
* IR EPI TI=50(400/1200/2400) (1:15 X 4): Gradient echo IR EPI, 1.875 x 1.875 x 4mm^3 voxel size, 2x in-plane acceleration. The first scan should be run with Auto Prescan + Scan, and the following three should be run using Manual Prescan (do not change any parameters) + Scan.&lt;br /&gt;
&lt;br /&gt;
Note that you could also choose to use only the four IR EPI scans to get a quantitative T1 map at a lower resolution. The working principle and model fitting procedure is explained [http://www-mrsrl.stanford.edu/~jbarral/t1map.html here].&lt;br /&gt;
&lt;br /&gt;
== Spectroscopy ==&lt;br /&gt;
In-vivo spectroscopy sequences and analysis methods available and used at CNI are described [[GABA spectro | on this CNI spectroscopy page]].&lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
== Device specific processing ==&lt;br /&gt;
The [[GE Processing | GE processing]] includes various steps that can influence the signal-to-noise of your data.  We explain what we have learned about this and how to control it in this page.&lt;br /&gt;
&lt;br /&gt;
== Technical notes ==&lt;br /&gt;
* [[media:Bob_spatialRes_111216.pdf|Slides on spatial resolution]] from CNI tutorial&lt;br /&gt;
* [[MR Signal Equations]]&lt;br /&gt;
&lt;br /&gt;
== Session Running Script ==&lt;br /&gt;
&lt;br /&gt;
We advise you to put together a session running script that outlines set up of the scanner and peripherals and positioning of and communications with the participant. You can find an example [[media:Session_Running_Script.pdf|here]] (courtesy of Nanna Notthoff, Carstensen Lab).&lt;br /&gt;
&lt;br /&gt;
== CNI&#039;s Quality Assurance protocol ==&lt;br /&gt;
Weekly QA scans include: &lt;br /&gt;
# BOLD EPI sequence (analyze mean and variance over time)&lt;br /&gt;
# DW EPI sequence (analyze eddy current distortion stability)&lt;br /&gt;
# Spiral field map (analyze long-term B0 stability)&lt;br /&gt;
All QA scans are done on the fBIRN agar phantom. The phantom is positioned in the same orientation with the same padding each week. The landmark must be set to the same. The Rx should be not touched (use the same stored Rx). We should do HO shim and set the shim VOI to exactly cover the sphere.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MR_Protocols&amp;diff=59389</id>
		<title>MR Protocols</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MR_Protocols&amp;diff=59389"/>
		<updated>2026-02-11T21:04:40Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Additional information (deprecated) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page offers advice about how to set up your scan protocols and save the information.  The wiki pages take you through the template protocols we think are most widely used. These protocols can be found on the the scanner console, saved under “CNI/head” within the protocol pool.&lt;br /&gt;
&lt;br /&gt;
Screenshots to remind you about how to set specific MRI protocols can be found on the page [[Setting up protocols page | Setting up protocols]]&lt;br /&gt;
&lt;br /&gt;
= General =&lt;br /&gt;
&lt;br /&gt;
== Setting up an MR scan protocol ==&lt;br /&gt;
A basic MR scan session usually starts with the following scans:&lt;br /&gt;
* &#039;&#039;&#039;Localizer&#039;&#039;&#039; - a 3-plane localizer or &#039;scout&#039; scan meant to find the subject&#039;s head. It is also be used for prescription for the subsequent scans. Doing some sort of localizer is necessary, and the &#039;3planeloc SSFSE&#039; (single shot fast spin echo) is the standard work-horse used by most CNI users.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Anatomical&#039;&#039;&#039; - usually a 3D T1-weighted scan at 0.9mm or 1mm isotropic resolution. It is essential for image alignment and anatomical analysis. More choices of anatomical scans are listed in the Anatomical imaging section.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Higher-order shim&#039;&#039;&#039; - measures the magnetic field inhomogeneity and corrects it with polynomial gradients up to 2nd order. It should be run before fieldmap, fMRI or diffusion scans.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Field map&#039;&#039;&#039; - measures the magnetic field inhomogeneity that cannot be corrected by the shim and saves the inhomogeneity in a field map. It should be run immediately before or after the fMRI scan.&lt;br /&gt;
&lt;br /&gt;
At this point you will want to add a number of &#039;&#039;&#039;functional&#039;&#039;&#039; scans, &#039;&#039;&#039;diffusion&#039;&#039;&#039; scans or other type of scans based on your experiment. In the [[#MRI Protocol Templates | next section]] we describe templates for different categories of MRI protocols. The protocol templates are organized by category.  One set is based on conventional multislice (2D) or 3D methods, a second set is based on the new simultaneous multislice (SMS) protocols (also called mux or multiband), and a third set are some special methods (spectroscopy and qMRI).&lt;br /&gt;
&lt;br /&gt;
You can get help in customizing the parameters from the CNI staff (ask Hua, Adam, or Laima).&lt;br /&gt;
&lt;br /&gt;
== Saving your protocol parameters ==&lt;br /&gt;
=== Save screen-shots ===&lt;br /&gt;
At the GE console, you can save screen shots of the GE interface to show the main parameters that you have set in a protocol. Just get to the screen that you want to save, then press the &#039;Prnt Scrn&#039; button on the keyboard. A little dialog will show up. You can choose to print, which will print on paper to the Laser printer in the control room. However, we strongly suggest that you save some trees and the toxic ink chemicals by saving a digital copy instead. To do this, type ina reasonable name in the filename field (default is &#039;screen&#039;) and hit the &#039;PNG&amp;quot; button. A PNG image will then magically appear in the &#039;screensaves&#039; folder on the linux machine next to the console (cnirt). From there, you can email the images to yourself. Or, even better, create your own personal wiki page here that describes your protocol (just log in with your SUNet ID) and put the images in there. Then, you will always have them available when needed! THis is also a great way to share protocol information with your colleagues.&lt;br /&gt;
=== Get a PDF of all protocol parameters ===&lt;br /&gt;
&lt;br /&gt;
You can get a complete PDF of all your protocol info with a few clicks of the mouse. It&#039;s not quite as easy as a screensave, so we outline the procedure here. Note - There is a change on figure 4 - The pdf file will now appear with some viewing options at the top of the pdf file. By clicking on the 4th option from the right (a square with three parallel lines) the drop down menu will display a &amp;quot;save a copy&amp;quot; option which will result in the pdf being saved in the screensaves folder on the Linux machine (voxel2) next to the scanner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=5&amp;gt;&lt;br /&gt;
Image:Export_protocol_button.png|Click the &amp;quot;Protocol Exchange&amp;quot; button under the Image Management tab.&lt;br /&gt;
Image:ExportMode.png|Select &amp;quot;Export Mode&amp;quot; and click OK in the dialog that comes up.&lt;br /&gt;
Image:ProtocolSelection.png|Find your protocol in the next dialog, drag it to the &amp;quot;Protocol Selection&amp;quot; panel, and make sure it is selected. Then press the &amp;quot;preview&amp;quot; button.&lt;br /&gt;
Image:SavePdf.png|You&#039;ll then see the PDF of your protocol. Right-click anywhere within the pdf and select &amp;quot;Save as...&amp;quot; from the drop-down menu.&lt;br /&gt;
Image:SaveAs.png|Type the path and filename. Be sure that the path is /usr/g/mrraw/screensaves/ so it&#039;ll magically appear in the &amp;quot;screensaves&amp;quot; directory on the linux box.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MRI protocol templates ==&lt;br /&gt;
The CNI has stored example protocols for anatomical, fMRI, diffusion, spectroscopy and quantitative MR scans (named as &amp;quot;CNI Examples&amp;quot;, stored under &amp;quot;CNI / Head&amp;quot;). Depending on the user&#039;s needs, there are several ways to run a scan session. The stored protocols are meant to be used as a &#039;menu&#039; from which you select the sequence that you want, based on your needs. While there are many variations stored there, here we just highlight a couple of the most common versions. A detailed list of all parameters for all scans can be found in the PDF files for each protocol. Some suggested ways of selecting from and set up these scans for your own scan session are described below.&lt;br /&gt;
&lt;br /&gt;
== Moving protocols from CNI to Lucas ==&lt;br /&gt;
If you plan to transfer scan protocols from the CNI to Lucas Center, please contact Hua and follow the steps below:&lt;br /&gt;
&lt;br /&gt;
* Let CNI staff know the (a) name of the protocol(s) to transfer and (b) which Lucas scanner. It would be useful if you could include a list of scans in your protocol too. We will help transfer the protocol files over to Lucas. &lt;br /&gt;
&lt;br /&gt;
* If your protocol contains pulse sequences provided by researchers outside CNI, then please let them know about the transfer so that they can prepare the sequences for you at Lucas. For example, if you run any spectroscopy sequences, then please let [mailto:mgu@stanford.edu Dr Meng Gu] know about the transfer plan. &lt;br /&gt;
&lt;br /&gt;
* Follow up with Lucas staff about setting up peripheral devices, e.g. response box, scanner trigger, visual display, physio recording, etc. The visual display at both Lucas scanners uses a projector and a screen mounted on the head coil. Another thing to keep in mind is that &#039;&#039;&#039;Lucas scanners do not send out scan triggers in the same way as the CNI scanner does&#039;&#039;&#039;, so it’s preferred to let the stimulation program trigger the scanner by writing out a byte through the usb-serial port. Lucas also provides their version of the functional sequences that send out triggers to the computer, if you prefer to let the scanner trigger your stimulation. For more details please seek advice from the Lucas staff. &lt;br /&gt;
&lt;br /&gt;
* The Lucas center has its own instance of Flywheel [http://lucascenter.flywheel.io lucascenter.flywheel.io]. &#039;&#039;&#039;Prior to scanning at Lucas, please be sure to coordinate with Tom Brosnan, or [mailto:lmperry@stanford.edu Michael Perry], to have your group’s accounts and projects configured.&#039;&#039;&#039; Michael can help you make sure your projects have the correct gear rules configured to process your data, which is an important consideration to maintain consistency across the two sites. As a good first approximation you can map existing project gear rules at CNI to your new projects at Lucas. Our goal is to make the same gears available at Lucas as are available at CNI. This is a work in progress.&lt;br /&gt;
&lt;br /&gt;
= Conventional imaging =&lt;br /&gt;
&lt;br /&gt;
== Anatomical imaging == &lt;br /&gt;
&lt;br /&gt;
===T1 weighted ===&lt;br /&gt;
All the suggested T1-weighted scans use GE&#039;s &amp;quot;BRAVO&amp;quot; sequence. It is an IR-prep, fast SPGR sequence with parameters tuned to optimize brain tissue contrast. Unless you have good reason to do so, you probably don&#039;t want to play with any parameters other than slice orientation, voxel size, and bandwidth. And for those, most users just pick one of the suggested configurations:&lt;br /&gt;
&lt;br /&gt;
* T1w 1mm ax (3:22): T1-weighted, 1mm^3 voxel size, 3D Bravo, axial slices. A single scan gives good signal-to-noise quality. If you just want a basic, fast, axial T1 weighted scan, go with this.  &lt;br /&gt;
&lt;br /&gt;
* T1w 1mm sag (3:43): T1-weighted, 1mm^3 voxel size, 3D Bravo, sagittal slices. A single scan gives good signal-to-noise quality. This is similar to the 1mm axial, but with sagittal slice orientation. Compared to axial, this orientation is slightly less efficient because you need a full phase FOV, but sagittal slices usually do better than axial with artifacts from large blood vessels (e.g., carotid artifacts land in non-brain regions rather than the temporal lobes) and with fat-shift artifacts, because the shifted scalp signal usually misses the brain while with axial it can sometimes overlap the occipital lobe gray matter, causing tissue segmentation problems.&lt;br /&gt;
&lt;br /&gt;
* T1w 0.9mm sag (4:49) T1-weighted, 0.9mm^3 voxel size, 3D Bravo, sagittal slices. A single scan gives good signal-to-noise quality. As with the above scan, but a little higher spatial resolution. If you can afford to take 5 minutes for a T1 scan, this one is a great choice. This is our work-horse. Note: to get true .9 isotropic voxels, enter &#039;23.04&#039; for the FOV. The scanner GUI will display this as &#039;23.0&#039;, but will store and use the full-precision that you type!&lt;br /&gt;
&lt;br /&gt;
* T1w 0.8mm sag (4:57 X 2): T1-weighted, 0.8mm^3 voxels, 3D Bravo, sagittal slices. Two scans (averaged in post-processing) are advised for good signal-to-noise quality. If you want to get better resolution, do two of these.&lt;br /&gt;
&lt;br /&gt;
* T1w 0.7mm sag (5:41 X 3): T1-weighted, 0.7mm^3 voxels, 3D Bravo, sagittal slices. 3-4 scans (averaged in post-processing) are advised for good signal-to-noise quality. If you can afford the time, and make use of high-quality anatomical images, this is the sequence to use.&lt;br /&gt;
&lt;br /&gt;
===T2 weighted ===&lt;br /&gt;
&lt;br /&gt;
* 3D T2 (5:03): T2-weighted, 0.8mm^3 voxel size, 3D Cube T2, sagittal slices. A single scan gives good signal-to-noise quality. &lt;br /&gt;
&lt;br /&gt;
* 3D T2 FLAIR (6:17): T2-weighted, 1 mm^3 voxel size, 3D Cube T2, sagittal slices. An additional inversion-recovery pulse is applied in the 3D T2 CUBE sequence to suppress the CSF signal in the T2 weighted images.&lt;br /&gt;
&lt;br /&gt;
* 3D T2 PROMO (5:42): T2-weighted, 0.8mm^3 voxel size, 3D Cube T2, sagittal slices. PROMO (PROspective MOtion correction) adjusts the scan parameters during the scan to prospectively correct for patient motion and thus reducing the image artifacts. &lt;br /&gt;
&lt;br /&gt;
=== T2w/PDw ===&lt;br /&gt;
&lt;br /&gt;
2D T2w/PDw FSE (4:25): A standard 2D T2-weighted scan. You also get a bonus proton-density scan. Note that the two datasets will be interleaved; you&#039;ll want to separate them in post-processing.&lt;br /&gt;
&lt;br /&gt;
=== Technical Notes ===&lt;br /&gt;
&lt;br /&gt;
In general, using a higher pixel bandwidth can help reduce chemical shift effects that push the fat signal from the scalp into the brain.&lt;br /&gt;
&lt;br /&gt;
The 3D Geometry Correction option uses a 3D correction for gradient non-linearity, over the 2D correction that is performed when the option is not checked. By including the slice direction in the correction, the resulting images are closer to geometric truth. The model used to represent gradient nonlinearity is the same as the 2D correction (&amp;quot;gradwarp&amp;quot;) and it uses the same cubic interpolation function as the 2D correction.&lt;br /&gt;
&lt;br /&gt;
== Functional imaging ==&lt;br /&gt;
&lt;br /&gt;
=== BOLD EPI (Full brain) ===&lt;br /&gt;
&lt;br /&gt;
BOLD EPI 2.9mm 2sec: gradient echo EPI, 2.9mm^3 voxel size, 45 slices (~13 cm), TR/TE 2s/30ms, 2x in-plane acceleration. This sequence gives you full coverage of the brain. The 2x in-plane acceleration reduces the EPI distortion. This is a standard sequence for fMRI scans.&lt;br /&gt;
&lt;br /&gt;
=== BOLD EPI (High resolution, partial brain) ===&lt;br /&gt;
&lt;br /&gt;
BOLD EPI 1.8mm 2sec (partial coverage): gradient echo EPI, 1.8mm^3 voxel size, 25 slices (~4.5 cm), TR/TE 2s/30ms, 2x in-plane acceleration. This sequence gives you partial coverage of the brain at a higher resolution. It is a good choice if you are interested in a particular part of the brain.&lt;br /&gt;
&lt;br /&gt;
===Technical Notes ===&lt;br /&gt;
If your protocol has multiple long-duration functional scans, you may consider doing additional field map measurements between the functional scans to access any field drift. See the [[Improving EPI]] page for information on fixing some common image problems with EPI images.&lt;br /&gt;
&lt;br /&gt;
There is a field map template protocol within the CNI/Head/CNI Example fMRI: Spiral fieldmap (0:27): 2D spiral, 1.75 x 1.75 x 2mm^3 voxel size. Copy the slice coverage of the BOLD scan. This scan generates a B0 field map in Hz (along with a magnitude image).&lt;br /&gt;
&lt;br /&gt;
The optimal echo time (TE) for BOLD fMRI at 3T is 30ms, where the difference in T2* decay of oxy/deoxy hemoglobin gives the highest contrast in the measured MR signals between the oxy/deoxy-genated blood.&lt;br /&gt;
&lt;br /&gt;
When doing BOLD fMRI, we prefer reading out the data at the optimal echo time quickly. When the TR (the repetition time) is shorter than the longitudinal relaxation time (T1) of the tissue of interest, we want to adjust the flip angle to optimize the SNR by maximizing the magnetization recovery along the z-axis (T1) during successive excitations of the same tissue. The optimal flip-angle is found by the Ernst equation:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;flip-angle = acos(exp(-TR/T1)) &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[Note: this formula will return values in radians, which then need to be converted to degrees. Alternatively, if using Matlab, use the acosd function which will return degrees.]&lt;br /&gt;
&lt;br /&gt;
* A typical T1 value for gray matter is (3T): 1.33 seconds (Kruger, et al, 2001). (At 1.5T, it is closer to 0.9 seconds.) &lt;br /&gt;
&lt;br /&gt;
*Or use the following values for typical TRs at 3T:&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: right&amp;quot;| &#039;&#039;&#039;TR (s):&#039;&#039;&#039;&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 1&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 1.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 2.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 3&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 3.5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 4&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 5&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 6&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 7&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: right&amp;quot;| &#039;&#039;&#039;flip (deg):&#039;&#039;&#039;&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 61.9&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 71.1&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 77.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 81.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 84.0&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 85.9&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 87.2&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 88.7&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 89.4&lt;br /&gt;
|style=&amp;quot;border-style: solid; border-width: 1px; text-align: center&amp;quot;| 89.7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Diffusion weighted imaging ==&lt;br /&gt;
&lt;br /&gt;
=== DTI ===&lt;br /&gt;
* DTI 2mm b1000 60dir (9:21): 2mm^2 voxel size, 60-70 axial slices, b-value 1000, 60 diffusion directions. &lt;br /&gt;
&lt;br /&gt;
=== HARDI ===&lt;br /&gt;
* DTI 2mm b2500 96dir (16:58): 2mm^2 voxel size, 60-70 axial slices, b-value 2500, 96 diffusion directions. &lt;br /&gt;
If you are pressed for time, you can drop the b-value to 2000 and/or reduce the number of directions to 80:&lt;br /&gt;
* DTI 2mm b2000 96dir (16:26): 2mm^2 voxel size, 60-70 axial slices, b-value 2000, 96 diffusion directions. &lt;br /&gt;
* DTI 2mm b2000 80dir (12:37): 2mm^2 voxel size, 60-70 axial slices, b-value 2000, 80 diffusion directions.&lt;br /&gt;
&lt;br /&gt;
=== Technical Notes ===&lt;br /&gt;
Diffusion imaging at the CNI uses a modified version of GE&#039;s DW-EPI sequence. The sequence was modified so that for dual-spin-echo scans, the polarity of the second 180 degree pulse is inverted relative to the first 180. This causes off-resonance signal from fat to get defocused and thus help reduce fat-shift artifacts (See Sarlls et. al. Robust fat suppression at 3T in&lt;br /&gt;
high-resolution diffusion-weighted single-shot echo-planar imaging of human brain. MRM 2011, PubMed PMID: [http://www.ncbi.nlm.nih.gov/pubmed/21604298 21604298] and Reese et. al. Reduction of eddy-current-induced distortion in diffusion MRI using a twice-refocused spin echo. MRM 2003, PubMed PMID: [http://www.ncbi.nlm.nih.gov/pubmed/12509835 12509835]).&lt;br /&gt;
&lt;br /&gt;
To decide on an optimal High Angular Resolution Diffusion Imaging (HARDI) acquisition protocol, see:&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/19603409 White and Dale (2009)] Optimal diffusion MRI acquisition for fiber orientation density estimation: an analytic approach. HBM. (Calculated optimal b-values for maximum FOD estimation efficiency with SH expansion orders of L = 2, 4, 6, and 8 to be approximately b = 1,500, 3,000, 4,600, and 6,200 s/mm^2; demonstrated how scanner-specific hardware limitations generally lead to optimal b-values that are slightly lower than the ideal b-values.)&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/18583153 Tournier et al. (2008)] Resolving crossing fibres using constrained spherical deconvolution: validation using diffusion-weighted imaging phantom data. NeuroImage. (For a 45 degrees crossing, the minimum b-value required to resolve the fibre orientations was ... 2000 s/mm^2 for CSD, and 1000 s/mm^2 for super-CSD.)&lt;br /&gt;
* [http://www.ncbi.nlm.nih.gov/pubmed/17379540 Tournier et al. (2007)] Robust determination of the fibre orientation distribution in diffusion MRI: non-negativity constrained super-resolved spherical deconvolution. NeuroImage.&lt;br /&gt;
&lt;br /&gt;
HARDI data analysis tools include Camino, dipy, mrTrix etc.&lt;br /&gt;
&lt;br /&gt;
We use a modified version of the stock GE DWI-EPI pulse sequence. The resulting dicoms contain the diffusion parameters in these fields:&lt;br /&gt;
* b-value (in sec/mm^2): 0043 1039 (GEMS_PARMS_01 block, item 1039)&lt;br /&gt;
* gradient direction: [0019 10bb, 0019 10bc, 0019 10bd] (GEMS_ACQU_01 block, items 10bb - 10bd)&lt;br /&gt;
In mrTrix (mapper.cpp), the following code is used to convert the dicom gradient values to the saved gradient directions:&lt;br /&gt;
&lt;br /&gt;
 // M is the image transform&lt;br /&gt;
 M(0,0) = -image.orientation_x[0];&lt;br /&gt;
 M(1,0) = -image.orientation_x[1];&lt;br /&gt;
 M(2,0) =  image.orientation_x[2];&lt;br /&gt;
 M(0,1) = -image.orientation_y[0];&lt;br /&gt;
 M(1,1) = -image.orientation_y[1];&lt;br /&gt;
 M(2,1) =  image.orientation_y[2];&lt;br /&gt;
 M(0,2) = -image.orientation_z[0];&lt;br /&gt;
 M(1,2) = -image.orientation_z[1];&lt;br /&gt;
 M(2,2) =  image.orientation_z[2];&lt;br /&gt;
 M(0,3) = -image.position_vector[0];&lt;br /&gt;
 M(1,3) = -image.position_vector[1];&lt;br /&gt;
 M(2,3) =  image.position_vector[2];&lt;br /&gt;
 M(3,0) = 0.0; M(3,1) = 0.0; M(3,2) = 0.0; M(3,3) = 1.0;&lt;br /&gt;
 H.DW_scheme(s, 0) = M(0,0)*d[0] + M(0,1)*d[1] - M(0,2)*d[2];&lt;br /&gt;
 H.DW_scheme(s, 1) = M(1,0)*d[0] + M(1,1)*d[1] - M(1,2)*d[2];&lt;br /&gt;
 H.DW_scheme(s, 2) = M(2,0)*d[0] + M(2,1)*d[1] - M(2,2)*d[2];&lt;br /&gt;
&lt;br /&gt;
If you get the data from the CNI Neurobiological Image Management System (NIMS), then the b-values and b-vectors have already been extracted for you and are provided along with the NIFTI file containing your data. These three files (the NIFTI, bvals, and bvecs files) can be send directly into most diffusion data analysis packages, such as the Stanford Vita Lab [[http://vistalab.stanford.edu/newlm/index.php/MrDiffusion mrDiffusion]] or FSL&#039;s [[http://www.fmrib.ox.ac.uk/fsl/fdt/index.html FDT]]. The b-values file contains a set of numbers (one for each acquired volume) that describe the b-value of the corresponding volume. The b-vecs file contains a triplet of numbers for each acquired volume, describing the diffusion-weighting direction for the corresponding volume. E.g., if you run our 60-direction scan, you will get 6 non-DW volumes followed by 60-DW volumes. Thus, you nifti file will contain 66 volumes. The b-vals file will contain 66 numbers (six 0&#039;s, fllowed by 60 1000&#039;s) and the b-vecs files will contain 66 triplets describing the DW directions for each volume (the triplets for the first 6 non-DW volumes are meaningless and can be ignored).&lt;br /&gt;
&lt;br /&gt;
=Simultaneous Multi-Slice (SMS)=&lt;br /&gt;
The CNI, in collaboration with GE, implemented [http://www.sciencedirect.com/science/article/pii/S1090780713000311 simultaneous multi-slice EPI] (also known as multiband EPI). GE has integrated the SMS EPI into its product software platform, and since CNI&#039;s scanner upgrade to the UHP system, the SMS sequence is available as part of the GE product sequences, called the Hyperband. The Hyperband option is available for both BOLD EPI and diffusion EPI. &lt;br /&gt;
&lt;br /&gt;
Previously CNI has provided the SMS sequence using our research PSD, the one we referred to as the &amp;quot;mux&amp;quot; sequence. We recommend everyone who has been using the &amp;quot;mux&amp;quot; sequence to transition to the Hyperband sequence. For a comparison of features and performances between the &amp;quot;mux&amp;quot; and Hyperband sequence, please see this CNI blog [http://cni.stanford.edu/hyperband-transition/ Hyperband transition]. More information about the legacy &amp;quot;mux&amp;quot; sequence is described on the [[MUX EPI]] page. &lt;br /&gt;
&lt;br /&gt;
== SMS fMRI ==&lt;br /&gt;
The Hyperband sequence uses a calibration process that is integrated in the prescan. It is not necessary to set up a separate calibration scan or account for additional calibration volumes in the EPI time series. The calibration data is not saved in the final images. By default all the volumes in the EPI time series are reconstructed and saved in the final images, so the number of volumes in NIFTI is exactly the same amount as specified in the protocol (in the Multi-Phase page). However, the first few volumes in the time series may have different intensity because the spin magnetization has not yet reached steady state. In the BOLD analysis it may be necessary to discard the first few volumes in order to get to the steady state. Alternatively, there is an option in the Hyperband sequence to allow users to specify a number of dummy volumes, in which case the scanner will not reconstruct the first few volumes, but the scan timing is still the same, i.e. data acquisition starts right after the scan trigger. &lt;br /&gt;
&lt;br /&gt;
=== BOLD EPI ===&lt;br /&gt;
* Hyperband 6, voxel size 2.4mm^3, FOV 21.6cm, number of slices 60, TR 710ms (scan protocol in the Connectome project)&lt;br /&gt;
* Hyperband 6, voxel size 1.8mm^3, FOV 23.0cm, number of slices 81, TR 1386ms&lt;br /&gt;
* Hyperband 8, voxel size 3.0mm^3, FOV 22.2cm, number of slices 48, TR 415ms&lt;br /&gt;
* Hyperband 8, voxel size 2.0mm^3, FOV 22.0cm, number of slices 72, TR 760ms&lt;br /&gt;
&lt;br /&gt;
=== Multi-echo EPI ===&lt;br /&gt;
* Hyperband 3, 2x in-plane acceleration, 3 EPI echoes, voxel size 2.8mm^3, FOV 22.4cm, number of slices 51, TR 1.49s, shortest TE 14.6ms, TE interval 23ms&lt;br /&gt;
&lt;br /&gt;
== SMS DWI ==&lt;br /&gt;
For SMS diffusion scans we generally recommend 2x to 3x slice acceleration, which will bring down the scan time by 2 to 3 times while maintaining the SNR of the diffusion weighted images. Partial Fourier acquisition is usually used to keep the TE as short as possible. The in-plane acceleration in addition to the slice acceleration is not always recommended because even though it can further reduce the EPI distortion but the SNR loss can be harmful for diffusion model fitting.&lt;br /&gt;
&lt;br /&gt;
Diffusion Spectrum Imaging (DSI) ([http://onlinelibrary.wiley.com/doi/10.1002/mrm.20642/full Magn. Reson. Med., 2005, 54: 1377–1386]) and multi-shell diffusion ([http://onlinelibrary.wiley.com/doi/10.1002/mrm.24736/full Magn. Reson. Med., 2013, 69: 1534–1540]) scans can be realized by designing gradient tables that specify direction and amplitude of the b-vectors. We set up a several customized gradient tables that are optimized for DTI, HARDI, 2 or 3-shell diffusion scans. Consult with us if you would like to set up your own diffusion gradient scheme. &lt;br /&gt;
&lt;br /&gt;
=== HARDI ===&lt;br /&gt;
* DTI 80dir 2mm (4:45): SMS factor 3, axial slices, 2mm^3 voxel size, number of slices 69, b-value 2500, 80 diffusion directions, 8 b=0 images &lt;br /&gt;
* DTI 96dir 2mm (5:50): SMS factor 3, axial slices, 2mm^3 voxel size, number of slices 69, b-value 3000, 96 diffusion directions, 10 b=0 images&lt;br /&gt;
&lt;br /&gt;
=== Multi-shell diffusion ===&lt;br /&gt;
* DTI g79/81 b3k 2-shell (4:33+4:40): 2-shell with 10 b=0 images, 75 directions at b=1500, 75 directions at b=3000. SMS factor 4, voxel size 1.5mm^3, number of slices 84 (scan protocol in the Connectome project)&lt;br /&gt;
* DTI g103 b2k 2-shell (4:50): 2-shell with 9 b=0 images, 30 directions at b=700, 64 directions at b=2000. SMS factor 3, 2x in-plane acceleration, voxel size 2mm^3, number of slices 75&lt;br /&gt;
* DTI g150 b3k 3-shell (6:15): 3-shell with 10 b=0 images, 30 direction at b=1000, 45 direction at b=2000, 65 direction at b=3000. SMS factor 3, 2x in-plane acceleration, voxel size 2mm^3, number of slices 63&lt;br /&gt;
&lt;br /&gt;
= Scientific Protocols for Tissue and Chemistry =&lt;br /&gt;
&lt;br /&gt;
== Quantitative MR ==&lt;br /&gt;
These template protocols make quantitative measurements of MR parameters (e.g. T1 in seconds, and proton density (PD) as a fraction of the voxel) of brain tissue.  Some 1 - PD is called the macromolecular tissue volume.&lt;br /&gt;
&lt;br /&gt;
=== T1 map ===&lt;br /&gt;
The SS-SMS T1 scan is a quantitative T1 scan using slice-shuffled inversion-recovery SMS EPI sequence. This scan gives you a T1 measurement at 2mm isotropic resolution in a minimum time. It uses in-plane acceleration therefore it&#039;s not necessary to run a separate pe1 scan for distortion correction unless you have enough time. For processing the NIFTI file from either pe0 or pe1 scan to get the T1 map, you can use [http://github.com/cni/t1fit/blob/master/t1_fitter.py this Python script]. If you acquired both pe0 and pe1, then you can use [http://github.com/cni/t1fit/blob/master/t1fit_unwarp.py this script] to process both NIFTI files to get the T1 map -- this includes an extra step for distortion correction using FSL&#039;s TOPUP before fitting the T1 relaxation. &lt;br /&gt;
&lt;br /&gt;
* SS-SMS T1 pe0 (pe1) (2:03): Gradient echo IR EPI, 2mm^3 voxel size, number of muxed slices 25 (75 unmuxed slices, 15cm), SMS factor 3, 2x in-plane acceleration, TR 3s.&lt;br /&gt;
&lt;br /&gt;
=== T1 map + PD map ===&lt;br /&gt;
The four SPGR scans, together with the four IR EPI scans, are set up for calculating T1 and PD maps using the [http://github.com/mezera/mrQ mrQ analysis package]. If you want a high resolution T1 map, or if you are interested in getting PD in addition to T1, then you should use this group of scans. &lt;br /&gt;
&lt;br /&gt;
* SPGR 1mm 30(4/10/20) deg (5:19 X 4): 3D SPGR, 1mm^3 voxel size, flip angle 30/4/10/20. The first scan should be run with Auto Prescan + Scan, and the following three should be run using Manual Prescan (do not change any parameters) + Scan.&lt;br /&gt;
&lt;br /&gt;
* IR EPI TI=50(400/1200/2400) (1:15 X 4): Gradient echo IR EPI, 1.875 x 1.875 x 4mm^3 voxel size, 2x in-plane acceleration. The first scan should be run with Auto Prescan + Scan, and the following three should be run using Manual Prescan (do not change any parameters) + Scan.&lt;br /&gt;
&lt;br /&gt;
Note that you could also choose to use only the four IR EPI scans to get a quantitative T1 map at a lower resolution. The working principle and model fitting procedure is explained [http://www-mrsrl.stanford.edu/~jbarral/t1map.html here].&lt;br /&gt;
&lt;br /&gt;
== Spectroscopy ==&lt;br /&gt;
In-vivo spectroscopy sequences and analysis methods available and used at CNI are described [[GABA spectro | on this CNI spectroscopy page]].&lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
== Device specific processing ==&lt;br /&gt;
The [[GE Processing | GE processing]] includes various steps that can influence the signal-to-noise of your data.  We explain what we have learned about this and how to control it in this page.&lt;br /&gt;
&lt;br /&gt;
== Technical notes ==&lt;br /&gt;
* [[media:bob_spatialRes_111216.pdf|Slides on spatial resolution]] from CNI tutorial&lt;br /&gt;
* [[MR Signal Equations]]&lt;br /&gt;
&lt;br /&gt;
== Session Running Script ==&lt;br /&gt;
&lt;br /&gt;
We advise you to put together a session running script that outlines set up of the scanner and peripherals and positioning of and communications with the participant. You can find an example [[media:Session_Running_Script.pdf|here]] (courtesy of Nanna Notthoff, Carstensen Lab).&lt;br /&gt;
&lt;br /&gt;
== CNI&#039;s Quality Assurance protocol ==&lt;br /&gt;
Weekly QA scans include: &lt;br /&gt;
# BOLD EPI sequence (analyze mean and variance over time)&lt;br /&gt;
# DW EPI sequence (analyze eddy current distortion stability)&lt;br /&gt;
# Spiral field map (analyze long-term B0 stability)&lt;br /&gt;
All QA scans are done on the fBIRN agar phantom. The phantom is positioned in the same orientation with the same padding each week. The landmark must be set to the same. The Rx should be not touched (use the same stored Rx). We should do HO shim and set the shim VOI to exactly cover the sphere.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=MediaWiki:Sidebar&amp;diff=59388</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=MediaWiki:Sidebar&amp;diff=59388"/>
		<updated>2026-02-11T20:57:58Z</updated>

		<summary type="html">&lt;p&gt;Huawu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* General Info&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** Getting Started|Getting Started&lt;br /&gt;
** Operations|Operations&lt;br /&gt;
** IRB|IRB Info&lt;br /&gt;
* Collecting Data&lt;br /&gt;
** MR Hardware|MR Hardware&lt;br /&gt;
** MR Protocols|MR Protocols&lt;br /&gt;
** MR Simulator|MR Simulator&lt;br /&gt;
** EyelinkTracker|Eye Tracker&lt;br /&gt;
* Managing Data&lt;br /&gt;
** Data Access|Data Access&lt;br /&gt;
** Flywheel|Flywheel&lt;br /&gt;
** Data Processing | Data Processing&lt;br /&gt;
** QA|QA Reports&lt;br /&gt;
* Help&lt;br /&gt;
** Troubleshooting| Troubleshooting&lt;br /&gt;
** gallery|Image Gallery&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** helppage|help&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=Hardware_configuration&amp;diff=59387</id>
		<title>Hardware configuration</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=Hardware_configuration&amp;diff=59387"/>
		<updated>2026-02-11T20:56:54Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Legacy Hardware Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GE console=&lt;br /&gt;
Need to put lots of stuff here about how we tricked-out our GE console with a new CPU, more RAW, and more storage for mrraw. We also configure its network to turn off GE&#039;s firewall (PNF) so that NFS exports work over the eth0 (192.*) interface. There is a VPN firewall between it and the internet, so the PNF firewwall is redundant. We connect its eth0 port to a gigabit switch that connects to all our servers and workstations in the CNI (we call this the &amp;quot;CNI private network&amp;quot;). One of the GE VPN router&#039;s LAN ports is also connected to this switch, so the console can get out to the internet through the 192.168.0.1 gateway. All incoming traffic is blocked there. (We did have to add a rule to the Stanford firewall to allow the GE mother ship to talk to our scanner.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Labjack (for recording biopac data)=&lt;br /&gt;
The [http://labjack.com/ue9 labjack UE9] is connected to the CNI private network and thus can be accessed from any of the CNI workstations, including the linux box next to the GE console. To configure the labjack for your network, install the [http://labjack.com/support/software labjack driver] and the [http://labjack.com/support/labjackpython labjack python module]. Then, connect your machine to the labjack via usb, fire up python, and try:&lt;br /&gt;
&lt;br /&gt;
    import ue9&lt;br /&gt;
    d = ue9.UE9()&lt;br /&gt;
    d.commConfig(IPAddress=&#039;192.168.0.12&#039;, Subnet=&#039;255.255.255.0&#039;, Gateway=&#039;0.0.0.0&#039;)&lt;br /&gt;
    d.reset()&lt;br /&gt;
&lt;br /&gt;
Then, once the labjack comes back up, it should be ready to ping, command, stream, etc.&lt;br /&gt;
&lt;br /&gt;
=Legacy Hardware Information=&lt;br /&gt;
&lt;br /&gt;
== EEG ==&lt;br /&gt;
[[EEG| This page]] provides some description about running EEG/fMRI sessions at CNI. However the EEG equipments have been retired since 2024. &lt;br /&gt;
&lt;br /&gt;
== USB-1208 HID trigger ==&lt;br /&gt;
&#039;&#039;&#039;NOTE: this trigger system is deprecated and has been removed. Please convert your scripts to use the [[#USB-to-Serial Port Trigger]].&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
At the CNI, we have a [[http://www.mccdaq.com/usb-data-acquisition/USB-1208-Series.aspx USB-1208]] HID device from Measurement Computing installed and wired into the scan trigger through pin 14. This device is supported by the PsychToolbox [[http://psychtoolbox.org/PTB-2/daq.html DAQ Toolbox]]. If you have PsychToolbox configured, just plug in the USB cable labeled &amp;quot;Matlab Trigger&amp;quot; and you can send a TTL pulse to the scanner by pulsing pin 14. See the VistaSoft [[http://vistalab.stanford.edu/trac/vistadisp/browser/trunk/exptTools2/experimentControl/StartScan.m StartScan]] function for example Matlab code.&lt;br /&gt;
&lt;br /&gt;
== Serial Trigger ==&lt;br /&gt;
=== Windows PC ===&lt;br /&gt;
On (older) Windows, you might need to install a driver the first time you connect the serial trigger. Download the [[Media:CNI_serial.inf|CNI Serial driver]] and be sure that the file name has the correct extension. (Windows will probably add a &amp;quot;.txt&amp;quot; to the file name, which causes the driver manager to fail to recognize it as an inf file. Change your folder settings to not hide file extensions and edit the file name to remove the &amp;quot;.txt&amp;quot;. In Windows 7, go to Windows Explorer and press the Alt key to show the menu, and click on Folder Options via Tools menu button. Click on View tab and remove the check from Hide extensions for known file types, and then press OK. Now you can see and edit the file extensions.) Then, go to the Windows &#039;device manager&#039; and open the device properties for the unrecognized USB device. Find the &#039;update driver&#039; button and browse to the directory containing the .inf file that you downloaded. Check the port settings and make sure the port is COM1, COM2, COM3 or COM4. If not, use the &#039;advanced&#039; button under the &amp;quot;port settings&amp;quot; tab to change the com port to one of these. (This is an E-Prime limitation.)&lt;br /&gt;
&lt;br /&gt;
=== OS-X System ===&lt;br /&gt;
Some older Matlab versions for OS-X system don&#039;t support the Matlab &#039;serial&#039; command. If that happens to be you, don&#039;t lose hope! You can set up a simple python script to do the triggering. First, get the trigger working in python. In a terminal, try this:&lt;br /&gt;
&lt;br /&gt;
 wget http://pypi.python.org/packages/source/p/pyserial/pyserial-2.6.tar.gz#md5=cde799970b7c1ce1f7d6e9ceebe64c98&lt;br /&gt;
 tar -xzf pyserial-2.6.tar.gz&lt;br /&gt;
 sudo mv pyserial-2.6 /Library/Python/2.3/site-packages/&lt;br /&gt;
 wget https://raw.github.com/cni/widgets/master/python/startScan.py&lt;br /&gt;
 chmod a+x startScan.py&lt;br /&gt;
 sudo mv startScan.py /usr/local/bin/&lt;br /&gt;
&lt;br /&gt;
Then, in Matlab, you can call this python script with:&lt;br /&gt;
&lt;br /&gt;
 unix(&#039;/usr/local/bin/startScan.py /dev/tty.usbmodem123451&#039;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CNI Touch-pad ==&lt;br /&gt;
[[File:cni_touch.jpg|thumb|x80px|CNI touch-pad.]]&lt;br /&gt;
We designed and built this MR-compatible touch pad. It uses a [http://www.magictouch.com/addon.html KEYTEC] [http://www.atmel.com/Images/doc8091.pdf 4-wire resistive touch] glass connected to a [http://www.pjrc.com/teensy/ Teensy 2.0] with [https://github.com/cni/widgets/blob/master/touch/touch.pde custom firmware]. The CNI Touch Pad connects to a host via USB and will show up as a serial port on your machine. It will continuously stream the absolute position of the subject&#039;s touch using a simple serial protocol. Here is [[codeserialport|some sample code]] to get coordinates in Matlab.&lt;br /&gt;
&lt;br /&gt;
==Subject Physio Data==&lt;br /&gt;
Legacy content for NIMS - At the CNI, we attempt to do the basic processing on the physio files generated by your scans. The files are read and regressors are computed. These regressors can be used to regress out the physio noise, or they can be used to de-noise the raw data. For details, see [https://github.com/cni/nims/blob/master/nimsproc/nimsphysio.py nimsphysio.py] in the NIMS repository.&lt;br /&gt;
&lt;br /&gt;
== Subject Positioning Accessories ==&lt;br /&gt;
Also, there is a [http://www.magconcept.com/ Mag Design and Engineering] bite-bar holder on the 8-channel and 32-channel coils (both built by Ben Krasnow). We have a 200deg water source in the control room (the Cuisinart coffee machine) and are planning to get a little microwave for heating things like bite bars and EEG electrolyte. &lt;br /&gt;
&lt;br /&gt;
Some labs have expressed interest in a vacuum pillow system for subject positioning. From: Ashley Shurick (Gross lab) is familiar with the SecureVacTM Immobilization System from Bionix Radiation Therapy. The system at NYU uses a customized pillow measuring 50 x 70 cm with 12.5L of fill. However, the size should depend on the head coil used, as pillows come larger or smaller, with more or less fill. They also have a vacuum pump system to remove air from the pillow, helping prevent movement. We are currently looking int this.&lt;br /&gt;
&lt;br /&gt;
==Eye Tracking Setup==&lt;br /&gt;
===EyeLink Data Transfer===&lt;br /&gt;
We looked for a way to automatically reap data from the eyelink, which runs [http://www.datalight.com/products/rom-dos/ rom-dos]. The coolest idea we had was to build a data streaming device out of two teensy&#039;s that presents itself to the eyelink as a USB flash drive, so when it saves the data files there, they actually stream to our server. But we think there might be some way to transfer files over the serial port using the archaic [http://en.wikipedia.org/wiki/ZMODEM zmodem] protocol that rom-dos supports. &lt;br /&gt;
&lt;br /&gt;
===IR Illuminator Technical Details===&lt;br /&gt;
We found that the standard IR light source from SR Research did not adequately focus the light onto the subject&#039;s eye, so we built a small MR-safe IR source using a single high-power IR LED epoxied to a non-metallic heat sink. The illuminator is mounted on the head coil using a loc-line stalk and can be positioned to nicely illuminate the target eye. It&#039;s powered from the same 5v source that powered the original SR illustrator (and that powers the camera) via a simple circuit based around a 1.8v linear regulator (it turns out that 1.8v drives this LED with just the right amount of current). The circuit was just the standard &amp;quot;typical application&amp;quot; circuit for a fixed voltage regulator, with a 100uF capacitor on the input and one on the output. We did have an issue with the RF pulses from the scanner causing some flicker in the illuminator, so we added a pair of 1000uF capacitors in parallel with the 100uF caps, and that minimized the flicker to a level that didn&#039;t interfere with eye tracking.&lt;br /&gt;
&lt;br /&gt;
Parts list:&lt;br /&gt;
* [http://www.superbrightleds.com/moreinfo/component-leds/315mw-850nm-infrared-led-with-star-heatsink-125-degree-viewing-angle/653/ IR LED] with [http://www.superbrightleds.com/moreinfo/component-led-accessories/secondary-optical-lenses-for-vollong-and-prolight-leds/337/ 45 deg lens]&lt;br /&gt;
* [http://www.digikey.com/product-detail/en/D10850-40/345-1077-ND/340370 non-metallic (composite) heatsink]&lt;br /&gt;
* 1.8v linear regulator, such as [http://www.digikey.com/product-detail/en/AP1084T18L-U/AP1084T18L-UDI-ND/1301115 AP1084]&lt;br /&gt;
* little aluminum heatsink for the regulator&lt;br /&gt;
* 2 1000uF capacitors &lt;br /&gt;
* 2 100uF capacitors&lt;br /&gt;
* Various [http://www.loc-line.com/ Loc-Line] pieces &lt;br /&gt;
&lt;br /&gt;
Here are some pictures of the very crude, &amp;quot;dead-bug&amp;quot; style circuit. Note that we neatly tucked it into the original eyelink IR illuminator case and we used an old cat-5 cable to connect the regulator with with IR source. The IR source was mounted to the plastic heat sink using [http://www.arcticsilver.com/arctic_silver_thermal_adhesive.htm thermal epoxy].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=6 widths=180px&amp;gt;&lt;br /&gt;
Image:eyelink_ir1.jpg|Assembled unit.&lt;br /&gt;
Image:eyelink_ir2.jpg|Close-up of the circuit.&lt;br /&gt;
Image:eyelink_ir3.jpg|Another shot of the circuit.&lt;br /&gt;
Image:eyelink_ir4.jpg|Close-up of the LED, lens, and heatsink.&lt;br /&gt;
Image:eyelink_ir5.jpg|Another shot of the LED assembly.&lt;br /&gt;
Image:eyelink_ir_circuit.png|Circuit. Note that we added 1000uF caps in parallel with C1 and C2.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We&#039;ve recently added a small enclosure. You can get the [https://github.com/cni/3d_models/blob/master/ir_box.stl stl file] or the [https://github.com/cni/3d_models/blob/master/ir_box.scad scad code] from our github [https://github.com/cni/3d_models/ 3d models repo].&lt;br /&gt;
{{3dviewer}}&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
If you normally set-up the eye tracker in the back of the room using the large screen and this does not work, it may be because the setup is in a different mode (where the eye tracker screen is projected on the little screen at the front of the scanner above the bore). Have a look at the figures at the right to correct the issue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=3&amp;gt;&lt;br /&gt;
Image:eyetracker_connections1.jpg|Video switches are at the back of the GE console computer.&lt;br /&gt;
Image:eyetracker_connections2.jpg|Check that this is on “GE Display”.&lt;br /&gt;
Image:eyetracker_connections3.jpg|And this little blue switch is on #1.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Resonance Technology Goggles===&lt;br /&gt;
The old [http://www.mrivideo.com/eye-tracking.php MReyetracking system] from Resonance Technology has been deprecated. This system used the [http://www.arringtonresearch.com/viewpoint.html ViewPoint] software from Arrington Research. For more details on the old eye tracker, see the [[eye tracker]] page.&lt;br /&gt;
&lt;br /&gt;
==Power switch for peripherals==&lt;br /&gt;
[[File:cni_peripheral_power_switches.jpg|thumb|Push-button switches to power on and off the peripheral equipment. (hand model cameo by Jason Yeatman)]]&lt;br /&gt;
The stimulus displays, audio system, and the fORP response system are best kept turned off when not in use. We&#039;ve found this to be particularly important for the LCD display, which can act up when it&#039;s been left on for too long. To make it easier to turn all these devices on and off, we have installed two switches on the column to the right of the GE console. Please turn all the equipment off when you finish scanning. The switches toggle the power and glow blue when the power is on. &lt;br /&gt;
&lt;br /&gt;
Behind the scenes, these push buttons each control a [http://www.furmansound.com/product.php?id=MP-15 Furman MP-15 power relay], one in the equipment room that controls power to scan room devices and one in the console room. The switched labelled &amp;quot;LCD&amp;quot; toggles power to devices in the scanner room and must be on to use the LCD display. The switch labelled &amp;quot;fORP&amp;quot; toggles the devices in the console room and must be on to use the fORP response system. The goggles and audio system require both switches to be on because they have a component in both the control room and the scan room.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=Hardware_configuration&amp;diff=59386</id>
		<title>Hardware configuration</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=Hardware_configuration&amp;diff=59386"/>
		<updated>2026-02-11T20:55:12Z</updated>

		<summary type="html">&lt;p&gt;Huawu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GE console=&lt;br /&gt;
Need to put lots of stuff here about how we tricked-out our GE console with a new CPU, more RAW, and more storage for mrraw. We also configure its network to turn off GE&#039;s firewall (PNF) so that NFS exports work over the eth0 (192.*) interface. There is a VPN firewall between it and the internet, so the PNF firewwall is redundant. We connect its eth0 port to a gigabit switch that connects to all our servers and workstations in the CNI (we call this the &amp;quot;CNI private network&amp;quot;). One of the GE VPN router&#039;s LAN ports is also connected to this switch, so the console can get out to the internet through the 192.168.0.1 gateway. All incoming traffic is blocked there. (We did have to add a rule to the Stanford firewall to allow the GE mother ship to talk to our scanner.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Labjack (for recording biopac data)=&lt;br /&gt;
The [http://labjack.com/ue9 labjack UE9] is connected to the CNI private network and thus can be accessed from any of the CNI workstations, including the linux box next to the GE console. To configure the labjack for your network, install the [http://labjack.com/support/software labjack driver] and the [http://labjack.com/support/labjackpython labjack python module]. Then, connect your machine to the labjack via usb, fire up python, and try:&lt;br /&gt;
&lt;br /&gt;
    import ue9&lt;br /&gt;
    d = ue9.UE9()&lt;br /&gt;
    d.commConfig(IPAddress=&#039;192.168.0.12&#039;, Subnet=&#039;255.255.255.0&#039;, Gateway=&#039;0.0.0.0&#039;)&lt;br /&gt;
    d.reset()&lt;br /&gt;
&lt;br /&gt;
Then, once the labjack comes back up, it should be ready to ping, command, stream, etc.&lt;br /&gt;
&lt;br /&gt;
=Legacy Hardware Information=&lt;br /&gt;
&lt;br /&gt;
== EEG ==&lt;br /&gt;
[[#EEG This page]] provides some description about running EEG/fMRI sessions at CNI. However the EEG equipments have been retired since 2024. &lt;br /&gt;
&lt;br /&gt;
== USB-1208 HID trigger ==&lt;br /&gt;
&#039;&#039;&#039;NOTE: this trigger system is deprecated and has been removed. Please convert your scripts to use the [[#USB-to-Serial Port Trigger]].&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
At the CNI, we have a [[http://www.mccdaq.com/usb-data-acquisition/USB-1208-Series.aspx USB-1208]] HID device from Measurement Computing installed and wired into the scan trigger through pin 14. This device is supported by the PsychToolbox [[http://psychtoolbox.org/PTB-2/daq.html DAQ Toolbox]]. If you have PsychToolbox configured, just plug in the USB cable labeled &amp;quot;Matlab Trigger&amp;quot; and you can send a TTL pulse to the scanner by pulsing pin 14. See the VistaSoft [[http://vistalab.stanford.edu/trac/vistadisp/browser/trunk/exptTools2/experimentControl/StartScan.m StartScan]] function for example Matlab code.&lt;br /&gt;
&lt;br /&gt;
== Serial Trigger ==&lt;br /&gt;
=== Windows PC ===&lt;br /&gt;
On (older) Windows, you might need to install a driver the first time you connect the serial trigger. Download the [[Media:CNI_serial.inf|CNI Serial driver]] and be sure that the file name has the correct extension. (Windows will probably add a &amp;quot;.txt&amp;quot; to the file name, which causes the driver manager to fail to recognize it as an inf file. Change your folder settings to not hide file extensions and edit the file name to remove the &amp;quot;.txt&amp;quot;. In Windows 7, go to Windows Explorer and press the Alt key to show the menu, and click on Folder Options via Tools menu button. Click on View tab and remove the check from Hide extensions for known file types, and then press OK. Now you can see and edit the file extensions.) Then, go to the Windows &#039;device manager&#039; and open the device properties for the unrecognized USB device. Find the &#039;update driver&#039; button and browse to the directory containing the .inf file that you downloaded. Check the port settings and make sure the port is COM1, COM2, COM3 or COM4. If not, use the &#039;advanced&#039; button under the &amp;quot;port settings&amp;quot; tab to change the com port to one of these. (This is an E-Prime limitation.)&lt;br /&gt;
&lt;br /&gt;
=== OS-X System ===&lt;br /&gt;
Some older Matlab versions for OS-X system don&#039;t support the Matlab &#039;serial&#039; command. If that happens to be you, don&#039;t lose hope! You can set up a simple python script to do the triggering. First, get the trigger working in python. In a terminal, try this:&lt;br /&gt;
&lt;br /&gt;
 wget http://pypi.python.org/packages/source/p/pyserial/pyserial-2.6.tar.gz#md5=cde799970b7c1ce1f7d6e9ceebe64c98&lt;br /&gt;
 tar -xzf pyserial-2.6.tar.gz&lt;br /&gt;
 sudo mv pyserial-2.6 /Library/Python/2.3/site-packages/&lt;br /&gt;
 wget https://raw.github.com/cni/widgets/master/python/startScan.py&lt;br /&gt;
 chmod a+x startScan.py&lt;br /&gt;
 sudo mv startScan.py /usr/local/bin/&lt;br /&gt;
&lt;br /&gt;
Then, in Matlab, you can call this python script with:&lt;br /&gt;
&lt;br /&gt;
 unix(&#039;/usr/local/bin/startScan.py /dev/tty.usbmodem123451&#039;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CNI Touch-pad ==&lt;br /&gt;
[[File:cni_touch.jpg|thumb|x80px|CNI touch-pad.]]&lt;br /&gt;
We designed and built this MR-compatible touch pad. It uses a [http://www.magictouch.com/addon.html KEYTEC] [http://www.atmel.com/Images/doc8091.pdf 4-wire resistive touch] glass connected to a [http://www.pjrc.com/teensy/ Teensy 2.0] with [https://github.com/cni/widgets/blob/master/touch/touch.pde custom firmware]. The CNI Touch Pad connects to a host via USB and will show up as a serial port on your machine. It will continuously stream the absolute position of the subject&#039;s touch using a simple serial protocol. Here is [[codeserialport|some sample code]] to get coordinates in Matlab.&lt;br /&gt;
&lt;br /&gt;
==Subject Physio Data==&lt;br /&gt;
Legacy content for NIMS - At the CNI, we attempt to do the basic processing on the physio files generated by your scans. The files are read and regressors are computed. These regressors can be used to regress out the physio noise, or they can be used to de-noise the raw data. For details, see [https://github.com/cni/nims/blob/master/nimsproc/nimsphysio.py nimsphysio.py] in the NIMS repository.&lt;br /&gt;
&lt;br /&gt;
== Subject Positioning Accessories ==&lt;br /&gt;
Also, there is a [http://www.magconcept.com/ Mag Design and Engineering] bite-bar holder on the 8-channel and 32-channel coils (both built by Ben Krasnow). We have a 200deg water source in the control room (the Cuisinart coffee machine) and are planning to get a little microwave for heating things like bite bars and EEG electrolyte. &lt;br /&gt;
&lt;br /&gt;
Some labs have expressed interest in a vacuum pillow system for subject positioning. From: Ashley Shurick (Gross lab) is familiar with the SecureVacTM Immobilization System from Bionix Radiation Therapy. The system at NYU uses a customized pillow measuring 50 x 70 cm with 12.5L of fill. However, the size should depend on the head coil used, as pillows come larger or smaller, with more or less fill. They also have a vacuum pump system to remove air from the pillow, helping prevent movement. We are currently looking int this.&lt;br /&gt;
&lt;br /&gt;
==Eye Tracking Setup==&lt;br /&gt;
===EyeLink Data Transfer===&lt;br /&gt;
We looked for a way to automatically reap data from the eyelink, which runs [http://www.datalight.com/products/rom-dos/ rom-dos]. The coolest idea we had was to build a data streaming device out of two teensy&#039;s that presents itself to the eyelink as a USB flash drive, so when it saves the data files there, they actually stream to our server. But we think there might be some way to transfer files over the serial port using the archaic [http://en.wikipedia.org/wiki/ZMODEM zmodem] protocol that rom-dos supports. &lt;br /&gt;
&lt;br /&gt;
===IR Illuminator Technical Details===&lt;br /&gt;
We found that the standard IR light source from SR Research did not adequately focus the light onto the subject&#039;s eye, so we built a small MR-safe IR source using a single high-power IR LED epoxied to a non-metallic heat sink. The illuminator is mounted on the head coil using a loc-line stalk and can be positioned to nicely illuminate the target eye. It&#039;s powered from the same 5v source that powered the original SR illustrator (and that powers the camera) via a simple circuit based around a 1.8v linear regulator (it turns out that 1.8v drives this LED with just the right amount of current). The circuit was just the standard &amp;quot;typical application&amp;quot; circuit for a fixed voltage regulator, with a 100uF capacitor on the input and one on the output. We did have an issue with the RF pulses from the scanner causing some flicker in the illuminator, so we added a pair of 1000uF capacitors in parallel with the 100uF caps, and that minimized the flicker to a level that didn&#039;t interfere with eye tracking.&lt;br /&gt;
&lt;br /&gt;
Parts list:&lt;br /&gt;
* [http://www.superbrightleds.com/moreinfo/component-leds/315mw-850nm-infrared-led-with-star-heatsink-125-degree-viewing-angle/653/ IR LED] with [http://www.superbrightleds.com/moreinfo/component-led-accessories/secondary-optical-lenses-for-vollong-and-prolight-leds/337/ 45 deg lens]&lt;br /&gt;
* [http://www.digikey.com/product-detail/en/D10850-40/345-1077-ND/340370 non-metallic (composite) heatsink]&lt;br /&gt;
* 1.8v linear regulator, such as [http://www.digikey.com/product-detail/en/AP1084T18L-U/AP1084T18L-UDI-ND/1301115 AP1084]&lt;br /&gt;
* little aluminum heatsink for the regulator&lt;br /&gt;
* 2 1000uF capacitors &lt;br /&gt;
* 2 100uF capacitors&lt;br /&gt;
* Various [http://www.loc-line.com/ Loc-Line] pieces &lt;br /&gt;
&lt;br /&gt;
Here are some pictures of the very crude, &amp;quot;dead-bug&amp;quot; style circuit. Note that we neatly tucked it into the original eyelink IR illuminator case and we used an old cat-5 cable to connect the regulator with with IR source. The IR source was mounted to the plastic heat sink using [http://www.arcticsilver.com/arctic_silver_thermal_adhesive.htm thermal epoxy].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=6 widths=180px&amp;gt;&lt;br /&gt;
Image:eyelink_ir1.jpg|Assembled unit.&lt;br /&gt;
Image:eyelink_ir2.jpg|Close-up of the circuit.&lt;br /&gt;
Image:eyelink_ir3.jpg|Another shot of the circuit.&lt;br /&gt;
Image:eyelink_ir4.jpg|Close-up of the LED, lens, and heatsink.&lt;br /&gt;
Image:eyelink_ir5.jpg|Another shot of the LED assembly.&lt;br /&gt;
Image:eyelink_ir_circuit.png|Circuit. Note that we added 1000uF caps in parallel with C1 and C2.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We&#039;ve recently added a small enclosure. You can get the [https://github.com/cni/3d_models/blob/master/ir_box.stl stl file] or the [https://github.com/cni/3d_models/blob/master/ir_box.scad scad code] from our github [https://github.com/cni/3d_models/ 3d models repo].&lt;br /&gt;
{{3dviewer}}&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
If you normally set-up the eye tracker in the back of the room using the large screen and this does not work, it may be because the setup is in a different mode (where the eye tracker screen is projected on the little screen at the front of the scanner above the bore). Have a look at the figures at the right to correct the issue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=3&amp;gt;&lt;br /&gt;
Image:eyetracker_connections1.jpg|Video switches are at the back of the GE console computer.&lt;br /&gt;
Image:eyetracker_connections2.jpg|Check that this is on “GE Display”.&lt;br /&gt;
Image:eyetracker_connections3.jpg|And this little blue switch is on #1.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Resonance Technology Goggles===&lt;br /&gt;
The old [http://www.mrivideo.com/eye-tracking.php MReyetracking system] from Resonance Technology has been deprecated. This system used the [http://www.arringtonresearch.com/viewpoint.html ViewPoint] software from Arrington Research. For more details on the old eye tracker, see the [[eye tracker]] page.&lt;br /&gt;
&lt;br /&gt;
==Power switch for peripherals==&lt;br /&gt;
[[File:cni_peripheral_power_switches.jpg|thumb|Push-button switches to power on and off the peripheral equipment. (hand model cameo by Jason Yeatman)]]&lt;br /&gt;
The stimulus displays, audio system, and the fORP response system are best kept turned off when not in use. We&#039;ve found this to be particularly important for the LCD display, which can act up when it&#039;s been left on for too long. To make it easier to turn all these devices on and off, we have installed two switches on the column to the right of the GE console. Please turn all the equipment off when you finish scanning. The switches toggle the power and glow blue when the power is on. &lt;br /&gt;
&lt;br /&gt;
Behind the scenes, these push buttons each control a [http://www.furmansound.com/product.php?id=MP-15 Furman MP-15 power relay], one in the equipment room that controls power to scan room devices and one in the console room. The switched labelled &amp;quot;LCD&amp;quot; toggles power to devices in the scanner room and must be on to use the LCD display. The switch labelled &amp;quot;fORP&amp;quot; toggles the devices in the console room and must be on to use the fORP response system. The goggles and audio system require both switches to be on because they have a component in both the control room and the scan room.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=Data_Processing&amp;diff=59385</id>
		<title>Data Processing</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=Data_Processing&amp;diff=59385"/>
		<updated>2026-02-11T20:33:46Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Gradient-echo EPI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most data processing is done in individual laboratories and tailored to specific data sets.  There are certain general processing methods that are provided by the CNI staff.  These methods are intended to improve the quality of specific data acquired with certain protocols (EPI, Spiral, Diffusion) within the CNI facility.  This [[Data Processing]] page first defines these CNI-specific methods.  This is followed by links to external sites either at Stanford or elsewhere that offer software for processing MRI and EEG data.&lt;br /&gt;
&lt;br /&gt;
= CNI Data Information =&lt;br /&gt;
&lt;br /&gt;
== Gradient-echo EPI ==&lt;br /&gt;
Many labs at CNI use a gradient-echo EPI sequence for BOLD fMRI imaging. This sequence is a modified version of the stock EPI sequence provided by GE. Some useful information about this sequence:&lt;br /&gt;
* The name of the custom PSD is &#039;&#039;&#039;cni_epi&#039;&#039;&#039;.&lt;br /&gt;
* Slice order: The slices are acquired interleaved by default, with odd slices first, then even slices. Be sure to take this into account when doing slice timing correction. You can use the &amp;quot;TriggerTime&amp;quot; field in the DICOM head to confirm the slice acquisition timing. Also note that the time points at which slices are acquired are equally spaced within the TR.&lt;br /&gt;
* Triggering: There is a UserCV to control the acquisition trigger. You can have no special triggering (scan starts when you hit &#039;Scan&#039;), external trigger to start the scan (see [[MR Hardware#Scan Triggers]] for details), or cardiac gating. &lt;br /&gt;
* Image reconstruction size: By default, the images are reconstructed at the native image size instead of being zero-padded up to the next higher power of two. This results in faster recons, smaller files, and no image interpolation, so it is generally preferred. But, if you want power-of-two image sizes, you can change this UserCV to get that behavior.&lt;br /&gt;
* Phase encoding gradient: To use FSL&#039;s TOPUP for EPI distortion correction, you need to acquire a pair of EPI scans with the same prescription except for the reversed phase encoding gradient polarity. There is a UserCV to control the PE polarity (called &amp;quot;pepolar&amp;quot; in GE&#039;s term). In most common cases, the phase encoding gradient is along AP/PA direction, and when pepolar = 0, the encoding goes from posterior to anterior (&amp;quot;j&amp;quot; in BIDS convension), and when pepolar = 1, the encoding goes from anterior to posterior (&amp;quot;j-&amp;quot; in BIDS convension).&lt;br /&gt;
&lt;br /&gt;
== Spiral ==&lt;br /&gt;
&lt;br /&gt;
== Arterial-Spin Labeling (ASL) ==&lt;br /&gt;
Sequence: The newest ASL sequence from GE is a pseudo-continuous sequence called 3DASL. By default it is set to create a Cerebral Bloodflow (CBF) volume as a post-processing task (reported in ml/100gm/min). Separate from post-processing, the sequence produces 2 volumes, a perfusion-weighted (PW) volume and a PD volume. The PW volume is created from subtracting the tagged volume from the control volume during the scan sequence.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ASL-specific considerations&#039;&#039;&#039;:&lt;br /&gt;
* &#039;&#039;Post-Label Delay (PLD)&#039;&#039;: default is 2025ms&lt;br /&gt;
** This should be edited to reflect population being studied. Populations with faster heart rates (such as children) should have a shorter post-label delay (e.g. healthy teens can be successfully scanned at 1525ms)&lt;br /&gt;
** PLD is saved as inversion time (TI) in the dicom headers&lt;br /&gt;
* &#039;&#039;Labeling time (LT)&#039;&#039;: default is 1450ms&lt;br /&gt;
* &#039;&#039;Slice thickness&#039;&#039;: default is 4mm&lt;br /&gt;
** minimum is 2mm&lt;br /&gt;
* &#039;&#039;Spiral arms&#039;&#039;: default is 8&lt;br /&gt;
** This is most significant means of adjusting spatial resolution. More arms = better spatial resolution in each slice.&lt;br /&gt;
* &#039;&#039;Prescription&#039;&#039;: The inferior edge of the prescription box must align with the base of the cerebellum.  This ensure the labeling plane (which is just inferior to the prescription box) is aligned to tag the blood passing through the carotid arteries in the neck before entering the brain.&lt;br /&gt;
** It is very important that the subject&#039;s head is aligned straight in the scanner. Tilting can result in poor labeling or artifacts in the PW volume (and subsequently the CBF volume).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Processing ASL Data&#039;&#039;&#039;:&lt;br /&gt;
Analyses can be conducted on the CBF volume or on the  PW volume. The CBF volume already has CBF quantified (naturally) based on the below information. This volume can be spatially normalized and analyzed in a similar way as processed fMRI data.&lt;br /&gt;
&lt;br /&gt;
* Homogeneous blood/brain partition coefficient for water is 0.9 ml/g&lt;br /&gt;
* Labeling inversion efficiency is 80% for a 3T scanner&lt;br /&gt;
* T1 of blood is 1.6s at a 3T scanner&lt;br /&gt;
* Saturation time is 2s&lt;br /&gt;
* Overall efficiency is 0.6&lt;br /&gt;
* The PD volume is used as a reference image&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can quantify CBF yourself from the PW volume if you&#039;d like to use different parameters or would like to perform additional spatial/intensity corrections before CBF quantification.&lt;br /&gt;
&lt;br /&gt;
== Diffusion Imaging ==&lt;br /&gt;
&lt;br /&gt;
= CNI Data processing =&lt;br /&gt;
&lt;br /&gt;
See [[Linux notes]] for random notes on using the linux machines at the CNI. For a nice description of the various parameters involved in field map unwarping, see [http://support.brainvoyager.com/functional-analysis-preparation/27-pre-processing/459-epi-distortion-correction-echo-spacing.html this page].&lt;br /&gt;
&lt;br /&gt;
== Field map estimation ==&lt;br /&gt;
All MR data is subject to distortions arising from imperfections in the mean magnetic field (B0). All centers make an effort to correct for these imperfections. The CNI community is developing methods to [[GE_Processing#Fieldmaps | assess the field map imperfections]] during the measurement process and corresponding [[Preprocessfmri | pre-processing software]] that corrects for these imperfections during the reconstruction process.&lt;br /&gt;
&lt;br /&gt;
==Gradient-reversal Unwarping (&#039;pepolar&#039;)==&lt;br /&gt;
Some of the CNI pulse sequences support reversing the gradient read-out direction (GE calls this &#039;pepolar&#039; for &#039;phase-encode polarity&#039;). If you acquire fMRI or diffusion data with one pepolar direction (e.g., pepolar=0, the default readout direction) and another dataset with the reversed direction (e.g., pepolar=1), then you can use the two sets of images to estimate the fieldmap and unwarp the data. For our multiband (&#039;mux&#039;, aka SMS-EPI) pulse sequences, the gradient read-out direction can be set as a user CV. &lt;br /&gt;
&lt;br /&gt;
To unwarp the data, we suggest that you use the FSL [http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/topup topup] tools. The echo train length (etl) needed in the acquisition parameter text file can be calculated using the echo spacing multiplied by the phase encoding matrix size. Both parameters can be found in the image metadata (for example, EffectiveEchoSpacing and AcquisitionMatrixPE in the json file produced by dcm2niix). For fMRI data, you can then do something like this:&lt;br /&gt;
&lt;br /&gt;
    echo &#039;0 1 0 [etl]&#039; &amp;gt; acq_params.txt&lt;br /&gt;
    echo &#039;0 -1 0 [etl]&#039; &amp;gt;&amp;gt; acq_params.txt&lt;br /&gt;
    fsl5.0-fslroi rs_pe0.nii.gz bu 1 1&lt;br /&gt;
    fsl5.0-fslroi rs_pe1.nii.gz bd 1 1&lt;br /&gt;
    fsl5.0-fslmerge -t bud bu bd&lt;br /&gt;
    fsl5.0-topup --imain=bud --datain=acq_params.txt --config=b02b0.cnf --out=rs_topup&lt;br /&gt;
    fsl5.0-applytopup --imain=rs_pe0 --inindex=1 --method=jac --datain=acq_params.txt --topup=rs_topup --out=rs0_unwarped&lt;br /&gt;
    fsl5.0-applytopup --imain=rs_pe1 --inindex=2 --method=jac --datain=acq_params.txt --topup=rs_topup --out=rs1_unwarped&lt;br /&gt;
&lt;br /&gt;
For diffusion data, have a look at this code: https://github.com/cni/nims/blob/master/scripts/pepolar_unwarp.py&lt;br /&gt;
&lt;br /&gt;
If you need to add a slice (topup requires even numbers for x, y and z), the run this before running the lines above:&lt;br /&gt;
&lt;br /&gt;
    mv rs_pe0.nii.gz rs_pe0_ORIG.nii.gz&lt;br /&gt;
    mv rs_pe1.nii.gz rs_pe1_ORIG.nii.gz&lt;br /&gt;
    fsl5.0-fslroi rs_pe0.nii.gz /tmp/pe0 0 -1 0 -1 0 1 0 -1&lt;br /&gt;
    fsl5.0-fslroi rs_pe1.nii.gz /tmp/pe1 0 -1 0 -1 0 1 0 -1&lt;br /&gt;
    fsl5.0-fslmerge -z rs_pe1 /tmp/pe1 rs_pe1_ORIG.nii.gz&lt;br /&gt;
    fsl5.0-fslmerge -z rs_pe0 /tmp/pe0 rs_pe0_ORIG.nii.gz&lt;br /&gt;
&lt;br /&gt;
Then, after topup finishes, you can remove the extra slice:&lt;br /&gt;
&lt;br /&gt;
    fsl5.0-fslroi rs_pe0_unwarped.nii.gz rs_pe0_unwarped_resize.nii.gz 0 -1 0 -1 1 -1 0 -1&lt;br /&gt;
    fsl5.0-fslroi rs_pe1_unwarped.nii.gz rs_pe1_unwarped_resize.nii.gz 0 -1 0 -1 1 -1 0 -1&lt;br /&gt;
&lt;br /&gt;
Complete procedure for mux qT1 data:&lt;br /&gt;
&lt;br /&gt;
    fslroi 9619_22_pe1.nii.gz /tmp/pe1 0 -1 0 -1 0 1 0 -1&lt;br /&gt;
    fslroi 9619_23_pe0.nii.gz /tmp/pe0 0 -1 0 -1 0 1 0 -1&lt;br /&gt;
    fslmerge -z pe1 /tmp/pe1.nii.gz 9619_22_pe1.nii.gz &lt;br /&gt;
    fslmerge -z pe0 /tmp/pe0.nii.gz 9619_23_pe0.nii.gz &lt;br /&gt;
    fslroi pe0 bu 1 1&lt;br /&gt;
    fslroi pe1 bd 1 1&lt;br /&gt;
    fslmerge -t bud bu bd&lt;br /&gt;
    topup --imain=bud --datain=acq_params.txt --config=b02b0.cnf --out=topup&lt;br /&gt;
    applytopup --imain=pe0 --inindex=1 --method=jac --datain=acq_params.txt --topup=topup --out=pe0_unwarped&lt;br /&gt;
    applytopup --imain=pe1 --inindex=2 --method=jac --datain=acq_params.txt --topup=topup --out=pe1_unwarped&lt;br /&gt;
    fslmaths pe0_unwarped.nii.gz -add pe1_unwarped.nii.gz /tmp/unwarped&lt;br /&gt;
    fslroi /tmp/unwarped.nii.gz unwarped 0 -1 0 -1 1 -1 0 -1&lt;br /&gt;
    bet unwarped.nii.gz brain -m&lt;br /&gt;
    ~/git/t1fit/t1_fitter.py -u -t 30 -m brain_mask.nii.gz unwarped.nii.gz qt1&lt;br /&gt;
&lt;br /&gt;
= MRI data processing resources =&lt;br /&gt;
==CNI LX Containers (virtual machines)==&lt;br /&gt;
The CNI has received funding from [http://biox.stanford.edu/biox/neuro.html Neuro Ventures] for a high-powered compute server which will be used to provide computational resources to CNI users. Please visit the [[LXC]] page for more information. &lt;br /&gt;
&lt;br /&gt;
== Stanford laboratories ==&lt;br /&gt;
&lt;br /&gt;
The [http://white.stanford.edu/newlm Wandell lab wiki] describes a large collection of software for processing and visualizing anatomical, functional, and diffusion-weighted MR data.&lt;br /&gt;
&lt;br /&gt;
Other lab sites could to be listed here.&lt;br /&gt;
&lt;br /&gt;
Some online analysis notes for the [[Phillips lab]].&lt;br /&gt;
&lt;br /&gt;
Notes for the [[CHIMe lab]].&lt;br /&gt;
&lt;br /&gt;
[[General data processing notes]].&lt;br /&gt;
&lt;br /&gt;
[[Compute environment notes]]&lt;br /&gt;
&lt;br /&gt;
== Worldwide ==&lt;br /&gt;
&lt;br /&gt;
* SPM&lt;br /&gt;
* FSL&lt;br /&gt;
* BrainVoyager&lt;br /&gt;
* Camino&lt;br /&gt;
* AFNI&lt;br /&gt;
* BrainVisa&lt;br /&gt;
* NiPy&lt;br /&gt;
&lt;br /&gt;
= EEG data processing resources =&lt;br /&gt;
&lt;br /&gt;
Something about the Norcia lab here.&lt;br /&gt;
&lt;br /&gt;
== Stanford laboratories ==&lt;br /&gt;
&lt;br /&gt;
== Worldwide resources ==&lt;br /&gt;
MATLAB based: SPM, EEGLAB&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=GE_Processing&amp;diff=59384</id>
		<title>GE Processing</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=GE_Processing&amp;diff=59384"/>
		<updated>2026-02-04T23:04:25Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Reconstructed image size */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The GE processing pipeline includes a variety of decisions that advanced users need to know.  This page describes some of what we have learned about this pipeline and how to control these decisions. It is our view that each of these decisions should be made very clear to users by GE.  Sometimes they are, sometimes not so much.&lt;br /&gt;
&lt;br /&gt;
Return to [[MR_Protocols]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;To-do list&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Here are various items that are on Kendrick&#039;s radar.  (Others should feel free to add items.)  Higher-priority items are listed towards the top.&lt;br /&gt;
&lt;br /&gt;
* FIELD INHOMOGENEITY CAUSED BY COIL? There is some suspicion that the 32-ch coil causes field inhomogenity near the top on coronal slices.  Kendrick will be testing various coils with respect to this issue. The specific reason that the inhomogenity is bad is that if you do a fieldmap correction, the field inhomogeneity can cause bright pixels to be placed in bad locations outside the brain. To avoid this, you could choose your phase encode direction judiciously. For example, with coronal slices, if you choose phase-encode left-right, then the crazy field region is above the head (in the scalp) and won&#039;t really have an impact since there are not many bright pixels to the left and right of the top of the scalp.&lt;br /&gt;
* FAT/WATER DIFFERENCE. We need to measure the fat/water frequency difference to optimize the TE values used in the spiral fieldmap.&lt;br /&gt;
* CAN WE INTRODUCE GRADWARP TO SPIRAL?  GE&#039;s sequences use gradwarp to fix distortions due to gradient nonlinearities.  To ensure consistency, the spiral sequence should also have the gradwarp correction.&lt;br /&gt;
* GRADWARP.  Can we find out how gradwarp works?&lt;br /&gt;
* CAN THE EPI SEQUENCE BE TRIGGERED? I.e., can the stimulus computer send an RF pulse to trigger the EPI sequence? Yes.  Use the type-in PSD cni_epi. During prescription, have a look on the Advanced tab and set the triggering option to 1.  0 means &amp;quot;don&#039;t wait for a trigger pulse&amp;quot; and 2 means each volume waits for a cardiac trigger pulse.&lt;br /&gt;
* SLICE MULTIPLEXING. What&#039;s the ETA on this?&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Interleave&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
[[File:EPI_sliceTime.png|thumb|TriggerTime DICOM value plotted for each image from three time frames of a 20-slice EPI scan.]]&lt;br /&gt;
[[File:knk-interleave.png|thumb|400px|One EPI volume. The TR was 10 s and the subject moved out of the coil halfway through the TR. Notice that the odd slices are all high and the even slices are all low, indicating that the slice acquisition order is interleaved.]]&lt;br /&gt;
&lt;br /&gt;
In the GE world, there are three meanings to the term &amp;quot;interleaved&amp;quot;, depending on where you interact with the protocol:&lt;br /&gt;
# The interleaved (vs. sequential) radio button in the EPI &amp;quot;Multi-phase&amp;quot; tab means acquire all the slices then repeat. In this context, &amp;quot;sequential&amp;quot; means acquire all time frames for a slice and then repeat for the next slice. For fMRI, you always want this to be set to interleaved.&lt;br /&gt;
# interleaved can also mean lines of k-space acquisition are interleaved for multishot EPI. &lt;br /&gt;
# interleaved can also mean slices are acquired odd first, then even. Kendrick has confirmed that the GE EPI sequence uses interleaved slice ordering by default. It isn&#039;t obvious how to change this using the GE interface, but interleaved is generally preferred anyway. Just be sure to take this into account when doing slice timing correction. You can use the &amp;quot;TriggerTime&amp;quot; field in the DICOM head to confirm the slice acquisition timing.  (Kendrick also verified that the time points at which slices are acquired are equally spaced within the TR (e.g. see the figure).)&lt;br /&gt;
&lt;br /&gt;
So, for our BOLD EPI sequence, the slice order is odd, even. E.g., for a 20-slice prescription, the slice order would be [1 3 5 7 9 2 4 6 8 10]. Slice 1 is the first slice in your NIFTI file. For an axial prescription, this slice might be either the most inferior or the most superior slice, depending on the slice order defined by the prescription. (The slice numbers appear in the graphic Rx dialog on the scanner console.) We are confident that the NIFTI files generated by the CNI NIMS system contain the correct slice order and necessary NIFTI header information to accurately indicate the slice order. However, if you have questions about this, contact the CNI Research Director.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Gradwarp&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
* By default, the scanner applies a correction for nonlinearities in the gradients, called gradwarp.  Presumably, the correction will make your images more spatially accurate.  It is not clear exactly what is the nature of the correction.&lt;br /&gt;
* Currently, Atsushi&#039;s spiral sequence does not take the gradwarp into account; thus, spiral images may be (slightly) misregistered with respect to images from stock GE sequences.&lt;br /&gt;
* Based on inspection of data, it appears that gradwarp corrects in 3D for the 3D T1 Bravo sequence.  But perhaps the correction is only 2D for 2D sequences?&lt;br /&gt;
* It appears that the gradient warping step is the very final step applied to the data (i.e., after calculating the magnitude, phase, real, and imaginary images, the gradient warping induces one final interpolation of the images). If you are interested in the phase data, you should compute the phase yourself from the gradwarped real and imaginary images instead of using the gradwarped phase image (which has interpolation problems).&lt;br /&gt;
* Perhaps we could make use of the [http://www.nitrc.org/projects/grad_unwarp Gradient Non-linearity Unwarping Tool]; also see the Neuroimage article by Jovicich, &amp;quot;Reliability in multi-site structural MRI studies: Effects of gradient non-linearity correction on phantom and human data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This is an example of the effect of gradwarp:&lt;br /&gt;
&lt;br /&gt;
[[File:knk-gradwarp-example.gif]]&lt;br /&gt;
&lt;br /&gt;
There are two frames.  The frame with a darker background and bigger brain is a version with the gradwarp correction turned OFF.  The other frame has the gradwarp correction turned ON (which is the default);&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;&amp;quot;Silent&amp;quot; Partial Fourier&#039;&#039;&#039; ==&lt;br /&gt;
Note that the effect described below only affected GE EPI sequences before software version RX28. The EPI sequence that most people use at CNI is a modified version of the GE product EPI sequence. Since version RX28 (including the latest MR30), we have implemented a modification in the sequence that avoids this kind of behavior - when TE is not long enough to acquire all the k-space lines, instead of droppinng the entire half of k-space and using a default 8 lines of overscan, the scanner will use the actual TE and echo spacing to calculate the maximum number of k-space lines it can acquire, and as many k-space lines as it can. This means there will not be a sudden drop of SNR due to the Partial Fourier readout. &lt;br /&gt;
&lt;br /&gt;
* In EPI, if you increase the acquisition time too much (e.g. by having a large matrix size or a short TE), the pulse sequence will be unable to acquire the requisite half of k-space before the TE value.  When this happens, the scanner silently decides to simply drop that half of k-space and acquire a default of 8 lines of k-space for that half.  This is potentially quite bad, as you lose a lot of SNR, since there will be wasted dead time after the RF pulse up until the beginning of the 8 lines.  Moreover, partial acquisitions may result in difficulties in the reconstruction process and thus image artifacts (I have noticed these when scanning phantoms).  The safest way to see whether the silent dropping of k-space happens is to check the plotter (to do that, start scanning, pause the scan, and then run plotter from a command window).  An easier (but unverified) way is to monitor the Relative SNR number in the console.  It appears that once you go over the limit, the relative SNR jumps way down.&lt;br /&gt;
** There is weird buggy behavior in the console concerning the relative SNR number.  If you violate the limit and the number of slices that can be acquired is less than the current number of slices (resulting in # acqs being set to 2), you need to reset the number of slices to a lower number within the limit.  Then, the # acqs will go back to 1, as desired.&lt;br /&gt;
** Regarding using the relative SNR as a index for whether the silent partial fourier occurs, for some reason, you need at least 20 volumes prescribed.  I have found that if you prescribe less volumes, then the big jump in relative SNR does not occur.&lt;br /&gt;
* To deal with the &amp;quot;silent&amp;quot; partial Fourier issue, one strategy is to ensure that you always get full coverage of k-space.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of what happens.  This is 70 phase-encode lines:&lt;br /&gt;
&lt;br /&gt;
[[File:knk-plotter1.png|x400px]]&lt;br /&gt;
&lt;br /&gt;
Everything is OK; a full k-space acquisition is obtained.&lt;br /&gt;
&lt;br /&gt;
This is 72 phase-encode lines:&lt;br /&gt;
&lt;br /&gt;
[[File:knk-plotter2.png|x400px]]&lt;br /&gt;
&lt;br /&gt;
Still OK.&lt;br /&gt;
&lt;br /&gt;
This is 74 phase-encode lines:&lt;br /&gt;
&lt;br /&gt;
[[File:knk-plotter3.png|x400px]]&lt;br /&gt;
&lt;br /&gt;
OOPS. Now there is substantial dead time before the TE.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s some more illustration of what the problem really amounts to.  This is a phantom, using 72 phase-encode lines:&lt;br /&gt;
&lt;br /&gt;
[[File:knk-silent-volgood.png|x200px]]&lt;br /&gt;
&lt;br /&gt;
And this is the temporal SNR (red and dark red is good):&lt;br /&gt;
&lt;br /&gt;
[[File:knk-silent-volgood-temporalsnr.png|x200px]]&lt;br /&gt;
&lt;br /&gt;
This is the same phantom, if you increase the phase-encode lines to 74 (which triggers the silent partial Fourier):&lt;br /&gt;
&lt;br /&gt;
[[File:knk-silent-volbad.png|x200px]]&lt;br /&gt;
&lt;br /&gt;
Notice the reconstruction artifacts.  And this is the temporal SNR:&lt;br /&gt;
&lt;br /&gt;
[[File:knk-silent-volbad-temporalsnr.png|x200px]]&lt;br /&gt;
&lt;br /&gt;
Notice it&#039;s substantially worse than the temporal SNR of the 72 version.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Fermi filtering&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
* The reconstruction code applies a Fermi low-pass filter by default(!).  To turn this off, set CV var rhfermr to the matrix size and set CV var rhfermw to 1.  Unfortunately, it appears that these CV vars are not saved when you save protocols, so you&#039;ll have to do this at least once per scan session.&lt;br /&gt;
* Apparently, the purpose of Fermi filtering is to reduce Gibbs artifacts (which are caused by truncation of k-space).&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Reconstructed image size&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
* By default, images are reconstructed at matrix sizes that are powers of two (presumably for speed).  However, this wastes disk and memory space.  To change the reconstructed image size, set CV variables rhrcxres, rhrcyres, rhimsize to the same as your acquisition matrix size.  For example, if I acquire a 70 x 70 matrix size, I would set rhrcxres=70, rhrcyres=70, rhimsize=70, and then I would get 70x70 images instead of 128x128.  In the CNI EPI sequence, set User CV4 in the Advanced tab to 1 to enable this feature.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Precise values&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
* The GUI tends to round values that you enter.  For example, if you enter 1605.242 for the TR, the GUI will round the value displayed to 1605.2, but the value that actually will get used is the precise one.  You can check this via the CV vars (e.g. optr), which you can take to be the actual value used.&lt;br /&gt;
* If you enter in a precise value, and copy and paste the entire sequence, usually I find that the precise value is also copied.&lt;br /&gt;
* If you enter in a precise value, and then save the protocol, I have found that (at least in some cases) the wrong, rounded value is saved.  You should re-enter the precise value every time you load in the saved protocol.&lt;br /&gt;
* If you have a precise FOV size (e.g. 14.24 cm FOV) entered, and you copy that slice prescription to another sequence, I have found that the rounded FOV is copied (e.g. 14.2 cm FOV).  You should re-enter the value to get it right.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Phase data&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
* By default, only magnitude images are reconstructed and saved by the scanner.  You can set the CV variable rhrcctrl in order to save phase-related images in addition to the magnitude images.  It appears that rhrcctrl should be an integer between 0 and 15, and reflects a 4-bit mask where the ordering of bits (from high to low) are imaginary, real, phase, magnitude.  For example, rhrcctrl=13 means to save imaginary, real, and magnitude images.&lt;br /&gt;
* In the DICOM files outputted by the scanner, the scanner cycles through the various versions of each slice before proceeding to the next slice.  The order appears to be magnitude, phase, real, and then imaginary.&lt;br /&gt;
* I have found that if you try to write out all four versions of the images, the reconstruction time becomes a real issue to worry about --- if you attempt to start the next EPI run before the scanner completes the reconstruction of the data from the previous EPI run, it will pause the new EPI run somewhere in the middle (presumably when its cache fills up or something).  This is really bad, so you should wait until the previous run completely finishes its reconstruction.  To speed things up, consider writing only the versions of the images that you need.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;CV variables&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Many variables that control scanner behavior are not accessible via the usual GUI interface.  To access these variables, press Save Rx and then Research-&amp;gt;Download.  Then, select Display CVs.&lt;br /&gt;
&lt;br /&gt;
Here is a list of CV vars that Kendrick has run across.  Atsushi might know about more of them.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;YOU MAY VERY WELL WANT TO USE THESE:&#039;&#039;&#039;&lt;br /&gt;
  map_deltaf [frequency for echo time difference (for Atsushi&#039;s spiral fieldmap)]&lt;br /&gt;
  rhfermr [Fermi radius (in matrix units I think)]&lt;br /&gt;
  rhfermw [Fermi width (in matrix units I think)]&lt;br /&gt;
  rhrcxres [transform size (x)]&lt;br /&gt;
  rhrcyres [transform size (y)]&lt;br /&gt;
  rhimsize [image size]&lt;br /&gt;
  pepolar [phase encoding polarity (direction)]&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;YOU PROBABLY DON&#039;T WANT TO USE THESE:&#039;&#039;&#039;&lt;br /&gt;
  opslquant [number of slices]&lt;br /&gt;
  optr [TR]&lt;br /&gt;
  opfphases [number of TRs]&lt;br /&gt;
  opte [TE]&lt;br /&gt;
  opflip [flip angle]&lt;br /&gt;
  opfov [field-of-view]&lt;br /&gt;
  opxres [frequency-encode resolution]&lt;br /&gt;
  opyres [phase-encode resolution]&lt;br /&gt;
  opslthick [slice thickness]&lt;br /&gt;
  opphasefov [fraction of the FOV in the phase-encode direction]&lt;br /&gt;
  avminte [minimum TE, same as in GUI]&lt;br /&gt;
  opnex [number of excitations]&lt;br /&gt;
  nograd [no gradwarp, default is 0]&lt;br /&gt;
  rhferme [Fermi eccentricity??]&lt;br /&gt;
  rhrcctrl [controls what kinds of images to save (see &amp;quot;Phase data&amp;quot; section above)]&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;UNKNOWN/UNTESTED:&#039;&#039;&#039;&lt;br /&gt;
  nframes [number of frames?]&lt;br /&gt;
  opti [?]&lt;br /&gt;
  num_overscan [default is 0?]&lt;br /&gt;
  rhmethod [default is 1?]&lt;br /&gt;
  esp [echo spacing?]&lt;br /&gt;
  autolock [autolock raw files, default is 0]&lt;br /&gt;
  rhexecctrl [?]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Fieldmaps&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
===Kendrick&#039;s Notes on Fieldmaps===&lt;br /&gt;
&lt;br /&gt;
One of the major problems that affects EPI data is spatial distortion.  It is possible to correct for distortions in EPI data posthoc using fieldmap measurements.  Kendrick has developed some MATLAB code that handles spatial distortion and other pre-processing procedures relevant to EPI fMRI data.&lt;br /&gt;
&lt;br /&gt;
The process can be divided into two basic parts.  The first part is getting the fieldmap acquisition right.  The second part is using the code to process the EPI and fieldmap data.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fieldmap strategy&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The higher-order shim (HOShim) is quite important and massages the field to be as homogenous as possible.  (It&#039;s best to get the field right up front instead of relying on postprocessing!).  In the HOShim, you should probably prescribe an ellipse that is liberal, i.e. covers all parts of the brain that are within your slice prescription.  Covering some air outside the brain is fine.  After the HOShim, make sure the Shim setting is OFF on all subsequent scans.&lt;br /&gt;
&lt;br /&gt;
Normally, a pre-scan is run before each GE sequence.  One of the things that the pre-scan does is to re-measure the peak frequency corresponding to water.  This in effect compensates for drift in the overall magnetic field strength (which may be due to heating which in turn is dependent on what pulse sequences you run).  But change in the magnetic field is exactly what we are trying to track using fieldmaps.  So, some fancy footwork is necessary to avoid re-measuring the peak frequency.&lt;br /&gt;
&lt;br /&gt;
The strategy that Kendrick likes is this:&lt;br /&gt;
# After completing the localizer, ASSET calibration, higher-order shim, and in-planes, we are ready to proceed to the actual functional data.&lt;br /&gt;
# Set up the EPI sequence and prescribe only one volume.  Then hit SCAN as usual.  This will trigger the pre-scan and acquire one volume.  We want to trigger the pre-scan because the pre-scan includes other calibration routines that reduce ghosting, etc.&lt;br /&gt;
# Then, proceed to collect your actual data by sandwiching EPI runs within fieldmap acquisitions, like F1 / E1 / F2 / E2 / F3 / E3 / F4.  This ensures that you have a good estimate of the field throughout all of the EPI data.&lt;br /&gt;
# Importantly, when starting each EPI and each fieldmap, click Save Rx, then click Research-&amp;gt;Download, then Manual Prep Scan.  This will open up a window.  Don&#039;t do anything and just click DONE.  Then click Prep Scan.  Then press the green button on the console keyboard to start the scan.  By using this procedure to start the scan, we avoid the pre-scan and therefore avoid the re-calibration of the peak frequency.&lt;br /&gt;
&lt;br /&gt;
If for some reason, later in the session, you decide to acquire sequences other than fieldmaps and EPIs, you should allow the pre-scan to run as usual (by just hitting the SCAN button to scan).  Of course, this will change the global constant describing the field strength.&lt;br /&gt;
&lt;br /&gt;
Also, if you for some reason change parameters of the EPI sequence (such as TR, TE, phase direction), you need to allow the pre-scan to run so that proper calibration can be done.  However, certain EPI parameters do not necessitate a pre-scan, like number of volumes to acquire and the phase-encode polarity (which is controlled through the CV variable pepolar).&lt;br /&gt;
&lt;br /&gt;
Admittedly, sandwiching every EPI run between fieldmaps is an aggressive (and paranoid) strategy --- each fieldmap takes about a minute to acquire.  If you like, it may be okay to space the fieldmaps more sparsely, e.g. F1 / E1 / E2 / F2 / E3 / E4 / F3, depending on how long your EPI runs are.  Of course, this comes at the expense of having sub-optimal tracking of the field.&lt;br /&gt;
&lt;br /&gt;
As an even less aggressive strategy, it is also conceivable to acquire only a single fieldmap (indeed, it appears that that&#039;s what most laboratories do, if anything at all) and also allow each EPI run to do the pre-scan (which avoids the cumbersome Manual Prep Scan procedure).  The hope here is that the bulk of the drift in the magnetic field can be captured by just a change in a global constant.  To a first approximation, it does appear that the overall DC in the field is the biggest effect, but in data that I have looked at, there are additional components that can&#039;t be described by just a constant.  Moreover, using a single fieldmap cannot compensate for changes in the field within individual EPI runs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spiral fieldmap acquisition&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Atsushi has developed a spiral-based sequence for measuring fieldmaps, and the quality is quite good.  Here are the parameters that Kendrick recommends for optimal quality:&lt;br /&gt;
# First, set slice thickness.&lt;br /&gt;
# Then copy slices from the EPI (or in-plane) sequence.&lt;br /&gt;
# 16-shot (16 spiral interleaves).  The purpose is to minimize the readout time so as to minimize distortion and dropout (in combination with an appropriately short TE).&lt;br /&gt;
# 700 ms TR.  You could try to reduce this value to speed up acquisition.  If the other parameters necessitate a longer TR, the sequence will silently use a longer TR and the scanner will scan past the on-screen time countdown.  This is okay, just wait a few seconds.&lt;br /&gt;
# 54° flip.  This is the Ernst angle for the 700 ms TR (assuming a T1 constant of 1333.33 ms).&lt;br /&gt;
# no SAT.  In regions of bad field inhomogeneity, water will be off-resonance.  So if you were to use a fat saturation pulse, you could destroy the water signal in these regions.  That is bad.  So, leave SAT off.&lt;br /&gt;
# 256 x 256.  This is a fairly high matrix size which will ensure high-resolution, high-quality field maps.&lt;br /&gt;
# 2 NEX.  Get two repetitions to ensure that the fieldmaps will have high SNR.  If time is a consideration, you might try going down to 1 NEX.&lt;br /&gt;
# 24.0 FOV.  This is a large FOV to ensure that the entire head is completely covered in the in-plane dimensions.  You could reduce, but be careful.&lt;br /&gt;
# 6 dummies to ensure we reach a steady-state.&lt;br /&gt;
# 4.545 ms TE.  This is 1/440Hz * 2.  It is unclear whether saved protocols will save the precise TE value.  So it is recommended that you manually type in 4.545 in each scan session.  (After typing it in, copying and pasting that sequence does preserve the precise value.)&lt;br /&gt;
# map_deltaf 440.  You must edit this CV variable after saving and downloading the spiral sequence.   (The purpose of the TE and map_deltaf values is to choose echo times that are matched to the difference between the precession frequencies of water and fat, so that the resulting fieldmaps will have minimal artifacts.) (UPDATE: This is now the default setting for the map_deltaf, so actually, you don&#039;t have to go in and edit the CV variable.)&lt;br /&gt;
# Note: it is very important that you get the TE and map_deltaf values right!  Otherwise, there will be fat-related artifacts in your fieldmaps.&lt;br /&gt;
# You will have to transfer the raw fieldmap data yourself (they do not get converted to DICOM format like data from the stock GE sequences).  The files are named like P39936.7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pre-processing code&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
See [[preprocessfmri]] for details on how to process EPI data using fieldmaps. Note that you need to know the number of phase encode lines (typically your image size along the phase encode dimension, divided by the ASSET acceleration factor) and the phase encode dwell time (which should be stored in the DICOM field (0043,102c): the time per phase-encode line in microseconds).&lt;br /&gt;
&lt;br /&gt;
===Using FSL to process CNI fieldmaps===&lt;br /&gt;
&lt;br /&gt;
The ...fieldmap.nii.gz file that we save in NIMS is what the FSL folks call &amp;quot;A single, real fieldmap image (showing the field inhomogeneity in each voxel)&amp;quot;. (NOTE: for older datasets in NIMS, this file uses the &#039;B0&#039; suffix rather than &#039;fieldmap&#039;.) The other nifti associated with a fieldmap scan is a magnitude image that can be used for masking, etc. &lt;br /&gt;
&lt;br /&gt;
The fieldmap image is in units of Hz. FSL likes radians/s, so you can convert it with fslmaths:&lt;br /&gt;
&lt;br /&gt;
    fslmaths 8860_6_1fieldmap.nii.gz -mul 6.28 fieldmap_rads&lt;br /&gt;
&lt;br /&gt;
Then jump straight to step 5 on the [http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FUGUE/Guide#Step_5_-_Regularising_the_fieldmap FSL FUGUE guide]. Although you may want to mask the fieldmap first. E.g.:&lt;br /&gt;
&lt;br /&gt;
    bet 8860_6_1.nii.gz fieldmap -m -n&lt;br /&gt;
    fslmaths fieldmap_rads.nii.gz -mul fieldmap_mask.nii.gz fieldmap_rads&lt;br /&gt;
    fugue --loadfmap=fieldmap_rads --despike --savefmap=fieldmap_rads&lt;br /&gt;
    fugue --loadfmap=fieldmap_rads -m --savefmap=fieldmap_rads&lt;br /&gt;
    fugue --loadfmap=fieldmap_rads -s 1 --savefmap=fieldmap_rads&lt;br /&gt;
&lt;br /&gt;
Then you can use [http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FUGUE/Guide#FUGUE FUGUE command-line tool] to unwarp the EPI image. E.g.:&lt;br /&gt;
&lt;br /&gt;
    fugue -i epi --dwell=dwelltime --loadfmap=fieldmap -u result&lt;br /&gt;
&lt;br /&gt;
where dwelltime is the same as the effective echo spacing. You can find the effective echo spacing from the header of your epi file. E.g., using fslhd, look at &#039;descrip&#039;:&lt;br /&gt;
&lt;br /&gt;
    fslhd 8860_5_1.nii.gz | grep &#039;descrip&#039;&lt;br /&gt;
&lt;br /&gt;
which produces:&lt;br /&gt;
&lt;br /&gt;
    descrip te=30.00;ti=0;fa=77;ec=0.4800;acq=[80,80];mt=0;rp=2.0;&lt;br /&gt;
&lt;br /&gt;
showing that the echo spacing (&#039;ec&#039;) is 0.48 milliseconds. The phase encoding dimension is usually y for EPI acquisitions. Note that, as the FSL docs say, &amp;quot;your operator can tell you whether the unwarp direction, or phase encode direction, is x, y or z, but whether it is + or - needs to be determined, currently, by trial and error...&amp;quot; However, we think it&#039;s usually + for data acquired here.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
	<entry>
		<id>http://cni.su.domains/wiki/index.php?title=GE_Processing&amp;diff=59383</id>
		<title>GE Processing</title>
		<link rel="alternate" type="text/html" href="http://cni.su.domains/wiki/index.php?title=GE_Processing&amp;diff=59383"/>
		<updated>2026-02-04T23:04:04Z</updated>

		<summary type="html">&lt;p&gt;Huawu: /* Reconstructed image size */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The GE processing pipeline includes a variety of decisions that advanced users need to know.  This page describes some of what we have learned about this pipeline and how to control these decisions. It is our view that each of these decisions should be made very clear to users by GE.  Sometimes they are, sometimes not so much.&lt;br /&gt;
&lt;br /&gt;
Return to [[MR_Protocols]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;To-do list&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Here are various items that are on Kendrick&#039;s radar.  (Others should feel free to add items.)  Higher-priority items are listed towards the top.&lt;br /&gt;
&lt;br /&gt;
* FIELD INHOMOGENEITY CAUSED BY COIL? There is some suspicion that the 32-ch coil causes field inhomogenity near the top on coronal slices.  Kendrick will be testing various coils with respect to this issue. The specific reason that the inhomogenity is bad is that if you do a fieldmap correction, the field inhomogeneity can cause bright pixels to be placed in bad locations outside the brain. To avoid this, you could choose your phase encode direction judiciously. For example, with coronal slices, if you choose phase-encode left-right, then the crazy field region is above the head (in the scalp) and won&#039;t really have an impact since there are not many bright pixels to the left and right of the top of the scalp.&lt;br /&gt;
* FAT/WATER DIFFERENCE. We need to measure the fat/water frequency difference to optimize the TE values used in the spiral fieldmap.&lt;br /&gt;
* CAN WE INTRODUCE GRADWARP TO SPIRAL?  GE&#039;s sequences use gradwarp to fix distortions due to gradient nonlinearities.  To ensure consistency, the spiral sequence should also have the gradwarp correction.&lt;br /&gt;
* GRADWARP.  Can we find out how gradwarp works?&lt;br /&gt;
* CAN THE EPI SEQUENCE BE TRIGGERED? I.e., can the stimulus computer send an RF pulse to trigger the EPI sequence? Yes.  Use the type-in PSD cni_epi. During prescription, have a look on the Advanced tab and set the triggering option to 1.  0 means &amp;quot;don&#039;t wait for a trigger pulse&amp;quot; and 2 means each volume waits for a cardiac trigger pulse.&lt;br /&gt;
* SLICE MULTIPLEXING. What&#039;s the ETA on this?&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Interleave&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
[[File:EPI_sliceTime.png|thumb|TriggerTime DICOM value plotted for each image from three time frames of a 20-slice EPI scan.]]&lt;br /&gt;
[[File:knk-interleave.png|thumb|400px|One EPI volume. The TR was 10 s and the subject moved out of the coil halfway through the TR. Notice that the odd slices are all high and the even slices are all low, indicating that the slice acquisition order is interleaved.]]&lt;br /&gt;
&lt;br /&gt;
In the GE world, there are three meanings to the term &amp;quot;interleaved&amp;quot;, depending on where you interact with the protocol:&lt;br /&gt;
# The interleaved (vs. sequential) radio button in the EPI &amp;quot;Multi-phase&amp;quot; tab means acquire all the slices then repeat. In this context, &amp;quot;sequential&amp;quot; means acquire all time frames for a slice and then repeat for the next slice. For fMRI, you always want this to be set to interleaved.&lt;br /&gt;
# interleaved can also mean lines of k-space acquisition are interleaved for multishot EPI. &lt;br /&gt;
# interleaved can also mean slices are acquired odd first, then even. Kendrick has confirmed that the GE EPI sequence uses interleaved slice ordering by default. It isn&#039;t obvious how to change this using the GE interface, but interleaved is generally preferred anyway. Just be sure to take this into account when doing slice timing correction. You can use the &amp;quot;TriggerTime&amp;quot; field in the DICOM head to confirm the slice acquisition timing.  (Kendrick also verified that the time points at which slices are acquired are equally spaced within the TR (e.g. see the figure).)&lt;br /&gt;
&lt;br /&gt;
So, for our BOLD EPI sequence, the slice order is odd, even. E.g., for a 20-slice prescription, the slice order would be [1 3 5 7 9 2 4 6 8 10]. Slice 1 is the first slice in your NIFTI file. For an axial prescription, this slice might be either the most inferior or the most superior slice, depending on the slice order defined by the prescription. (The slice numbers appear in the graphic Rx dialog on the scanner console.) We are confident that the NIFTI files generated by the CNI NIMS system contain the correct slice order and necessary NIFTI header information to accurately indicate the slice order. However, if you have questions about this, contact the CNI Research Director.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Gradwarp&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
* By default, the scanner applies a correction for nonlinearities in the gradients, called gradwarp.  Presumably, the correction will make your images more spatially accurate.  It is not clear exactly what is the nature of the correction.&lt;br /&gt;
* Currently, Atsushi&#039;s spiral sequence does not take the gradwarp into account; thus, spiral images may be (slightly) misregistered with respect to images from stock GE sequences.&lt;br /&gt;
* Based on inspection of data, it appears that gradwarp corrects in 3D for the 3D T1 Bravo sequence.  But perhaps the correction is only 2D for 2D sequences?&lt;br /&gt;
* It appears that the gradient warping step is the very final step applied to the data (i.e., after calculating the magnitude, phase, real, and imaginary images, the gradient warping induces one final interpolation of the images). If you are interested in the phase data, you should compute the phase yourself from the gradwarped real and imaginary images instead of using the gradwarped phase image (which has interpolation problems).&lt;br /&gt;
* Perhaps we could make use of the [http://www.nitrc.org/projects/grad_unwarp Gradient Non-linearity Unwarping Tool]; also see the Neuroimage article by Jovicich, &amp;quot;Reliability in multi-site structural MRI studies: Effects of gradient non-linearity correction on phantom and human data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This is an example of the effect of gradwarp:&lt;br /&gt;
&lt;br /&gt;
[[File:knk-gradwarp-example.gif]]&lt;br /&gt;
&lt;br /&gt;
There are two frames.  The frame with a darker background and bigger brain is a version with the gradwarp correction turned OFF.  The other frame has the gradwarp correction turned ON (which is the default);&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;&amp;quot;Silent&amp;quot; Partial Fourier&#039;&#039;&#039; ==&lt;br /&gt;
Note that the effect described below only affected GE EPI sequences before software version RX28. The EPI sequence that most people use at CNI is a modified version of the GE product EPI sequence. Since version RX28 (including the latest MR30), we have implemented a modification in the sequence that avoids this kind of behavior - when TE is not long enough to acquire all the k-space lines, instead of droppinng the entire half of k-space and using a default 8 lines of overscan, the scanner will use the actual TE and echo spacing to calculate the maximum number of k-space lines it can acquire, and as many k-space lines as it can. This means there will not be a sudden drop of SNR due to the Partial Fourier readout. &lt;br /&gt;
&lt;br /&gt;
* In EPI, if you increase the acquisition time too much (e.g. by having a large matrix size or a short TE), the pulse sequence will be unable to acquire the requisite half of k-space before the TE value.  When this happens, the scanner silently decides to simply drop that half of k-space and acquire a default of 8 lines of k-space for that half.  This is potentially quite bad, as you lose a lot of SNR, since there will be wasted dead time after the RF pulse up until the beginning of the 8 lines.  Moreover, partial acquisitions may result in difficulties in the reconstruction process and thus image artifacts (I have noticed these when scanning phantoms).  The safest way to see whether the silent dropping of k-space happens is to check the plotter (to do that, start scanning, pause the scan, and then run plotter from a command window).  An easier (but unverified) way is to monitor the Relative SNR number in the console.  It appears that once you go over the limit, the relative SNR jumps way down.&lt;br /&gt;
** There is weird buggy behavior in the console concerning the relative SNR number.  If you violate the limit and the number of slices that can be acquired is less than the current number of slices (resulting in # acqs being set to 2), you need to reset the number of slices to a lower number within the limit.  Then, the # acqs will go back to 1, as desired.&lt;br /&gt;
** Regarding using the relative SNR as a index for whether the silent partial fourier occurs, for some reason, you need at least 20 volumes prescribed.  I have found that if you prescribe less volumes, then the big jump in relative SNR does not occur.&lt;br /&gt;
* To deal with the &amp;quot;silent&amp;quot; partial Fourier issue, one strategy is to ensure that you always get full coverage of k-space.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of what happens.  This is 70 phase-encode lines:&lt;br /&gt;
&lt;br /&gt;
[[File:knk-plotter1.png|x400px]]&lt;br /&gt;
&lt;br /&gt;
Everything is OK; a full k-space acquisition is obtained.&lt;br /&gt;
&lt;br /&gt;
This is 72 phase-encode lines:&lt;br /&gt;
&lt;br /&gt;
[[File:knk-plotter2.png|x400px]]&lt;br /&gt;
&lt;br /&gt;
Still OK.&lt;br /&gt;
&lt;br /&gt;
This is 74 phase-encode lines:&lt;br /&gt;
&lt;br /&gt;
[[File:knk-plotter3.png|x400px]]&lt;br /&gt;
&lt;br /&gt;
OOPS. Now there is substantial dead time before the TE.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s some more illustration of what the problem really amounts to.  This is a phantom, using 72 phase-encode lines:&lt;br /&gt;
&lt;br /&gt;
[[File:knk-silent-volgood.png|x200px]]&lt;br /&gt;
&lt;br /&gt;
And this is the temporal SNR (red and dark red is good):&lt;br /&gt;
&lt;br /&gt;
[[File:knk-silent-volgood-temporalsnr.png|x200px]]&lt;br /&gt;
&lt;br /&gt;
This is the same phantom, if you increase the phase-encode lines to 74 (which triggers the silent partial Fourier):&lt;br /&gt;
&lt;br /&gt;
[[File:knk-silent-volbad.png|x200px]]&lt;br /&gt;
&lt;br /&gt;
Notice the reconstruction artifacts.  And this is the temporal SNR:&lt;br /&gt;
&lt;br /&gt;
[[File:knk-silent-volbad-temporalsnr.png|x200px]]&lt;br /&gt;
&lt;br /&gt;
Notice it&#039;s substantially worse than the temporal SNR of the 72 version.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Fermi filtering&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
* The reconstruction code applies a Fermi low-pass filter by default(!).  To turn this off, set CV var rhfermr to the matrix size and set CV var rhfermw to 1.  Unfortunately, it appears that these CV vars are not saved when you save protocols, so you&#039;ll have to do this at least once per scan session.&lt;br /&gt;
* Apparently, the purpose of Fermi filtering is to reduce Gibbs artifacts (which are caused by truncation of k-space).&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Reconstructed image size&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
* By default, images are reconstructed at matrix sizes that are powers of two (presumably for speed).  However, this wastes disk and memory space.  To change the reconstructed image size, set CV variables rhrcxres, rhrcyres, rhimsize to the same as your acquisition matrix size.  For example, if I acquire a 70 x 70 matrix size, I would set rhrcxres=70, rhrcyres=70, rhimsize=70, and then I would get 70x70 images instead of 128x128.  In the CNI EPI sequence, set User CV4 to 1 to enable this feature.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Precise values&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
* The GUI tends to round values that you enter.  For example, if you enter 1605.242 for the TR, the GUI will round the value displayed to 1605.2, but the value that actually will get used is the precise one.  You can check this via the CV vars (e.g. optr), which you can take to be the actual value used.&lt;br /&gt;
* If you enter in a precise value, and copy and paste the entire sequence, usually I find that the precise value is also copied.&lt;br /&gt;
* If you enter in a precise value, and then save the protocol, I have found that (at least in some cases) the wrong, rounded value is saved.  You should re-enter the precise value every time you load in the saved protocol.&lt;br /&gt;
* If you have a precise FOV size (e.g. 14.24 cm FOV) entered, and you copy that slice prescription to another sequence, I have found that the rounded FOV is copied (e.g. 14.2 cm FOV).  You should re-enter the value to get it right.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Phase data&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
* By default, only magnitude images are reconstructed and saved by the scanner.  You can set the CV variable rhrcctrl in order to save phase-related images in addition to the magnitude images.  It appears that rhrcctrl should be an integer between 0 and 15, and reflects a 4-bit mask where the ordering of bits (from high to low) are imaginary, real, phase, magnitude.  For example, rhrcctrl=13 means to save imaginary, real, and magnitude images.&lt;br /&gt;
* In the DICOM files outputted by the scanner, the scanner cycles through the various versions of each slice before proceeding to the next slice.  The order appears to be magnitude, phase, real, and then imaginary.&lt;br /&gt;
* I have found that if you try to write out all four versions of the images, the reconstruction time becomes a real issue to worry about --- if you attempt to start the next EPI run before the scanner completes the reconstruction of the data from the previous EPI run, it will pause the new EPI run somewhere in the middle (presumably when its cache fills up or something).  This is really bad, so you should wait until the previous run completely finishes its reconstruction.  To speed things up, consider writing only the versions of the images that you need.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;CV variables&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Many variables that control scanner behavior are not accessible via the usual GUI interface.  To access these variables, press Save Rx and then Research-&amp;gt;Download.  Then, select Display CVs.&lt;br /&gt;
&lt;br /&gt;
Here is a list of CV vars that Kendrick has run across.  Atsushi might know about more of them.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;YOU MAY VERY WELL WANT TO USE THESE:&#039;&#039;&#039;&lt;br /&gt;
  map_deltaf [frequency for echo time difference (for Atsushi&#039;s spiral fieldmap)]&lt;br /&gt;
  rhfermr [Fermi radius (in matrix units I think)]&lt;br /&gt;
  rhfermw [Fermi width (in matrix units I think)]&lt;br /&gt;
  rhrcxres [transform size (x)]&lt;br /&gt;
  rhrcyres [transform size (y)]&lt;br /&gt;
  rhimsize [image size]&lt;br /&gt;
  pepolar [phase encoding polarity (direction)]&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;YOU PROBABLY DON&#039;T WANT TO USE THESE:&#039;&#039;&#039;&lt;br /&gt;
  opslquant [number of slices]&lt;br /&gt;
  optr [TR]&lt;br /&gt;
  opfphases [number of TRs]&lt;br /&gt;
  opte [TE]&lt;br /&gt;
  opflip [flip angle]&lt;br /&gt;
  opfov [field-of-view]&lt;br /&gt;
  opxres [frequency-encode resolution]&lt;br /&gt;
  opyres [phase-encode resolution]&lt;br /&gt;
  opslthick [slice thickness]&lt;br /&gt;
  opphasefov [fraction of the FOV in the phase-encode direction]&lt;br /&gt;
  avminte [minimum TE, same as in GUI]&lt;br /&gt;
  opnex [number of excitations]&lt;br /&gt;
  nograd [no gradwarp, default is 0]&lt;br /&gt;
  rhferme [Fermi eccentricity??]&lt;br /&gt;
  rhrcctrl [controls what kinds of images to save (see &amp;quot;Phase data&amp;quot; section above)]&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;UNKNOWN/UNTESTED:&#039;&#039;&#039;&lt;br /&gt;
  nframes [number of frames?]&lt;br /&gt;
  opti [?]&lt;br /&gt;
  num_overscan [default is 0?]&lt;br /&gt;
  rhmethod [default is 1?]&lt;br /&gt;
  esp [echo spacing?]&lt;br /&gt;
  autolock [autolock raw files, default is 0]&lt;br /&gt;
  rhexecctrl [?]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Fieldmaps&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
===Kendrick&#039;s Notes on Fieldmaps===&lt;br /&gt;
&lt;br /&gt;
One of the major problems that affects EPI data is spatial distortion.  It is possible to correct for distortions in EPI data posthoc using fieldmap measurements.  Kendrick has developed some MATLAB code that handles spatial distortion and other pre-processing procedures relevant to EPI fMRI data.&lt;br /&gt;
&lt;br /&gt;
The process can be divided into two basic parts.  The first part is getting the fieldmap acquisition right.  The second part is using the code to process the EPI and fieldmap data.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fieldmap strategy&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The higher-order shim (HOShim) is quite important and massages the field to be as homogenous as possible.  (It&#039;s best to get the field right up front instead of relying on postprocessing!).  In the HOShim, you should probably prescribe an ellipse that is liberal, i.e. covers all parts of the brain that are within your slice prescription.  Covering some air outside the brain is fine.  After the HOShim, make sure the Shim setting is OFF on all subsequent scans.&lt;br /&gt;
&lt;br /&gt;
Normally, a pre-scan is run before each GE sequence.  One of the things that the pre-scan does is to re-measure the peak frequency corresponding to water.  This in effect compensates for drift in the overall magnetic field strength (which may be due to heating which in turn is dependent on what pulse sequences you run).  But change in the magnetic field is exactly what we are trying to track using fieldmaps.  So, some fancy footwork is necessary to avoid re-measuring the peak frequency.&lt;br /&gt;
&lt;br /&gt;
The strategy that Kendrick likes is this:&lt;br /&gt;
# After completing the localizer, ASSET calibration, higher-order shim, and in-planes, we are ready to proceed to the actual functional data.&lt;br /&gt;
# Set up the EPI sequence and prescribe only one volume.  Then hit SCAN as usual.  This will trigger the pre-scan and acquire one volume.  We want to trigger the pre-scan because the pre-scan includes other calibration routines that reduce ghosting, etc.&lt;br /&gt;
# Then, proceed to collect your actual data by sandwiching EPI runs within fieldmap acquisitions, like F1 / E1 / F2 / E2 / F3 / E3 / F4.  This ensures that you have a good estimate of the field throughout all of the EPI data.&lt;br /&gt;
# Importantly, when starting each EPI and each fieldmap, click Save Rx, then click Research-&amp;gt;Download, then Manual Prep Scan.  This will open up a window.  Don&#039;t do anything and just click DONE.  Then click Prep Scan.  Then press the green button on the console keyboard to start the scan.  By using this procedure to start the scan, we avoid the pre-scan and therefore avoid the re-calibration of the peak frequency.&lt;br /&gt;
&lt;br /&gt;
If for some reason, later in the session, you decide to acquire sequences other than fieldmaps and EPIs, you should allow the pre-scan to run as usual (by just hitting the SCAN button to scan).  Of course, this will change the global constant describing the field strength.&lt;br /&gt;
&lt;br /&gt;
Also, if you for some reason change parameters of the EPI sequence (such as TR, TE, phase direction), you need to allow the pre-scan to run so that proper calibration can be done.  However, certain EPI parameters do not necessitate a pre-scan, like number of volumes to acquire and the phase-encode polarity (which is controlled through the CV variable pepolar).&lt;br /&gt;
&lt;br /&gt;
Admittedly, sandwiching every EPI run between fieldmaps is an aggressive (and paranoid) strategy --- each fieldmap takes about a minute to acquire.  If you like, it may be okay to space the fieldmaps more sparsely, e.g. F1 / E1 / E2 / F2 / E3 / E4 / F3, depending on how long your EPI runs are.  Of course, this comes at the expense of having sub-optimal tracking of the field.&lt;br /&gt;
&lt;br /&gt;
As an even less aggressive strategy, it is also conceivable to acquire only a single fieldmap (indeed, it appears that that&#039;s what most laboratories do, if anything at all) and also allow each EPI run to do the pre-scan (which avoids the cumbersome Manual Prep Scan procedure).  The hope here is that the bulk of the drift in the magnetic field can be captured by just a change in a global constant.  To a first approximation, it does appear that the overall DC in the field is the biggest effect, but in data that I have looked at, there are additional components that can&#039;t be described by just a constant.  Moreover, using a single fieldmap cannot compensate for changes in the field within individual EPI runs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spiral fieldmap acquisition&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Atsushi has developed a spiral-based sequence for measuring fieldmaps, and the quality is quite good.  Here are the parameters that Kendrick recommends for optimal quality:&lt;br /&gt;
# First, set slice thickness.&lt;br /&gt;
# Then copy slices from the EPI (or in-plane) sequence.&lt;br /&gt;
# 16-shot (16 spiral interleaves).  The purpose is to minimize the readout time so as to minimize distortion and dropout (in combination with an appropriately short TE).&lt;br /&gt;
# 700 ms TR.  You could try to reduce this value to speed up acquisition.  If the other parameters necessitate a longer TR, the sequence will silently use a longer TR and the scanner will scan past the on-screen time countdown.  This is okay, just wait a few seconds.&lt;br /&gt;
# 54° flip.  This is the Ernst angle for the 700 ms TR (assuming a T1 constant of 1333.33 ms).&lt;br /&gt;
# no SAT.  In regions of bad field inhomogeneity, water will be off-resonance.  So if you were to use a fat saturation pulse, you could destroy the water signal in these regions.  That is bad.  So, leave SAT off.&lt;br /&gt;
# 256 x 256.  This is a fairly high matrix size which will ensure high-resolution, high-quality field maps.&lt;br /&gt;
# 2 NEX.  Get two repetitions to ensure that the fieldmaps will have high SNR.  If time is a consideration, you might try going down to 1 NEX.&lt;br /&gt;
# 24.0 FOV.  This is a large FOV to ensure that the entire head is completely covered in the in-plane dimensions.  You could reduce, but be careful.&lt;br /&gt;
# 6 dummies to ensure we reach a steady-state.&lt;br /&gt;
# 4.545 ms TE.  This is 1/440Hz * 2.  It is unclear whether saved protocols will save the precise TE value.  So it is recommended that you manually type in 4.545 in each scan session.  (After typing it in, copying and pasting that sequence does preserve the precise value.)&lt;br /&gt;
# map_deltaf 440.  You must edit this CV variable after saving and downloading the spiral sequence.   (The purpose of the TE and map_deltaf values is to choose echo times that are matched to the difference between the precession frequencies of water and fat, so that the resulting fieldmaps will have minimal artifacts.) (UPDATE: This is now the default setting for the map_deltaf, so actually, you don&#039;t have to go in and edit the CV variable.)&lt;br /&gt;
# Note: it is very important that you get the TE and map_deltaf values right!  Otherwise, there will be fat-related artifacts in your fieldmaps.&lt;br /&gt;
# You will have to transfer the raw fieldmap data yourself (they do not get converted to DICOM format like data from the stock GE sequences).  The files are named like P39936.7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pre-processing code&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
See [[preprocessfmri]] for details on how to process EPI data using fieldmaps. Note that you need to know the number of phase encode lines (typically your image size along the phase encode dimension, divided by the ASSET acceleration factor) and the phase encode dwell time (which should be stored in the DICOM field (0043,102c): the time per phase-encode line in microseconds).&lt;br /&gt;
&lt;br /&gt;
===Using FSL to process CNI fieldmaps===&lt;br /&gt;
&lt;br /&gt;
The ...fieldmap.nii.gz file that we save in NIMS is what the FSL folks call &amp;quot;A single, real fieldmap image (showing the field inhomogeneity in each voxel)&amp;quot;. (NOTE: for older datasets in NIMS, this file uses the &#039;B0&#039; suffix rather than &#039;fieldmap&#039;.) The other nifti associated with a fieldmap scan is a magnitude image that can be used for masking, etc. &lt;br /&gt;
&lt;br /&gt;
The fieldmap image is in units of Hz. FSL likes radians/s, so you can convert it with fslmaths:&lt;br /&gt;
&lt;br /&gt;
    fslmaths 8860_6_1fieldmap.nii.gz -mul 6.28 fieldmap_rads&lt;br /&gt;
&lt;br /&gt;
Then jump straight to step 5 on the [http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FUGUE/Guide#Step_5_-_Regularising_the_fieldmap FSL FUGUE guide]. Although you may want to mask the fieldmap first. E.g.:&lt;br /&gt;
&lt;br /&gt;
    bet 8860_6_1.nii.gz fieldmap -m -n&lt;br /&gt;
    fslmaths fieldmap_rads.nii.gz -mul fieldmap_mask.nii.gz fieldmap_rads&lt;br /&gt;
    fugue --loadfmap=fieldmap_rads --despike --savefmap=fieldmap_rads&lt;br /&gt;
    fugue --loadfmap=fieldmap_rads -m --savefmap=fieldmap_rads&lt;br /&gt;
    fugue --loadfmap=fieldmap_rads -s 1 --savefmap=fieldmap_rads&lt;br /&gt;
&lt;br /&gt;
Then you can use [http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FUGUE/Guide#FUGUE FUGUE command-line tool] to unwarp the EPI image. E.g.:&lt;br /&gt;
&lt;br /&gt;
    fugue -i epi --dwell=dwelltime --loadfmap=fieldmap -u result&lt;br /&gt;
&lt;br /&gt;
where dwelltime is the same as the effective echo spacing. You can find the effective echo spacing from the header of your epi file. E.g., using fslhd, look at &#039;descrip&#039;:&lt;br /&gt;
&lt;br /&gt;
    fslhd 8860_5_1.nii.gz | grep &#039;descrip&#039;&lt;br /&gt;
&lt;br /&gt;
which produces:&lt;br /&gt;
&lt;br /&gt;
    descrip te=30.00;ti=0;fa=77;ec=0.4800;acq=[80,80];mt=0;rp=2.0;&lt;br /&gt;
&lt;br /&gt;
showing that the echo spacing (&#039;ec&#039;) is 0.48 milliseconds. The phase encoding dimension is usually y for EPI acquisitions. Note that, as the FSL docs say, &amp;quot;your operator can tell you whether the unwarp direction, or phase encode direction, is x, y or z, but whether it is + or - needs to be determined, currently, by trial and error...&amp;quot; However, we think it&#039;s usually + for data acquired here.&lt;/div&gt;</summary>
		<author><name>Huawu</name></author>
	</entry>
</feed>