3.6.0
Added:
- unit tests for initializing DiffractionObject with empty array in xarray and yarray
- function to return the index of the closest value to the specified value in an array.
- functions to convert between d and q
- catch division by zero warning messages in tests
- functionality to raise useful warning and error messages during angular conversion between two theta and q
- Improved API documentation in
DiffractionObjectmethods and properties using the NumPy docstring format and PEP 256 - validate xtype belongs to XQUANTITIES during DiffractionObject init
- Group's Pytest practices for using @pytest.mark.parametrize in test_diffraction_objects.py
- unit tests for add operation for DiffractionObject
- Better wording on the capture user info functionality
- Spelling check via Codespell in pre-commit
- prettier pre-commit hook for automatic linting of .yml, .json, and .md files
- Function that can be used to compute muD (absorption coefficient) from a file containing an absorption profile
from a line-scan through the sample - sbillinge username as the authorized admin for GitHub release workflow in
build-wheel-release-upload.yml - function to compute x-ray attenuation coefficient (mu) using XrayDB
- class docstring for
DiffractionObject - docforamtter in pre-commit for automatic formatting of docstrings to PEP 257
- Function nsinterp for automatic interpolation onto the Nyquist-Shannon grid.
- functionality to return the 2D array based on the specified xtype
- functionality in dump to allow writing data on dspace
- addition, multiplication, subtraction, and division operators between two DiffractionObject instances or a scalar value with another DiffractionObject for modifying yarray (intensity) values.
- functionality to rescale diffraction objects, placing one on top of another at a specified point
- new feature in
scale_to(): default scaling is based on the max q-value in each diffraction object. - functions to convert between d and tth
- unit test for expected warning when no wavelength is provided for DiffractionObject init
- copy() method for DiffractionObject instance
- docstrings for
on_q,on_tth,on_d, anddumpindiffraction_objects.py. - prevent direct modification of
all_arraysusing@property - Information on how to update the default user information
- Example docs for basic DiffractionObject usage
- deploy github pages documentation on pre-release
- Gettable
idproperty toDiffractionObject
Changed:
- Refactor get_user_info to separate the tasks of getting the info from config files
and creating config files when they are missing. - test comment format with compact style without extra line for each comment
- Rename
input_scattering_quantitytoinput_datainDiffractionObjectinit - refactor
q_to_tth()andtth_to_q()intodiffpy.utils.transformsto make them available outside
DiffractionObject - Moved resampler out of parsers, new path is diffpy.utils.resampler
- Rename the
isfloatfunction tois_number, and move it to thediffpy/utils/utilsvalidators.pydirectory - arrays and attributes now can be inserted when a DiffractionObject is instantiated
- data are now stored as a (len(x),4) numpy array with intensity in column 0, the q, then tth, then d
DiffractionObject.on_q,...on_tthand...on_dare now methods and called asDiffractionObject.on_q()etc.`- \tests directory tree to match \src
- DiffractionObject's "id" property renamed to "uuid"
DiffractionObjectrequires 3 input parameters ofxarray,yarray,xtype, to be instantiated. It can be instantiated with empty arrays.- Paths in our documentation reflect changes made in code.
- Enumerated list for the different ways to set user information
Deprecated:
resamplefunction in resampler. Replaced withwsinterpwith better functionality.- Diffraction_object class, renamed to DiffractionObject
Fixed:
- additional information to users to relieve frustration in finding how to update global config
- Unittest to Pytest migration for test_loaddata.py
- file paths of the test files according to new \tests directory tree
- Typo for get_package_info example
- return type of
get_array_indexmethod inDiffractionObjectto return integer instead of list
Removed:
- scattering_objects layer in importing diffraction_objects
user_config.py. Replaced by_load_configandcheck_and_build_global_configintools.py.- Relative imports in parser's init.py
set_angles_from_list,set_angles_from,set_qs_from_rangemethods inDiffractionObject