@@ -0,0 +1,1872 @@
+# Copyright (c) 2014, Dignity Health%0A#%0A# Author: Ashley Anderson III %3Caganders3@gmail.com%3E%0A# Date: 2016-01-25 09:50%0A%0Aimport gpi%0Aimport numpy as np%0Aimport bart.python.cfl as cfl%0Aimport os%0A%0Aclass ExternalNode(gpi.NodeAPI):%0A    %22%22%22Uses the numpy save interface for writing arrays.%0A%0A    INPUT - numpy array to write%0A%0A    WIDGETS:%0A    File Browser - button to launch file browser, and typein widget, to give pathname for output file%0A    Write Mode - write at any event, or write only with new filename%0A    Write Now - write right now%0A    %22%22%22%0A%0A    def initUI(self):%0A%0A       # Widgets%0A        self.addWidget(%0A            'SaveFileBrowser', 'File Browser', button_title='Browse',%0A            caption='Save File (*.npy)', filter='cfl (*.cfl)')%0A        self.addWidget('PushButton', 'Write Mode', button_title='Write on New Filename', toggle=True)%0A        self.addWidget('PushButton', 'Write Now', button_title='Write Right Now', toggle=False)%0A%0A        # IO Ports%0A        self.addInPort('in', 'NPYarray', dtype=np.complex64)%0A%0A        # store for later use%0A        self.URI = gpi.TranslateFileURI%0A%0A    def validate(self):%0A%0A        if self.getVal('Write Mode'):%0A            self.setAttr('Write Mode', button_title=%22Write on Every Event%22)%0A        else:%0A            self.setAttr('Write Mode', button_title=%22Write on New Filename%22)%0A%0A        fname = self.URI(self.getVal('File Browser'))%0A        self.setDetailLabel(fname)%0A%0A        return 0%0A%0A    def compute(self):%0A%0A        if self.getVal('Write Mode') or self.getVal('Write Now') or ('File Browser' in self.widgetEvents()):%0A%0A            fpath = self.URI(self.getVal('File Browser'))%0A            basedir, fname = os.path.split(fpath)%0A            basename, ext = os.path.splitext(fname)%0A%0A            outpath = os.path.join(basedir, basename)%0A%0A            data = self.getData('in')%0A            cfl.writecfl(outpath, data)%0A%0A        return(0)%0A

Add CFL writer.