Skip to content

Commit af8bb4f

Browse files
committed
0.6.5 release with rebuilt docs
1 parent 921918f commit af8bb4f

5 files changed

Lines changed: 169 additions & 159 deletions

File tree

README.md

Lines changed: 155 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,155 @@
1-
Introduction
2-
============
3-
4-
The *Stoner* Python package is a set of utility classes for writing data
5-
analysis code. It was written within the Condensed Matter Physics group
6-
at the University of Leeds as a shared resource for quickly writing
7-
simple programs to do things like fitting functions to data, extract
8-
curve parameters and churn through large numbers of small text data
9-
files.
10-
11-
For a general introduction, users are referred to the Users Guide, which
12-
is part of the [online documentation](http://pythonhosted.org/Stoner/)
13-
along with the API Reference guide. The [github
14-
repository](http://www.github.com/gb119/Stoner-PythonCode/) also
15-
contains some example scripts.
16-
17-
Getting this Code
18-
=================
19-
20-
The *Stoner* package requires numpy \>=1.8, scipy \>=0.14, matplotlib
21-
\>=1.4, h5py, numba lmfit, filemagic, and blist. Experimental code also
22-
makes use of the Enthought Tools Suite packages.
23-
24-
Ananconda Python (and probably other scientific Python distributions)
25-
include nearly all of the dependencies, aprt from lmfit. However, this
26-
can by installed with the usual tools such as *easy\_install* or *pip*.
27-
28-
~~~~ {.sourceCode .sh}
29-
easy_install lmfit
30-
~~~~
31-
32-
The easiest way to install the Stoner package is via seuptools'
33-
easy\_install
34-
35-
~~~~ {.sourceCode .sh}
36-
easy_install Stoner
37-
~~~~
38-
39-
This will install the Stoner package and any missing dependencies into
40-
your current Python environment. Since the package is under fairly
41-
constant updates, you might want to follow the development with git. The
42-
source code, along with example scripts and some sample data files can
43-
be obtained from the github repository:
44-
<https://github.com/gb119/Stoner-PythonCode>
45-
46-
The codebase is largely compatible with Python 3.4, with the expception
47-
of the 3D vector map plots which make use of Enthought's *mayavi*
48-
package which is still only Python 2 compatible due to the underlying
49-
Vtk toolkit. Other issues of broken 3.4 code are bugs to be squashed.
50-
51-
Overview
52-
========
53-
54-
The **Stoner** package provides two basic top-level classes that
55-
describe an individual file of experimental data and a list (such as a
56-
directory tree on disc) of many experimental files. For our research, a
57-
typical single experimental data file is essentially a single 2D table
58-
of floating point numbers with associated metadata, usually saved in
59-
some ASCII text format. This seems to cover most experiments in the
60-
physical sciences, but it you need a more complex format with more
61-
dimensions of data, we suggest you look elsewhere.
62-
63-
DataFile and Friends
64-
--------------------
65-
66-
**Stoner.Core.DataFile** is the base class for representing individual
67-
experimental data sets. It provides basic methods to examine and
68-
manipulate data, manage metadata and load and save data files. It has a
69-
large number of sub classes - most of these are in Stoner.FileFormats
70-
and are used to handle the loading of specific file formats. Two,
71-
however, contain additional functionality for writing analysis programs.
72-
73-
- **Stoner.Analysis.AnalyseFile** provides additional methods for curve-fitting, differentiating, smoothing and carrying out
74-
: basic calculations on data.
75-
76-
- **Stoner.Plot.PlotFile** provides additional routines for plotting
77-
data on 2D or 3D plots.
78-
79-
As mentioned above, there are subclasses of **DataFile** in the
80-
**Stoner.FileFormats** module that support loading many of the common
81-
file formats used in our research.
82-
83-
For rapid development of small scripts, we would recommend the
84-
**Stoner.Data** class which is a superclass of the above, and provides a
85-
'kitchen-sink' one stop shop for most of the package's functionality.
86-
87-
DataFolder
88-
----------
89-
90-
**Stoner.Folders.DataFolder** is a class for assisting with the work of
91-
processing lots of files in a common directory structure. It provides
92-
methods to list. filter and group data according to filename patterns or
93-
metadata and then to execute a function on each file or group of files.
94-
95-
The **Stoner.HDF5** module provides some experimental classes to
96-
manipulate *DataFile* and *DataFolder* objects within HDF5 format files.
97-
These are not a way to handle arbitary HDF5 files - the format is much
98-
to complex and flexible to make that an easy task, rather it is a way to
99-
work with large numbers of experimental sets using just a single file
100-
which may be less brutal to your computer's OS than having directory
101-
trees with millions of individual files.
102-
103-
Resources
104-
=========
105-
106-
Included in the [github
107-
repository](http://www.github.com/gb119/Stoner-PythonCode/) are a
108-
(small) collection of sample scripts for carrying out various operations
109-
and some sample data files for testing the loading and processing of
110-
data. There is also a User\_Guide as part of this documentation, along
111-
with a complete API reference \<Stoner\>
112-
113-
Contact and Licensing
114-
=====================
115-
116-
The lead developer for this code is [Dr Gavin
117-
Burnell](http://www.stoner.leeds.ac.uk/people/gb)
118-
\<<g.burnell@leeds.ac.uk>\> . The User Guide gives the current list of
119-
other contributors to the project.
120-
121-
This code and the sample data are all (C) The University of Leeds
122-
2008-2015 unless otherwise indficated in the source file. The contents
123-
of this package are licensed under the terms of the GNU Public License
124-
v3
125-
126-
Recent Changes
127-
==============
128-
129-
Development Version
130-
-------------------
131-
132-
The current development version is 0.6. This features some major changes
133-
in the architecture, switching from a numpy MaskedArray as the main data
134-
store to a custom sub-class that contains most of the logic for indexing
135-
data by column name and designation. The metadata storage has also been
136-
switched to using blist.sortteddict for a fast, alphabetically ordered
137-
dictionary storage. Other underlying changes are a switch to using
138-
properties rather than straight attribute access.
139-
140-
0.6 now also makes use of filemagic to work out the mime type of files
141-
to be loaded to try and improve the resilience of the automatic file
142-
format detection.
143-
144-
0.6 also adds some extra methods to AnalyseFile for extrapolation.
145-
146-
Online documentation for the development version can be found on the
147-
[githib repository pages](http://gb119.github.io/Stoner-PythonCode)
148-
149-
[![image](https://zenodo.org/badge/17265/gb119/Stoner-PythonCode.svg)](https://zenodo.org/badge/latestdoi/17265/gb119/Stoner-PythonCode)
150-
151-
Stable Version
152-
--------------
153-
154-
The development version is now in beta release and so no further relases
155-
will be made to the current stable release (0.5).
1+
Introduction
2+
============
3+
4+
The *Stoner* Python package is a set of utility classes for writing data
5+
analysis code. It was written within the Condensed Matter Physics group
6+
at the University of Leeds as a shared resource for quickly writing
7+
simple programs to do things like fitting functions to data, extract
8+
curve parameters and churn through large numbers of small text data
9+
files.
10+
11+
For a general introduction, users are referred to the Users Guide, which
12+
is part of the [online documentation](http://pythonhosted.org/Stoner/)
13+
along with the API Reference guide. The [github
14+
repository](http://www.github.com/gb119/Stoner-PythonCode/) also
15+
contains some example scripts.
16+
17+
Getting this Code
18+
=================
19+
20+
The *Stoner* package requires numpy \>=1.8, scipy \>=0.14, matplotlib
21+
\>=1.4, h5py, numba lmfit, filemagic, and blist. Experimental code also
22+
makes use of the Enthought Tools Suite packages.
23+
24+
Ananconda Python (and probably other scientific Python distributions)
25+
include nearly all of the dependencies, aprt from lmfit. However, this
26+
can by installed with the usual tools such as *easy\_install* or *pip*.
27+
28+
``` {.sourceCode .sh}
29+
easy_install lmfit
30+
```
31+
32+
The easiest way to install the Stoner package is via seuptools'
33+
easy\_install
34+
35+
``` {.sourceCode .sh}
36+
easy_install Stoner
37+
```
38+
39+
This will install the Stoner package and any missing dependencies into
40+
your current Python environment. Since the package is under fairly
41+
constant updates, you might want to follow the development with git. The
42+
source code, along with example scripts and some sample data files can
43+
be obtained from the github repository:
44+
<https://github.com/gb119/Stoner-PythonCode>
45+
46+
The codebase is largely compatible with Python 3.4, with the expception
47+
of the 3D vector map plots which make use of Enthought's *mayavi*
48+
package which is still only Python 2 compatible due to the underlying
49+
Vtk toolkit. Other issues of broken 3.4 code are bugs to be squashed.
50+
51+
Overview
52+
========
53+
54+
The **Stoner** package provides two basic top-level classes that
55+
describe an individual file of experimental data and a list (such as a
56+
directory tree on disc) of many experimental files. For our research, a
57+
typical single experimental data file is essentially a single 2D table
58+
of floating point numbers with associated metadata, usually saved in
59+
some ASCII text format. This seems to cover most experiments in the
60+
physical sciences, but it you need a more complex format with more
61+
dimensions of data, we suggest you look elsewhere.
62+
63+
DataFile and Friends
64+
--------------------
65+
66+
**Stoner.Core.DataFile** is the base class for representing individual
67+
experimental data sets. It provides basic methods to examine and
68+
manipulate data, manage metadata and load and save data files. It has a
69+
large number of sub classes - most of these are in Stoner.FileFormats
70+
and are used to handle the loading of specific file formats. Two,
71+
however, contain additional functionality for writing analysis programs.
72+
73+
- **Stoner.Analysis.AnalyseFile** provides additional methods for curve-fitting, differentiating, smoothing and carrying out
74+
: basic calculations on data.
75+
76+
- **Stoner.Plot.PlotFile** provides additional routines for plotting
77+
data on 2D or 3D plots.
78+
79+
As mentioned above, there are subclasses of **DataFile** in the
80+
**Stoner.FileFormats** module that support loading many of the common
81+
file formats used in our research.
82+
83+
For rapid development of small scripts, we would recommend the
84+
**Stoner.Data** class which is a superclass of the above, and provides a
85+
'kitchen-sink' one stop shop for most of the package's functionality.
86+
87+
DataFolder
88+
----------
89+
90+
**Stoner.Folders.DataFolder** is a class for assisting with the work of
91+
processing lots of files in a common directory structure. It provides
92+
methods to list. filter and group data according to filename patterns or
93+
metadata and then to execute a function on each file or group of files.
94+
95+
The **Stoner.HDF5** module provides some experimental classes to
96+
manipulate *DataFile* and *DataFolder* objects within HDF5 format files.
97+
These are not a way to handle arbitary HDF5 files - the format is much
98+
to complex and flexible to make that an easy task, rather it is a way to
99+
work with large numbers of experimental sets using just a single file
100+
which may be less brutal to your computer's OS than having directory
101+
trees with millions of individual files.
102+
103+
Resources
104+
=========
105+
106+
Included in the [github
107+
repository](http://www.github.com/gb119/Stoner-PythonCode/) are a
108+
(small) collection of sample scripts for carrying out various operations
109+
and some sample data files for testing the loading and processing of
110+
data. There is also a User\_Guide as part of this documentation, along
111+
with a complete API reference \<Stoner\>
112+
113+
Contact and Licensing
114+
=====================
115+
116+
The lead developer for this code is [Dr Gavin
117+
Burnell](http://www.stoner.leeds.ac.uk/people/gb)
118+
\<<g.burnell@leeds.ac.uk>\> . The User Guide gives the current list of
119+
other contributors to the project.
120+
121+
This code and the sample data are all (C) The University of Leeds
122+
2008-2015 unless otherwise indficated in the source file. The contents
123+
of this package are licensed under the terms of the GNU Public License
124+
v3
125+
126+
Recent Changes
127+
==============
128+
129+
Development Version
130+
-------------------
131+
132+
The current development version is 0.6. This features some major changes
133+
in the architecture, switching from a numpy MaskedArray as the main data
134+
store to a custom sub-class that contains most of the logic for indexing
135+
data by column name and designation. The metadata storage has also been
136+
switched to using blist.sortteddict for a fast, alphabetically ordered
137+
dictionary storage. Other underlying changes are a switch to using
138+
properties rather than straight attribute access.
139+
140+
0.6 now also makes use of filemagic to work out the mime type of files
141+
to be loaded to try and improve the resilience of the automatic file
142+
format detection.
143+
144+
0.6 also adds some extra methods to AnalyseFile for extrapolation.
145+
146+
Online documentation for the development version can be found on the
147+
[githib repository pages](http://gb119.github.io/Stoner-PythonCode)
148+
149+
[![image](https://zenodo.org/badge/17265/gb119/Stoner-PythonCode.svg)](https://zenodo.org/badge/latestdoi/17265/gb119/Stoner-PythonCode)
150+
151+
Stable Version
152+
--------------
153+
154+
The development version is now in beta release and so no further relases
155+
will be made to the current stable release (0.5).

Stoner/HDF5.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,11 +409,20 @@ def _save(self, f, trail):
409409
return f.filename
410410

411411
class SLS_STXMFile(DataFile):
412-
"""Load images from the Swiss Light Source Pollux beamline"""
412+
"""Load images from the Swiss Light Source Pollux beamline.
413+
414+
This class checks that theree is a single group "entry1" in the root of the HDF5 file
415+
and that the "definition" dataset is "NXstxm"
416+
417+
The class assumes that the dataset "counter0" is the image, all other groups and datasets
418+
are recursively scanned and any dataset that is less than 2D is recorded in the metadata. The attributes
419+
of the root group are also recorded. Metadata kets are in dotted notation and have the leading
420+
"entry1" removed.
421+
"""
413422
priority = 16
414423
compression = 'gzip'
415424
compression_opts = 6
416-
patterns = ["*.hdf",]
425+
patterns = ["*.hdf5",]
417426
mime_type=["application/x-hdf"]
418427

419428
def _load(self, filename=None, **kargs):

Stoner/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
from .Util import Data
1111
from Stoner.Folders import DataFolder
1212

13-
__version_info__ = ('0', '6', '4')
13+
__version_info__ = ('0', '6', '5')
1414
__version__ = '.'.join(__version_info__)
1515

doc/Stoner.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ Facility Outputs
9494
OpenGDAFile
9595
RasorFile
9696
SNSFile
97+
SLS_STXMFile
9798

9899
:mod:`PlotFormats` Module
99100
==========================

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
extensions = ['sphinx.ext.autodoc',
3030
'sphinx.ext.intersphinx',
3131
'sphinx.ext.todo',
32-
'sphinx.ext.pngmath',
32+
#'sphinx.ext.imgmath',
3333
'sphinx.ext.viewcode',
3434
'sphinx.ext.napoleon',
3535
'sphinx.ext.graphviz',

0 commit comments

Comments
 (0)