summaryrefslogtreecommitdiff
path: root/python-pyevaldata.spec
blob: 2e891e3a8de9d6aa132c112c32776d2432467c35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
%global _empty_manifest_terminate_build 0
Name:		python-pyEvalData
Version:	1.5.1
Release:	1
Summary:	Python module to evaluate experimental data
License:	MIT
URL:		https://github.com/dschick/pyEvalData
Source0:	https://mirrors.nju.edu.cn/pypi/web/packages/96/b6/4a1ba329db5fe52fc141f13bcbb7ae802f062611a22cbca226ed22732af1/pyEvalData-1.5.1.tar.gz
BuildArch:	noarch

Requires:	python3-numpy
Requires:	python3-matplotlib
Requires:	python3-lmfit
Requires:	python3-scipy
Requires:	python3-uncertainties
Requires:	python3-xrayutilities
Requires:	python3-h5py
Requires:	python3-nexusformat
Requires:	python3-sphinx
Requires:	python3-nbsphinx
Requires:	python3-sphinxcontrib-napoleon
Requires:	python3-flake8
Requires:	python3-pytest

%description
# Welcome to pyEvalData

[![Documentation Status](https://readthedocs.org/projects/pyevaldata/badge/?version=latest)](https://pyevaldata.readthedocs.io/en/latest/?badge=latest)
![CI](https://github.com/dschick/pyEvalData/actions/workflows/main.yml/badge.svg)
![pypi](https://github.com/dschick/pyEvalData/actions/workflows/upload-to-pypi.yml/badge.svg)
[![codecov](https://codecov.io/gh/dschick/pyEvalData/branch/develop/graph/badge.svg?token=B73OXF4YRI)](https://codecov.io/gh/dschick/pyEvalData)

This is a Python module to read and evaluate experimental data. It can handle
raw data from different sources such as
[spec](https://certif.com/content/spec/),
[hdf5](https://www.hdfgroup.org/solutions/hdf5/),
[NeXus](https://www.nexusformat.org/) files which are common data formats at
synchrotrons, FELs, as well as in a growing number of laboratories. The
evaluation provides common functionalities such as binning, error calculation,
and advanced data manipulation via algebraic expressions as well as pre- and
post-data-filters. Furthermore, advanced wrapper functions allow for plotting
and fitting sequences of one or multiple scans in dependence of an external
parameter.

A minimal code example would look like this:

```python
import pyEvalData as ped
# define your data source
spec = ped.io.Spec(file_name='data.spec')
# initialize the evaluation
ev = ped.Evaluation(spec)
# define the x- and y-data
ev.xcol = 'motor1'
ev.clist = ['ct1', 'ct2', 'ct1/ct2']
# create a plot for scans 1-3
ev.plot_scans([1, 2, 3])
```

Please follow the [user guide](https://pyevaldata.readthedocs.io/en/latest/user_guide.html)
and [examples](https://pyevaldata.readthedocs.io/en/latest/examples.html) for
your first steps with `pyEvalData`.

## Features

- reading of several pre-defined raw data formats
  * [spec](https://certif.com/content/spec/)
  * [hdf5](https://www.hdfgroup.org/solutions/hdf5/)
  * [NeXus](https://www.nexusformat.org/)
  * user-defined text files
  * camera images (Dectris Pilatus, Princeton MTE, Greateyes, ...)
  * composite sources
- easy implementation of new raw-data formats using an `interface class`
- common methods for plotting and fitting of experimental data, including:
  * data binning
  * error calculation
  * data manipulation via algebraic expressions
  * common data pre- and post-filters

## Installation

You can either install directly from
[pypi.org](https://www.pypi.org/project/pyEvalData) using the command

    $ pip install pyEvalData

or if you want to work on the latest develop release you can clone 
`pyEvalData` from the main git repository:

    $ git clone https://github.com/dschick/pyEvalData.git pyEvalData

To work in editable mode (source is only linked 
but not copied to the python site-packages), just do:

    $ pip install -e ./pyEvalData

Or to do a normal install with

    $ pip install ./pyEvalData

Optionally, you can also let pip install directly from the repository: 

    $ pip install git+https://github.com/dschick/pyEvalData.git

You can have the following optional installations to enable unit tests, as well
as building the documentation:

    $ pip install pyEvalData[testing]
    $ pip install pyEvalData[documentation]

## Contribute & Support

If you are having issues please let us know via the
[issue tracker](https://github.com/dschick/pyEvalData/issues).

You can contribute to the project via pull-requests following the
[GitHub flow concept](https://docs.github.com/en/get-started/quickstart/github-flow).

## License

The project is licensed under the MIT license.




%package -n python3-pyEvalData
Summary:	Python module to evaluate experimental data
Provides:	python-pyEvalData
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-pyEvalData
# Welcome to pyEvalData

[![Documentation Status](https://readthedocs.org/projects/pyevaldata/badge/?version=latest)](https://pyevaldata.readthedocs.io/en/latest/?badge=latest)
![CI](https://github.com/dschick/pyEvalData/actions/workflows/main.yml/badge.svg)
![pypi](https://github.com/dschick/pyEvalData/actions/workflows/upload-to-pypi.yml/badge.svg)
[![codecov](https://codecov.io/gh/dschick/pyEvalData/branch/develop/graph/badge.svg?token=B73OXF4YRI)](https://codecov.io/gh/dschick/pyEvalData)

This is a Python module to read and evaluate experimental data. It can handle
raw data from different sources such as
[spec](https://certif.com/content/spec/),
[hdf5](https://www.hdfgroup.org/solutions/hdf5/),
[NeXus](https://www.nexusformat.org/) files which are common data formats at
synchrotrons, FELs, as well as in a growing number of laboratories. The
evaluation provides common functionalities such as binning, error calculation,
and advanced data manipulation via algebraic expressions as well as pre- and
post-data-filters. Furthermore, advanced wrapper functions allow for plotting
and fitting sequences of one or multiple scans in dependence of an external
parameter.

A minimal code example would look like this:

```python
import pyEvalData as ped
# define your data source
spec = ped.io.Spec(file_name='data.spec')
# initialize the evaluation
ev = ped.Evaluation(spec)
# define the x- and y-data
ev.xcol = 'motor1'
ev.clist = ['ct1', 'ct2', 'ct1/ct2']
# create a plot for scans 1-3
ev.plot_scans([1, 2, 3])
```

Please follow the [user guide](https://pyevaldata.readthedocs.io/en/latest/user_guide.html)
and [examples](https://pyevaldata.readthedocs.io/en/latest/examples.html) for
your first steps with `pyEvalData`.

## Features

- reading of several pre-defined raw data formats
  * [spec](https://certif.com/content/spec/)
  * [hdf5](https://www.hdfgroup.org/solutions/hdf5/)
  * [NeXus](https://www.nexusformat.org/)
  * user-defined text files
  * camera images (Dectris Pilatus, Princeton MTE, Greateyes, ...)
  * composite sources
- easy implementation of new raw-data formats using an `interface class`
- common methods for plotting and fitting of experimental data, including:
  * data binning
  * error calculation
  * data manipulation via algebraic expressions
  * common data pre- and post-filters

## Installation

You can either install directly from
[pypi.org](https://www.pypi.org/project/pyEvalData) using the command

    $ pip install pyEvalData

or if you want to work on the latest develop release you can clone 
`pyEvalData` from the main git repository:

    $ git clone https://github.com/dschick/pyEvalData.git pyEvalData

To work in editable mode (source is only linked 
but not copied to the python site-packages), just do:

    $ pip install -e ./pyEvalData

Or to do a normal install with

    $ pip install ./pyEvalData

Optionally, you can also let pip install directly from the repository: 

    $ pip install git+https://github.com/dschick/pyEvalData.git

You can have the following optional installations to enable unit tests, as well
as building the documentation:

    $ pip install pyEvalData[testing]
    $ pip install pyEvalData[documentation]

## Contribute & Support

If you are having issues please let us know via the
[issue tracker](https://github.com/dschick/pyEvalData/issues).

You can contribute to the project via pull-requests following the
[GitHub flow concept](https://docs.github.com/en/get-started/quickstart/github-flow).

## License

The project is licensed under the MIT license.




%package help
Summary:	Development documents and examples for pyEvalData
Provides:	python3-pyEvalData-doc
%description help
# Welcome to pyEvalData

[![Documentation Status](https://readthedocs.org/projects/pyevaldata/badge/?version=latest)](https://pyevaldata.readthedocs.io/en/latest/?badge=latest)
![CI](https://github.com/dschick/pyEvalData/actions/workflows/main.yml/badge.svg)
![pypi](https://github.com/dschick/pyEvalData/actions/workflows/upload-to-pypi.yml/badge.svg)
[![codecov](https://codecov.io/gh/dschick/pyEvalData/branch/develop/graph/badge.svg?token=B73OXF4YRI)](https://codecov.io/gh/dschick/pyEvalData)

This is a Python module to read and evaluate experimental data. It can handle
raw data from different sources such as
[spec](https://certif.com/content/spec/),
[hdf5](https://www.hdfgroup.org/solutions/hdf5/),
[NeXus](https://www.nexusformat.org/) files which are common data formats at
synchrotrons, FELs, as well as in a growing number of laboratories. The
evaluation provides common functionalities such as binning, error calculation,
and advanced data manipulation via algebraic expressions as well as pre- and
post-data-filters. Furthermore, advanced wrapper functions allow for plotting
and fitting sequences of one or multiple scans in dependence of an external
parameter.

A minimal code example would look like this:

```python
import pyEvalData as ped
# define your data source
spec = ped.io.Spec(file_name='data.spec')
# initialize the evaluation
ev = ped.Evaluation(spec)
# define the x- and y-data
ev.xcol = 'motor1'
ev.clist = ['ct1', 'ct2', 'ct1/ct2']
# create a plot for scans 1-3
ev.plot_scans([1, 2, 3])
```

Please follow the [user guide](https://pyevaldata.readthedocs.io/en/latest/user_guide.html)
and [examples](https://pyevaldata.readthedocs.io/en/latest/examples.html) for
your first steps with `pyEvalData`.

## Features

- reading of several pre-defined raw data formats
  * [spec](https://certif.com/content/spec/)
  * [hdf5](https://www.hdfgroup.org/solutions/hdf5/)
  * [NeXus](https://www.nexusformat.org/)
  * user-defined text files
  * camera images (Dectris Pilatus, Princeton MTE, Greateyes, ...)
  * composite sources
- easy implementation of new raw-data formats using an `interface class`
- common methods for plotting and fitting of experimental data, including:
  * data binning
  * error calculation
  * data manipulation via algebraic expressions
  * common data pre- and post-filters

## Installation

You can either install directly from
[pypi.org](https://www.pypi.org/project/pyEvalData) using the command

    $ pip install pyEvalData

or if you want to work on the latest develop release you can clone 
`pyEvalData` from the main git repository:

    $ git clone https://github.com/dschick/pyEvalData.git pyEvalData

To work in editable mode (source is only linked 
but not copied to the python site-packages), just do:

    $ pip install -e ./pyEvalData

Or to do a normal install with

    $ pip install ./pyEvalData

Optionally, you can also let pip install directly from the repository: 

    $ pip install git+https://github.com/dschick/pyEvalData.git

You can have the following optional installations to enable unit tests, as well
as building the documentation:

    $ pip install pyEvalData[testing]
    $ pip install pyEvalData[documentation]

## Contribute & Support

If you are having issues please let us know via the
[issue tracker](https://github.com/dschick/pyEvalData/issues).

You can contribute to the project via pull-requests following the
[GitHub flow concept](https://docs.github.com/en/get-started/quickstart/github-flow).

## License

The project is licensed under the MIT license.




%prep
%autosetup -n pyEvalData-1.5.1

%build
%py3_build

%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
	find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
	find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
	find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
	find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
	find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%files -n python3-pyEvalData -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 1.5.1-1
- Package Spec generated