MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / test_fit_xrf_map2

Function test_fit_xrf_map2

pyxrf/core/tests/test_map_processing.py:910–943  ·  view source on GitHub ↗

Basic functionality of `fit_xrf_map`. Tests are run using global Dask clients to inprove testing speed.

()

Source from the content-addressed store, hash-verified

908
909
910def test_fit_xrf_map2():
911 """
912 Basic functionality of `fit_xrf_map`.
913 Tests are run using global Dask clients to inprove testing speed.
914 """
915
916 dataset_params = {"n_data_dimensions": (20, 20)}
917 add_pts_before, add_pts_after = 15, 10
918 use_snip = False
919
920 ft = _FitXRFMapTesting(
921 dataset_params=dataset_params,
922 use_snip=use_snip,
923 add_pts_before=add_pts_before,
924 add_pts_after=add_pts_after,
925 )
926
927 # Just run the test with input data represented as numpy array
928 data = ft.data_input
929
930 # Run fitting
931 data_out = fit_xrf_map(
932 data,
933 data_sel_indices=ft.data_sel_indices,
934 matv=ft.spectra,
935 snip_param=ft.snip_param,
936 use_snip=use_snip,
937 chunk_pixels=10,
938 n_chunks_min=4,
939 progress_bar=None,
940 client=None,
941 )
942
943 ft.verify_fit_output(data_out=data_out, snip_param=ft.snip_param)
944
945
946# fmt: off

Callers

nothing calls this directly

Calls 3

fit_xrf_mapFunction · 0.90
_FitXRFMapTestingClass · 0.85
verify_fit_outputMethod · 0.80

Tested by

no test coverage detected