Commit af5aeb5e authored by Owen Arnold's avatar Owen Arnold
Browse files

Merge branch 'packaging' into 'master'

Add ability to package

See merge request !1
parents a5a9a08d 567ea32f
# WFM Stitching module
This module uses Mantid to process neutron data recorded in wavelength
This package uses [Mantid]( to process neutron data recorded in wavelength
frame multiplication (WFM) mode. This library is based on a previous
script written by Jon Taylor, Owen Arnold and Robin Woracek.
**Please note that this script is still under development.**
**Please note that this package is still under development.**
## Installation
* Install Mantid from [here]( ensure that you take the official latest release.
* Check that Mantid is in the python path. Official releases should automatically add themselves. Check that the path to the Mantid bin directory is listed, i.e.
* [Optional Step] We strongly recomment the use of `virtualenv` to install and use `wfm-stitching`, see [here]( for information on installing and activating a virtual environment
* Download and install the binary distribution. You can find these on [gitlab]( under releases.
`pip install {path to *.whl}`
* You can verify that this has installed correctly using:
`pip show wfm-stitching`
which yields, if installed correctly, something like the following:
Name: wfm-stitching
Version: 0.1.0
Location: ~/virtualenvironments/v20/lib/python2.7/site-packages
Requires: pyfits
6. You are done, you should be able to import from `wfm_stitching`, i.e.
from wfm_stitching import WFMProcessor
# Processing Data
The processing is done using the class `WFMProcessor`, which can be
imported from the `wfm_stitching` module and requires a few arguments
......@@ -125,3 +158,7 @@ The size of the image is guessed by taking the square root of the number of spec
be overridden by supplying the `pixels`-parameter as an integer. The base filename will get
numbers appended to it, and each file contains it's position in the image stack in terms of
physical units (microseconds or Angstroms) in the header.
### Development
See **** for important maintenance and development topics
# Packaging
python -v bdist_wheel --universal
`-v` option give verbose output and is optional. This creates a wheel in a newly created `dist` directory. For example:
These should be versioned against releases.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# *********************************************************************
# lewis - a library for creating hardware device simulators
# Copyright (C) 2017-2018 European Spallation Source ERIC
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <>.
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, ''), encoding='utf-8') as f:
long_description =
description='Tools for Wavelength Frame Multiplication stiching in Mantid',
author='Owen Arnold',
license='GPL v3',
'Development Status :: 4 - Beta',
'Intended Audience :: Neutron Scattering Instrument Scientists',
'Topic :: Science :: Neutron Scattering',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
keywords='neutron scattering, science',
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment