tools Package — pySAXS 77.September2012 documentation

### Navigation

- index
- modules |
- next |
- previous |
- pySAXS 77.September2012 documentation »
- pySAXS »
- pySAXS Package »

# tools Package

## `tools` Package

## `DetectPeaks` Module

`pySAXS.tools.DetectPeaks.` `findPeaks`(x, y, pp, percent, printout=None, method='gaussian')

  find peaks on x,y datas return array aof founds peaks [center position, max,fwhm], x, and y of fitted datas

`pySAXS.tools.DetectPeaks.` `fitPeakWithGaussian`(x, y)

  fit peak with a gaussian x, and y are the datas, return result for fit as list [height,fwhm,center,zero],x, and fitted y

`pySAXS.tools.DetectPeaks.` `fitPeakWithTrapez`(x, y)

  fit peaks with trapez x, and y are the datas, return result for fit as list [height,fwhm,center,zero],x, and fitted y

## `ProgressBarText` Module

class `pySAXS.tools.ProgressBarText.` `progressbarClass`(finalcount, progresschar=None)
  `progress`(count)

## `ProgressBarView` Module

A basic widget for showing the progress being made in a task.

class `pySAXS.tools.ProgressBarView.` `ProgressBarView`(master=None, orientation='horizontal', min=0, max=100, width=100, height=None, doLabel=1, appearance=None, fillColor=None, background=None, labelColor=None, labelFont=None, labelText='', labelFormat='%d%%', value=0.1, bd=2)
  `grid`(*args, **kw)
  `onResize`(event)
  `pack`(*args, **kw)
  `update`()
  `updateProgress`(newValue, newMax=None)

## `fileimage` Module

project : pySAXS description : functions for opening detectors data file authors : Olivier Tache Last changes :

> 08-03-2007 OT : port to pySAXS library lsqkjdqlskdjlqksd

`pySAXS.tools.fileimage.` `ConvertToSpe`(filenameIn, filenameOut, progressbar=None)

  convert a data file into SPE file

`pySAXS.tools.fileimage.` `OpenFile`(filename, progressbar=None)

  ouvre le fichier image filename et retourne un tableau

`pySAXS.tools.fileimage.` `OpenFileGEL`(fname, progressbar=None)

  open GEL ImageQuant data file Molecular Dynamics

`pySAXS.tools.fileimage.` `OpenFileMP`(fname, progressbar=None)

  open gas detector MP file FASTCOM format

`pySAXS.tools.fileimage.` `OpenFileMPA3`(fname, progressbar=None)

  open gas detector MP3 file ascii files FASTCOM format

`pySAXS.tools.fileimage.` `OpenFileMPA3_DAT`(fname, progressbar=None)

  open gas detector MP3 file Binary datas FASTCOM format

`pySAXS.tools.fileimage.` `OpenFileSPE`(fname, progressbar=None)

  open SPE Winview data file Ropper Scientific

`pySAXS.tools.fileimage.` `OpenFileTIF`(fname, progressbar=None)

  open tiff data file

`pySAXS.tools.fileimage.` `WriteFileSPE`(fname, data, progressbar=None)

  write SPE Winview data file Ropper Scientific

`pySAXS.tools.fileimage.` `importFit2D`(filename='')

  import Fit2D Chi file after radial averaging create a rgr file for excel (ascii format)

## `filetools` Module

general tools for files manipulation

`pySAXS.tools.filetools.` `fileExist`(finename)

  check if a file exist

`pySAXS.tools.filetools.` `getExtension`(filename)

  return extension from filename

`pySAXS.tools.filetools.` `getFilename`(filename)

  return name from filename without directory structure

`pySAXS.tools.filetools.` `importArray`(filename, linestoskip=None, separator='\t', cols=None)

  import a file into a numeric float array skipping lines beginning by #

`pySAXS.tools.filetools.` `listFiles`(paths, file)

  Searches a path for a specified file. ListFile(“c:data”,*.rgr”) return a list with file *.rgr

## `isNumeric` Module

tools package for numbers

`pySAXS.tools.isNumeric.` `isNumeric`(val)

  return true if val is a numeric value

## `progressBarBinding` Module

class `pySAXS.tools.progressBarBinding.` `ProgressBarB`(type=None, object=None, max=None)
  `initialize`(max)
  `progress`(value)

## `xmltools` Module

`pySAXS.tools.xmltools.` `convertText`(text, datatype=None)

  convert text with datatype

`pySAXS.tools.xmltools.` `data2XMLfile`(object, filename, name='')

  save data into XML file

`pySAXS.tools.xmltools.` `data2string`(arr)

  return a string from an array separated with comma

  [1.2 2.3 ...] -> “1.2 2.3 “

`pySAXS.tools.xmltools.` `getDatatype`(obj)

  return type of object in string without < >

`pySAXS.tools.xmltools.` `string2data`(st)

  return a array containing datas from string

### Navigation

- index
- modules |
- next |
- previous |
- pySAXS 77.September2012 documentation »
- pySAXS »
- pySAXS Package »