text:
Q: Copying file from local to SharePoint server location Now on my PC I can use explorer to open a location on our SP server (location eg http://sp.myhost.com/site/Documents/). And from there I can copy/paste a file from eg my C:\ drive.
I need to replicate the copy process progmatically. FileCopy() doesn't do it - seems to be the http:// bit that's causing problems!

A: Does the server allow WebDAV access? If yes, there are WebDAV clients for Delphi available, including Indy 10.

A: In case if you are not using BLOB storage all SharePoint files are stored in the database as BLOB objects.
When you access your files with explorer you are using windows service which is reading files from SharePoiont and render it to you. This way you can copy and paste as soon as donwload them from an to SharePoint manually.
To be able to do this automatically you should achive this using the next SP API code:
        using (SPSite site = new SPSite("http://testsite.dev"))
        {
            using (SPWeb web = site.OpenWeb())
            {
                using (FileStream fs = File.OpenRead(@"C:\Debug.txt"))
                {
                    byte[] buffer = new byte[fs.Length];
                    fs.Read(buffer, 0, (int) fs.Length);

                    SPList list = web.GetList("Lists/Test AAD");
                    SPFile f = list.RootFolder.Files.Add("/Shared Documents/"+Path.GetFileName(fs.Name), buffer);
                }
            }
        }

This will add new "Debug.txt" file to the "Shared Documents" library read from the disk C. To do this for each file just loop through each file in the folder. You can open web only once and do the loop each time when you add file...
Hope it helps,
Andrew


text:
Compare the Honda NSX 3.0 V6 - [1990] vs BMW 5 Series M5 E28 - [1985].
Compare the Honda NSX 3.0 V6 - [1990] vs BMW 5 Series M5 E28 - [1985]. Find out which car is the fastest, most powerful, lightest or has the biggest engine in our top trumps style comparison page. Find out which car has the highest top speed or is the fastest accelerating, is it the Honda NSX 3.0 V6 or the BMW 5 Series M5 E28. We'll leave it up to you to decide which is your favourite.
Figures & Specs: Honda NSX 3.0 V6 - [1990]
Year: 1990 | Type: Coupe
Aspiration: N/A
0-100 mph (160.9 kph): 14.0 secs
Drive: RWD | Engine Location: M
Compare the 1990 Honda NSX 3.0 V6 with 100s more cars.
Closest rivals of the 1990 Honda NSX 3.0 V6.
Figures & Specs: BMW 5 Series M5 E28 - [1985]
Compare the 1985 BMW 5 Series M5 E28 with 100s more cars.
Closest rivals of the 1985 BMW 5 Series M5 E28.
Porsche Panamera 4.8 V8 Turbo S - [2011]
Mazda RX7 Turbo - [1992]
Ford Escort XR3i - [1992]
Bentley Mulsanne Speed 6.8 V8 Turbo - [2014]
Ferrari 206 Dino GT - [1968]
Peugeot 505 2.8 V6 - [1986]
Jaguar XK 140 SE - [1954]
Lamborghini Gallardo 5.0 V10 Spyder - [2005]
Fiat Bravo 2.0 20V 155 HGT
Alfa-Romeo 164 2.0 V6 Turbo

redpajama_set_name: RedPajamaCommonCrawl


Our super SELL OUT leggings are back in this new fabulous style.. The Harley are totally amazing. All the fabulousness of the originals, slight fleece lining, matte finish, high waist, thick waistband and hold you in in all the right places.. The added detail creates an almost biker look that looks great dressed up or dressed down with trainers or pumps.. Your go to leggings just got a little bit better !!!


The Added tax is one of the most popular assignments among students' documents. If you are stuck with writing or missing ideas, scroll down and find inspiration in the best samples. Added tax is quite a rare and popular topic for writing an essay, but it certainly is in our database.
500 essays on "Added tax"
What is an Added Tax?
Added Tax is a type of students written assignments that requires several steps to be completed.
How can an Added Tax be written faster?
Typical Added Tax would take you 3 to 6 hours to complete. That includes 2 hours of thorough research, 30 minutes for creating an outline, 2 hours of writing, and 1,5 hours for editing, proofreading and proper formatting.
Ideas. By downloading several Added Tax papers you'll get a multiple choice of ideas to elaborate in own essay. Don't reinvent the wheel. Go through several essays uploaded by other students and grab the best ideas.
Students, who are voluntarily sharing their works with others, uploaded each Added Tax samples from our database. We encourage you to use them as essay samples, but please, do not submit them as own. Our contributors most surely have already submitted them and now they are open for view to thousands of users.
Let us find you essays on topic Added tax for FREE!


P/E - 12.30; ATR – 0.83.
The company ranks the ninth on capitalization in the sector of "Technologies" among the issuers trading in the American stock market.
On 15 January the company reported for Q4 of the fiscal year 2015. Company's press-release showed that net profit fell by 1% for the reporting period (from $3.7 billion to $3.6 billion). EPS (Earning per share) exceeded analysts' forecast of growth by 17.4% amounting to 0.74 USD.
At the press-conference company's management said that performance degradation is associated with the decrease of sales of the PCs. In 2015 the decline in the volume of sales exceeded 8% reaching $32.2 billion.
According to the company's press-release, net profit of the company fell by 300 million USD up to 11.42 billion USD. Gross profit margin fell by 1.1% up to 62.6%.
Company's management plans to diversify its business investing funds into venture projects. The main sphere of investment is Hi-tech companies.
Poor data of the last report will have a negative impact on investors' confidence to the company. Key area of the company's activity is PC. Further decline in the sale of PCs will trigger decline in the price of company's shares.
In the near future company's share will decline.
Long-term trading: at the moment the issuer has broken down and consolidated below support level of 29.30 USD. After testing and consolidating the levels of 29.30-31.00 and in case of the respective confirmations (for example, pattern Price Action), ), we recommend to open short positions. Risk per trade is less than 2% of the capital. Stop order can be placed slightly above the signal line. For this position we recommend to place Take profit in parts at the levels of 28.00 USD, 26.50 USD and 25.50 USD and 98.00 USD with the use of trailing stop.
Medium-term trading: reversal pattern has been formed on the chart with timeframe 1Н. After breakdown and testing of resistance level 29.00 USD we recommend to open countertrend long positions. Risk per trade is less than 1% of the capital. Stop order can be placed at the level of 28.20 USD. For this position we recommend to place Take profit in parts at the levels of 30.00 USD, 31.00 USD and 31.50 USD with the use of trailing stop.


Sweetly B Squared: Mom's Night OUT?
Although Maggie is 2 1/2 years old, I just went to my first official 'mom's night out' with the mommies group we recently joined. I was a little nervous at first. Sure, it was just going to be pizza and a games night, but what if they had a bunch of crazy xbox games? I've never even played most game systems now-a-days!
Luckily, it was just old-fashioned board games. Okay, maybe not 'old-fashioned,' but not scary and electronical! First we played Cranium, which it turned out none of us were sure how to play. We figured we were supposed to roll the colored die at some point, but we were never sure if it was before or after we answered a question. No matter, it was fun anyway.
What board games do your family or friends play and enjoy?
We love Catchphrase! We have a few other couples we get together with and we always end up playing it.
I wish my family loved board games.. it's only me and it's hard to play boardgames by yourself. Catchphrase sounds like fun. I do play Scrabble with my Mom about 3 or 4 nights a week. We're pretty evenly matched - I won last night, she won the night before.


text:
ConfigSystem prefabConfigs;
Hashtable prefabTable;

void prefab_system_init(EntityManager* entityManager, const char* prefabRoot) {
    config_system_init(&prefabConfigs, (char*)prefabRoot);
    hashtable_init(&prefabTable, 32, prefab_free_void);

    Directory* prefabDir = directory_open(prefabRoot);
    FileDescriptor* currentFile;
    while ((currentFile = directory_next(prefabDir))) {
        size_t len = strlen(currentFile->filename);
        // Only add the file if it has the '.prefab' extensions
        if (len > 7 && strcmp(&currentFile->filename[len - 7], ".prefab") == 0) {
            config_system_load(&prefabConfigs, currentFile->filename);
            Config* cfg = config_system_get(&prefabConfigs, currentFile->filename);
            Prefab* newPrefab = CALLOC(1, Prefab);
            newPrefab->config = cfg;
            prefab_reload(newPrefab);
            hashtable_insert(&prefabTable, currentFile->filename, (void*)newPrefab);
        }
    }
    directory_close(prefabDir);
}

void prefab_system_terminate() {
    config_system_terminate(&prefabConfigs);
    hashtable_free_contents(&prefabTable);
}

Prefab* prefab_new(char* filename) {
    Prefab* self = CALLOC(1, Prefab);
    prefab_init(self, filename);
    return self;
}

void prefab_init(Prefab* self, char* filename) {
    self->config = config_system_get(&prefabConfigs, filename);
    component_batch_zero(&self->components);
}

void prefab_free(Prefab* self) {
    component_batch_free(&self->components);
    free(self);
}

void prefab_free_void(void* self) {
    prefab_free((Prefab*)self);
}

void prefab_reload(Prefab* self) {
    u32 count = (u32)config_get_array_count(self->config, CONFIG_DEFAULT_SECTION, "components");
    component_batch_init(&self->components, count);

    for (u32 i = 0; i < count; ++i) {
        char* name = config_get_string_at(self->config, CONFIG_DEFAULT_SECTION, "components", i);
        Component* component = component_deserialize(self->config, name);
        component_batch_add(&self->components, component);
    }
}

Prefab* prefab_get(const char* name) {
    return (Prefab*)hashtable_get(&prefabTable, name);
}

void prefab_instantiate(Prefab* self) {
    prefab_instantiate_at(self, vec2_zero(), 0.f);
}

void prefab_instantiate_at(Prefab* self, Vec2 position, f32 rotation) {
    entities_instantiate_prefab(globals.game->entityManager, self, position, rotation);
}

redpajama_set_name: RedPajamaGithub


My best friend, my buddy, my son! David Newell Dowdrick had Duchenne Muscular Dystrophy. He knew the prognosis but never stopped living, and planning his life. His love of life was exceeded only by his love of others.


In Jan, 16th 2017, WELLCAMP prefab house factory held a grand party about 2016 annual and conference of folding container house. The theme of this party is The SAME AS YOU, showing our company purpose that we care for every refugee through offering High quality and inexpensive prefab houses just like everyone worldwide. In order to share this happiness and success, WELLCAMP has invited many partners and all our staffs to attend this annual party.
During this party, we played video about the events of WELLCAMP in 2016, including Canton Fair, Qatar and Myanmar exhibition, CCTV interview, etc. We are proud to publish the establishment of Guangdong RONGWEI GROUP and hold the ceremony. We are dedicated to prefabricated house industry faithfully.
Please remember that WELLCAMP prefab house company is always focusing on study the most comfortable and suitable prefab houses to you, dear customers. We are really appreciated to your accompany and advice to our products along this year and we promise to surpass the old me in the new year.
If you are interested in our products, after watching this video, please click here.


No, there was never anything hip about Cross. And there still isn't. But there was plenty of beauty and heart in his compositions. And there still is.
The King of Smooth Pop, Christopher Cross found fame and success very early on in his storied career, winning an astonishing five Grammy Awards (including the Grammy For Album of The Year, beating out Pink Floyd's The Wall) for his self-titled 1979 debut album. In the five-time multi-platinum, career-defining album can be found ubiquitous smash hit single Sailing, as well as the Oscar-winning 'Arthur's Theme (The bEst That You Can Do)'. Not one to rest on his diamond laurels, the adult contemporary superstar has since released 13 studio albums and is set to hit the road on a mammoth 2019 tour in support of his latest effort 'Take Me As I Am'.
Uncowed by trends or expectations, Cross stays true to his sophisticated brand of balladry on the 2017 album, effortlessly blending spacious, dream-like instrumental flights with lyrical landscapes, guitar-centric foundations and lush string arrangements. Taking the listener back to the golden years of 'Sailing', Cross finely balances experimental tumbles down the rabbit hole with the familiar, solid song-writing that first made his name.
Seen Christopher Cross? Loved it? Hated it?
Sound good to you? Share this page on social media and let your friends know about Christopher Cross at City Winery.
Please note: The term City Winery and/or Christopher Cross as well as all associated graphics, logos, and/or other trademarks, tradenames or copyrights are the property of the City Winery and/or Christopher Cross and are used herein for factual descriptive purposes only. We are in no way associated with or authorized by the City Winery and/or Christopher Cross and neither that entity nor any of its affiliates have licensed or endorsed us to sell tickets, goods and or services in conjunction with their events.


Makes 1, scale as needed.
Place the Sugar, PILOT Shortening, White Wings Flour, Baking Powder, Milk Powder, Salt and Mixed Spice into a bowl and blend thoroughly on a low gear, but not to paste.
Blend the Egg, Water and, if using, Vanilla Essence together, then add two thirds of the mix to the mixture from Step 1 and bring to a paste. Add the remaining egg and water mix and blend all on a low gear.
Chop Apples, scrape bowl, then aerate on third gear for four minutes.
Note: Number of Serves is based on approximately one 40cm x 40cm slab cake.


text:
Inquiries Act 2005
Inquiry proceedings
There are currently no known outstanding effects for the Inquiries Act 2005, Section 18.
18Public access to inquiry proceedings and informationU.K.
(1)Subject to any restrictions imposed by a notice or order under section 19, the chairman must take such steps as he considers reasonable to secure that members of the public (including reporters) are able—
(a)to attend the inquiry or to see and hear a simultaneous transmission of proceedings at the inquiry;
(b)to obtain or to view a record of evidence and documents given, produced or provided to the inquiry or inquiry panel.
(2)No recording or broadcast of proceedings at an inquiry may be made except—
(a)at the request of the chairman, or
(b)with the permission of the chairman and in accordance with any terms on which permission is given.
Any such request or permission must be framed so as not to enable a person to see or hear by means of a recording or broadcast anything that he is prohibited by a notice under section 19 from seeing or hearing.
(3)Section 32(2) of the Freedom of Information Act 2000 (c. 36) (certain inquiry records etc exempt from obligations under that Act) does not apply in relation to information contained in documents that, in pursuance of rules under section 41(1)(b) below, have been passed to and are held by a public authority.
(4)Section 37(1)(b) of the Freedom of Information (Scotland) Act 2002 (asp 13) (certain inquiry records etc exempt from obligations under that Act) does not apply in relation to information contained in documents that, in pursuance of rules under section 41(1)(b) below, have been passed to and are held by a Scottish public authority.


We handpick the most scenic biking routes—from the Rocky Mountains to the Tuscan countryside. Our biking trip leaders know the least trafficked cycling routes and also the most terrific stops—the trattoria where you can lunch al fresco, the olive orchard perfect for a picnic, the best spot to pick wild blueberries. A Backroads bike tour is a dream vacation. Can you already feel the wind in your hair and the sun on your face?


Serving businesses for 35 years, Brad has a national practice in the areas of OSHA/MSHA defense, labor and environmental law.
Won 25 unfair labor practice cases filed against a water company before the National Labor Relations Board (NLRB).
Defended 26 OSHA investigations and penalty actions involving workplace fatalities.
Won more than 20 OSHA whistleblower retaliation cases for general industry and construction sector and 8 MSHA whistleblower cases in the mining sector.
Prevailed in an administrative action against Illinois EPA to extend a precedent-setting water discharge permit involving effluent trading.
Counseled prospective buyers of coal-fired power plants in Arkansas, Colorado, Florida, Nevada and New Mexico.
Negotiated collective bargaining agreements for numerous manufacturing companies, animal rendering facilities, mine operators, television stations and hotels.
Obtained favorable results for dairy companies in more than 100 OSHA citation cases nationwide.
Settled OSHA case for a medical practice, reducing the original penalty amount by 80%.
Obtained dismissal of a whistleblower complaint for a company in the cable television sector. Complaint alleged that company failed to provide certain safety equipment and retaliated with wrongful termination.
Rock Products: The Blurred Line: What is Your Company's Jurisdictional Boundary Between MSHA and OSHA?
Blurred lines: Does MSHA or OSHA have Jurisdiction at Your Site?


Note: The characteristics of this lipstick is Non-stick cup, no rub off. matte surface. use Olive oil or discharge makeup oil to discharge. And Lips will be a bit dry in the winter, so please use it with lip balm. Thanks!
Want to be a makeup talent? If you have it, it will come true.
It is absolutely safe for you to use them!


text:
1932 Dorothy 2017
Dorothy Miller
October 2, 1932 — July 20, 2017
Obituary for Dorothy L. Miller (Henderson)
DATELINE- Moscow, KS
Dorothy Laverne Miller
Dorothy Laverne Miller, 84, died on Thursday, July 20, 2017 at High Plains Retirement Village, Lakin, KS.
She was the daughter of Victor and Mable (Henderson) Lewis, she was born on October 2, 1932, Ulysses, KS.
She and Andrew Miller were married and later divorced. They married on December 31, 1949.
She was a member of the United Methodist Church of Moscow. Dorothy loved to cook and make quilts. She graduated from Mount Carmel High School of Wichita. She was the president of Ladies VFW Auxiliary. Dorothy was a dispatcher for 15 years at Stevens County Sherriff Department.
Survivors include a son Terry Miller, Hugoton, KS; a daughter, Gloria Allen & husband Charles, Garden City, KS. A nephew she raised as her own, Scherill Sheldon & wife Debbie, Colorado Springs, CO. Grandchildren include, Arick Miller & wife Diana, Hugoton, KS, Cally Landon & wife Kelly, Deerfield, KS, Hileri Snyder & husband Jimmy, Potsboro, Texas, Angie Dunsworth & husband Jim, Garden City, KS, Jaime Lippencott, Elk City, OK, Ashley Nesselrode & husband Donnie, Colorado Springs, CO, Akela Whisennand & husband Dre`, Oklahoma City, OK; 16 greatgrandchildren.
She was preceded in death by her parents, brother Victor Lewis, and great granddaughter Miranda Dunsworth.
Memorials have been established for Dorothy Miller Memorial Fund. Memorials may be mailed to Paul's-Robson Funeral Home –P.O. Box 236- Hugoton, KS 67951.
Funeral service will be held on Monday, July 24, 2017 at Moscow United Methodist Church at 10:30 AM. Burial will follow at the Moscow Cemetery.
Paul's-Robson Funeral Home, Hugoton is in charge of arrangements.
To order memorial trees or send flowers to the family in memory of Dorothy Miller, please visit our flower store.


text:
// Accord Statistics Library
// The Accord.NET Framework
// http://accord-framework.net
//
// Copyright © César Souza, 2009-2014
// cesarsouza at gmail.com
//
//    This library is free software; you can redistribute it and/or
//    modify it under the terms of the GNU Lesser General Public
//    License as published by the Free Software Foundation; either
//    version 2.1 of the License, or (at your option) any later version.
//
//    This library is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//    Lesser General Public License for more details.
//
//    You should have received a copy of the GNU Lesser General Public
//    License along with this library; if not, write to the Free Software
//    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
//

namespace Accord.Statistics.Models.Fields.Functions
{
    using System;
    using System.Collections.Generic;
    using System.Runtime.Serialization;
    using Accord.Statistics.Models.Fields.Features;

    /// <summary>
    ///   Factor Potential (Clique Potential) function.
    /// </summary>
    ///
    /// <typeparam name="T">The type of the observations being modeled.</typeparam>
    ///
    [Serializable]
    public class FactorPotential<T> : IEnumerable<IFeature<T>>
    {

        /// <summary>
        ///   Gets the <see cref="IPotentialFunction{T}"/>
        ///   to which this factor potential belongs.
        /// </summary>
        ///
        public IPotentialFunction<T> Owner { get; private set; }

        /// <summary>
        ///   Gets the number of model states
        ///   assumed by this function.
        /// </summary>
        ///
        public int States { get; private set; }

        /// <summary>
        ///   Gets the index of this factor in the
        ///   <see cref="Owner"/> potential function.
        /// </summary>
        ///
        public int Index { get; private set; }

        /// <summary>
        ///   Gets the segment of the parameter vector which contains
        ///   parameters respective to all features from this factor.
        /// </summary>
        ///
        public ArraySegment<double> FactorParameters { get; protected set; }

        /// <summary>
        ///   Gets the segment of the parameter vector which contains
        ///   parameters respective to the edge features.
        /// </summary>
        ///
        public ArraySegment<double> EdgeParameters { get; protected set; }

        /// <summary>
        ///   Gets the segment of the parameter vector which contains
        ///   parameters respective to the state features.
        /// </summary>
        ///
        public ArraySegment<double> StateParameters { get; protected set; }

        /// <summary>
        ///   Gets the segment of the parameter vector which contains
        ///   parameters respective to the output features.
        /// </summary>
        ///
        public ArraySegment<double> OutputParameters { get; protected set; }

        /// <summary>
        ///   Creates a new factor (clique) potential function.
        /// </summary>
        ///
        /// <param name="owner">The owner <see cref="IPotentialFunction{T}"/>.</param>
        /// <param name="states">The number of states in this clique potential.</param>
        /// <param name="factorIndex">The index of this factor potential in the <paramref name="owner"/>.</param>
        /// <param name="edgeIndex">The index of the first edge feature in the <paramref name="owner"/>'s parameter vector.</param>
        /// <param name="edgeCount">The number of edge features in this factor.</param>
        /// <param name="stateIndex">The index of the first state feature in the <paramref name="owner"/>'s parameter vector.</param>
        /// <param name="stateCount">The number of state features in this factor.</param>
        /// <param name="classIndex">The index of the first class feature in the <paramref name="owner"/>'s parameter vector.</param>
        /// <param name="classCount">The number of class features in this factor.</param>
        ///
        public FactorPotential(IPotentialFunction<T> owner, int states, int factorIndex,
            int edgeIndex, int edgeCount, int stateIndex, int stateCount, int classIndex = 0, int classCount = 0)
            : this(owner, states, factorIndex)
        {
            EdgeParameters = new ArraySegment<double>(owner.Weights, edgeIndex, edgeCount);
            StateParameters = new ArraySegment<double>(owner.Weights, stateIndex, stateCount);
            OutputParameters = new ArraySegment<double>(owner.Weights, classIndex, classCount);

            FactorParameters = new ArraySegment<double>(owner.Weights,
                Math.Min(Math.Min(edgeIndex, stateIndex), classIndex),
                edgeCount + stateCount + classCount);
        }

        /// <summary>
        ///   Creates a new factor (clique) potential function.
        /// </summary>
        ///
        /// <param name="owner">The owner <see cref="IPotentialFunction{T}"/>.</param>
        /// <param name="states">The number of states in this clique potential.</param>
        /// <param name="factorIndex">The index of this factor potential in the <paramref name="owner"/>.</param>
        ///
        public FactorPotential(IPotentialFunction<T> owner, int states, int factorIndex)
        {
            Owner = owner;
            States = states;
            Index = factorIndex;
        }

        /// <summary>
        ///   Computes the factor potential function for the given parameters.
        /// </summary>
        ///
        /// <param name="states">A state sequence.</param>
        /// <param name="observations">A sequence of observations.</param>
        /// <param name="output">The output class label for the sequence.</param>
        /// <returns>The value of the factor potential function evaluated for the given parameters.</returns>
        ///
        public double Compute(int[] states, T[] observations, int output = 0)
        {
            double p = Compute(-1, states[0], observations, 0, output);
            for (int t = 1; t < observations.Length; t++)
                p += Compute(states[t - 1], states[t], observations, t, output);

            return p;
        }

        /// <summary>
        ///   Computes the factor potential function for the given parameters.
        /// </summary>
        ///
        /// <param name="states">A state sequence.</param>
        /// <param name="observations">A sequence of observations.</param>
        /// <param name="output">The output class label for the sequence.</param>
        /// <returns>The value of the factor potential function evaluated for the given parameters.</returns>
        ///
        public virtual double[] GetFeatureVector(int[] states, T[] observations, int output = 0)
        {
            double[] featureVector = new double[FactorParameters.Count];

            for (int i = 0, k = FactorParameters.Offset; i < featureVector.Length; i++, k++)
                featureVector[i] = Owner.Features[k].Compute(states, observations, output);

            return featureVector;
        }

        /// <summary>
        ///   Computes the factor potential function for the given parameters.
        /// </summary>
        ///
        /// <param name="previousState">The previous state in a given sequence of states.</param>
        /// <param name="currentState">The current state in a given sequence of states.</param>
        /// <param name="observations">The observation vector.</param>
        /// <param name="index">The index of the observation in the current state of the sequence.</param>
        /// <param name="outputClass">The output class label for the sequence.</param>
        /// <returns>The value of the factor potential function evaluated for the given parameters.</returns>
        ///
        public virtual double Compute(int previousState, int currentState, T[] observations, int index,
            int outputClass = 0)
        {
            int start = FactorParameters.Offset;
            int end = FactorParameters.Offset + FactorParameters.Count;

            double sum = 0;
            for (int k = start; k < end; k++)
            {
                double weight = Owner.Weights[k];

                if (Double.IsNaN(weight))
                    Owner.Weights[k] = weight = 0;

                if (weight != 0)
                {
                    double value = Owner.Features[k].Compute(previousState, currentState, observations, index, outputClass);

                    if (value != 0) sum += weight * value;
                }

                if (Double.IsNaN(sum))
                    return 0;

                if (Double.IsInfinity(sum))
                    return sum;
            }

            return sum;
        }

        /// <summary>
        ///   Returns an enumerator that iterates through all features in this factor potential function.
        /// </summary>
        /// <returns>
        ///   An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the collection.
        /// </returns>
        public IEnumerator<IFeature<T>> GetEnumerator()
        {
            int start = FactorParameters.Offset;
            int end = FactorParameters.Offset + FactorParameters.Count;

            for (int k = start; k < end; k++)
                yield return Owner.Features[k];

            yield break;
        }

        /// <summary>
        ///   Returns an enumerator that iterates through all features in this factor potential function.
        /// </summary>
        ///
        /// <returns>
        /// An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the collection.
        /// </returns>
        ///
        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }

        /// <summary>
        ///   Creates a new object that is a copy of the current instance.
        /// </summary>
        ///
        /// <returns>
        ///   A new object that is a copy of this instance.
        /// </returns>
        ///
        public FactorPotential<T> Clone(IPotentialFunction<T> newOwner)
        {
            var clone = (FactorPotential<T>)this.MemberwiseClone();
            clone.Owner = newOwner;
            return clone;
        }

        #region Backward compatibility

        [OnDeserialized]
        private void OnDeserializedMethod(StreamingContext context)
        {
#pragma warning disable 618,612
            EdgeParameters = new ArraySegment<double>(Owner.Weights, EdgeParameterIndex, EdgeParameterCount);
            StateParameters = new ArraySegment<double>(Owner.Weights, StateParameterIndex, StateParameterCount);
            FactorParameters = new ArraySegment<double>(Owner.Weights, ParameterIndex, ParameterCount);
#pragma warning restore 618,612
        }

        [Obsolete]
        private int EdgeParameterIndex { get; set; }
        [Obsolete]
        private int EdgeParameterCount { get; set; }
        [Obsolete]
        private int StateParameterIndex { get; set; }
        [Obsolete]
        private int StateParameterCount { get; set; }
        [Obsolete]
        private int ParameterIndex { get; set; }
        [Obsolete]
        private int ParameterCount { get; set; }
        [Obsolete]
        private int EdgeParameterEnd { get; set; }
        [Obsolete]
        private int StateParameterEnd { get; set; }
        [Obsolete]
        private int ParameterEnd { get; set; }
        #endregion

    }
}


Deep brain stimulation (DBS) is a circuit-oriented treatment for mental disorders. Unfortunately, even well-conducted psychiatric DBS clinical trials have yielded inconsistent symptom relief, in part because DBS' mechanism(s) of action are unclear. One clue to those mechanisms may lie in the efficacy of ventral internal capsule/ventral striatum (VCVS) DBS in both major depression (MDD) and obsessive-compulsive disorder (OCD). MDD and OCD both involve deficits in cognitive control. Cognitive control depends on prefrontal cortex (PFC) regions that project into the VCVS. Here, we show that VCVS DBS' effect is explained in part by enhancement of PFC-driven cognitive control. DBS improves human subjects' performance on a cognitive control task and increases theta (5–8Hz) oscillations in both medial and lateral PFC. The theta increase predicts subjects' clinical outcomes. Our results suggest a possible mechanistic approach to DBS therapy, based on tuning stimulation to optimize these neurophysiologic phenomena.
Mental disorders, particularly mood and anxiety disorders, are a leading cause of disability and economic burden1. This is in part because many patients have no relief from gold standard clinical treatments. Focused electrical/magnetic brain stimulation has been proposed as a better approach to the mental health epidemic, because stimulation therapies may directly affect the circuit deficits believed to underlie mental illness2. Deep brain stimulation (DBS) is a particularly promising new therapy. Early DBS studies in major depressive disorder (MDD) and obsessive–compulsive disorder (OCD) were extremely encouraging3,4. Patients reported dramatic and long-lasting symptom relief where all prior treatments had failed. Of five blinded and sham-controlled DBS clinical trials, however, two met their primary endpoint, two did not, and one remains unpublished3,4,5. This ambiguous set of outcomes has limited DBS' use in mental illness, despite the pressing need for new treatments for these disorders. We and others have argued that the limited clinical trial signal does not reflect a lack of efficacy, but instead a limited mechanistic understanding4,5,6. DBS therapy requires fine tuning of individual patients' stimulation parameters, altering the applied electric field to engage a target circuit7. A challenge in mental illness is that there is no objective biomarker of that engagement, and thus no rigorous definition of "effective dose"8,9. The brain's response to electrical stimulation has been studied for decades, from simple preparations to complex modeling7,10,11. Despite those studies, the precise therapeutic mechanism of DBS' high-frequency stimulation is a topic of frequent debate. Current theories focus around resetting of abnormal oscillatory activity, which may alter information transmission in distributed circuits8,12. This uncertainty suggests that some patients who did not respond in clinical trials likely did not receive an active dose of the study intervention. Others may not even have had a circuit deficit that was appropriate for DBS treatment. This stands in contrast to the testing of more common therapies such as medications, where investigators can at least be certain that a drug achieved a desired serum level.
In clinically successful DBS applications, such as Parkinson disease, the dosing problem can be solved by trial and error. Motor symptoms change almost immediately when stimulation is optimal, and hence clinicians can find the correct dose in a matter of hours. Psychiatric DBS changes symptoms over weeks to months, making it impossible to fully explore the parameter space or to immediately verify the appropriateness of a dose adjustment. If DBS' mechanisms were better understood, it might be possible to redesign the clinical approach around physiology. Stimulation could be titrated to achieve a specific and relatively immediate electrophysiologic change, with symptom relief emerging in response to that change4,8,13,14. Thus, understanding mechanisms of action at the neurophysiologic level is a critical next step for developing DBS as a psychiatric treatment.
DBS of one specific brain region, the ventral internal capsule/ventral striatum (VCVS), may be helpful in identifying some of those therapeutic mechanisms. VCVS is the only DBS target to pass blinded trials, with success in both MDD and OCD3,4. These disorders are clinically considered as very different, but their common response to VCVS stimulation suggests the presence of common underlying pathophysiology. One commonality particularly relevant to DBS is that MDD and OCD both involve impaired cognitive control5,15. Cognitive control is the flexible adjustment of mental processing and/or responses in the face of changing environmental demands16,17. Control deficits may explain inflexible behavior in many mental disorders, e.g., the "automatic" negative cognitions of MDD, the repetitive behaviors of OCD, or the rigid interests of autism15,18. The converse (flexibility) is critical to clinical recovery, e.g., when a behavior therapist asks a patient to act opposite to a habit. Brain structures involved in cognitive control include medial prefrontal cortex (mPFC), the dorsal anterior cingulate (dACC)16,18, lateral prefrontal cortex (PFC)18,19, and recurrent circuits connecting those structures to striatum20. Those cortico-striatal circuits pass through the VCVS DBS target, meaning that stimulation should broadly influence prefrontal networks21,22. Thus, we propose that VCVS DBS may act in part by enhancing cognitive control, possibly by retrograde activation of corticofugal fibers in the ventral capsule.
Experimentally, control is often studied through conflict tasks, where subjects must suppress a pre-potent response to follow a less intuitive rule16,17. When performing conflict tasks, humans and other species show increased low-frequency oscillations of the electrical local field potential (LFP) and/or electroencephalogram (EEG). These are particularly common in the theta (4–8 Hz) band and over/within mPFC17,23. Theta oscillations are theorized to allow mPFC neural ensembles to synchronize with and drive neural firing in other brain regions, allowing mPFC to "gate" response sets and behavior styles24. Thus, if DBS does enhance cognitive control, the enhancement should be reflected in more powerful PFC theta oscillations. This would also comport with broader theories that DBS acts by restoring healthy oscillatory activity. We tested this hypothesis by manipulating human subjects' VCVS DBS and measuring both medial and lateral PFC activity via EEG as they performed a difficult cognitive control/conflict task. Here, we show that VCVS DBS enhances cognitive control, that this enhanced control is correlated with the expected PFC theta oscillations, and that the increased theta power is in turn correlated with clinical recovery. It should thus be possible to improve DBS' clinical efficacy by using these markers for biomarker-based, closed-loop stimulator programming.
Fourteen subjects (12 MDD and 2 OCD; Table 1) with VCVS DBS implants performed a variant of the Multi-Source Interference Task (MSIT, Fig. 1a) that included emotional distractors to increase overall cognitive load. We recorded EEG as subjects performed MSIT with their usual clinical stimulation either ON or OFF (Fig. 1b). We analyzed task response times (RTs) in a mixed effects generalized linear model (GLM). Cognitive conflict (interference), emotional distraction, and DBS all influenced RT (Fig. 1c, d, Supplementary Fig. 1). As in prior studies25,26, interference slowed RTs by 224 ms on average (t = 53.2 for Wald test of GLM coefficient, p < 1e–20, Fig. 1c). DBS enhanced performance: subjects were on average 34 ms faster with DBS ON (t = −8.6, p < 1.33e–17, Fig. 1d). There was no interaction between DBS and trial type, i.e., the RT for both control and interference trials was reduced (Supplementary Fig. 1). DBS-related improvement was not explained by a speed-accuracy tradeoff, as there was no difference in error rate between ON and OFF (1.74 vs. 1.69% respectively, p = 0.48, binomial test). It was not explained by psychomotor changes, as a different task performed minutes later (Fig. 2a) showed no change in button pressing speed with DBS ON vs. OFF (Fig. 2b). On that second task, DBS also slowed reaction times as subjects chose between two rewarding options, suggesting that the MSIT improvement is not driven by impulsive responding (Fig. 2c, d). The effect also is not explained by practice on the task. Any practice effect in this ON-then-OFF design would appear as the exact opposite of our observation (faster in OFF). Further, a cohort of subjects who performed repeated blocks of MSIT without DBS manipulations showed no change in RT from block to block (Supplementary Fig. 2).
To test the relationship between improved cognitive control and frontal theta oscillations, we source localized the task-related EEG activity to cortical regions implicated in cognitive control and MSIT specifically (Fig. 1e). We verified that the source localization preserved oscillatory activity and that the majority of the task-related activity was non-phase-locked (Supplementary Fig. 2). We then tested for significant theta modulation through sliding multivariate regression with temporal cluster correction (see Methods). As expected, the cognitive effort required to perform MSIT increased the power of non-phase-locked theta oscillations throughout PFC (Fig. 3a, b). In ventrolateral PFC (anterior inferior frontal gyrus) particularly, theta power increased over baseline for the entire post-MSIT period (Fig. 3c, d). DBS potentiated that increase (p < 0.05, cluster mass corrected via permutation testing) for nearly the entire MSIT decision-making period (Fig. 3c) and −199 ms to +120 ms around the response (Fig. 3d). The DBS effect was specific to the theta band, with few changes in other frequencies (Fig. 3e, f, Supplementary Figs. 3–4). DBS' effect on theta was specific to the active exercise of control for decision making—theta power in resting-state recordings from the same subjects did not change between DBS ON and OFF conditions (Supplementary Figure 4). In the task recordings, 79.93% of the stimulus-locked significant theta cluster mass (summed across labels) was between the MSIT onset and the mean RT (Fig. 3g), whereas 87.73% of the significant response-locked mass was before the response.
In time-domain evoked potentials, almost no DBS effect survived multiple-testing correction (Fig. 4; Supplementary Fig. 5). The DBS effect was separate in location and frequency from task-induced Interference effects (Fig. 3g vs. Fig. 4g, Supplementary Fig. 5). Supporting the claim that theta power is mechanistically liked to cognitive control, ON–OFF theta power changes at the single subject level correlated with subjects' RT improvement (Supplementary Fig. 6). These results follow multiple prior studies suggesting that theta oscillations in medial PFC, lateral PFC, and cingulate are a neurophysiologic correlate of effective cognitive control. They further suggest that amplifying those oscillations facilitates control.
These neurophysiologic changes predicted clinical outcomes. ON–OFF RT changes alone did not correlate with subjects' clinical response to DBS (Fig. 5a, b). However, theta change in anterior inferior frontal gyrus (IFG), the area with the largest task and DBS theta effects, did correlate. The ON–OFF theta difference of Fig. 3c, as calculated in individual subjects, significantly correlated with improvement in depressive symptoms from pre-operative baseline (n = 8, r = 0.76, p = 0.03 by Fisher Z-transform; area under curve 0.87 with confidence interval (CI) 0.57–1.0; Fig. 5c, d). This correlation appeared to be true regardless of subjects' initial clinical diagnosis. Neither RT nor theta EEG was strongly associated with hypomania (Fig. 5e–h), a major clinical complication of VCVS DBS28. Hypomania is one of several manifestations of DBS-induced impulsivity. Its lack of correlation with theta or RT, combined with the lack of impulsive choice in a companion task involving win-win comparisons (Fig. 2), suggests that our results cannot be explained simply by impulsive responding.
A popular theory of DBS' mechanism of action suggests that this deep brain intervention acts primarily on cortex, by stimulating cortical projections to the implant site21,29. Our results support this theory, finding oscillatory changes in multiple regions whose thalamic projections traverse the VCVS21. The effect is only seen in task-related theta, suggesting that DBS specifically modulates functional ensembles that activate during effortful cognitive control. The correlation between that theta modulation and clinical outcomes suggests a potential physiologically informed approach to psychiatric DBS. The present practice of adjusting stimulation based on patients' subjective report of immediate mood changes leads to clinician/patient frustration, adverse clinical outcomes, and missed clinical trial endpoints5,13,30,31. In future studies, stimulation parameters might directly be titrated to change a theta biomarker, rather than relying on ad hoc clinician opinion. For instance, patients might continuously perform tasks requiring effortful cognitive control, with continuous monitoring of the trial-to-trial induced oscillations. Stimulation parameters such as intensity and location along the dorso-ventral axis of the internal capsule could then be adjusted, either manually by a programming clinician or under computer control. Next-generation DBS hardware is already capable of self-titrating stimulation to achieve an electrophysiologic response32, and we have described early examples of frameworks for this type of task-driven programming10,13,33. We have also demonstrated methods for frequency-specific oscillatory enhancement34. Combining these methods would bring psychiatric neurostimulation closer to movement disorders, where tremor can be quickly observed and DBS titrated to suppress it35.
Prospective validation is, however, critical before moving to a closed-loop trial. This was a small study, despite being an exhaustive sample of all willing subjects at one research center. We used robust procedures to prevent model over-fitting, and information criterion minimization in particular is mathematically equivalent to the gold standard, out-of-sample cross-validation36. The heterogeneity of psychiatric illness nevertheless makes validation an important step for any putative biomarker37,38. Ideally, the procedures performed here should be administered pre-operatively and sequentially during a patient's DBS treatment, demonstrating a longitudinal correlation between task-induced theta and clinical response. An ongoing study (NCT03184454) aims at that prospective longitudinal validation. Further, clinical response correlated with changes in task-induced theta, but did not correlate with DBS-induced behavior change—even though behavior itself was correlated to theta power, as it was in other cognitive control studies17,23,39. This may reflect more on the task than on the construct—we chose the MSIT as our index because of its ability to generate subject-level significant effects. The tradeoff was a task that could be performed with few errors. In another recent study with a cognitive control task involving a higher error rate, behavior did track clinical improvement39. Measuring control with multiple tasks would be an important consideration for future work. A more nuanced measure of cognitive control might also compensate for the heterogeneity and non-interval nature of clinical scales such as the MADRS.
Given the broad role of cognitive control deficits in mental illnesses, our results could have equally broad clinical applications. Other DBS targets for psychiatric illness, such as the subcallosal cingulate (SCC) and the medial forebrain bundle, also project to the regions we studied40,41. Augmented cognitive control might be a common mechanism of DBS at multiple clinical targets. Alternatively, the slightly different white matter projections of each DBS site might allow each to access and improve a different cognitive function. In contrast, a DBS target for movement disorders and OCD, the subthalamic nucleus (STN), tends to increase impulsive responding during conflict42,43. STN-like impulsivity thus does not appear to explain our results. We did not observe a specific speedup on high-conflict trials, which was a hallmark of the STN studies. Further, in a second task run immediately after MSIT, subjects had significantly increased RTs when required to deliberate in a win–win situation. This is the opposite of the STN result. Combining the effects of these different targets might enable fine-grained control of individual patients' cognitive/emotional deficits, a "precision medicine" approach to therapy5,13. In support of that idea, a recent clinical trial combined VCVS and STN stimulation in OCD patients. When STN stimulation modulated corticothalamic fibers originating in PFC, patients performed better on a Stroop-like task44. These are the same fibers we are likely to have engaged using our larger VCVS leads.
Theta oscillations and metrics derived from theta have previously been proposed as biomarkers of depressive states and treatment response38,45. One article proposed another theta measure, resting-state prefrontal cordance, as a predictor of SCC DBS response46. However, as we reviewed in a recent meta-analysis38, those studies focused on resting-state activity, where a given oscillatory band may represent any number of ongoing mental processes. Here, we specifically demonstrated a change in task-induced frontal theta, a neurophysiologic process with strong and well-documented links to executive function17,23. The report of resting-state cordance in SCC DBS also did not reach its primary statistical significance endpoint and did not demonstrate out-of-sample reliability. We reached our pre-specified significance level even after multiple-comparison correction, and we demonstrated out-of-sample evidence through bootstrapping and through information criterion minimization (mathematically equivalent to cross-validation36). We posit that the use of a specific cognitive task to enhance the theta output of conflict-related ensembles greatly improved signal-to-noise, aiding detection. We also note that we observed performance improvements (RT decreases) on both control and interference trials. We attribute this to the task structure, in which trial types were interleaved, both with high frequency, and in an unpredictable fashion. In this design, subjects cannot prospectively predict when they will need to exercise cognitive control. This should cause control-related frontal circuits to remain in a state of readiness, effectively decreasing the burden of "switching on" control16.
We found enhanced theta oscillations in medial and lateral PFC, dorsally and ventrally, but cognitive control might depend on only a subset of these regions. That possibility could be explored in animal models, where genetic tools could limit DBS' effects to a specific PFC projection29. It would be useful to explore the degree to which this effect requires specific neurotransmitters within those circuits. DBS of this same region was recently suggested to affect metabolism specifically through nucleus accumbens D1-receptor cells, and those same dopaminergic circuits may be relevant for DBS' psychiatric effects47. Finally, animal studies might dissect the acute vs. chronic effects of neurostimulation. In our data, a greater DBS-induced theta change was associated with a smaller clinical effect. This may represent a neuroplastic effect of chronic stimulation: patients who experience a strong "theta rebound" with DBS OFF may not have experienced permanent remodeling of brain networks, and thus retain their depressive vulnerability. Clarifying these mechanisms and the clinical correlation could advance both the reliability of clinical neuromodulation and our broader understanding of human cognition.
DBS would improve human cognitive control, reflected in increased performance in the DBS ON condition.
DBS would augment the power of theta oscillations, primarily in lateral prefrontal cortex and dorsal anterior cingulate cortex, given the specific role of these oscillations in decision-making and response inhibition.
The degree of DBS-induced change in the above propositions would explain part of its mechanism of action, as determined by prediction of the clinical outcome.
These analyses were not pre-registered. At the time of data collection and study conception, pre-registration was not a widely available service.
Fourteen subjects with VCVS DBS consented to participate in the experiments. All had received VCVS DBS implants for a prior clinical study (NCT00640133, NCT00837486, or NCT00555698), with entry criteria given in48,49. All were right handed. The sample included six males and eight females, aged in their 30s–70s at time of data collection, with a minimum of 6 months' exposure to chronic stimulation and a maximum of 7 years. Subjects had predominantly been implanted for MDD, but 2/14 had a primary indication of OCD with comorbid MDD. Most had at least partial clinical response to DBS. Informed consent for study participation was obtained by a physician who was not the subject's primary DBS clinician, after the full nature and possible consequences of the study were explained. All study procedures comport with applicable governmental and institutional ethical guidelines. Study procedures were reviewed and approved by the Massachusetts General Hospital Institutional Review Board.
To probe cognitive flexibility, we employed a modified version of the MSIT (main text Fig. 1a). The MSIT requires subjects to identify which of a set of three numbers is different than its neighbors. Subjects must keep three fingers of their right hand positioned over response keys corresponding to the digits 1–3. In control (non-interference) trials, the target is in the same spatial position as its corresponding response key, and the flanking digits are not valid responses (i.e., they are 0s). In interference trials, the target is out-of-position relative to its corresponding key-press and is flanked by other viable targets. MSIT has been shown to produce robust functional magnetic resonance imaging (fMRI)25 and electrophysiologic26 changes, with a significant (interference–control) difference often detectable at the individual subject level. We note that this specific operationalization of cognitive control, performance on a conflict task, is only one of many possible experimental approaches. Cognitive control is evoked in many situations, including approach-avoidance conflict50, switch-stay decisions16,51, and possibly also in emotionally valenced self-regulation52. The specific advantage of MSIT is that it is verified to induce statistically robust subject-level effects, at both the behavioral and neural level, amplifying our power to detect DBS-induced differences. We further added an emotional interference dimension, based on a hypothesis that subjects with severe treatment-resistant illness would be attentionally biased towards negative pictures. Before each MSIT trial, an image selected from the International Affective Picture System, or IAPS53, was presented. The image remained on-screen, partially obscured by the MSIT stimulus, for the trial duration. A fixed subset of 144 images were selected from the overall IAPS dataset to cover the range of available valence (positive, neutral, and negative) and emotional arousal ratings.
Each block of trials contained 72 control and 72 interference trials. We assigned positive, neutral, and negative IAPS images assigned to each trial type in a counterbalanced fashion, such that each image was presented once in a control and once in an interference context. The 144 images were split between these two 144-trial blocks in a manner that minimized the mean squared pairwise differences between image ratings when rank ordered by their valence. To prevent response sets or habituation, trial sequence in each block was pseudo-randomized so that subjects never had more than two trials in a row that shared the same valence, interference level, or desired response finger. This highly interleaved trial design was expected to place greater demands on cognitive control systems by reducing predictability of the stimuli. As shown in Fig. 1a, subjects viewed the IAPS picture alone for 400 ms, were presented with the MSIT stimulus and given up to 1500 ms to respond, and then viewed a fixation cross for 3–5 s (randomized with a uniform distribution). They were instructed to minimize eye blinking during the trial and to blink freely during the fixation period. Before data collection, subjects performed a block of 20 trials where they received correct/incorrect feedback, followed by another block of 40 trials without feedback. They repeated this practice, if necessary, until they achieved over 90% correct responses (counting missed trials as incorrect).
Many of our subjects had prior negative life experiences with specific associations to themes presented in IAPS. To control for these strong subjective/idiosyncratic interpretations in this small sample, we collected individual image ratings. After each block was complete, subjects were re-presented with each IAPS image and given 25 s to rate the image emotionally. We used the same self-assessment manikin system originally used to develop the IAPS54, which assigns each picture a valence rating from 1 to 9 (representing most negative to most positive) and an arousal rating from 1 to 9 (representing not-at-all arousing to highly arousing). Both the MSIT and the post-task IAPS rating images were presented using Psychophysics Toolbox (http://psychtoolbox.org) running under MATLAB 2013a.
Electroencephalographic data were acquired at 1450 Hz (Nexstim eXimia EEG) from 60 channels placed according to the international 10–20 system and the manufacturer's standard cap. The ground electrode was placed on the bridge of the nose. One diagonal bipolar electro-oculogram channel was placed around the right eye. Channels were prepared to <5 kΩ impedance. The scalp location of each channel was digitized after cap preparation and prior to recordings. We also digitized the nasion and both pre-auricular points, plus 100 additional scalp points not corresponding to any EEG sensor, to improve the quality of MRI-to-digitization co-registration. In four subjects, in addition to the task data, we collected 1 min each of eyes-open and eyes-closed resting data just after each task block and before the IAPS self-assessment ratings.
All subjects first completed an MSIT block, resting-state collection, and image assessment with their DBS on at its usual clinical settings (DBS ON). Directly after MSIT, but before resting-state and image-rating blocks, subjects also completed 15 min of the Effort Expenditure for Rewards Task (EEfRT)27. A trained clinician then de-activated the bilateral implanted neurostimulators, and the subject rested for at least 1 h without removing the EEG cap. In animal studies, an hour's withdrawal of chronic stimulation was sufficient to produce robust changes in neural activity that appeared to be a rebound/counter-regulatory response55. This rebound effect does not terminate within an hour, but persists for an extended period, as documented by clinical studies where patients slowly relapse over a week after DBS discontinuation56. The presence of this rebound effect should emphasize or amplify the neurological changes caused by chronic stimulation. After re-preparing any high-impedance channels, subjects again performed MSIT, EEfRT, resting-state, and image ratings (DBS OFF condition) before neurostimulator re-activation. Subjects were aware of their device status, as were the experimenters, although no subject experienced adverse psychological consequences from the study manipulation.
EEG analyses used the minimum norm estimate (MNE)-Python suite57. Offline, EEG data were bandpass filtered between 0.5 and 50 Hz, then epoched. This effectively removes the DBS artifact as shown in our and others' past work37,58, as all subjects' stimulators were set above the cutoff frequency. Harmonic frequencies of DBS stimulation would similarly be entirely outside the passband of this filter and outside of all frequency bands analyzed in this work. See Table 1 for individual subjects' stimulation frequencies. We removed eyeblinks and muscle artifacts with signal space projection59. We then cut trials/epochs from the continuous data. Stimulus-locked analyses used data from 1.5 s before the IAPS onset to 3.4 s after IAPS onset (1500 ms after end of trial). Response-locked analyses used −1.5 s before to 1.5 s after the response. Amplitude rejection (threshold = ± 150 μV) removed trials with residual artifacts. Finally, we converted all trials to change relative to baseline, defined as 0.5 s to 0.1 s before the IAPS onset. For time-domain analyses, we subtracted the mean of this window from all trials for that specific subject; for frequency-domain, we converted data to decibels (dB) relative to baseline.
Of the 14 subjects, six were excluded from further EEG analysis during preprocessing. Four subjects were excluded because their EEG data were recorded without the use of a digitization system. Their data could thus not be accurately source localized. Two more subjects were excluded from further EEG analysis due to substantial electromyographic artifact, which resulted in the rejection of the vast majority of trials following the quality assurance procedures described above. The EEG data of the remaining eight subjects was then subjected to source localization and all further analysis described below.
We reconstructed subjects' cortical surfaces from presurgical T1 MRI images using Freesurfer v5.360. The EEG cap digitization was manually co-registered to the Freesurfer anatomical reconstruction using the MNE command line tools package. Then, in MNE-Python, the cortical meshes were downsampled from ~160,000 vertices per hemisphere to 4098 dipole locations (vertices) per hemisphere. We calculated a forward solution using the three-compartment boundary-element model61 with the inner and outer skull surfaces reconstructed from Freesurfer's watershed algorithm62. The dipole amplitude (current source density) at each cortical location was estimated using the anatomically constrained MNEs method63, using a pipeline similar to other reports of region of interest (ROI)-based oscillatory analyses64. Briefly, the MNE method finds the maximum a posteriori estimates of the latent cortical sources, given the observed sensor sources, assuming (1) the current source amplitudes are sparse and normally distributed with a known source covariance matrix and (2) the observed sensor data contain additive noise with a normal distribution and a known spatial covariance matrix. Importantly, as opposed to other beamforming methods, the MNE method preserves oscillations such that oscillatory power can be estimated following source localization. Each vertex's current source estimate includes a dipole orientation, such that the source time course may be either positive or negative at any given time. Here, the orientations of the dipoles were constrained to the cortex using recommended default parameters (loose = 0.2, depth = 0.8). The noise covariance matrices necessary for source localization were estimated per subject from a baseline of period of 500 ms prior to the start of each trial. The empirical covariance estimates were regularized via the "shrunk" method, as recommended by Engemann and Gramfort65. Individual source estimate data were then mapped to Freesurfer's "fsaverage" cortical surface. Finally, source estimate time courses for individual vertices were combined within a set of cortical labels corresponding to our ROIs: cingulate cortex (rACC, dACC, mCC), dorso-mPFC (dmPFC/superior frontal gyrus), dorso-lateral prefrontal cortex (DLPFC/middle frontal gyrus), and ventrolateral prefrontal cortex (VLPFC/inferior frontal gyrus). The average time course per ROI was computed using the "PCA flip" technique in MNE-Python. Briefly, singular value decomposition (SVD) is applied to the vertex-wise time courses per ROI and the first right singular vector is extracted. Each vertex's time course is then scaled and sign flipped. The scaling is performed in order to match the average power of vertex-wise time courses. The sign of the time course is adjusted by multiplying it with the sign of the left singular vector from the SVD, which ensures that the phase does not change by 180 degrees from one source time course to the next. Supplementary Table 1 lists these labels and the anatomical shorthand used for each in the main text/figures. The anatomical labels/ROIs were manually assembled by merging of multiple smaller, contiguous labels from the Lausanne 243-region atlas66. The labels used here were designed to ensure that each cortical region corresponded to a nearly equal number of vertices in the standard template brain. We selected the label set to cover regions previously implicated in functional neuro-imaging of the MSIT13,25.
The primary behavioral outcome in MSIT is subjects' RT, as they are pre-trained to very low error rates. Along with others, we have shown that RTs during conflict and decision-making tasks are better approximated by gamma than by Gaussian distributions13,67. We thus analyzed behavior in a mixed effects GLM with the gamma distribution and identity link function. That GLM was applied at the per-trial level, allowing us to model the effects of DBS and trial-specific effects such as emotion and cognitive interference. The mixed effects design, which includes a random intercept for the subject, specifically controls for intra-subject correlation (trials and sessions as repeated measures). We excluded trials with missing responses, error trials, and post-error trials. We further excluded trials with outlier RTs, which we defined by fitting a gamma distribution to each subject's RT data, pooling the DBS ON and OFF runs for this preprocessing step. We then excluded trials with RT likelihood <0.005 based on the fitted distribution. These approaches excluded 247 trials (6.12% of total, n = 3785 trials retained in analysis).
To control for overall RT variability across subjects, we specified GLMs with a subject-specific random intercept plus fixed effects for experiment variables (mixed models). Similar to prior reports, e.g.28, we identified the appropriate model by minimizing Akaike's information criterion (AIC) during stepwise addition of variables. Importantly, AIC minimization is mathematically equivalent to constructing the model by out-of-sample cross-validation36, an approach we have identified as essential in biomarker research38. We considered interference, DBS, valence, and arousal as possible RT predictors based on our pre-specified hypotheses and the task design. We also tested interaction terms between these main effects. We considered trial number within a run as a nuisance regressor, controlling for fatigue and/or learning effects. The data were best explained by a model with the aforegoing main effects, but no interaction terms (see main text and Supplementary Fig. 1). Models with other predictors, e.g., RT on the preceding trial (an autoregressive effect), were not identifiable. Conflict and DBS were dummy coded, whereas valence, arousal, and trial number were treated as continuous variables. All independent variables were standardized to the 0–1 interval for regression, but are reported in the article after conversion back to their natural units for ease of interpretation.
For the time-domain (evoked potential) analysis, sensor and source space time courses were reduced to the (−0.5, 2.0) s time window for stimulus-locked epochs and (−1.0, 1.0) windows for response-locked epochs. Furthermore, all epochs were low-pass filtered to 15 Hz and downsampled by a factor of 3. Confidence intervals on plotted event-related potentials (ERPs) were calculated by 1000 bootstrap resamplings with replacement (preserving the number of trials within each subject). All ERPs shown are the grand mean across all subjects.
For the spectral-domain analysis, we calculated non-phase-locked power in three bands of interest: theta (4–8 Hz), alpha (8–15 Hz), and beta (15–30 Hz). We emphasized non-phase-locked, or induced, oscillations because they appear to be more directly related to proactive cognitive control17. In trial-based analyses of Simon-effect tasks, over 80% of the conflict/control-related theta power change was non-phase-locked23. The non-phase-locked theta power was correlated with trial-to-trial RTs, more so than the phase-locked theta reflected in the time-domain ERP. Further, in a non-trial-structured cognitive control task, theta oscillations appeared to be continuously present over mid-frontal cortex, increasing in power when more control was needed68. In contrast, phase-locked theta oscillations may be more related to error-related performance monitoring69, a phenomenon not studied here due to the very small number of error trials.
To calculate non-phase-locked power changes, we first subtracted the mean ERP from each trial23. The subtracted ERP (and the trials from which it was subtracted) were calculated for each combination of subject, condition (DBS ON/OFF × Interference/Conflict trials), and ROI/sensor. All plots of EEG power show data after this ERP removal.
Sensor and source-localized data were then decomposed into their time-frequency representation via Morlet wavelet convolution. Wavelets had base frequencies sampled from 2 to 50 Hz in 25 logarithmically spaced steps, where each wavelet was characterized by three cycles. Decomposition was performed on single-trial data, not on the average or ERP. All frequency power estimates were normalized to the average power of a pre-stimulus baseline (−0.5 s to −0.1 s) for each frequency band. We used a dB transform for normalization. The baseline power was computed separately for each subject and DBS condition (OFF, ON). The same pre-stimulus baseline period used for stimulus-locked analyses was also used for response-locked analyses. We then averaged the values within each pre-specified frequency band to obtain a per-trial power time course for each band. All resulting power values shown in the article were normalized to dB as noted above. All power topographic and time course plots represent the grand mean across subjects.
In both sensor and source space, both time-domain and frequency-domain EEG data were analyzed using ordinary least squares regression70,71. The single-trial voltage or power at each time point was entered into a linear model using the same independent variables as the behavioral GLM: interference, DBS, valence, arousal, and trial number. We standardized all independent variables to the [0, 1] interval for this model also. We also considered the possibility that interference and DBS might interact at the neural level even though we saw no behavioral interaction, and thus included a DBS × interference interaction term in this regression. To replicate the effect of the subject-specific intercepts in the behavior model, we subtracted each individual subject's all-trials mean voltage or power time course from that subject's trials. Contrast statistics (t-tests) were computed for each resulting beta weight (regression coefficient) at each sample. To control for multiple statistical comparisons (timepoints) within each ROI/electrode, we performed permutation inference and temporal cluster correction72. We used 1000 permutations for each analysis, discarded clusters <50 ms in temporal extent, and retained only clusters that were significant at α = 0.05. For the time-domain analysis in source space, we further corrected these cluster p-values using the Benjamini–Hochberg false discovery rate (FDR) step-down procedure across all tested ROIs. For frequency-domain analysis, we did the same, but using a single step-down across ROIs and frequency bands simultaneously. All significant clusters shown in the article survived these corrections. The exception is that for sensor-space analysis, we did not correct for multiple sensors, because we tested only one sensor for time-domain and one sensor for frequency-domain analysis. The sensor-space frequency-domain p-values were again corrected for multiple bands.
We hypothesized that both theta band EEG and MSIT behavior changes induced by DBS might correlate with subjects' clinical response to VCVS DBS treatment. We further hypothesized that this correlation might be with positive clinical response (improvement in depression) or with clinical complications (hypomania, as in28). We quantified these at the individual subject level: MSIT RT as the mean (DBS ON–DBS OFF) difference, and theta EEG as the integrated height of the (DBS ON–DBS OFF) difference wave in the VLPFC (anterior inferior frontal gyrus). The VLPFC label was selected as the predictor variable after viewing the results of the preceding analyses. The difference wave was specifically calculated over the time period where we found a significant cluster during the source space analysis. Depression was measured with the Montgomery–Åsberg Depression Rating Scale (MADRS) as collected during the subjects' original clinical trials; we did not attempt correlation with OCD symptoms because only two subjects in the sample had OCD. We used the MADRS change from the pre-implant baseline to the day of data collection, or to the nearest clinical visit to the data collection (always within 1 month) if a given subject was unable to complete the MADRS that day. Hypomania used the same dataset as28, in which the presence/absence of hypomanic episodes had been coded for each subject by trained clinical raters. The dependent variable was whether that subject had ever had hypomania during their DBS treatment course. One subject was not included in hypomania analyses due to unavailability of clinical data.
Out-of-sample prediction capability is important to assess for putative psychiatric biomarkers37,38, but difficult to measure in rare populations such as DBS patients. As a surrogate, we generated confidence intervals for the clinical/biomarker correlations by drawing 1000 bootstrap resamples (with replacement) from the original subject population. We used those same bootstrap draws to construct the confidence interval of the area under the curve (AUC) for receiver-operator characteristic (ROC) curves for classification of hypomania present/absent and depression responder/nonresponder. The latter used the same threshold of 50% MADRS improvement as in the clinical trials, e.g. in49.
Theta changes observed during MSIT performance might not be specific to the task, but might arise from a general shift in the EEG frequency spectrum during DBS. Five subjects contributed at least 2 min of eyes-open resting-state data with DBS ON and OFF. From these data, we cut 60 1-s artifact-free epochs from the ON and OFF recordings in each subject, then computed a power spectral density (PSD) from 0 to 30 Hz via the multitaper method. We computed mean power within the theta (4–8 Hz) region of each epoch's PSD, then tested the difference between these distributions with the Mann–Whitney U-test. We carried out these analyses on theta power from sensor Fz, which was the scalp point of highest theta power during MSIT performance.
A potential concern is that any RT results we observe might be explainable by practice effects. Although the ON and OFF blocks were separated by an hour or more, subjects might still retain some procedural memory of the task. To address this confound, we analyzed data from a group of subjects who performed multiple temporally spaced MSIT runs without the emotional distractors. These subjects were part of a larger study focused on the network-level physiology of mental illness13. They were admitted for inpatient electrophysiologic monitoring of medication-refractory epilepsy. While inpatient, they were approached daily to perform multiple cognitive tasks, including MSIT. In this case, we used the original version of the task, which does not include the background IAPS distractors. Due to the nature of clinical work on an inpatient unit, including breaks for meals and clinical rounds, these subjects often performed one or more 64-trial MSIT blocks with a substantial break in between. This effectively replicates the design of our primary study, except for the DBS manipulation. We analyzed task blocks performed before and after these breaks, in eight subjects. For these subjects, we fit their MSIT trial RTs with a gamma distribution GLM that mimicked the main cohort analysis, i.e., independent/predictor terms for block (which mimics the DBS term), conflict, trial number, and a subject-specific intercept. As with the main cohort, all of these subjects provided full informed consent before any study procedures. All experimental procedures with these subjects complied with governmental and institutional ethics requirements and were approved by the Massachusetts General Hospital Institutional Review Board.
Pre-processed but not analyzed EEG data (source time courses and sensor-space data) and related MRI files is deposited at https://openneuro.org/datasets/ds001784.
Analysis scripts are similarly archived at https://github.com/mghneurotherapeutics/EMOTE-afMSIT.
Journal peer review information: Nature Communications thanks Thomas Schlaepfer, Martijn Figee, and the anonymous reviewer for their contribution to the peer review of this work. Peer reviewer reports are available.
Whiteford, H. A. et al. Global burden of disease attributable to mental and substance use disorders: findings from the Global Burden of Disease Study 2010. Lancet 382, 1575–1586 (2013).
Camprodon, J.A., Rauch, S.L., Greenberg, B.D. & Dougherty, D.D. (eds.) Psychiatric Neurotherapeutics: Contemporary Surgical and Device-Based Treatments. (Humana Press, New York, NY, 2016).
Graat, I., Figee, M. & Denys, D. The application of deep brain stimulation in the treatment of psychiatric disorders. Int. Rev. Psychiatry 29, 178–190 (2017).
Widge, A. S., Malone, D. A. J. & Dougherty, D. D. Closing the loop on deep brain stimulation for treatment-resistant depression. Front. Neurosci. 12, 175 (2018).
Widge, A. S., Deckersbach, T., Eskandar, E. N. & Dougherty, D. D. Deep brain stimulation for treatment-resistant psychiatric illnesses: what has gone wrong and what should we do next? Biol. Psychiatry 79, e9–e10 (2016).
Bari, A. A. et al. Charting the road forward in psychiatric neurosurgery: proceedings of the 2016 American Society for Stereotactic and Functional Neurosurgery workshop on neuromodulation for psychiatric disorders. J. Neurol. Neurosurg. Psychiatry https://doi.org/10.1136/jnnp-2017-317082 (2018).
Noecker, A. M. et al. StimVision software: examples and applications in subcallosal cingulate deep brain stimulation for depression. Neuromodulation Technol. Neural Interface 21, 191–196 (2018).
Bilge, M. T., Gosai, A. & Widge, A. S. Deep brain stimulation in psychiatry: mechanisms, models, and next-generation therapies. Psychiatr. Clin. North Am. 41, 373–383 (2018).
Herrington, T. M., Cheng, J. J. & Eskandar, E. N. Mechanisms of deep brain stimulation. J. Neurophysiol. 115, 19–38 (2015).
Basu, I. et al. A neural mass model to predict electrical stimulation evoked responses in human and non-human primate brain. J. Neural Eng. 15, 066012 (2018).
Ranck, J. B. Which elements are excited in electrical stimulation of mammalian central nervous system: a review. Brain Res. 98, 417–440 (1975).
Ashkan, K., Rogers, P., Bergman, H. & Ughratdar, I. Insights into the mechanisms of deep brain stimulation. Nat. Rev. Neurol. 13, 548–554 (2017).
Widge, A. S. et al. Treating refractory mental illness with closed-loop brain stimulation: progress towards a patient-specific transdiagnostic approach. Exp. Neurol. 287, 361–472 (2017).
Ramirez-Zamora, A. et al. Evolving applications, technological challenges and future opportunities in neuromodulation: proceedings of the fifth annual deep brain stimulation think tank. Front. Neurosci. 11, 734 (2018).
Robbins, T. W., Gillan, C. M., Smith, D. G., de Wit, S. & Ersche, K. D. Neurocognitive endophenotypes of impulsivity and compulsivity: towards dimensional psychiatry. Trends Cogn. Sci. 16, 81–91 (2012).
Shenhav, A., Cohen, J. D. & Botvinick, M. M. Dorsal anterior cingulate cortex and the value of control. Nat. Neurosci. 19, 1286–1291 (2016).
Cavanagh, J. F. & Frank, M. J. Frontal theta as a mechanism for cognitive control. Trends Cogn. Sci. 18, 414–421 (2014).
McTeague, L. M. et al. Identification of common neural circuit disruptions in cognitive control across psychiatric disorders. Am. J. Psychiatry 174, 676–685 (2017).
Vaghi, M. M. et al. Specific frontostriatal circuits for impaired cognitive flexibility and goal-directed planning in obsessive-compulsive disorder: evidence from resting-state functional connectivity. Biol. Psychiatry 81, 708–717 (2017).
O'Hare, J., Calakos, N. & Yin, H. H. Recent insights into corticostriatal circuit mechanisms underlying habits. Curr. Opin. Behav. Sci. 20, 40–46 (2018).
Haber, S. N. & Heilbronner, S. R. Translational research in OCD: circuitry and mechanisms. Neuropsychopharmacology 38, 252–253 (2013).
Makris, N. et al. Variability and anatomical specificity of the orbitofrontothalamic fibers of passage in the ventral capsule/ventral striatum (VC/VS): precision care for patient-specific tractography-guided targeting of deep brain stimulation (DBS) in obsessive compulsive disorder (OCD). Brain Imaging Behav. 10, 1054–1067 (2016).
Cohen, M. X. & Donner, T. H. Midfrontal conflict-related theta-band power reflects neural oscillations that predict behavior. J. Neurophysiol. 110, 2752–2763 (2013).
Bush, G. & Shin, L. M. The multi-source interference task: an fMRI task that reliably activates the cingulo-frontal-parietal cognitive/attention network. Nat. Protoc. 1, 308–313 (2006).
González-Villar, A. J. & Carrillo-de-la-Peña, M. T. Brain electrical activity signatures during performance of the multisource interference task. Psychophysiology 54, 874–881 (2017).
Treadway, M. T., Buckholtz, J. W., Schwartzman, A. N., Lambert, W. E. & Zald, D. H. Worth the 'EEfRT'? The effort expenditure for rewards task as an objective measure of motivation and anhedonia. PLoS ONE 4, e6598 (2009).
Widge, A. S. et al. Predictors of hypomania during ventral capsule/ventral striatum deep brain stimulation. J. Neuropsychiatry Clin. Neurosci. 28, 38–44 (2015).
Gradinaru, V., Mogri, M., Thompson, K. R., Henderson, J. M. & Deisseroth, K. Optical deconstruction of Parkinsonian neural circuitry. Science 324, 354–359 (2009).
Klein, E. et al. Brain-computer interface-based control of closed-loop brain stimulation: attitudes and ethical considerations. Brain-Comput. Interfaces 3, 140–148 (2016).
Goering, S., Klein, E., Dougherty, D. D. & Widge, A. S. Staying in the loop: relational agency and identity in next-generation DBS for psychiatry. AJOB Neurosci. 8, 59–70 (2017).
Lo, M.-C. & Widge, A. S. Closed-loop neuromodulation systems: next-generation treatments for psychiatric illness. Int. Rev. Psychiatry 29, 191–204 (2017).
Yousefi, A. et al. COMPASS: an open-source, general-purpose software toolkit for computational psychiatry. Front. Neurosci. 12, 957 (2019).
Widge, A. S. et al. Altering alpha-frequency brain oscillations with rapid analog feedback-driven neurostimulation. PLoS ONE 13, e0207781 (2018).
Malekmohammadi, M. et al. Kinematic adaptive deep brain stimulation for resting tremor in Parkinson's disease. Mov. Disord. 31, 426–428 (2016).
Stone, M. An asymptotic equivalence of choice of model by cross-validation and Akaike's criterion. J. R. Stat. Soc. Ser. B Methodol. 39, 44–47 (1977).
Widge, A. S. et al. Ventral capsule/ventral striatum deep brain stimulation does not consistently diminish occipital cross-frequency coupling. Biol. Psychiatry 80, e59–e60 (2016).
Widge, A. S. et al. Electroencephalographic biomarkers for treatment response prediction in major depressive illness: a meta-analysis. Am. J. Psychiatry https://doi.org/10.1176/appi.ajp.2018.17121358 (in press).
Ryman, S. G. et al. Impaired midline theta power and connectivity during proactive cognitive control in schizophrenia. Biol. Psychiatry 84, 675–683 (2018).
Schlaepfer, T. E., Bewernick, B. H., Kayser, S., Mädler, B. & Coenen, V. A. Rapid effects of deep brain stimulation for treatment-resistant major depression. Biol. Psychiatry 73, 1204–1212 (2013).
Riva-Posse, P. et al. Defining critical white matter pathways mediating successful subcallosal cingulate deep brain stimulation for treatment-resistant depression. Biol. Psychiatry 76, 963–969 (2014).
Cavanagh, J. F. et al. Subthalamic nucleus stimulation reverses mediofrontal influence over decision threshold. Nat. Neurosci. 14, 1462–1467 (2011).
Frank, M. J., Samanta, J., Moustafa, A. A. & Sherman, S. J. Hold your horses: impulsivity, deep brain stimulation, and medication in Parkinsonism. Science 318, 1309–1312 (2007).
Tyagi, H. et al. A randomised trial directly comparing ventral capsule and anteromedial subthalamic nucleus stimulation in obsessive compulsive disorder: clinical and imaging evidence for dissociable effects. Biol. Psychiatry https://doi.org/10.1016/j.biopsych.2019.01.017 (2019).
Pizzagalli, D. A. et al. Pretreatment rostral anterior cingulate cortex theta activity in relation to symptom improvement in depression: a randomized clinical trial. JAMA Psychiatry https://doi.org/10.1001/jamapsychiatry.2018.0252 (2018).
Broadway, J. M. et al. Frontal theta cordance predicts 6-month antidepressant response to subcallosal cingulate deep brain stimulation for treatment-resistant depression: a pilot study. Neuropsychopharmacology 37, 1764–1772 (2012).
Horst, K. Wter et al. Striatal dopamine regulates systemic glucose metabolism in humans and mice. Sci. Transl. Med. 10, eaar3752 (2018).
Garnaat, S. L. et al. Who qualifies for deep brain stimulation for OCD? Data from a naturalistic clinical sample. J. Neuropsychiatry Clin. Neurosci. 26, 81–86 (2014).
Dougherty, D. D. et al. A randomized sham-controlled trial of deep brain stimulation of the ventral capsule/ventral striatum for chronic treatment-resistant depression. Biol. Psychiatry 78, 240–248 (2015).
Friedman, A. et al. A corticostriatal path targeting striosomes controls decision-making under conflict. Cell 161, 1320–1333 (2015).
Kolling, N. et al. Value, search, persistence and model updating in anterior cingulate cortex. Nat. Neurosci. 19, 1280–1285 (2016).
LeDoux, J. & Daw, N. D. Surviving threats: neural circuit and computational implications of a new taxonomy of defensive behaviour. Nat. Rev. Neurosci. 19, 269–282 (2018).
Lang, P. J., Bradley, M. M. & Cuthbert, B. N. International Affective Picture System (IAPS): Affective Ratings of Pictures and Instruction Manual. (University of Florida, Gainesville, FL, 2008).
Bradley, M. M. & Lang, P. J. Measuring emotion: the self-assessment manikin and the semantic differential. J. Behav. Ther. Exp. Psychiatry 25, 49–59 (1994).
Ewing, S. G. & Grace, A. A. Long-term high frequency deep brain stimulation of the nucleus accumbens drives time-dependent changes in functional connectivity in the rodent limbic system. Brain Stimul. 6, 274–285 (2013).
Ooms, P. et al. Rebound of affective symptoms following acute cessation of deep brain stimulation in obsessive-compulsive disorder. Brain Stimul. 7, 727–731 (2014).
Gramfort, A. et al. MEG and EEG data analysis with MNE-Python. Front Neurosci. 7, 267 (2013).
Bahramisharif, A. et al. Deep brain stimulation diminishes cross-frequency coupling in obsessive-compulsive disorder. Biol. Psychiatry 80, e57–e58 (2016).
Uusitalo, M. A. & Ilmoniemi, R. J. Signal-space projection method for separating MEG or EEG into components. Med Biol. Eng. Comput. 35, 135–140 (1997).
Fischl, B. FreeSurfer. NeuroImage 62, 774–781 (2012).
Hämäläinen, M., Hari, R., Ilmoniemi, R. J., Knuutila, J. & Lounasmaa, O. V. Magnetoencephalography—theory, instrumentation, and applications to noninvasive studies of the working human brain. Rev. Mod. Phys. 65, 413 (1993).
Ségonne, F. et al. A hybrid approach to the skull stripping problem in MRI. Neuroimage 22, 1060–1075 (2004).
Hämäläinen, M. S. & Ilmoniemi, R. J. Interpreting magnetic fields of the brain: minimum norm estimates. Med Biol. Eng. Comput. 32, 35–42 (1994).
Hwang, K., Ghuman, A. S., Manoach, D. S., Jones, S. R. & Luna, B. Frontal preparatory neural oscillations associated with cognitive control: a developmental study comparing young adults and adolescents. NeuroImage 136, 139–148 (2016).
Engemann, D. A. & Gramfort, A. Automated model selection in covariance estimation and spatial whitening of MEG and EEG signals. NeuroImage 108, 328–342 (2015).
Daducci, A. et al. The Connectome Mapper: an open-source processing pipeline to map connectomes with MRI. PLOS ONE 7, e48121 (2012).
Palmer, E. M., Horowitz, T. S., Torralba, A. & Wolfe, J. M. What are the shapes of response time distributions in visual search? J. Exp. Psychol. Hum. Percept. Perform. 37, 58–71 (2011).
Cohen, M. X. Midfrontal theta tracks action monitoring over multiple interactive time scales. NeuroImage 141, 262–272 (2016).
Cohen, M. X. A neural microcircuit for cognitive conflict detection and signaling. Trends Neurosci. 37, 480–490 (2014).
Smith, N. J. & Kutas, M. Regression-based estimation of ERP waveforms: I. The rERP framework. Psychophysiology 52, 157–168 (2015).
Smith, N. J. & Kutas, M. Regression-based estimation of ERP waveforms: II. Nonlinear effects, overlap correction, and practical considerations. Psychophysiology 52, 169–181 (2015).
We gratefully acknowledge technical assistance from Amanda Arulpragasam, Andrew Corse, Nina Levar, and Tommi Raij with subject recruitment and data collection. Graphical elements in Fig. 1a include photography by Elias Levy re-used under CC-BY. This work was supported by grants from the Brain & Behavior Research Foundation (A.S.W.), Picower Family Foundation (A.S.W., E.K.M.), MIT Picower Institute Innovation Fund (E.K.M.), Defense Advanced Research Projects Agency (DARPA) under Cooperative Agreement Number W911NF-14-2-0045 issued by the Army Research Organization (ARO) contracting office in support of DARPA's SUBNETS Program (A.S.W., D.D.D., E.N.E., S.Z., T.D.), Office of Naval Research MURI N00014-16-1-2832 (E.K.M.), and National Institutes of Health (R21MH109722, A.S.W.; R03MH111320, A.S.W. and D.D.D.; UH3NS100548, A.S.W., D.D.D., E.N.E., and T.D.; R37MH087027, E.K.M.). The views, opinions, and findings expressed are those of the authors. They should not be interpreted as representing the official views or policies of the Department of Defense, Department of Health & Human Services, any other branch of the U.S. Government, or any other funding entity.
A.S.W., D.D.D and E.K.M. designed the research. T.D. designed the behavioral task. E.N.E. performed neurosurgical procedures in the subjects' clinical trials. A.S.W., D.D.D and E.N.E. obtained research funding and provided general team supervision. A.S.W., A.C.P., I.B. and S.S.C. collected data in epilepsy subjects. A.S.W. and S.Z. collected EEG/behavioral data, performed the analyses, and created the figures. A.S.W., S.Z. and E.K.M. wrote the manuscript. All authors had an opportunity to review the manuscript and revise for critical intellectual content.
A.S.W., D.D.D., E.K.M., E.N.E., and T.D. are named inventors on patent applications related to deep brain stimulation and oscillations, including at least one application related to the subject of this paper. A.S.W., D.D.D., and E.N.E. have received consulting income and/or research support from Medtronic, which manufactured the devices used in this study. Medtronic had no financial or technical involvement with this specific research. T.D. discloses honoraria, consultation fees and/or royalties from the MGH Psychiatry Academy, BrainCells Inc., Clintara, LLC., Systems Research and Applications Corporation, Boston University, the Catalan Agency for Health Technology Assessment and Research, the National Association of Social Workers Massachusetts, the Massachusetts Medical Society, Tufts University, NIDA, NIMH, and Oxford University Press. None of those entities manufactures technology or products used in the study. The remaining authors declare no competing interests.
Correspondence to A. S. Widge.


Looking to minimize your business costs, prefer to keep lower balances and have few debits per month. The Union Bay Credit Union Current Account may be the best choice for you. This non-interest bearing chequing account offers convenient access to your money along with cost-saving features that make it simple to manage your resources and keep your business on track.
The 20/20 Business Account is for the small to medium business that has a clear vision of what they need in a bank account; and seldom have more than 20 transactions per month.
The Business MAXIMIZER® Account streamlines your day-to-day banking by combining your chequing and savings. It also comes with a flat monthly fee and 30 free debits when your account balance is $5000 or more.
We have designed our Active Business MAXIMIZER® Account for business members who have many day to day transactions and want to earn daily interest on their balance.
All business accounts with a Line of Credit are required to have an annual review.
At Union Bay Credit Union, we understand the unique needs of non-profit organizations in our communities. We share a lot of common values with these groups in terms of helping our communities, and the people who live here, be the best that they can be. That's why we offer low-cost chequing accounts designed to fit the charitable organizations, clubs, groups and associations that keep our communities strong and vibrant.
As with all Union Bay accounts, your funds are 100% guaranteed.


Home Marine Safety Port Condition Whiskey set in Key West, Fla.
Port Condition Whiskey set in Key West, Fla.
Aug 23rd, 2012 · Comments Off on Port Condition Whiskey set in Key West, Fla.
MIAMI- The U.S. Coast Guard captain of the port has set hurricane condition Whiskey for the Port of Key West, Fla.
Gale force winds from Tropical Storm Isaac are expected to make landfall along the coast of the Florida Keys within 72 hours.
Pleasure crafts are advised to seek safe refuge. Drawbridges will not be operating when sustained wind speeds reach 45 mph or if an evacuation is in progress.
The captain of the port has activated a regulated navigation area for the Florida Keys. To enter, transit or remain within this regulated navigation area, vessels must comply with the following requirements: Owners, operators or agents of all self-propelled oceangoing vessels greater than 500 gross tons and all barges and their supporting tugs must immediately advise the captain of the port of their intent to remain in port or to depart.
Owners, operators or agents of all self-propelled oceangoing vessels greater than 500 gross tons, and all barges and their supporting tugs desiring to remain in port must arrange safe moorings. Within 24 hours they must either complete and submit a remaining in port checklist to the captain of the port or appear in person at Sector Key West to provide a briefing on intentions for remaining in port.
All plans for remaining in port are subject to captain of the port acceptance. Copies of the checklist are available from the captain of the port.
All self-propelled oceangoing vessels greater than 500 gross tons and all barges and their supporting tugs departing the port must depart no later than 24 hours prior to the arrival of gale force winds; which is currently predicted for 3 p.m., Thursday. Vessels bound for this port which are unable to depart 24 hours prior to the arrival of gale force winds are advised to seek an alternative destination.