nfit 0.89.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nfit-0.89.12/LICENSE +21 -0
- nfit-0.89.12/PKG-INFO +288 -0
- nfit-0.89.12/README.md +225 -0
- nfit-0.89.12/pyproject.toml +130 -0
- nfit-0.89.12/setup.cfg +4 -0
- nfit-0.89.12/src/nfit/__init__.py +1239 -0
- nfit-0.89.12/src/nfit/_electronic_cupy.py +438 -0
- nfit-0.89.12/src/nfit/_electronic_numba.py +182 -0
- nfit-0.89.12/src/nfit/_mdevent_numba.py +144 -0
- nfit-0.89.12/src/nfit/_model_hooks.py +34 -0
- nfit-0.89.12/src/nfit/_parallel.py +47 -0
- nfit-0.89.12/src/nfit/_rebin_numba.py +233 -0
- nfit-0.89.12/src/nfit/_rpa_cupy.py +110 -0
- nfit-0.89.12/src/nfit/_rpa_numba.py +406 -0
- nfit-0.89.12/src/nfit/_sum_rules_numba.py +73 -0
- nfit-0.89.12/src/nfit/analysis/__init__.py +94 -0
- nfit-0.89.12/src/nfit/analysis/artifacts.py +133 -0
- nfit-0.89.12/src/nfit/analysis/bragg.py +1195 -0
- nfit-0.89.12/src/nfit/analysis/builtins.py +582 -0
- nfit-0.89.12/src/nfit/analysis/coordinates.py +179 -0
- nfit-0.89.12/src/nfit/analysis/core.py +109 -0
- nfit-0.89.12/src/nfit/analysis/corrections.py +70 -0
- nfit-0.89.12/src/nfit/analysis/curie_weiss.py +294 -0
- nfit-0.89.12/src/nfit/analysis/data_reduction.py +564 -0
- nfit-0.89.12/src/nfit/analysis/fingerprint.py +257 -0
- nfit-0.89.12/src/nfit/analysis/heat_capacity.py +177 -0
- nfit-0.89.12/src/nfit/analysis/registry.py +124 -0
- nfit-0.89.12/src/nfit/analysis/runner.py +326 -0
- nfit-0.89.12/src/nfit/analysis/spectral.py +516 -0
- nfit-0.89.12/src/nfit/analysis/zones.py +76 -0
- nfit-0.89.12/src/nfit/analysis_bragg_gui.py +306 -0
- nfit-0.89.12/src/nfit/analysis_gui.py +849 -0
- nfit-0.89.12/src/nfit/analysis_window_builder.py +190 -0
- nfit-0.89.12/src/nfit/app_bootstrap.py +107 -0
- nfit-0.89.12/src/nfit/app_distribution.py +66 -0
- nfit-0.89.12/src/nfit/app_updates.py +359 -0
- nfit-0.89.12/src/nfit/app_updates_gui.py +310 -0
- nfit-0.89.12/src/nfit/application_preferences.py +80 -0
- nfit-0.89.12/src/nfit/axes.py +114 -0
- nfit-0.89.12/src/nfit/backgrounds.py +251 -0
- nfit-0.89.12/src/nfit/brillouin_zone.py +649 -0
- nfit-0.89.12/src/nfit/cache_utils.py +176 -0
- nfit-0.89.12/src/nfit/closures.py +946 -0
- nfit-0.89.12/src/nfit/colormaps.py +563 -0
- nfit-0.89.12/src/nfit/composite_spectral.py +86 -0
- nfit-0.89.12/src/nfit/cross_section.py +322 -0
- nfit-0.89.12/src/nfit/crystal.py +1122 -0
- nfit-0.89.12/src/nfit/dataset.py +628 -0
- nfit-0.89.12/src/nfit/dipole.py +213 -0
- nfit-0.89.12/src/nfit/electronic_backends.py +403 -0
- nfit-0.89.12/src/nfit/electronic_builder.py +3154 -0
- nfit-0.89.12/src/nfit/electronic_distributed.py +218 -0
- nfit-0.89.12/src/nfit/electronic_interactions.py +692 -0
- nfit-0.89.12/src/nfit/electronic_matrix.py +300 -0
- nfit-0.89.12/src/nfit/electronic_normalization.py +280 -0
- nfit-0.89.12/src/nfit/electronic_pipeline_sampling.py +894 -0
- nfit-0.89.12/src/nfit/electronic_resolvers.py +33 -0
- nfit-0.89.12/src/nfit/electronic_response.py +3524 -0
- nfit-0.89.12/src/nfit/electronic_sampling.py +761 -0
- nfit-0.89.12/src/nfit/electronic_spin.py +498 -0
- nfit-0.89.12/src/nfit/electronic_structure.py +2963 -0
- nfit-0.89.12/src/nfit/electronic_symmetry.py +144 -0
- nfit-0.89.12/src/nfit/file_dialogs.py +279 -0
- nfit-0.89.12/src/nfit/fit_config.py +2971 -0
- nfit-0.89.12/src/nfit/fit_config_electronic.py +958 -0
- nfit-0.89.12/src/nfit/fit_config_heisenberg_rpa.py +1325 -0
- nfit-0.89.12/src/nfit/fit_diagnostics_gui.py +549 -0
- nfit-0.89.12/src/nfit/fit_results.py +107 -0
- nfit-0.89.12/src/nfit/fitting.py +2422 -0
- nfit-0.89.12/src/nfit/form_factors.py +630 -0
- nfit-0.89.12/src/nfit/harmonics.py +104 -0
- nfit-0.89.12/src/nfit/heat_capacity.py +115 -0
- nfit-0.89.12/src/nfit/importers.py +1065 -0
- nfit-0.89.12/src/nfit/kpath.py +392 -0
- nfit-0.89.12/src/nfit/macs.py +659 -0
- nfit-0.89.12/src/nfit/magnetization.py +27 -0
- nfit-0.89.12/src/nfit/mdevent.py +1199 -0
- nfit-0.89.12/src/nfit/mdhisto.py +522 -0
- nfit-0.89.12/src/nfit/metadata_dimensions.py +550 -0
- nfit-0.89.12/src/nfit/metadata_dimensions_gui.py +502 -0
- nfit-0.89.12/src/nfit/model_geometry.py +431 -0
- nfit-0.89.12/src/nfit/model_plots.py +2019 -0
- nfit-0.89.12/src/nfit/model_registry.py +1612 -0
- nfit-0.89.12/src/nfit/model_registry_electronic.py +1539 -0
- nfit-0.89.12/src/nfit/models.py +90 -0
- nfit-0.89.12/src/nfit/performance.py +88 -0
- nfit-0.89.12/src/nfit/performance_benchmark.py +328 -0
- nfit-0.89.12/src/nfit/performance_gui.py +223 -0
- nfit-0.89.12/src/nfit/pipeline.py +392 -0
- nfit-0.89.12/src/nfit/plot_gui.py +143 -0
- nfit-0.89.12/src/nfit/plot_recipes.py +423 -0
- nfit-0.89.12/src/nfit/plotting.py +50 -0
- nfit-0.89.12/src/nfit/plotting_core.py +3166 -0
- nfit-0.89.12/src/nfit/powder.py +237 -0
- nfit-0.89.12/src/nfit/preferences_gui.py +129 -0
- nfit-0.89.12/src/nfit/project_archive.py +233 -0
- nfit-0.89.12/src/nfit/project_composite_physics.py +56 -0
- nfit-0.89.12/src/nfit/project_composites.py +2299 -0
- nfit-0.89.12/src/nfit/project_coordinates.py +281 -0
- nfit-0.89.12/src/nfit/project_data.py +1902 -0
- nfit-0.89.12/src/nfit/project_data_panels.py +54 -0
- nfit-0.89.12/src/nfit/project_dataset_io.py +283 -0
- nfit-0.89.12/src/nfit/project_dataset_panels.py +1579 -0
- nfit-0.89.12/src/nfit/project_group_panels.py +672 -0
- nfit-0.89.12/src/nfit/project_gui.py +19666 -0
- nfit-0.89.12/src/nfit/project_history.py +295 -0
- nfit-0.89.12/src/nfit/project_import_dialogs.py +446 -0
- nfit-0.89.12/src/nfit/project_imports.py +1182 -0
- nfit-0.89.12/src/nfit/project_io.py +437 -0
- nfit-0.89.12/src/nfit/project_lindhard_editor.py +912 -0
- nfit-0.89.12/src/nfit/project_masks.py +554 -0
- nfit-0.89.12/src/nfit/project_model_editor.py +847 -0
- nfit-0.89.12/src/nfit/project_models.py +63 -0
- nfit-0.89.12/src/nfit/project_point_lists.py +488 -0
- nfit-0.89.12/src/nfit/project_rebin_panels.py +276 -0
- nfit-0.89.12/src/nfit/project_rebinning.py +1618 -0
- nfit-0.89.12/src/nfit/project_tight_binding_editor.py +1683 -0
- nfit-0.89.12/src/nfit/project_view_data.py +245 -0
- nfit-0.89.12/src/nfit/project_window_builder.py +837 -0
- nfit-0.89.12/src/nfit/qt_branding.py +10 -0
- nfit-0.89.12/src/nfit/qt_brillouin_zone.py +73 -0
- nfit-0.89.12/src/nfit/qt_brillouin_zone_viewer.py +707 -0
- nfit-0.89.12/src/nfit/qt_controls.py +50 -0
- nfit-0.89.12/src/nfit/qt_electronic_matrix_viewer.py +284 -0
- nfit-0.89.12/src/nfit/qt_electronic_viewer.py +881 -0
- nfit-0.89.12/src/nfit/qt_fermi_surface_viewer.py +412 -0
- nfit-0.89.12/src/nfit/qt_kpath_viewer.py +349 -0
- nfit-0.89.12/src/nfit/qt_model_geometry_viewer.py +573 -0
- nfit-0.89.12/src/nfit/qt_pyvista.py +57 -0
- nfit-0.89.12/src/nfit/qt_sampling_progress.py +150 -0
- nfit-0.89.12/src/nfit/qt_slice_builder.py +1203 -0
- nfit-0.89.12/src/nfit/qt_slice_controls.py +327 -0
- nfit-0.89.12/src/nfit/qt_slice_modes.py +1191 -0
- nfit-0.89.12/src/nfit/qt_slice_viewer.py +4401 -0
- nfit-0.89.12/src/nfit/qt_viewer_shell.py +38 -0
- nfit-0.89.12/src/nfit/qt_volume_controls.py +456 -0
- nfit-0.89.12/src/nfit/qt_volume_viewer.py +1120 -0
- nfit-0.89.12/src/nfit/quantities.py +293 -0
- nfit-0.89.12/src/nfit/raw_dgs.py +1188 -0
- nfit-0.89.12/src/nfit/rebin.py +1440 -0
- nfit-0.89.12/src/nfit/rebin_cache.py +69 -0
- nfit-0.89.12/src/nfit/report.py +1942 -0
- nfit-0.89.12/src/nfit/resolution.py +249 -0
- nfit-0.89.12/src/nfit/resources/nfit-icon.png +0 -0
- nfit-0.89.12/src/nfit/slice_viewer_state.py +299 -0
- nfit-0.89.12/src/nfit/spectral_channels.py +520 -0
- nfit-0.89.12/src/nfit/spin_fluctuations.py +1487 -0
- nfit-0.89.12/src/nfit/sum_rules.py +385 -0
- nfit-0.89.12/src/nfit/susceptibility.py +109 -0
- nfit-0.89.12/src/nfit/symmetry.py +300 -0
- nfit-0.89.12/src/nfit/tensor_rpa.py +631 -0
- nfit-0.89.12/src/nfit/workflow.py +1174 -0
- nfit-0.89.12/src/nfit.egg-info/PKG-INFO +288 -0
- nfit-0.89.12/src/nfit.egg-info/SOURCES.txt +248 -0
- nfit-0.89.12/src/nfit.egg-info/dependency_links.txt +1 -0
- nfit-0.89.12/src/nfit.egg-info/entry_points.txt +2 -0
- nfit-0.89.12/src/nfit.egg-info/requires.txt +44 -0
- nfit-0.89.12/src/nfit.egg-info/top_level.txt +1 -0
- nfit-0.89.12/tests/test_analysis_bragg.py +374 -0
- nfit-0.89.12/tests/test_analysis_coordinates.py +71 -0
- nfit-0.89.12/tests/test_analysis_core.py +154 -0
- nfit-0.89.12/tests/test_analysis_curie_weiss.py +132 -0
- nfit-0.89.12/tests/test_analysis_data_reduction.py +254 -0
- nfit-0.89.12/tests/test_analysis_gui.py +583 -0
- nfit-0.89.12/tests/test_analysis_persistence.py +158 -0
- nfit-0.89.12/tests/test_analysis_spectral.py +403 -0
- nfit-0.89.12/tests/test_analysis_zones.py +23 -0
- nfit-0.89.12/tests/test_app_distribution.py +401 -0
- nfit-0.89.12/tests/test_app_updates_gui.py +225 -0
- nfit-0.89.12/tests/test_architecture.py +169 -0
- nfit-0.89.12/tests/test_axes.py +12 -0
- nfit-0.89.12/tests/test_backgrounds.py +451 -0
- nfit-0.89.12/tests/test_bin_centers.py +101 -0
- nfit-0.89.12/tests/test_brillouin_zone.py +677 -0
- nfit-0.89.12/tests/test_cache_utils.py +54 -0
- nfit-0.89.12/tests/test_closures.py +295 -0
- nfit-0.89.12/tests/test_composite_spectral.py +226 -0
- nfit-0.89.12/tests/test_cross_section.py +182 -0
- nfit-0.89.12/tests/test_crystal.py +575 -0
- nfit-0.89.12/tests/test_dataset.py +127 -0
- nfit-0.89.12/tests/test_dipole.py +137 -0
- nfit-0.89.12/tests/test_electronic_builder.py +920 -0
- nfit-0.89.12/tests/test_electronic_distributed.py +95 -0
- nfit-0.89.12/tests/test_electronic_module_boundaries.py +162 -0
- nfit-0.89.12/tests/test_electronic_normalization.py +129 -0
- nfit-0.89.12/tests/test_electronic_pipeline_sampling.py +440 -0
- nfit-0.89.12/tests/test_electronic_response.py +2214 -0
- nfit-0.89.12/tests/test_electronic_sampling.py +245 -0
- nfit-0.89.12/tests/test_electronic_spin.py +277 -0
- nfit-0.89.12/tests/test_electronic_structure.py +1400 -0
- nfit-0.89.12/tests/test_electronic_viewers.py +773 -0
- nfit-0.89.12/tests/test_file_dialogs.py +162 -0
- nfit-0.89.12/tests/test_fit_bulk_magnetization.py +523 -0
- nfit-0.89.12/tests/test_fit_compilation.py +969 -0
- nfit-0.89.12/tests/test_fit_config_decomposition.py +223 -0
- nfit-0.89.12/tests/test_fit_interactions.py +570 -0
- nfit-0.89.12/tests/test_fit_spectral_models.py +976 -0
- nfit-0.89.12/tests/test_fitting.py +705 -0
- nfit-0.89.12/tests/test_form_factors.py +248 -0
- nfit-0.89.12/tests/test_heat_capacity.py +142 -0
- nfit-0.89.12/tests/test_importers.py +333 -0
- nfit-0.89.12/tests/test_kpath.py +157 -0
- nfit-0.89.12/tests/test_macs.py +464 -0
- nfit-0.89.12/tests/test_masks.py +130 -0
- nfit-0.89.12/tests/test_mdevent.py +493 -0
- nfit-0.89.12/tests/test_mdhisto.py +139 -0
- nfit-0.89.12/tests/test_metadata_dimensions.py +799 -0
- nfit-0.89.12/tests/test_model_dependency_boundaries.py +80 -0
- nfit-0.89.12/tests/test_model_registry.py +431 -0
- nfit-0.89.12/tests/test_models.py +32 -0
- nfit-0.89.12/tests/test_packaging.py +43 -0
- nfit-0.89.12/tests/test_palette_sources.py +40 -0
- nfit-0.89.12/tests/test_performance.py +214 -0
- nfit-0.89.12/tests/test_pipeline.py +92 -0
- nfit-0.89.12/tests/test_plot_recipes.py +186 -0
- nfit-0.89.12/tests/test_plotting.py +2445 -0
- nfit-0.89.12/tests/test_plotting_core.py +663 -0
- nfit-0.89.12/tests/test_powder_convergence.py +243 -0
- nfit-0.89.12/tests/test_preferences_gui.py +188 -0
- nfit-0.89.12/tests/test_project_composites.py +152 -0
- nfit-0.89.12/tests/test_project_data.py +3542 -0
- nfit-0.89.12/tests/test_project_data_panels.py +156 -0
- nfit-0.89.12/tests/test_project_dataset_io.py +99 -0
- nfit-0.89.12/tests/test_project_explorer.py +2728 -0
- nfit-0.89.12/tests/test_project_fitting.py +1810 -0
- nfit-0.89.12/tests/test_project_imports.py +157 -0
- nfit-0.89.12/tests/test_project_masks.py +165 -0
- nfit-0.89.12/tests/test_project_model_editors.py +178 -0
- nfit-0.89.12/tests/test_project_models.py +2454 -0
- nfit-0.89.12/tests/test_project_point_lists.py +112 -0
- nfit-0.89.12/tests/test_project_rebinning_boundaries.py +149 -0
- nfit-0.89.12/tests/test_project_view_data.py +43 -0
- nfit-0.89.12/tests/test_project_window_builder.py +205 -0
- nfit-0.89.12/tests/test_qt_branding.py +20 -0
- nfit-0.89.12/tests/test_qt_slice_modes.py +115 -0
- nfit-0.89.12/tests/test_quantities.py +68 -0
- nfit-0.89.12/tests/test_raw_dgs.py +365 -0
- nfit-0.89.12/tests/test_rebin.py +638 -0
- nfit-0.89.12/tests/test_report.py +664 -0
- nfit-0.89.12/tests/test_resolution.py +97 -0
- nfit-0.89.12/tests/test_saved_plot_colors.py +82 -0
- nfit-0.89.12/tests/test_spin_fluctuations.py +914 -0
- nfit-0.89.12/tests/test_sum_rules.py +237 -0
- nfit-0.89.12/tests/test_susceptibility.py +56 -0
- nfit-0.89.12/tests/test_symmetry.py +241 -0
- nfit-0.89.12/tests/test_tensor_rpa.py +495 -0
- nfit-0.89.12/tests/test_user_colormaps.py +39 -0
- nfit-0.89.12/tests/test_viewer_dependency_boundaries.py +85 -0
- nfit-0.89.12/tests/test_volume_viewer.py +565 -0
- nfit-0.89.12/tests/test_workflow.py +671 -0
nfit-0.89.12/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Paul M. Neves
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
nfit-0.89.12/PKG-INFO
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nfit
|
|
3
|
+
Version: 0.89.12
|
|
4
|
+
Summary: Reduced magnetic-scattering analysis for nearly magnetic metals
|
|
5
|
+
Author-email: "Paul M. Neves" <pneves1@jhu.edu>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/pmneves7/nfit
|
|
8
|
+
Project-URL: Repository, https://github.com/pmneves7/nfit
|
|
9
|
+
Project-URL: Documentation, https://nfit.readthedocs.io/
|
|
10
|
+
Project-URL: Issues, https://github.com/pmneves7/nfit/issues
|
|
11
|
+
Keywords: inelastic neutron scattering,magnetic susceptibility,spin fluctuations,condensed matter physics
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
20
|
+
Requires-Python: >=3.12
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: packaging>=25
|
|
24
|
+
Requires-Dist: certifi>=2026.7.22
|
|
25
|
+
Requires-Dist: numpy>=2.5
|
|
26
|
+
Requires-Dist: scipy>=1.18
|
|
27
|
+
Requires-Dist: matplotlib>=3.11.1
|
|
28
|
+
Requires-Dist: colorcet>=3.1
|
|
29
|
+
Requires-Dist: cmcrameri>=1.10
|
|
30
|
+
Requires-Dist: cmocean>=4.0.3
|
|
31
|
+
Requires-Dist: palettable>=3.3.3
|
|
32
|
+
Requires-Dist: h5py>=3.16
|
|
33
|
+
Requires-Dist: pyside6>=6.11.2
|
|
34
|
+
Requires-Dist: emcee>=3.1
|
|
35
|
+
Requires-Dist: gemmi>=0.6
|
|
36
|
+
Requires-Dist: ase>=3.23
|
|
37
|
+
Requires-Dist: seekpath>=2.2
|
|
38
|
+
Requires-Dist: threadpoolctl>=3.1
|
|
39
|
+
Requires-Dist: pyvista>=0.48.4
|
|
40
|
+
Requires-Dist: pyvistaqt>=0.13.1
|
|
41
|
+
Requires-Dist: imageio>=2.31
|
|
42
|
+
Requires-Dist: imageio-ffmpeg>=0.4
|
|
43
|
+
Provides-Extra: distribution
|
|
44
|
+
Requires-Dist: pyinstaller<7,>=6.22; extra == "distribution"
|
|
45
|
+
Provides-Extra: dev
|
|
46
|
+
Requires-Dist: build>=1; extra == "dev"
|
|
47
|
+
Requires-Dist: pytest>=7; extra == "dev"
|
|
48
|
+
Requires-Dist: pytest-cov>=5; extra == "dev"
|
|
49
|
+
Requires-Dist: ruff>=0.12; extra == "dev"
|
|
50
|
+
Requires-Dist: twine>=5; extra == "dev"
|
|
51
|
+
Requires-Dist: numba>=0.67; extra == "dev"
|
|
52
|
+
Requires-Dist: periodictable>=1.7; extra == "dev"
|
|
53
|
+
Provides-Extra: accel
|
|
54
|
+
Requires-Dist: numba>=0.67; extra == "accel"
|
|
55
|
+
Provides-Extra: gpu
|
|
56
|
+
Requires-Dist: cupy>=12; extra == "gpu"
|
|
57
|
+
Provides-Extra: docs
|
|
58
|
+
Requires-Dist: sphinx<10,>=9.1; extra == "docs"
|
|
59
|
+
Requires-Dist: myst-parser<6,>=5.1; extra == "docs"
|
|
60
|
+
Requires-Dist: sphinx-copybutton>=0.5; extra == "docs"
|
|
61
|
+
Requires-Dist: furo>=2025.12.19; extra == "docs"
|
|
62
|
+
Dynamic: license-file
|
|
63
|
+
|
|
64
|
+
# nfit
|
|
65
|
+
|
|
66
|
+
<picture>
|
|
67
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/_static/nfit-logo-dark.svg">
|
|
68
|
+
<source media="(prefers-color-scheme: light)" srcset="docs/_static/nfit-logo.svg">
|
|
69
|
+
<img src="docs/_static/nfit-logo.svg" alt="nfit logo" width="240">
|
|
70
|
+
</picture>
|
|
71
|
+
|
|
72
|
+
> **Experimental beta software:** nfit is under active development and may
|
|
73
|
+
> contain incomplete or incorrect behavior. Validate scientific results independently.
|
|
74
|
+
> Paul M. Neves developed nfit with assistance from AI coding tools.
|
|
75
|
+
|
|
76
|
+
`nfit` analyzes magnetic neutron-scattering and related bulk measurements.
|
|
77
|
+
It works with physical coordinates such as `H`, `K`, `L`, `|Q|`, and energy
|
|
78
|
+
transfer, independently of the originating instrument or file layout.
|
|
79
|
+
|
|
80
|
+
## Install nfit
|
|
81
|
+
|
|
82
|
+
Download the current application from [GitHub Releases](https://github.com/pmneves7/nfit/releases/latest),
|
|
83
|
+
then follow the [macOS, Windows, or Linux installation instructions](docs/desktop_installers.md).
|
|
84
|
+
The same guide covers system requirements, updates, and uninstalling nfit.
|
|
85
|
+
|
|
86
|
+
On macOS, a [local app launcher](docs/getting_started.md#macos-local-app-launcher)
|
|
87
|
+
provides double-click startup and a Dock icon using your existing environment.
|
|
88
|
+
|
|
89
|
+
The package provides:
|
|
90
|
+
|
|
91
|
+
- native MDHisto, single-crystal and direct-powder MDEvent, and compatible
|
|
92
|
+
direct-geometry spectrometer workflows, with project-owned composite
|
|
93
|
+
materialization and scaled powder or aligned-histogram background subtraction;
|
|
94
|
+
- NIST NCNR MACS NeXus import with separate energy-analyzed SPEC and
|
|
95
|
+
energy-integrated DIFF streams, DAVE-compatible analyzer-energy recovery,
|
|
96
|
+
monitor normalization, detector masks, and viewer-ready
|
|
97
|
+
batch composites that can join existing compatible collections, with promoted
|
|
98
|
+
crystal orientation;
|
|
99
|
+
- powder-cut, MPMS magnetization, PPMS heat-capacity, and tabular imports;
|
|
100
|
+
- masking, coverage- and sample-aware symmetry/rebinning with per-axis
|
|
101
|
+
Discrete, Step, Bins, Edges, or tolerance-clustered modes, editable
|
|
102
|
+
fractional/discrete point assignment, expandable bin-grid information,
|
|
103
|
+
multiple named fit or visualization binnings per dataset and composite,
|
|
104
|
+
unified timed, cancellable dataset- and point-level rebin progress with stage-resolved
|
|
105
|
+
native MDEvent reduction,
|
|
106
|
+
momentum-coordinate matrices, automatic
|
|
107
|
+
zero-aligned uniform grids specified by bin centers, composites, backgrounds
|
|
108
|
+
with automatic grid matching for unrebinned neutron references, and
|
|
109
|
+
non-destructive analyses, including live hierarchical composites and editable
|
|
110
|
+
source-linked histogram sums, differences, or comparison clones with
|
|
111
|
+
independent raw-data binning, plus lazy navigation for run-heavy projects;
|
|
112
|
+
- metadata dimensions for temperature or other sample conditions, accumulated with physical coordinates in the central N-dimensional rebinner,
|
|
113
|
+
with selectable channels, nominal coordinates, display and integration axes,
|
|
114
|
+
exact tiled slices, visible zero-valued background references, temperature-aware
|
|
115
|
+
fitting, and per-axis discrete or fractional rebinning;
|
|
116
|
+
- source reload actions for individual datasets and complete dataset collections,
|
|
117
|
+
with automatic refresh of dependent composites and open viewers;
|
|
118
|
+
- folder-level enable controls for masks and backgrounds, plus a shared scale
|
|
119
|
+
editor for all backgrounds in a folder;
|
|
120
|
+
- paired neutron cross-section and dynamical-susceptibility channels for datasets
|
|
121
|
+
and composites, with temperature-coordinate conversion for temperature series;
|
|
122
|
+
- local, MMP, generalized-paramagnon/damped-mode, conserved-ferromagnetic,
|
|
123
|
+
relaxational or inertial Heisenberg-RPA, and coupled-susceptibility models
|
|
124
|
+
for inelastic, quasistatic elastic, and optional bulk-response comparisons,
|
|
125
|
+
with a tabbed crystal/exchange workflow and explicit powder and
|
|
126
|
+
self-consistency convergence controls;
|
|
127
|
+
- a linked bare Lindhard response with complex multiband susceptibility,
|
|
128
|
+
Cartesian spin and neutron projections, fixed-filling support, automatic
|
|
129
|
+
formula-unit and represented-magnetic-center normalization, per-orbital
|
|
130
|
+
tabulated, custom, or coherent effective magnetic form factors, workflow-focused
|
|
131
|
+
controls, fitting, model-owned plots, and editable scripts;
|
|
132
|
+
- modular scalar Stoner, user-matrix, and local multiorbital Hubbard--Hund
|
|
133
|
+
RPA interaction dressings with eV input, canonical meV vertices, shared
|
|
134
|
+
electronic-response dependencies, pole diagnostics, fitting, and reports;
|
|
135
|
+
- production electronic-response controls with bounded transition batches,
|
|
136
|
+
fit-shared response caches, reusable parameter-resolved momentum
|
|
137
|
+
Hamiltonians, factorized orbital-pair responses, resource-aware
|
|
138
|
+
independent-Q scheduling, workload-gated fused CPU and end-to-end optional
|
|
139
|
+
GPU contractions, model-digest-aware eigensystem and bare-response reuse,
|
|
140
|
+
exact commensurate-Q permutation,
|
|
141
|
+
digest-bearing tolerance-certified periodic Q interpolation with nonlinear
|
|
142
|
+
RPA revalidation and reusable fit geometry, certified little-group
|
|
143
|
+
reduction, observable-specific automatic DOS certificates and dataset-domain
|
|
144
|
+
complete TB--Lindhard--RPA mesh certificates,
|
|
145
|
+
backend-equivalence probes, separate
|
|
146
|
+
mesh/broadening convergence plots, and scheduler-neutral response chunks
|
|
147
|
+
with editable Slurm launchers;
|
|
148
|
+
- CIF/manual crystal geometry and arbitrary manual or Wannier90 tight-binding
|
|
149
|
+
models with explicit local orbital frames, site-point-group harmonic
|
|
150
|
+
subspaces, symmetry-allowed onsite terms, selectable orbital-explicit
|
|
151
|
+
Slater--Koster or general-matrix hopping candidates, lazy primitive-cell
|
|
152
|
+
resolution, Hinuma/HPKOT and Setyawan--Curtarolo paths, eV/meV conversion,
|
|
153
|
+
bands, orbital projections, Gaussian and linear-tetrahedron density of
|
|
154
|
+
states, Fermi surfaces, bounded CPU and optional
|
|
155
|
+
GPU eigensystem backends, certified total-DOS symmetry reduction,
|
|
156
|
+
implicit/collinear/spinor bases,
|
|
157
|
+
manifold-resolved onsite spin-orbit coupling, Hamiltonian and orbital-block
|
|
158
|
+
matrix inspection, shared 3D model-geometry inspection, and
|
|
159
|
+
primitive-cell first-Brillouin-zone views; atoms, orbitals, and bonds in the
|
|
160
|
+
model-geometry viewer are clickable and identified in its side panel, while
|
|
161
|
+
all electronic viewers use a common plot-plus-settings layout and the band,
|
|
162
|
+
DOS, and Fermi viewers own their plot-specific calculation controls; DOS
|
|
163
|
+
production meshes are selected and certified in the model editor with
|
|
164
|
+
per-iteration convergence progress, while Fermi grids may use a physical
|
|
165
|
+
reciprocal-space spacing or explicit axis sizes. Band and DOS figures
|
|
166
|
+
also expose scriptable curve, marker, typography, frame, legend, Fermi-level,
|
|
167
|
+
projection-visibility, and high-symmetry-guide styling, while DOS energy
|
|
168
|
+
limits can be derived automatically from the sampled bands,
|
|
169
|
+
band, DOS, and Fermi-surface viewers can copy or save their rendered figures,
|
|
170
|
+
three-dimensional Fermi surfaces use GPU-accelerated interaction with
|
|
171
|
+
scriptable opacity, text, grid, legend, and smooth/flat shading controls, and the
|
|
172
|
+
Brillouin-zone viewer provides scriptable styling, visibility, projection,
|
|
173
|
+
and image-export controls; named onsite, hopping, and SOC coefficients share
|
|
174
|
+
the standard bounds, fit-selection, dataset-sharing, report, and script
|
|
175
|
+
machinery;
|
|
176
|
+
- an extensible model registry shared by fitting, GUI metadata, diagnostics,
|
|
177
|
+
reports, plots, project files, and workflow scripts, with a tiered
|
|
178
|
+
category/model selector for primitive, spin-fluctuation, electronic,
|
|
179
|
+
heat-capacity, and magnetization components;
|
|
180
|
+
- simultaneous least-squares fitting with resource-aware parallel numerical
|
|
181
|
+
derivatives, explicit uncertainty conventions, optional
|
|
182
|
+
differential-evolution initialization, and `emcee` posterior sampling;
|
|
183
|
+
- single-file `.nfit` projects with optional persisted rebin caches, temporary
|
|
184
|
+
disk overflow for binnings that exceed the memory cache, generated
|
|
185
|
+
analysis artifacts, fit timelines,
|
|
186
|
+
provenance, safe transactional script editing, and GUI detection of external
|
|
187
|
+
file changes, installation-local remembered file-dialog locations, plus
|
|
188
|
+
editable script export for dataset preparation, analyses, fits, and saved
|
|
189
|
+
plots;
|
|
190
|
+
- interactive slice, waterfall, tiled 2D-slice, and volumetric visualization
|
|
191
|
+
with large-volume safeguards, optional visualization-only smoothing across
|
|
192
|
+
empty bins, per-panel tiled cursor inspection, optional metric- and
|
|
193
|
+
centering-aware Brillouin-zone boundaries with scriptable line styling,
|
|
194
|
+
dedicated experimental momentum-path maps with automatic or absolute-HKL
|
|
195
|
+
higher-zone paths, propagated tube-average errors, symmetry guides, and 3D
|
|
196
|
+
inspection,
|
|
197
|
+
customizable tiled-slice labels,
|
|
198
|
+
independent, same-state viewer duplication and stored plot recipes that
|
|
199
|
+
retain independent source/composite-rebin configurations, separate save/update
|
|
200
|
+
actions for stored plots, and provide named,
|
|
201
|
+
previewed Matplotlib, cmcrameri, Colorcet, cmocean, MyCarta, and CartoColors
|
|
202
|
+
color maps, plus drop-in custom RGB palette files in nfit's application-data
|
|
203
|
+
folder, accessible through **File → Preferences**, installation-local continuous and waterfall colormap
|
|
204
|
+
defaults, and display-only Gaussian interpolation into adjacent empty bins,
|
|
205
|
+
with toolbar **Help** opening the local documentation;
|
|
206
|
+
- machine-local rebin performance defaults, cancellable machine calibration and
|
|
207
|
+
configuration-specific benchmarks with timing/memory reports and script export;
|
|
208
|
+
- multi-selection dataset operations and recursive copy/paste for nested
|
|
209
|
+
dataset groups.
|
|
210
|
+
|
|
211
|
+
See the [documentation](docs/index.md) for workflows, physics conventions,
|
|
212
|
+
model equations, and the Python API.
|
|
213
|
+
|
|
214
|
+
## Authorship
|
|
215
|
+
|
|
216
|
+
nfit was authored and is maintained by Paul M. Neves (Johns Hopkins
|
|
217
|
+
University, pneves1@jhu.edu). AI and large-language-model coding tools have
|
|
218
|
+
assisted with portions of the code, tests, and documentation. Authorship and
|
|
219
|
+
responsibility for the project remain with Paul M. Neves.
|
|
220
|
+
See [References and software influences](docs/references.md) for the scientific
|
|
221
|
+
and software projects that informed nfit.
|
|
222
|
+
|
|
223
|
+
## Installation
|
|
224
|
+
|
|
225
|
+
nfit requires Python 3.12 or newer. The supplied conda environment uses
|
|
226
|
+
Python 3.14 and a current NumPy/SciPy/Numba and Qt/VTK stack.
|
|
227
|
+
|
|
228
|
+
Native macOS, 64-bit Windows 10/11, and 64-bit Ubuntu 22.04 or newer beta
|
|
229
|
+
installers provide a self-contained application with the nfit icon, a branded
|
|
230
|
+
loading screen, offline help, and consent-based verified updates. Testers do
|
|
231
|
+
not need Python, Conda, Git, or the source repository. See
|
|
232
|
+
[Desktop installers and updates](docs/desktop_installers.md) for download,
|
|
233
|
+
installation, system requirements, and update instructions.
|
|
234
|
+
|
|
235
|
+
If you are new to GitHub, Python, and Conda, follow the step-by-step
|
|
236
|
+
[first-time setup guide](docs/getting_started.md#first-time-collaborator-setup).
|
|
237
|
+
It covers accepting a GitHub invitation (or downloading a ZIP), installing Git
|
|
238
|
+
and Miniforge, creating the `nfit` environment, and launching the application.
|
|
239
|
+
|
|
240
|
+
For an existing checkout:
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
conda env update -f environment.yml --prune
|
|
244
|
+
conda activate nfit
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Launch the project explorer with:
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
nfit
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Development
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
python -m pytest -q
|
|
257
|
+
python -m pytest --cov=nfit --cov-branch --cov-report=term-missing
|
|
258
|
+
python -m ruff check
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
## Example
|
|
262
|
+
|
|
263
|
+
Run the small script-only analysis example:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
python examples/data_playground.py
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Build the documentation with warnings treated as errors:
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
python -m sphinx -W -b html docs docs/_build/html
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Validate release artifacts locally with:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
python -m build
|
|
279
|
+
python -m twine check dist/*
|
|
280
|
+
python -m pip install dist/nfit-*.whl
|
|
281
|
+
nfit
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
## Documentation
|
|
285
|
+
|
|
286
|
+
Documentation is built with Sphinx, MyST Markdown, MyST-NB/Jupyter notebooks,
|
|
287
|
+
and the Furo theme. User-facing behavior, tests, tooltips, and the relevant
|
|
288
|
+
source page should change together.
|
nfit-0.89.12/README.md
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# nfit
|
|
2
|
+
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/_static/nfit-logo-dark.svg">
|
|
5
|
+
<source media="(prefers-color-scheme: light)" srcset="docs/_static/nfit-logo.svg">
|
|
6
|
+
<img src="docs/_static/nfit-logo.svg" alt="nfit logo" width="240">
|
|
7
|
+
</picture>
|
|
8
|
+
|
|
9
|
+
> **Experimental beta software:** nfit is under active development and may
|
|
10
|
+
> contain incomplete or incorrect behavior. Validate scientific results independently.
|
|
11
|
+
> Paul M. Neves developed nfit with assistance from AI coding tools.
|
|
12
|
+
|
|
13
|
+
`nfit` analyzes magnetic neutron-scattering and related bulk measurements.
|
|
14
|
+
It works with physical coordinates such as `H`, `K`, `L`, `|Q|`, and energy
|
|
15
|
+
transfer, independently of the originating instrument or file layout.
|
|
16
|
+
|
|
17
|
+
## Install nfit
|
|
18
|
+
|
|
19
|
+
Download the current application from [GitHub Releases](https://github.com/pmneves7/nfit/releases/latest),
|
|
20
|
+
then follow the [macOS, Windows, or Linux installation instructions](docs/desktop_installers.md).
|
|
21
|
+
The same guide covers system requirements, updates, and uninstalling nfit.
|
|
22
|
+
|
|
23
|
+
On macOS, a [local app launcher](docs/getting_started.md#macos-local-app-launcher)
|
|
24
|
+
provides double-click startup and a Dock icon using your existing environment.
|
|
25
|
+
|
|
26
|
+
The package provides:
|
|
27
|
+
|
|
28
|
+
- native MDHisto, single-crystal and direct-powder MDEvent, and compatible
|
|
29
|
+
direct-geometry spectrometer workflows, with project-owned composite
|
|
30
|
+
materialization and scaled powder or aligned-histogram background subtraction;
|
|
31
|
+
- NIST NCNR MACS NeXus import with separate energy-analyzed SPEC and
|
|
32
|
+
energy-integrated DIFF streams, DAVE-compatible analyzer-energy recovery,
|
|
33
|
+
monitor normalization, detector masks, and viewer-ready
|
|
34
|
+
batch composites that can join existing compatible collections, with promoted
|
|
35
|
+
crystal orientation;
|
|
36
|
+
- powder-cut, MPMS magnetization, PPMS heat-capacity, and tabular imports;
|
|
37
|
+
- masking, coverage- and sample-aware symmetry/rebinning with per-axis
|
|
38
|
+
Discrete, Step, Bins, Edges, or tolerance-clustered modes, editable
|
|
39
|
+
fractional/discrete point assignment, expandable bin-grid information,
|
|
40
|
+
multiple named fit or visualization binnings per dataset and composite,
|
|
41
|
+
unified timed, cancellable dataset- and point-level rebin progress with stage-resolved
|
|
42
|
+
native MDEvent reduction,
|
|
43
|
+
momentum-coordinate matrices, automatic
|
|
44
|
+
zero-aligned uniform grids specified by bin centers, composites, backgrounds
|
|
45
|
+
with automatic grid matching for unrebinned neutron references, and
|
|
46
|
+
non-destructive analyses, including live hierarchical composites and editable
|
|
47
|
+
source-linked histogram sums, differences, or comparison clones with
|
|
48
|
+
independent raw-data binning, plus lazy navigation for run-heavy projects;
|
|
49
|
+
- metadata dimensions for temperature or other sample conditions, accumulated with physical coordinates in the central N-dimensional rebinner,
|
|
50
|
+
with selectable channels, nominal coordinates, display and integration axes,
|
|
51
|
+
exact tiled slices, visible zero-valued background references, temperature-aware
|
|
52
|
+
fitting, and per-axis discrete or fractional rebinning;
|
|
53
|
+
- source reload actions for individual datasets and complete dataset collections,
|
|
54
|
+
with automatic refresh of dependent composites and open viewers;
|
|
55
|
+
- folder-level enable controls for masks and backgrounds, plus a shared scale
|
|
56
|
+
editor for all backgrounds in a folder;
|
|
57
|
+
- paired neutron cross-section and dynamical-susceptibility channels for datasets
|
|
58
|
+
and composites, with temperature-coordinate conversion for temperature series;
|
|
59
|
+
- local, MMP, generalized-paramagnon/damped-mode, conserved-ferromagnetic,
|
|
60
|
+
relaxational or inertial Heisenberg-RPA, and coupled-susceptibility models
|
|
61
|
+
for inelastic, quasistatic elastic, and optional bulk-response comparisons,
|
|
62
|
+
with a tabbed crystal/exchange workflow and explicit powder and
|
|
63
|
+
self-consistency convergence controls;
|
|
64
|
+
- a linked bare Lindhard response with complex multiband susceptibility,
|
|
65
|
+
Cartesian spin and neutron projections, fixed-filling support, automatic
|
|
66
|
+
formula-unit and represented-magnetic-center normalization, per-orbital
|
|
67
|
+
tabulated, custom, or coherent effective magnetic form factors, workflow-focused
|
|
68
|
+
controls, fitting, model-owned plots, and editable scripts;
|
|
69
|
+
- modular scalar Stoner, user-matrix, and local multiorbital Hubbard--Hund
|
|
70
|
+
RPA interaction dressings with eV input, canonical meV vertices, shared
|
|
71
|
+
electronic-response dependencies, pole diagnostics, fitting, and reports;
|
|
72
|
+
- production electronic-response controls with bounded transition batches,
|
|
73
|
+
fit-shared response caches, reusable parameter-resolved momentum
|
|
74
|
+
Hamiltonians, factorized orbital-pair responses, resource-aware
|
|
75
|
+
independent-Q scheduling, workload-gated fused CPU and end-to-end optional
|
|
76
|
+
GPU contractions, model-digest-aware eigensystem and bare-response reuse,
|
|
77
|
+
exact commensurate-Q permutation,
|
|
78
|
+
digest-bearing tolerance-certified periodic Q interpolation with nonlinear
|
|
79
|
+
RPA revalidation and reusable fit geometry, certified little-group
|
|
80
|
+
reduction, observable-specific automatic DOS certificates and dataset-domain
|
|
81
|
+
complete TB--Lindhard--RPA mesh certificates,
|
|
82
|
+
backend-equivalence probes, separate
|
|
83
|
+
mesh/broadening convergence plots, and scheduler-neutral response chunks
|
|
84
|
+
with editable Slurm launchers;
|
|
85
|
+
- CIF/manual crystal geometry and arbitrary manual or Wannier90 tight-binding
|
|
86
|
+
models with explicit local orbital frames, site-point-group harmonic
|
|
87
|
+
subspaces, symmetry-allowed onsite terms, selectable orbital-explicit
|
|
88
|
+
Slater--Koster or general-matrix hopping candidates, lazy primitive-cell
|
|
89
|
+
resolution, Hinuma/HPKOT and Setyawan--Curtarolo paths, eV/meV conversion,
|
|
90
|
+
bands, orbital projections, Gaussian and linear-tetrahedron density of
|
|
91
|
+
states, Fermi surfaces, bounded CPU and optional
|
|
92
|
+
GPU eigensystem backends, certified total-DOS symmetry reduction,
|
|
93
|
+
implicit/collinear/spinor bases,
|
|
94
|
+
manifold-resolved onsite spin-orbit coupling, Hamiltonian and orbital-block
|
|
95
|
+
matrix inspection, shared 3D model-geometry inspection, and
|
|
96
|
+
primitive-cell first-Brillouin-zone views; atoms, orbitals, and bonds in the
|
|
97
|
+
model-geometry viewer are clickable and identified in its side panel, while
|
|
98
|
+
all electronic viewers use a common plot-plus-settings layout and the band,
|
|
99
|
+
DOS, and Fermi viewers own their plot-specific calculation controls; DOS
|
|
100
|
+
production meshes are selected and certified in the model editor with
|
|
101
|
+
per-iteration convergence progress, while Fermi grids may use a physical
|
|
102
|
+
reciprocal-space spacing or explicit axis sizes. Band and DOS figures
|
|
103
|
+
also expose scriptable curve, marker, typography, frame, legend, Fermi-level,
|
|
104
|
+
projection-visibility, and high-symmetry-guide styling, while DOS energy
|
|
105
|
+
limits can be derived automatically from the sampled bands,
|
|
106
|
+
band, DOS, and Fermi-surface viewers can copy or save their rendered figures,
|
|
107
|
+
three-dimensional Fermi surfaces use GPU-accelerated interaction with
|
|
108
|
+
scriptable opacity, text, grid, legend, and smooth/flat shading controls, and the
|
|
109
|
+
Brillouin-zone viewer provides scriptable styling, visibility, projection,
|
|
110
|
+
and image-export controls; named onsite, hopping, and SOC coefficients share
|
|
111
|
+
the standard bounds, fit-selection, dataset-sharing, report, and script
|
|
112
|
+
machinery;
|
|
113
|
+
- an extensible model registry shared by fitting, GUI metadata, diagnostics,
|
|
114
|
+
reports, plots, project files, and workflow scripts, with a tiered
|
|
115
|
+
category/model selector for primitive, spin-fluctuation, electronic,
|
|
116
|
+
heat-capacity, and magnetization components;
|
|
117
|
+
- simultaneous least-squares fitting with resource-aware parallel numerical
|
|
118
|
+
derivatives, explicit uncertainty conventions, optional
|
|
119
|
+
differential-evolution initialization, and `emcee` posterior sampling;
|
|
120
|
+
- single-file `.nfit` projects with optional persisted rebin caches, temporary
|
|
121
|
+
disk overflow for binnings that exceed the memory cache, generated
|
|
122
|
+
analysis artifacts, fit timelines,
|
|
123
|
+
provenance, safe transactional script editing, and GUI detection of external
|
|
124
|
+
file changes, installation-local remembered file-dialog locations, plus
|
|
125
|
+
editable script export for dataset preparation, analyses, fits, and saved
|
|
126
|
+
plots;
|
|
127
|
+
- interactive slice, waterfall, tiled 2D-slice, and volumetric visualization
|
|
128
|
+
with large-volume safeguards, optional visualization-only smoothing across
|
|
129
|
+
empty bins, per-panel tiled cursor inspection, optional metric- and
|
|
130
|
+
centering-aware Brillouin-zone boundaries with scriptable line styling,
|
|
131
|
+
dedicated experimental momentum-path maps with automatic or absolute-HKL
|
|
132
|
+
higher-zone paths, propagated tube-average errors, symmetry guides, and 3D
|
|
133
|
+
inspection,
|
|
134
|
+
customizable tiled-slice labels,
|
|
135
|
+
independent, same-state viewer duplication and stored plot recipes that
|
|
136
|
+
retain independent source/composite-rebin configurations, separate save/update
|
|
137
|
+
actions for stored plots, and provide named,
|
|
138
|
+
previewed Matplotlib, cmcrameri, Colorcet, cmocean, MyCarta, and CartoColors
|
|
139
|
+
color maps, plus drop-in custom RGB palette files in nfit's application-data
|
|
140
|
+
folder, accessible through **File → Preferences**, installation-local continuous and waterfall colormap
|
|
141
|
+
defaults, and display-only Gaussian interpolation into adjacent empty bins,
|
|
142
|
+
with toolbar **Help** opening the local documentation;
|
|
143
|
+
- machine-local rebin performance defaults, cancellable machine calibration and
|
|
144
|
+
configuration-specific benchmarks with timing/memory reports and script export;
|
|
145
|
+
- multi-selection dataset operations and recursive copy/paste for nested
|
|
146
|
+
dataset groups.
|
|
147
|
+
|
|
148
|
+
See the [documentation](docs/index.md) for workflows, physics conventions,
|
|
149
|
+
model equations, and the Python API.
|
|
150
|
+
|
|
151
|
+
## Authorship
|
|
152
|
+
|
|
153
|
+
nfit was authored and is maintained by Paul M. Neves (Johns Hopkins
|
|
154
|
+
University, pneves1@jhu.edu). AI and large-language-model coding tools have
|
|
155
|
+
assisted with portions of the code, tests, and documentation. Authorship and
|
|
156
|
+
responsibility for the project remain with Paul M. Neves.
|
|
157
|
+
See [References and software influences](docs/references.md) for the scientific
|
|
158
|
+
and software projects that informed nfit.
|
|
159
|
+
|
|
160
|
+
## Installation
|
|
161
|
+
|
|
162
|
+
nfit requires Python 3.12 or newer. The supplied conda environment uses
|
|
163
|
+
Python 3.14 and a current NumPy/SciPy/Numba and Qt/VTK stack.
|
|
164
|
+
|
|
165
|
+
Native macOS, 64-bit Windows 10/11, and 64-bit Ubuntu 22.04 or newer beta
|
|
166
|
+
installers provide a self-contained application with the nfit icon, a branded
|
|
167
|
+
loading screen, offline help, and consent-based verified updates. Testers do
|
|
168
|
+
not need Python, Conda, Git, or the source repository. See
|
|
169
|
+
[Desktop installers and updates](docs/desktop_installers.md) for download,
|
|
170
|
+
installation, system requirements, and update instructions.
|
|
171
|
+
|
|
172
|
+
If you are new to GitHub, Python, and Conda, follow the step-by-step
|
|
173
|
+
[first-time setup guide](docs/getting_started.md#first-time-collaborator-setup).
|
|
174
|
+
It covers accepting a GitHub invitation (or downloading a ZIP), installing Git
|
|
175
|
+
and Miniforge, creating the `nfit` environment, and launching the application.
|
|
176
|
+
|
|
177
|
+
For an existing checkout:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
conda env update -f environment.yml --prune
|
|
181
|
+
conda activate nfit
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Launch the project explorer with:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
nfit
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Development
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
python -m pytest -q
|
|
194
|
+
python -m pytest --cov=nfit --cov-branch --cov-report=term-missing
|
|
195
|
+
python -m ruff check
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Example
|
|
199
|
+
|
|
200
|
+
Run the small script-only analysis example:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
python examples/data_playground.py
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Build the documentation with warnings treated as errors:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
python -m sphinx -W -b html docs docs/_build/html
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Validate release artifacts locally with:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
python -m build
|
|
216
|
+
python -m twine check dist/*
|
|
217
|
+
python -m pip install dist/nfit-*.whl
|
|
218
|
+
nfit
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## Documentation
|
|
222
|
+
|
|
223
|
+
Documentation is built with Sphinx, MyST Markdown, MyST-NB/Jupyter notebooks,
|
|
224
|
+
and the Furo theme. User-facing behavior, tests, tooltips, and the relevant
|
|
225
|
+
source page should change together.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77.0.3", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "nfit"
|
|
7
|
+
version = "0.89.12"
|
|
8
|
+
description = "Reduced magnetic-scattering analysis for nearly magnetic metals"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.12"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "Paul M. Neves", email = "pneves1@jhu.edu" }
|
|
15
|
+
]
|
|
16
|
+
dependencies = [
|
|
17
|
+
"packaging>=25",
|
|
18
|
+
"certifi>=2026.7.22",
|
|
19
|
+
"numpy>=2.5",
|
|
20
|
+
"scipy>=1.18",
|
|
21
|
+
"matplotlib>=3.11.1",
|
|
22
|
+
"colorcet>=3.1",
|
|
23
|
+
"cmcrameri>=1.10",
|
|
24
|
+
"cmocean>=4.0.3",
|
|
25
|
+
"palettable>=3.3.3",
|
|
26
|
+
"h5py>=3.16",
|
|
27
|
+
"pyside6>=6.11.2",
|
|
28
|
+
"emcee>=3.1",
|
|
29
|
+
"gemmi>=0.6",
|
|
30
|
+
"ase>=3.23",
|
|
31
|
+
"seekpath>=2.2",
|
|
32
|
+
"threadpoolctl>=3.1",
|
|
33
|
+
"pyvista>=0.48.4",
|
|
34
|
+
"pyvistaqt>=0.13.1",
|
|
35
|
+
"imageio>=2.31",
|
|
36
|
+
"imageio-ffmpeg>=0.4",
|
|
37
|
+
]
|
|
38
|
+
keywords = [
|
|
39
|
+
"inelastic neutron scattering",
|
|
40
|
+
"magnetic susceptibility",
|
|
41
|
+
"spin fluctuations",
|
|
42
|
+
"condensed matter physics",
|
|
43
|
+
]
|
|
44
|
+
classifiers = [
|
|
45
|
+
"Development Status :: 4 - Beta",
|
|
46
|
+
"Intended Audience :: Science/Research",
|
|
47
|
+
"Operating System :: OS Independent",
|
|
48
|
+
"Programming Language :: Python :: 3",
|
|
49
|
+
"Programming Language :: Python :: 3.12",
|
|
50
|
+
"Programming Language :: Python :: 3.13",
|
|
51
|
+
"Programming Language :: Python :: 3.14",
|
|
52
|
+
"Topic :: Scientific/Engineering :: Physics",
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
[project.urls]
|
|
56
|
+
Homepage = "https://github.com/pmneves7/nfit"
|
|
57
|
+
Repository = "https://github.com/pmneves7/nfit"
|
|
58
|
+
Documentation = "https://nfit.readthedocs.io/"
|
|
59
|
+
Issues = "https://github.com/pmneves7/nfit/issues"
|
|
60
|
+
|
|
61
|
+
[project.scripts]
|
|
62
|
+
nfit = "nfit.project_gui:main"
|
|
63
|
+
|
|
64
|
+
[project.optional-dependencies]
|
|
65
|
+
distribution = [
|
|
66
|
+
"pyinstaller>=6.22,<7",
|
|
67
|
+
]
|
|
68
|
+
dev = [
|
|
69
|
+
"build>=1",
|
|
70
|
+
"pytest>=7",
|
|
71
|
+
"pytest-cov>=5",
|
|
72
|
+
"ruff>=0.12",
|
|
73
|
+
"twine>=5",
|
|
74
|
+
"numba>=0.67",
|
|
75
|
+
# Source of the vendored magnetic form-factor tables (Brown, International
|
|
76
|
+
# Tables C 4.4.5). Only needed to regenerate them and to run the drift test
|
|
77
|
+
# that re-derives them; nfit itself has no runtime dependency on it, so a
|
|
78
|
+
# published result never changes because this package was updated.
|
|
79
|
+
"periodictable>=1.7",
|
|
80
|
+
]
|
|
81
|
+
# Accelerated compute backends for large spin-fluctuation fits. Both are
|
|
82
|
+
# optional: nfit falls back to numpy when they are absent, and selects a
|
|
83
|
+
# backend by problem size (see nfit.set_rpa_backend).
|
|
84
|
+
accel = [
|
|
85
|
+
"numba>=0.67",
|
|
86
|
+
]
|
|
87
|
+
# GPU backend. Install the CuPy wheel matching your CUDA toolkit, e.g.
|
|
88
|
+
# `pip install cupy-cuda12x`; the generic `cupy` sdist requires a local CUDA
|
|
89
|
+
# build. AMD ROCm builds of CuPy also work.
|
|
90
|
+
gpu = [
|
|
91
|
+
"cupy>=12",
|
|
92
|
+
]
|
|
93
|
+
docs = [
|
|
94
|
+
"sphinx>=9.1,<10",
|
|
95
|
+
"myst-parser>=5.1,<6",
|
|
96
|
+
"sphinx-copybutton>=0.5",
|
|
97
|
+
"furo>=2025.12.19",
|
|
98
|
+
]
|
|
99
|
+
|
|
100
|
+
[tool.setuptools.package-data]
|
|
101
|
+
nfit = ["resources/*.png"]
|
|
102
|
+
|
|
103
|
+
[tool.setuptools.packages.find]
|
|
104
|
+
where = ["src"]
|
|
105
|
+
|
|
106
|
+
[tool.pytest.ini_options]
|
|
107
|
+
testpaths = ["tests"]
|
|
108
|
+
addopts = "-ra"
|
|
109
|
+
|
|
110
|
+
[tool.coverage.run]
|
|
111
|
+
branch = true
|
|
112
|
+
source = ["nfit"]
|
|
113
|
+
|
|
114
|
+
[tool.coverage.report]
|
|
115
|
+
fail_under = 75
|
|
116
|
+
show_missing = true
|
|
117
|
+
skip_covered = true
|
|
118
|
+
|
|
119
|
+
[tool.ruff]
|
|
120
|
+
target-version = "py312"
|
|
121
|
+
line-length = 100
|
|
122
|
+
extend-exclude = ["src/nfit.egg-info"]
|
|
123
|
+
|
|
124
|
+
[tool.ruff.lint]
|
|
125
|
+
select = ["E", "F", "I", "UP", "B"]
|
|
126
|
+
ignore = [
|
|
127
|
+
"E501", # Adopt line wrapping separately from the initial lint rollout.
|
|
128
|
+
"E741", # H, K, L are conventional reciprocal-space coordinates.
|
|
129
|
+
"UP040", # Preserve the runtime values of public type aliases.
|
|
130
|
+
]
|
nfit-0.89.12/setup.cfg
ADDED