def getScanList(self): ''' return a list of scans to be used for loading data ''' logger.debug(METHOD_ENTER_STR) scanList = None if str(self.scanNumsTxt.text()) == EMPTY_STR: scanList = None else: scans = srange(str(self.scanNumsTxt.text())) scanList = scans.list() logger.debug(METHOD_EXIT_STR) return scanList
#output info = nx = 300 ny = 300 nz = 10 specName, specExt = os.path.splitext(specFile) # note that the q ranges in the three dimensions are available # later. If you know resolution desired, it is possible to calculate more # appropriate nx, ny, nz appConfig = RSMap3DConfigParser() maxImageMemory = appConfig.getMaxImageMemory() for scans in scanList1: scanRange = srange(scans).list() print ("scanRange %s" % scanRange) print("specName, specExt: %s, %s" % (specName, specExt)) ds = Sector33SpecDataSource(projectDir, specName, specExt, instConfigName, detectorConfigName, roi=roi, pixelsToAverage=bin, scanList= scanRange, # badPixelFile=badPixelFile, appConfig=appConfig) ds.setCurrentDetector(detectorName) ds.setProgressUpdater(updateDataSourceProgress) ds.loadSource(mapHKL=mapHKL) ds.setRangeBounds(ds.getOverallRanges()) imageToBeUsed = ds.getImageToBeUsed() print("imageToBeUsed %s" % imageToBeUsed) # wavelen = ENERGY_WAVELENGTH_CONVERT_FACTOR/ds.getIncidentEnergy()[scans[0]]
if verbose: xu.config.VERBOSITY = 1 else: xu.config.VERBOSITY = 0 specfilename = os.path.splitext(specfile)[0] specfileext = os.path.splitext(specfile)[1] # convert max_image_memory to bytes # Factor 1/15 is an empirical fudge factor... max_image_memory = max_image_memory * 1024 * 1024 / 15 for scans in scan_list: _start_time = time.time() scan_range = srange(scans) scans = scan_range.list() # Initialize the data source from the spec file, detector and instrument # configuration, read the data, and set the ranges such that all images # will be used. ds = Sector33SpecDataSource(projectdir, specfilename, specfileext, \ instrument_config, detector_config, roi=roi, pixelsToAverage=bin, \ scanList = scans, badPixelFile = badpixelfile) ds.setCurrentDetector('Pilatus') ds.loadSource() ds.setRangeBounds(ds.getOverallRanges()) imageToBeUsed = ds.getImageToBeUsed() wavelen = 12398.4190 / ds.getIncidentEnergy()[scans[0]] imageSize = np.prod(ds.getDetectorDimensions())