IA: Substantial improvements in the peak integral dialog.
[pyplotsuite.git] / README.txt
blobbc88fdb565b4e9744465ba0785199390ae7bda11
1 PyPlotSuite README File
2 =======================
4 .Copyright and License
5 *************************************************
6 Copyright (C) 2006-2007 Antonino Ingargiola <tritemio@gmail.com>
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
18 For more information read the file LICENSE.txt in the source directory.
19 *************************************************
22 Project Description
23 -------------------
25 *PyPlotSuite* is a set of graphical tools to quick visualize and explore/analyze
26 monodimentional and bidimensional data. The plot created can be saved in a
27 variety of image formats to produce publication quality graphs.
29 At the moment the project is composed by two little stand alone applications:
30 *ImageAnalyzer* and *Plotfile2*. ImageAnalyzer is focused towards images (or any
31 2D data, such as arrays) visualization, analysis, and measurement. Plotfile2
32 focus is towards simple data series visualization, with the possibility to
33 quick modify many plot characteristics. Both applications can save the result
34 on a multitude of image file formats (png, eps, jpeg, pdf, and more).
36 PyPlotSuite is written in python, using the GTK gui toolkit (through the python
37 binding pygtk, and using Glade-2 to layout the windows). All plots are created
38 with the great Matplotlib python 2D graphic library. Matplotlib is such a good
39 tool that the PyPlotSuite applications are only tiny wrapper around Matplotlib
40 functionality. Also some Numpy functionality are used both through Matplotlib
41 (which requires Numpy) and both directly.
43 Home Page::         http://pyplotsuite.sourceforge.net[]
44 *Latest Version*::  0.1-alpha9 
47 NEWS 
48 ----
49 0.1-alpha9
50 ~~~~~~~~~~
51 * New "Sum by" and "Multiply by" functions added.
52 * New Image Properties dialog which shows filen name, size, max and min values 
53   and coordinates, and other values (mean, variance, median, ...)
54 * Histogram plot speedups thanks to the use of ndimage.measurements and added
55   selectable number of bins.
56 * Added tools to graphically set parameters to calculate integral of a 
57   peak in the image. The integral domain is selected by the pixels inside a 
58   circle that are above a threshold value. The circle center is selectable via 
59   mouse click on the image. The pixels outside the circle that are below the 
60   threshold are used to calculate the offset of the image. The results can be 
61   saved to a text file.
62 * Added "Save file" to save modified images as arrays in pickle format.
63 * Added a virtual binning feature (similar of the binning feature of some 
64   CCD). It reduces the image resolution building each pixel as the sum of the 
65   values of the pixel in a rectangle. Note that this is not a boxcar filter 
66   (and IIRC is not even a linear filter).
67 * Another bugfix from David TrĂ©mouilles (about dialog close button work on Mac)
68   Thanks ;).
71 0.1-alpha8
72 ~~~~~~~~~~
73 * Added multiplatform installer using distutils. Now to install the pyplotsuite
74   system-wide just do "python setup.py install" form the source tree with
75   administrative privileges.
76 * Various bug-fixes thanks to David TrĂ©mouilles' bug reports and patches (now 
77   the open dialog remebers the last dir).
78 * scipy.filters is now only optional to run ImageAnalyzer
79 * ImageAnalyzer: Allow to change aspect ratio for images in ImageAnalyzer (via 
80   the pixel dimesion dialog)
81 * ImageAnalyzer: Zemax file format loading fixes and autodetection improvements.
84 0.1-alpha7
85 ~~~~~~~~~~
86 Only Plotfile2 changes in this release. Various speed-up and code optimization, 
87 and the support for changing also the color for all line-plot elements.
89 0.1-alpha6
90 ~~~~~~~~~~
91 This is the first version of PyPlotSuite released as a single tarball. It 
92 includes both ImageAnalyzer and Plotfile2.
94 A new plot property dialog in Plotfile2 allows to change many plot parameters 
95 (line style and width, marker style and size). There's also the GUI for 
96 changing the colors of the various plot elements but this functions is not 
97 implemented in the underlying code yet.
100 Release Notice
101 --------------
103 Early versions of *ImageAnalyzer* and *Plotfile2* were released in separated
104 tarballs with separated version number. Now they are released together in the
105 same tarball with the same version number (and I plan to integrate them more).
106 However they retain separated changelogs, so you can keep track of each
107 application separately.
109 Installation
110 ------------
111 You can decompress the archive where you want and then execute PyPloSuite in 
112 place, entering the directory and typing:
114 --------
115   python imageanalyzer
116 --------
120 --------
121   python plotfile2
122 --------
124 You can install PyPlotSuite system wide with this command:
126 --------
127   python setup.py install
128 --------
131 Development Version
132 -------------------
134 The development version of *PyPlotSuite* is hosted on a
135 http://repo.or.cz/w/pyplotsuite.git[git repository]. To download the latest
136 development version just install http://git.or.cz/[git] 
137 and type:
139 -------------------
140   $ git clone git://repo.or.cz/pyplotsuite.git
141 -------------------
143 Now you have a complete working tree of PyPlotSuite to test/hack on. If git
144 and cogito does not work on your OS (I think only windows is affected) look at
145 http://bazaar-vcs.org/[bazar] that is multiplatform SCM with a git plugin too.
148 Requirements
149 ------------
151 You must have this software installed in order to be able to run the program:
153 - Any recent version of Linux, Mac OSX or Windows
155 - Python 2.4 or newer (2.3 may still work, not tested):
156     http://www.python.org[]
158 - PyGTK 2.x:
159     http://www.pygtk.org/[]
161 - NumPy (1.0 or newer)
162     http://numpy.scipy.org/[]
164 - MatPlotLib (0.87 or newer):
165     http://matplotlib.sourceforge.net/[]
167 - SciPy (only the module scipy.ndimage.filters):
168     http://www.scipy.org/[]
170 - Python Image Library (PIL):
171     http://www.pythonware.com/products/pil/[]
173 NOTE: Typically Numpy is a prerequisite for Matplotlib, so you may have
174 installed it in bundle with Matplotlib.
176 NOTE: The Scipy module and the PIL library are a requirement only if you want
177 to run ImageAnalyzer. Plotfile2 does not requires them.
180 Image Analyzer
181 --------------
183 Name::              Image Analyzer
184 Description::       A tool to extract and make measures on scientific images.
187 Description
188 ~~~~~~~~~~~
190 ImageAnalyzer is a python[1] program written with the purpose to analyze
191 scientific images to extract information such dimensions, and to reveal some
192 subtle features. You can also create and save publication quality figures in a
193 variety of hard-copy formats (using Matplotlib[5]).
195 To execute the program type:
197 -------------
198   python imageanalyzer
199 -------------
201 Remeber to check the software requirement above.
204 Image formats supported
205 ~~~~~~~~~~~~~~~~~~~~~~~
207 All format supported by the PIL[6] library, with the following pixel formats:
208 - L (Luminance, aka black&white) 8 bit and 14 bit
209 - RBG(A) with 8bit per channel
212 Features
213 ~~~~~~~~
215 The features currently implemented are:
217     - Load, zoom and navigate on any RBG(A) or L (Luminance, aka black&white)
218       images.
219     - The possibility to choose one of the following 17 interpolation 
220       algorithms:
221           Bessel, Bicubic, Bilinear, Blackman, Catrom, Gaussian, Hamming,
222           Hanning, Hermite, Kaiser, Lanczos, Mitchell, Nearest, Quadric, Sinc,
223           Spline16, Spline36.
224       The default one is Nearest which is "no interpolation".
225     - Select one of the 14 color-maps (only for L images).
226     - Select a dynamic range either numerically and graphically through an
227       histogram of the image (only for L images).
228     - Grid on/off, black/white (to match various color-maps).
229     - Calculate the distance between two points with the option to set the pixel
230       dimension for the image (x and y separately).
231     - Plot the pixel-precise profile of an arbitrary number of sections of the
232       image (only for L images).
233     - Gaussian filter the image setting different parameters for the X and 
234       the Y direction.
235     - Virtual binning of the image (as the binning feature of the CCD). An 
236       arbitrary rectangular base-block size can be chosen.
237     - Calculate the integral of a peak present in the image selecting the 
238       integration domain using a threshold value (all the pixel with value 
239       greater than the threshold are summed) and circular domain (outside 
240       which no pixel is summed even is they are above the threshold). The 
241       center of the circle can be also selected clicking on the image.
242     - Add or multiply the image by a constant value.
245 ImageAnalyzer TODO
246 ~~~~~~~~~~~~~~~~~~
248 To-do list in no particular order:
250     - Allow to save modified images. *[DONE]*
251     - Allow to save/load plot properties (colormap, interpolation, zoom). 
252       Handle this as explained in Plotfile2 TODO (below).
253     - Allow to choose font size for title and labels (separately).
254     - Fix axis apect ratio in histogram window.
255     - Better handling of failure on file load.
256     - Use Plotfile2 (instead of the current custom window) to show image 
257       sections.
258     - More image filtering options.
259     - Add pixel-value picker tool.
260     - Peak integration tool (2d integration on a circular area). *[DONE]*
261     - Noise removal tools (dithering, noise shaping, 2D matched filter, you
262       name it! :D)
265 Plotfile2
266 ---------
268 Name::              Plotfile2
269 Description::       A tool plot 1D data series.
272 Description
273 ~~~~~~~~~~~
275 Plotfile2 is is a python[1] program written with the purpose to quick plot data
276 series stored in standard ascii text files. Multiple data series can be plotted,
277 compared and the resulting plot can be saved in a variety of image file formats
278 with a customizable size and resolution. This feature come particularly handy
279 if you want to embed your plot in a document and you what size the final image
280 will have.
282 Plotfile2 is written using the GTK toolkit[2] and embeds Matplotlib[5] plot
283 facility.
285 To execute the program, enter the Plotfile2 dir and type:
287 --------
288   python plotfile2
289 ---------
291 See also the software requirements above.
294 Features
295 ~~~~~~~~
297 At the moment Plotfile2 can:
299     - Load one or more data series from a two column (spaces or tab separated) 
300       ascii file. Blank lines (only spaces or tabs) are ignored.
301     - Detect if there is an header to automatically set axis labels. The header
302       must be one line with two strings separated by spacing (or tabs). Blank
303       lines before and after the header are ignored. More than two 
304       space-separated string results in an error.
305     - Controls to change the X and Y axis range, scale (linear or 
306       log) and  toggle grid.
307     - Controls to toggle if plot shows points (markers), lines or both. 
308     - Complete customization of plot elements through a dedicated dialog
309       (line style, marker type, colors, etc...).
310     - Set the plot title and axis labels
311     - Set the figure size (both in inches or in cm) and resolution (in dpi).
312       This is useful to export a plot to be included in a document with a know
313       size.
314     - Navigate/explore plots (zoom, un-zoom, pan, etc) thanks to the Matplotlib
315       NavigationToolbar2 (try to click on the crossed arrows icon and then 
316       click and dragg with the right mouse button).
317     - Save the plot in a multitude of image formats (png, jpeg, eps, pdf, ...
318       all the formats supported by Matplotlib). Just click on the floppy icon.
321 Plotfile2 TODO
322 ~~~~~~~~~~~~~~
324 - Possibility to customize plot line style, line color, line width, marker
325   color, marker size, marker type for each series. *[COMPLETED]*
326 - Possibility to use spline interpolation (with various orders), and
327   exponential-spline interpolation '[Work in progress]'.
328 - Add dialogs to choose an arbitrary color for plot elements in 
329   the "Plot Properties" dialog.
330 - Allow font size (and if possible) font style change for labels and title.
331 - Save plots as data (two columns ascii file or csv). This is useful for
332   new data generated by the interpolation.
333 - Allow to save and load plot properties associated with a set of data. This 
334   would allow to load a dataset with associated plot style. To maintain the 
335   data in a compatible format this metadata will be saved in a new file with 
336   same name but different extension (f.e. ".plot"). Maybe the file should 
337   be hidden... (in the same dir of the data of course).
338 - Add basic operators (spectrum, intergrate, differentiate: which make sense?).
339 - Embed an (optional) [i]python shell.
342 Plotfile2 Known Problems
343 ~~~~~~~~~~~~~~~~~~~~~~~~
344 - When you change figure size and resolution using the dedicated dialog, the
345   main window may show a scrambled plot (or only an corner of the entire plot).
346   This is only a visualization issue. Therefore, if you save the file (without
347   resizing the window!) you will obtain the image file with the correct size
348   and resolution ready to be included in your documents.
350 NOTE: If you have any suggestion to solve this problem please contact 
351 mailto:tritemio@gmail.com[me] via mail.
354 Links
355 -----
357 1. *Python*: a dynamic object-oriented programming language.
359     * http://www.python.org[]
362 2. *PyGTK*: Python binding for the GTK user interface library.
364     * http://www.pygtk.org/[]
367 3. *Numpy*: The fundamental package needed for numerical computing with Python.
368     It is the successor (and unifier) of all the old projects (Numeric and
369     Numarray) for python numerical computing.
371     * http://numpy.scipy.org/[]
374 4. *SciPy*: Many modules that were not specific to Numpy are gathered under the
375     broader project SciPy:
377     * http://numpy.scipy.org/[]
380 5. *MatPlotLib*: A python 2D plotting library which produces publication quality
381     figures in a variety of hard-copy formats and interactive environments
382     across platforms.
384     * http://matplotlib.sourceforge.net/[]
387 6. *Python Imaging Library* (PIL).
389     * http://www.pythonware.com/products/pil/[]
393 ***********************
394 The html version of this README was generated from the ASCII file with:
396 ---------
397 $ asciidoc -a toc -a icons -a badges README.txt
398 ---------
399 ***********************