Skip to content

various improvements july26 - #59

Merged
DanPorter merged 18 commits into
mainfrom
dp/various_xas_improvements_july26
Aug 4, 2026
Merged

various improvements july26#59
DanPorter merged 18 commits into
mainfrom
dp/various_xas_improvements_july26

Conversation

@DanPorter

@DanPorter DanPorter commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Various improvements and fixes, plus additions to the documentation and examples.

Alignment for XAS Spectra

ROI definition improvements

  • add_roi added to Experiment
  • Locally defined rois are now propagated properly
  • additional documentation and examples added (Fix for document ROI functionality #51 )

2D mesh grids

NexusScan Time functions

  • add NexusScan.start_end_duration()
  • add default to NexusScan.times()
  • add NexusScan.get_scan_time()
  • add get_file_time() to file_functions.py
  • add use_time option to ExperimentPlotManager.metadata

NexusScan improvements

  • NexusScan.scans() can now accept NexusScan as input, preserving the local_data and namespace
  • add NexusScan.get_max_index()

New misc functions

TKGUI

  • some minor improvements,
  • add copy scan number to scan selector
  • add copy code to ROI editor

DanPorter added 18 commits July 28, 2026 11:22
## spectra_analysis.py
 - add find_shift

## spectra.py
 - add shift()

## spectra_container.py
 - add align_spectra to average and subtraction
 - add plot()

## tests
 - add tests
## hdfmap_generic.py
 - add ROI_SUFFIXES

## nexus_scan.py
 - add rois()

## nxxas_loader.py
 - add custom ROI on i16 vortext load.
## experiment.py
 - replaced _scan_numbers with all_scan_numbers
 - allow scans to be loaded from NexusScan objects
 - add get_scan_number()
 - add get_nearby_scan_numbers()
 - improved find_scans
 - add get_value_changes()

Add examples and tests.

All tests pass.

## xas/container_functions.py
 - add find_similar_measurements
Also add tests for NexusScan and improve doc strings
## nexus_scan.py
 - add NexusScan.start_end_duration()
 - add default to NexusScan.times()
 - add NexusScan.get_scan_time()

## file_functions.py
 - add get_file_time()

## exp_plot_manager.py
 - add use_time option to ExperimentPlotManager.metadata
## surface_grid.py
 - add algorithms for creating 2D mesh from coordinates
 - Fix for issue #49
 - add test to test_utils.py

## experiment.py
 - add option to Experiment.generate_mesh

## example_2d_surface_scans.py
 - add example
 - fix for #50

All tests pass.
## nexus_scan.py
 - add NexusScan.replace_default_names()

## misc_functions.py
 - add multi_replace()

## fit_functions.py
 - add guess for model_fit()

## fitting/results.py
 - add yinit parameter

## Examples
 - improve example_peak_fits.py
 - improve peak_fitting.md
 - add example_peak_fits2.py as old version
## nexus_scan.py
 - add NexusScan.replace_default_names()
 - change to NexusScan.get_plot_axis() to include expressions.

## misc_functions.py
 - add multi_replace()

## fit_functions.py
 - add guess for model_fit()

## fitting/results.py
 - add yinit parameter

## Examples
 - improve example_peak_fits.py
 - improve peak_fitting.md
 - add example_peak_fits2.py as old version
…26' into dp/various_xas_improvements_july26

# Conflicts:
#	mmg_toolbox/nexus/nexus_scan.py
## nexus_scan.py
 - add NexusScan.save(), .save_nxdata(), and .save_csv()
 - add load functions to load the saved data.
 - add tests

All tests pass.
## tkgui/widgets/scan_selector.py
 - add copy scan number and copy metadata to right click menu
## Added misc/phase_plates.py
 - misc is location or arbitary analysis code
 - plate_plates.py contains normalisation "vimpire teeth" analysis from Py16.plotqbpm
 - Code needs refinement but it works
 - Tests needed
 - Fix for issue #34

## scripts
 - added qbpm_script.py
@DanPorter
DanPorter merged commit 257e31e into main Aug 4, 2026
10 checks passed
@DanPorter
DanPorter deleted the dp/various_xas_improvements_july26 branch August 4, 2026 15:31
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