saveLocation = os.path.realpath(args.save.strip())
    if not os.path.exists(saveLocation):
        os.mkdir(saveLocation)
    else:
        if not os.path.isdir(saveLocation):
            raise FileNotFoundError(
                "[Errno 2] No such file or directory: '{}'".format(
                    saveLocation))
else:
    saveFile = False

file = _tools.extractDataFiles(args, settingsName, oneFile=True)[0]

directory = os.path.split(file)

_tools.updateSetting(settingsName, directory)

plot = args.plotList
binning = args.binning

argsIdx = []

booleanList = np.zeros((len(PlotType)), dtype=bool)
for arg in plot:
    argsIdx.append(switch(arg))

argsIdx = np.unique([x for x in argsIdx if x is not None])

booleanList[np.array(argsIdx)] = True

File = DataFile.DataFile(file)
Exemple #2
0
                    "--binning",
                    type=int,
                    default='8',
                    help="Binning performed. Default '8'")
parser.add_argument(
    "-r",
    "--reuse",
    action='store_true',
    help='Set flag to reuse files from previous usage. Default false.')

args = parser.parse_args()

files = _tools.extractDataFiles(args, settingsName)
directory = os.path.split(files[0])[0] + os.path.sep

_tools.updateSetting(settingsName, files)
binning = args.binning

if not args.save is '':
    saveLocation = args.save.strip()
else:
    saveLocation = directory

for file in files:
    dataSet = DataSet.DataSet(dataFiles=file)
    dataSet.convertDataFile(binning=binning,
                            saveLocation=saveLocation,
                            saveFile=True)


def main():