def _buildFileRoot(self): """ Build an auto-generated output filename root (i.e. minus the plot type or .npz ending). """ # Build basic version. self.fileRoot = '_'.join([self.runName, self.metric.name, self.metadata, self.slicer.slicerName[:4].upper()]) # Sanitize output name if needed. self.fileRoot = utils.nameSanitize(self.fileRoot)
def _buildFileRoot(self): """ Build an auto-generated output filename root (i.e. minus the plot type or .npz ending). """ # Build basic version. self.fileRoot = '_'.join([self.runName, self.metric.name, self.metadata, self.slicer.slicerName[:4].upper()]) # Sanitize output name if needed. self.fileRoot = utils.nameSanitize(self.fileRoot)
def _buildFileRoot(self, fileRoot=None): """ Build an auto-generated output filename root (i.e. minus the plot type or .npz ending). """ if fileRoot is None: # Build basic version. self.fileRoot = '_'.join([self.runName, self.metric.name, self.metadata]) else: self.fileRoot = fileRoot # Sanitize output name if needed. self.fileRoot = utils.nameSanitize(self.fileRoot)
def _buildFileRoot(self, fileRoot=None): """ Build an auto-generated output filename root (i.e. minus the plot type or .npz ending). """ if fileRoot is None: # Build basic version. self.fileRoot = '_'.join( [self.runName, self.metric.name, self.metadata]) else: self.fileRoot = fileRoot # Sanitize output name if needed. self.fileRoot = utils.nameSanitize(self.fileRoot)
def _buildFileRoot(self, outfileSuffix=None): """ Build a root filename for plot outputs. If there is only one metricBundle, this is equal to the metricBundle fileRoot + outfileSuffix. For multiple metricBundles, this is created from the runNames, metadata and metric names. If you do not wish to use the automatic filenames, then you could set 'savefig' to False and save the file manually to disk, using the plot figure numbers returned by 'plot'. """ if len(self.mBundles) == 1: outfile = self.mBundles[0].fileRoot else: outfile = '_'.join([self.jointRunNames, self.jointMetricNames, self.jointMetadata]) outfile += '_' + self.mBundles[0].slicer.slicerName[:4].upper() if outfileSuffix is not None: outfile += '_' + outfileSuffix outfile = utils.nameSanitize(outfile) return outfile
def _buildFileRoot(self, outfileSuffix=None): """ Build a root filename for plot outputs. If there is only one metricBundle, this is equal to the metricBundle fileRoot + outfileSuffix. For multiple metricBundles, this is created from the runNames, metadata and metric names. If you do not wish to use the automatic filenames, then you could set 'savefig' to False and save the file manually to disk, using the plot figure numbers returned by 'plot'. """ if len(self.mBundles) == 1: outfile = self.mBundles[0].fileRoot else: outfile = '_'.join([self.jointRunNames, self.jointMetricNames, self.jointMetadata]) outfile += '_' + self.mBundles[0].slicer.slicerName[:4].upper() if outfileSuffix is not None: outfile += '_' + outfileSuffix outfile = utils.nameSanitize(outfile) return outfile