Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADD: Add Support for Time of Flight Resolution calc #111

Merged
merged 3 commits into from May 10, 2018
Merged

ADD: Add Support for Time of Flight Resolution calc #111

merged 3 commits into from May 10, 2018

Conversation

pseudocubic
Copy link
Contributor

ADD: Simplify Instrument class and add ToF instrument
Changed Instrument to be a function that determines which class should
be passed back to the user, TripleAxisInstrument or
TimeOfFlightInstrument based on a kwarg instrument_type. If no such
kwarg is given, TripleAxisInstrument is assumed, to default to expected
previous behavior.

ADD: Placeholder for Takin engine classes
Added placeholders for the Takin engine resolution calculations (will
interact with pipes). This feature is not yet supported, and default
behavior is to use the internal resolution calculation engines.

ADD: TOF instrument
Fixed some PEP8 issues with docstrings
Added placeholder for TOF instrument
Renamed PlotInstrument Class

ADD: Add basic support for two instrument types to fileio
Added TOF instrument support to save_instrument.

FIX: resolution ellipsoid plotting
Resolves #74
Switched to plotting with skimage and matplotlib Axes3D from vispy. More stable and consistent.
Now plots multiple ellipsoids properly, and correctly scales axes.

ADD: Comparison between TripleAxisInstrument objects
Added eq and ne methods for comparison between instrument objects

DOC: Updated Instrument example
Added new example for ellipsoid plotting

ADD: constants
Added neutron mass and hbar and electron charge

ADD: Classes for time of flight instruments
Created a detector class to hold time of flight instrument detector information
Created a chopper class for TOF instruments
Created a guide class for TOF instruments
Added usages to docstring of TimeOfFlightInstrument class.
Added beam width to Chopper class

ADD: Violini calculations
Currently supports only the calculation of spherical and cylindrical
spectrometers. Also, only supports single hkle values, unlike current
state of TAS resolution calculator.

REF: PEP8 cleanup
Refactored miscellaneous code formatting and reordered imports

FIX: Re-enable resolution convolution tests
Resolves #59
Re-enables the resolution convolution tests based on corrections to matlab code

REF: Reduce identical code in calc_projections method
Reduces the amount of identical code lines in calc_projections of the
TAS Instrument class

ADD: added repr methods to classes
repr methods have been added to the following classes:

Analyzer
Chopper
Detector
Goniometer
Instrument
Monochromator
TakinTripleAxis
TakinTimeOfFlight
_dummy

ADD: Custom Exceptions
Added Custom exceptions to Instrument class and tools functions to increase descriptiveness of Exceptions

FIX: marching_cubes function output change
measure.marching_cubes function from scikit-learn has changed to return 4 outputs: verts, faces, norms, and values.

DOC: License update (year)
Added 2018 to the license timeframe

REF: Removed orderedDict requirement
Removed support for Python 2.6 by using OrderedDict from collections
instead of needing to install orderedDict package.

REF: Change Travis config
Updated Travis and Appveyor configurations to support better automated
releases through PYPI and Anaconda Cloud and eliminate code clutter and
excess dependency testing. MacOS testing is no longer supported because
since the package is python-only, it is assumed that it will work if the
linux tests pass.

ADD: Simplify Instrument class and add ToF instrument
Changed `Instrument` to be a function that determines which class should
be passed back to the user, TripleAxisInstrument or
TimeOfFlightInstrument based on a kwarg `instrument_type`. If no such
kwarg is given, TripleAxisInstrument is assumed, to default to expected
previous behavior.

ADD: Placeholder for Takin engine classes
Added placeholders for the Takin engine resolution calculations (will
interact with pipes). This feature is not yet supported, and default
behavior is to use the internal resolution calculation engines.

ADD: TOF instrument
Fixed some PEP8 issues with docstrings
Added placeholder for TOF instrument
Renamed PlotInstrument Class

ADD: Add basic support for two instrument types to fileio
Added TOF instrument support to save_instrument.

FIX: resolution ellipsoid plotting
Resolves #74
Switched to plotting with skimage and matplotlib Axes3D from vispy. More stable and consistent.
Now plots multiple ellipsoids properly, and correctly scales axes.

ADD: Comparison between TripleAxisInstrument objects
Added __eq__ and __ne__ methods for comparison between instrument objects

DOC: Updated Instrument example
Added new example for ellipsoid plotting

ADD: constants
Added neutron mass and hbar and electron charge

ADD: Classes for time of flight instruments
Created a detector class to hold time of flight instrument detector information
Created a chopper class for TOF instruments
Created a guide class for TOF instruments
Added usages to docstring of TimeOfFlightInstrument class.
Added beam width to Chopper class

ADD: Violini calculations
Currently supports only the calculation of spherical and cylindrical
spectrometers. Also, only supports single `hkle` values, unlike current
state of TAS resolution calculator.

REF: PEP8 cleanup
Refactored miscellaneous code formatting and reordered imports

FIX: Re-enable resolution convolution tests
Resolves #59
Re-enables the resolution convolution tests based on corrections to matlab code

REF: Reduce identical code in calc_projections method
Reduces the amount of identical code lines in calc_projections of the
TAS Instrument class

ADD: added __repr__ methods to classes
__repr__ methods have been added to the following classes:

Analyzer
Chopper
Detector
Goniometer
Instrument
Monochromator
TakinTripleAxis
TakinTimeOfFlight
_dummy

ADD: Custom Exceptions
Added Custom exceptions to Instrument class and tools functions to increase descriptiveness of Exceptions

FIX: marching_cubes function output change
measure.marching_cubes function from scikit-learn has changed to return 4 outputs: verts, faces, norms, and values.

DOC: License update (year)
Added 2018 to the license timeframe

REF: Removed orderedDict requirement
Removed support for Python 2.6 by using OrderedDict from collections
instead of needing to install orderedDict package.

REF: Change Travis config
Updated Travis and Appveyor configurations to support better automated
releases through PYPI and Anaconda Cloud and eliminate code clutter and
excess dependency testing. MacOS testing is no longer supported because
since the package is python-only, it is assumed that it will work if the
linux tests pass.
Indentation prevented parsing of .travis.yml
Updated changelog and fixed error in documentation.

Closes #74
Closes #77

[skip ci]
@codecov-io
Copy link

Codecov Report

Merging #111 into master will decrease coverage by 2.5%.
The diff coverage is 81.91%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #111      +/-   ##
==========================================
- Coverage    84.8%   82.29%   -2.51%     
==========================================
  Files          48       56       +8     
  Lines        3941     4140     +199     
==========================================
+ Hits         3342     3407      +65     
- Misses        599      733     +134
Impacted Files Coverage Δ
neutronpy/crystal/atom.py 76.66% <ø> (ø) ⬆️
neutronpy/crystal/structure_factors.py 88.88% <ø> (ø) ⬆️
neutronpy/data/plot.py 73.28% <ø> (ø) ⬆️
neutronpy/energy.py 90.47% <ø> (ø) ⬆️
neutronpy/spurion.py 98.03% <ø> (ø) ⬆️
neutronpy/__init__.py 96.15% <ø> (ø) ⬆️
neutronpy/crystal/symmetry.py 92.8% <ø> (ø) ⬆️
neutronpy/data/analysis.py 98.43% <ø> (ø) ⬆️
neutronpy/instrument/goniometer.py 0% <0%> (ø) ⬆️
neutronpy/logger.py 0% <0%> (ø) ⬆️
... and 42 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 910b2d9...7f25d31. Read the comment docs.

@pseudocubic pseudocubic merged commit c98d79e into neutronpy:master May 10, 2018
@pseudocubic pseudocubic deleted the feature/tof-resolution branch May 10, 2018 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants