Code to place polarized neutron reflectivity into bins of constant Qz with regard for Zeeman energy change to the spin-flip channel.
The code is written as a Jupyter notebook. Example data are included as separate files (spin_down.txt and spin_up.txt). As a first step, run all cells in the notebook. Opportunities are identified for users to make their own choices for analysis of the data. The code is written to be a stand-alone operation on data collected from a pulse neutron source that have been previously normalized to the wavelength dependence of the incident beam spectrum, background subtracted, etc. The constant Qz binning (this code) is the last step to perform in the analysis (reduction) workflow. This step yields the the reflectivities for the four neutron spin cross-sections. A future intention is to create a version of this code that will be one module of many in the data analysis workflow. Work funded by the U.S. Department of Energy under contract No. DE-AC05-00OR22725.