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

Huge changes... LMFIT, better histogram filling logic, UI for doing the histogramming with parquet files #5

Merged
merged 21 commits into from
Nov 13, 2024

Conversation

alconley
Copy link
Owner

Changed all the Gaussian fitting to use pythons lmfit module. I did this since I felt like i was reinventing the wheel for a lot of the code. It makes the fitting a little slower but way easier for me to add stuff in the future. Also, we now fill row by row in parallel using the rayon crate. For large datasets, I would run out of memory however now we take chucks of the lazyframe, and performing the filling. Currently the chunks are set to 10 million rows. The total filling time also decreased drastically. Finally, the ui for adding histograms and added new columns to the data was completely reworked. Cuts can also be added to specific histograms.

	deleted:    src/fitter/background_fitter.rs
	modified:   src/fitter/fit_handler.rs
	modified:   src/fitter/fit_settings.rs
	modified:   src/fitter/main_fitter.rs
	modified:   src/fitter/mod.rs
	deleted:    src/fitter/models/double_exponential.rs
	deleted:    src/fitter/models/exponential.rs
	modified:   src/fitter/models/gaussian.rs
	modified:   src/fitter/models/mod.rs
	deleted:    src/fitter/models/polynomial.rs
	modified:   src/histoer/histo1d/context_menu.rs
	modified:   src/histoer/histo1d/histogram1d.rs
	modified:   src/histoer/histo1d/keybinds.rs
	modified:   src/histoer/histo1d/peak_finder.rs
	modified:   src/histogram_scripter/manual_histogram_script.rs
	modified:   src/egui_plot_stuff/egui_line.rs
	new file:   src/fitter/common.rs
	modified:   src/fitter/fit_handler.rs
	modified:   src/fitter/fit_settings.rs
	modified:   src/fitter/main_fitter.rs
	modified:   src/fitter/mod.rs
	modified:   src/fitter/models/gaussian.rs
	new file:   src/fitter/models/linear.rs
	modified:   src/fitter/models/mod.rs
	modified:   src/histoer/histo1d/histogram1d.rs
	modified:   src/histoer/histo1d/keybinds.rs
	modified:   src/fitter/common.rs
	modified:   src/fitter/fit_handler.rs
	modified:   src/fitter/fit_settings.rs
	modified:   src/fitter/main_fitter.rs
	modified:   src/fitter/mod.rs
	new file:   src/fitter/models/exponential.rs
	modified:   src/fitter/models/linear.rs
	modified:   src/fitter/models/mod.rs
	new file:   src/fitter/models/powerlaw.rs
	new file:   src/fitter/models/quadratic.rs
	modified:   src/histoer/histo1d/histogram1d.rs
	modified:   src/egui_plot_stuff/colors.rs
	modified:   src/fitter/fit_settings.rs
	modified:   src/fitter/main_fitter.rs
	modified:   src/fitter/models/gaussian.rs
	modified:   src/fitter/models/mod.rs
	modified:   src/histoer/histo1d/histogram1d.rs
	modified:   src/histogram_scripter/manual_histogram_script.rs
	modified:   src/egui_plot_stuff/egui_line.rs
	modified:   src/fitter/common.rs
	modified:   src/fitter/fit_handler.rs
	modified:   src/fitter/fit_settings.rs
	modified:   src/fitter/main_fitter.rs
	modified:   src/fitter/models/exponential.rs
	modified:   src/fitter/models/gaussian.rs
	modified:   src/fitter/models/linear.rs
	modified:   src/fitter/models/mod.rs
	modified:   src/fitter/models/powerlaw.rs
	modified:   src/fitter/models/quadratic.rs
	modified:   src/histoer/histo1d/histogram1d.rs
	modified:   src/histogram_scripter/manual_histogram_script.rs
	renamed:    lmfit_test.py -> tests/lmfit_test.py
	modified:   .github/workflows/rust.yml
	new file:   requirements.txt
	modified:   src/histoer/histo1d/peak_finder.rs
	modified:   src/histogram_scripter/manual_histogram_script.rs
	modified:   src/egui_plot_stuff/egui_plot_settings.rs
	modified:   src/fitter/main_fitter.rs
	modified:   src/fitter/models/exponential.rs
	modified:   src/fitter/models/linear.rs
	modified:   src/fitter/models/powerlaw.rs
	modified:   src/fitter/models/quadratic.rs
	modified:   src/histoer/histo1d/keybinds.rs
	modified:   src/histoer/histo1d/peak_finder.rs
	modified:   src/histoer/histo2d/projections.rs
	modified:   src/histoer/histogrammer.rs
	modified:   src/histoer/tree.rs
	modified:   src/histogram_scripter/manual_histogram_script.rs
	modified:   src/util/processer.rs
	modified:   src/histoer/histogrammer.rs
	modified:   src/histoer/tree.rs
	modified:   src/histogram_scripter/histogram_script.rs
	modified:   src/histogram_scripter/manual_histogram_script.rs
	modified:   src/util/processer.rs
	modified:   src/histoer/histo1d/context_menu.rs
	modified:   src/histoer/histogrammer.rs
	modified:   src/histoer/tree.rs
	modified:   src/histogram_scripter/manual_histogram_script.rs
	modified:   src/ui/app.rs
	modified:   src/histoer/histo2d/statistics.rs
	modified:   src/histoer/histogrammer.rs
	modified:   src/histogram_scripter/manual_histogram_script.rs
…with a large dataset

	modified:   Cargo.lock
	modified:   Cargo.toml
	modified:   src/histoer/histo1d/histogram1d.rs
	modified:   src/histoer/histo1d/statistics.rs
	modified:   src/histoer/histo2d/histogram2d.rs
	modified:   src/histoer/histo2d/statistics.rs
	modified:   src/histoer/histogrammer.rs
	deleted:    src/histogram_scripter/configure_auxillary_detectors.rs
	modified:   src/histogram_scripter/histogram_script.rs
	deleted:    src/histogram_scripter/histogram_ui_elements.rs
	modified:   src/histogram_scripter/manual_histogram_script.rs
	modified:   src/histogram_scripter/mod.rs
	modified:   src/util/processer.rs
	deleted:    assets/hist1d_fitting.gif
	deleted:    assets/projection_example.gif
	modified:   src/histoer/histo2d/histogram2d.rs
	modified:   src/histoer/histogrammer.rs
	modified:   src/histogram_scripter/histogram_script.rs
	renamed:    src/histogram_scripter/manual_histogram_script.rs -> src/histogram_scripter/manual_histogram_scripts.rs
	modified:   src/histogram_scripter/mod.rs
	modified:   src/ui/app.rs
	modified:   src/util/processer.rs
	modified:   Cargo.lock
	modified:   Cargo.toml
	modified:   src/histoer/histo1d/histogram1d.rs
	modified:   src/histoer/histo2d/histogram2d.rs
	modified:   src/histoer/histogrammer.rs
	modified:   src/histogram_scripter/histogram_script.rs
	modified:   src/util/processer.rs
	modified:   src/histogram_scripter/histogram_script.rs
	modified:   src/histogram_scripter/manual_histogram_scripts.rs
	modified:   src/ui/app.rs
	modified:   src/cutter/cuts.rs
	modified:   src/egui_plot_stuff/colors.rs
	modified:   src/egui_plot_stuff/egui_polygon.rs
	modified:   src/histoer/histogrammer.rs
	deleted:    src/histogram_scripter/configure_lazyframes.rs
	modified:   src/histogram_scripter/histogram_script.rs
	modified:   src/histogram_scripter/mod.rs
	modified:   src/util/processer.rs
	modified:   src/egui_plot_stuff/egui_plot_settings.rs
	modified:   src/histoer/histo1d/histogram1d.rs
	modified:   README.md
	modified:   src/egui_plot_stuff/egui_horizontal_line.rs
	modified:   src/egui_plot_stuff/egui_vertical_line.rs
	modified:   src/histoer/histo1d/histogram1d.rs
	modified:   src/histoer/histo1d/plot_settings.rs
	modified:   src/histoer/histo2d/histogram2d.rs
	modified:   src/histoer/histo2d/projections.rs
	modified:   src/histoer/histogrammer.rs
@alconley alconley merged commit 31128c0 into master Nov 13, 2024
12 checks passed
@alconley alconley deleted the lmfit_as_fitter branch November 13, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant