From 56aec108d449eebf4edc6b8aca1d43a1429f85cb Mon Sep 17 00:00:00 2001 From: marco cammarata Date: Sat, 11 Mar 2017 11:27:41 +0100 Subject: [PATCH] added a skip_first and last keyword to limit files being worked on --- xray/azav.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xray/azav.py b/xray/azav.py index 5ca360e..fa4daaa 100644 --- a/xray/azav.py +++ b/xray/azav.py @@ -219,7 +219,7 @@ def removeBackground(data,qlims=(0,10),max_iter=30,background_regions=[],force=F def doFolder(folder,files='*.edf*',nQ = 1500,force=False,mask=None,dark=10,norm='auto', - saveChi=True,poni='pyfai.poni',storageFile='auto',save=True,diagnostic=None): + saveChi=True,poni='pyfai.poni',storageFile='auto',save=True,diagnostic=None,skip_first=0,last=None): """ calc 1D curves from files in folder, returning a dictionary of stuff nQ : number of Q-points (equispaced) force : if True, redo from beginning even if previous data are found @@ -247,7 +247,7 @@ def doFolder(folder,files='*.edf*',nQ = 1500,force=False,mask=None,dark=10,norm= else: saved = None - files = utils.getFiles(folder,files) + files = utils.getFiles(folder,files)[skip_first:last] if saved is not None: files = [f for f in files if utils.getBasename(f) not in saved["files"]]