diff --git a/specsanalyzer/develop/_modules/index.html b/specsanalyzer/develop/_modules/index.html index d2e7b1b..49e6f25 100644 --- a/specsanalyzer/develop/_modules/index.html +++ b/specsanalyzer/develop/_modules/index.html @@ -7,7 +7,7 @@
-specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+specsanalyzer 0.5.2.dev10+g554f714 documentation
diff --git a/specsanalyzer/develop/_modules/specsanalyzer/config.html b/specsanalyzer/develop/_modules/specsanalyzer/config.html index 4ca22ab..39ff3e9 100644 --- a/specsanalyzer/develop/_modules/specsanalyzer/config.html +++ b/specsanalyzer/develop/_modules/specsanalyzer/config.html @@ -7,7 +7,7 @@ -specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -551,22 +551,39 @@
"""This module contains a config library for loading yaml/json files into dicts"""
-from __future__ import annotations
+from __future__ import annotations
-import json
-import os
-import platform
-from importlib.util import find_spec
-from pathlib import Path
+import json
+import os
+import platform
+from importlib.util import find_spec
+from pathlib import Path
-import yaml
+import yaml
+from platformdirs import user_config_path
+
+from specsanalyzer.logging import setup_logging
package_dir = os.path.dirname(find_spec("specsanalyzer").origin)
+USER_CONFIG_PATH = user_config_path(
+ appname="specsanalyzer",
+ appauthor="OpenCOMPES",
+ ensure_exists=True,
+)
+SYSTEM_CONFIG_PATH = (
+ Path(os.environ["ALLUSERSPROFILE"]).joinpath("specsanalyzer")
+ if platform.system() == "Windows"
+ else Path("/etc/").joinpath("specsanalyzer")
+)
+
+# Configure logging
+logger = setup_logging("config")
+
[docs]
-def parse_config(
+def parse_config(
config: dict | str = None,
folder_config: dict | str = None,
user_config: dict | str = None,
@@ -590,12 +607,13 @@ Source code for specsanalyzer.config
user_config (dict | str, optional): user-based config dictionary
or file path. The loaded dictionary is completed with the user-based values,
taking preference over system and default values.
- Defaults to the file ".specsanalyzer/config.yaml" in the current user's home directory.
+ Defaults to the file ".config/specsanalyzer/config_v1.yaml" in the current user's home
+ directory.
system_config (dict | str, optional): system-wide config dictionary
or file path. The loaded dictionary is completed with the system-wide values,
taking preference over default values.
- Defaults to the file "/etc/specsanalyzer/config.yaml" on linux,
- and "%ALLUSERSPROFILE%/specsanalyzer/config.yaml" on windows.
+ Defaults to the file "/etc/specsanalyzer/config_v1.yaml" on linux,
+ and "%ALLUSERSPROFILE%/specsanalyzer/config_v1.yaml" on windows.
default_config (dict | str, optional): default config dictionary
or file path. The loaded dictionary is completed with the default values.
Defaults to *package_dir*/config/default.yaml".
@@ -615,7 +633,7 @@ Source code for specsanalyzer.config
else:
config_dict = load_config(config)
if verbose:
- print(f"Configuration loaded from: [{str(Path(config).resolve())}]")
+ logger.info(f"Configuration loaded from: [{str(Path(config).resolve())}]")
folder_dict: dict = None
if isinstance(folder_config, dict):
@@ -626,47 +644,36 @@ Source code for specsanalyzer.config
if Path(folder_config).exists():
folder_dict = load_config(folder_config)
if verbose:
- print(f"Folder config loaded from: [{str(Path(folder_config).resolve())}]")
+ logger.info(f"Folder config loaded from: [{str(Path(folder_config).resolve())}]")
user_dict: dict = None
if isinstance(user_config, dict):
user_dict = user_config
else:
if user_config is None:
- user_config = str(
- Path.home().joinpath(".specsanalyzer").joinpath("config.yaml"),
- )
+ user_config = str(USER_CONFIG_PATH.joinpath("config_v1.yaml"))
if Path(user_config).exists():
user_dict = load_config(user_config)
if verbose:
- print(f"User config loaded from: [{str(Path(user_config).resolve())}]")
+ logger.info(f"User config loaded from: [{str(Path(user_config).resolve())}]")
system_dict: dict = None
if isinstance(system_config, dict):
system_dict = system_config
else:
if system_config is None:
- if platform.system() in ["Linux", "Darwin"]:
- system_config = str(
- Path("/etc/").joinpath("specsanalyzer").joinpath("config.yaml"),
- )
- elif platform.system() == "Windows":
- system_config = str(
- Path(os.environ["ALLUSERSPROFILE"])
- .joinpath("specsanalyzer")
- .joinpath("config.yaml"),
- )
+ system_config = str(SYSTEM_CONFIG_PATH.joinpath("config_v1.yaml"))
if Path(system_config).exists():
system_dict = load_config(system_config)
if verbose:
- print(f"System config loaded from: [{str(Path(system_config).resolve())}]")
+ logger.info(f"System config loaded from: [{str(Path(system_config).resolve())}]")
if isinstance(default_config, dict):
default_dict = default_config
else:
default_dict = load_config(default_config)
if verbose:
- print(f"Default config loaded from: [{str(Path(default_config).resolve())}]")
+ logger.info(f"Default config loaded from: [{str(Path(default_config).resolve())}]")
if folder_dict is not None:
config_dict = complete_dictionary(
@@ -694,7 +701,7 @@ Source code for specsanalyzer.config
[docs]
-def load_config(config_path: str) -> dict:
+def load_config(config_path: str) -> dict:
"""Loads config parameter files.
Args:
@@ -728,7 +735,7 @@ Source code for specsanalyzer.config
[docs]
-def save_config(config_dict: dict, config_path: str, overwrite: bool = False):
+def save_config(config_dict: dict, config_path: str, overwrite: bool = False):
"""Function to save a given config dictionary to a json or yaml file. Normally, it loads any
existing file of the given name, and keeps any existing dictionary keys not present in the
provided dictionary. The overwrite option creates a fully empty dictionary first.
@@ -761,7 +768,7 @@ Source code for specsanalyzer.config
[docs]
-def complete_dictionary(dictionary: dict, base_dictionary: dict) -> dict:
+def complete_dictionary(dictionary: dict, base_dictionary: dict) -> dict:
"""Iteratively completes a dictionary from a base dictionary, by adding keys that are missing
in the dictionary, and are present in the base dictionary.
@@ -790,6 +797,94 @@ Source code for specsanalyzer.config
return dictionary
+
+
+def _parse_env_file(file_path: Path) -> dict:
+ """Helper function to parse a .env file into a dictionary.
+
+ Args:
+ file_path (Path): Path to the .env file
+
+ Returns:
+ dict: Dictionary of environment variables from the file
+ """
+ env_content = {}
+ if file_path.exists():
+ with open(file_path) as f:
+ for line in f:
+ line = line.strip()
+ if line and "=" in line:
+ key, val = line.split("=", 1)
+ env_content[key.strip()] = val.strip()
+ return env_content
+
+
+
+[docs]
+def read_env_var(var_name: str) -> str | None:
+ """Read an environment variable from multiple locations in order:
+ 1. OS environment variables
+ 2. .env file in current directory
+ 3. .env file in user config directory
+ 4. .env file in system config directory
+
+ Args:
+ var_name (str): Name of the environment variable to read
+
+ Returns:
+ str | None: Value of the environment variable or None if not found
+ """
+ # 1. check OS environment variables
+ value = os.getenv(var_name)
+ if value is not None:
+ logger.debug(f"Found {var_name} in OS environment variables")
+ return value
+
+ # 2. check .env in current directory
+ local_vars = _parse_env_file(Path(".env"))
+ if var_name in local_vars:
+ logger.debug(f"Found {var_name} in ./.env file")
+ return local_vars[var_name]
+
+ # 3. check .env in user config directory
+ user_vars = _parse_env_file(USER_CONFIG_PATH / ".env")
+ if var_name in user_vars:
+ logger.debug(f"Found {var_name} in user config .env file")
+ return user_vars[var_name]
+
+ # 4. check .env in system config directory
+ system_vars = _parse_env_file(SYSTEM_CONFIG_PATH / ".env")
+ if var_name in system_vars:
+ logger.debug(f"Found {var_name} in system config .env file")
+ return system_vars[var_name]
+
+ logger.debug(f"Environment variable {var_name} not found in any location")
+ return None
+
+
+
+
+[docs]
+def save_env_var(var_name: str, value: str) -> None:
+ """Save an environment variable to the .env file in the user config directory.
+ If the file exists, preserves other variables. If not, creates a new file.
+
+ Args:
+ var_name (str): Name of the environment variable to save
+ value (str): Value to save for the environment variable
+ """
+ env_path = USER_CONFIG_PATH / ".env"
+ env_content = _parse_env_file(env_path)
+
+ # Update or add new variable
+ env_content[var_name] = value
+
+ # Write all variables back to file
+ with open(env_path, "w") as f:
+ for key, val in env_content.items():
+ f.write(f"{key}={val}\n")
+ logger.debug(f"Environment variable {var_name} saved to .env file")
+
diff --git a/specsanalyzer/develop/_modules/specsanalyzer/convert.html b/specsanalyzer/develop/_modules/specsanalyzer/convert.html
index 56f2a50..4de742a 100644
--- a/specsanalyzer/develop/_modules/specsanalyzer/convert.html
+++ b/specsanalyzer/develop/_modules/specsanalyzer/convert.html
@@ -7,7 +7,7 @@
- specsanalyzer.convert — specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsanalyzer.convert — specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -29,7 +29,7 @@
-
+
@@ -37,7 +37,7 @@
-
+
@@ -46,7 +46,7 @@
@@ -54,7 +54,7 @@
-
+
@@ -116,7 +116,7 @@
- specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -551,15 +551,20 @@
Source code for specsanalyzer.convert
"""Specsanalyzer image conversion module"""
-from __future__ import annotations
+from __future__ import annotations
-import numpy as np
-from scipy.ndimage import map_coordinates
+import logging
+
+import numpy as np
+from scipy.ndimage import map_coordinates
+
+# Configure logging
+logger = logging.getLogger("specsanalyzer.specsscan")
[docs]
-def get_damatrix_from_calib2d(
+def get_damatrix_from_calib2d(
lens_mode: str,
kinetic_energy: float,
pass_energy: float,
@@ -594,7 +599,7 @@ Source code for specsanalyzer.convert
except KeyError as exc:
raise KeyError(
"The supported modes were not found in the calib2d dictionary",
- ) from exc
+ ) from exc
if lens_mode in supported_angle_modes:
# given the lens mode get all the retardation ratios available
@@ -636,7 +641,7 @@ Source code for specsanalyzer.convert
elif lens_mode in supported_space_modes:
# use the mode defaults
- print("This is a spatial mode, using default " + lens_mode + " config")
+ logger.info("This is a spatial mode, using default " + lens_mode + " config")
rr_vec, da_matrix_full = get_rr_da(lens_mode, calib2d_dict)
a_inner = da_matrix_full[0][0]
da_matrix = da_matrix_full[1:][:]
@@ -653,7 +658,7 @@ Source code for specsanalyzer.convert
[docs]
-def bisection(array: np.ndarray, value: float) -> int:
+def bisection(array: np.ndarray, value: float) -> int:
"""
Auxiliary function to find the closest rr index from https://stackoverflow.com/questions/2566412/
find-nearest-value-in-numpy-array
@@ -697,7 +702,7 @@ Source code for specsanalyzer.convert
[docs]
-def second_closest_rr(rrvec: np.ndarray, closest_rr_index: int) -> int:
+def second_closest_rr(rrvec: np.ndarray, closest_rr_index: int) -> int:
"""Return closest_rr_index+1 unless you are at the edge of the rrvec.
Args:
@@ -719,7 +724,7 @@ Source code for specsanalyzer.convert
[docs]
-def get_rr_da(
+def get_rr_da(
lens_mode: str,
calib2d_dict: dict,
) -> tuple[np.ndarray, np.ndarray]:
@@ -748,7 +753,7 @@ Source code for specsanalyzer.convert
except KeyError as exc:
raise KeyError(
"The supported modes were not found in the calib2d dictionary",
- ) from exc
+ ) from exc
if lens_mode in supported_angle_modes:
rr_array = np.array(list(calib2d_dict[lens_mode]["rr"]))
@@ -762,7 +767,7 @@ Source code for specsanalyzer.convert
except KeyError as exc:
raise ValueError(
"Da values do not exist for the given mode.",
- ) from exc
+ ) from exc
da_matrix = np.zeros([dim1, dim2, dim3])
for count, item in enumerate(rr_array):
@@ -796,7 +801,7 @@ Source code for specsanalyzer.convert
[docs]
-def calculate_polynomial_coef_da(
+def calculate_polynomial_coef_da(
da_matrix: np.ndarray,
kinetic_energy: float,
pass_energy: float,
@@ -838,7 +843,7 @@ Source code for specsanalyzer.convert
[docs]
-def zinner(
+def zinner(
kinetic_energy: np.ndarray,
angle: np.ndarray,
da_poly_matrix: np.ndarray,
@@ -869,7 +874,7 @@ Source code for specsanalyzer.convert
[docs]
-def zinner_diff(
+def zinner_diff(
kinetic_energy: np.ndarray,
angle: np.ndarray,
da_poly_matrix: np.ndarray,
@@ -904,7 +909,7 @@ Source code for specsanalyzer.convert
[docs]
-def mcp_position_mm(
+def mcp_position_mm(
kinetic_energy: np.ndarray,
angle: np.ndarray,
a_inner: float,
@@ -945,7 +950,7 @@ Source code for specsanalyzer.convert
[docs]
-def calculate_matrix_correction(
+def calculate_matrix_correction(
kinetic_energy: float,
pass_energy: float,
nx_pixels: int,
@@ -1039,7 +1044,7 @@ Source code for specsanalyzer.convert
[docs]
-def calculate_jacobian(
+def calculate_jacobian(
angular_correction_matrix: np.ndarray,
e_correction: np.ndarray,
ek_axis: np.ndarray,
@@ -1067,7 +1072,7 @@ Source code for specsanalyzer.convert
[docs]
-def physical_unit_data(
+def physical_unit_data(
image: np.ndarray,
angular_correction_matrix: np.ndarray,
e_correction: float,
diff --git a/specsanalyzer/develop/_modules/specsanalyzer/core.html b/specsanalyzer/develop/_modules/specsanalyzer/core.html
index 692dc0d..5b2a040 100644
--- a/specsanalyzer/develop/_modules/specsanalyzer/core.html
+++ b/specsanalyzer/develop/_modules/specsanalyzer/core.html
@@ -7,7 +7,7 @@
- specsanalyzer.core — specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsanalyzer.core — specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -29,7 +29,7 @@
-
+
@@ -37,7 +37,7 @@
-
+
@@ -46,7 +46,7 @@
@@ -54,7 +54,7 @@
-
+
@@ -116,7 +116,7 @@
- specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -551,35 +551,39 @@
Source code for specsanalyzer.core
"""This is the specsanalyzer core class"""
-from __future__ import annotations
-
-import os
-from typing import Any
-from typing import Generator
-
-import imutils
-import ipywidgets as ipw
-import matplotlib
-import matplotlib.pyplot as plt
-import numpy as np
-import xarray as xr
-from IPython.display import display
-
-from specsanalyzer import io
-from specsanalyzer.config import complete_dictionary
-from specsanalyzer.config import parse_config
-from specsanalyzer.convert import calculate_matrix_correction
-from specsanalyzer.convert import get_damatrix_from_calib2d
-from specsanalyzer.convert import physical_unit_data
-from specsanalyzer.img_tools import crop_xarray
-from specsanalyzer.img_tools import fourier_filter_2d
+from __future__ import annotations
+
+import os
+from typing import Any
+
+import imutils
+import ipywidgets as ipw
+import matplotlib
+import matplotlib.pyplot as plt
+import numpy as np
+import xarray as xr
+from IPython.display import display
+
+from specsanalyzer import io
+from specsanalyzer.config import complete_dictionary
+from specsanalyzer.config import parse_config
+from specsanalyzer.convert import calculate_matrix_correction
+from specsanalyzer.convert import get_damatrix_from_calib2d
+from specsanalyzer.convert import physical_unit_data
+from specsanalyzer.img_tools import crop_xarray
+from specsanalyzer.img_tools import fourier_filter_2d
+from specsanalyzer.logging import set_verbosity
+from specsanalyzer.logging import setup_logging
package_dir = os.path.dirname(__file__)
+# Configure logging
+logger = setup_logging("specsanalyzer")
+
[docs]
-class SpecsAnalyzer:
+class SpecsAnalyzer:
"""SpecsAnalyzer: A class to convert photoemission data from a SPECS Phoibos analyzer from
camera image coordinates into physical units (energy, angle, position).
@@ -589,10 +593,11 @@ Source code for specsanalyzer.core
**kwds: Keyword arguments passed to ``parse_config``.
"""
- def __init__(
+ def __init__(
self,
metadata: dict[Any, Any] = {},
config: dict[Any, Any] | str = {},
+ verbose: bool = True,
**kwds,
):
"""SpecsAnalyzer constructor.
@@ -600,12 +605,14 @@ Source code for specsanalyzer.core
Args:
metadata (dict, optional): Metadata dictionary. Defaults to {}.
config (dict | str, optional): Metadata dictionary or file path. Defaults to {}.
+ verbose (bool, optional): Disable info logs if set to False.
**kwds: Keyword arguments passed to ``parse_config``.
"""
self._config = parse_config(
config,
**kwds,
)
+ set_verbosity(logger, verbose)
self.metadata = metadata
self._data_array = None
self.print_msg = True
@@ -619,7 +626,7 @@ Source code for specsanalyzer.core
self._correction_matrix_dict: dict[Any, Any] = {}
- def __repr__(self):
+ def __repr__(self):
if self._config is None:
pretty_str = "No configuration available"
else:
@@ -630,23 +637,23 @@ Source code for specsanalyzer.core
return pretty_str if pretty_str is not None else ""
@property
- def config(self) -> dict:
+ def config(self) -> dict:
"""Get config"""
return self._config
@property
- def calib2d(self) -> dict:
+ def calib2d(self) -> dict:
"""Get calib2d dict"""
return self._calib2d
@property
- def correction_matrix_dict(self) -> dict:
+ def correction_matrix_dict(self) -> dict:
"""Get correction_matrix_dict"""
return self._correction_matrix_dict
[docs]
- def convert_image(
+ def convert_image(
self,
raw_img: np.ndarray,
lens_mode: str,
@@ -843,7 +850,7 @@ Source code for specsanalyzer.core
ek_min = range_dict["ek_min"]
ek_max = range_dict["ek_max"]
if self.print_msg:
- print("Using saved crop parameters...")
+ logger.info("Using saved crop parameters...")
data_array = crop_xarray(data_array, ang_min, ang_max, ek_min, ek_max)
except KeyError:
try:
@@ -900,11 +907,13 @@ Source code for specsanalyzer.core
+ data_array.coords[data_array.dims[1]][0]
)
if self.print_msg:
- print("Cropping parameters not found, using cropping ranges from config...")
+ logger.info(
+ "Cropping parameters not found, using cropping ranges from config...",
+ )
data_array = crop_xarray(data_array, ang_min, ang_max, ek_min, ek_max)
except KeyError:
if self.print_msg:
- print(
+ logger.warning(
"Warning: Cropping parameters not found, "
"use method crop_tool() after loading.",
)
@@ -914,7 +923,7 @@ Source code for specsanalyzer.core
[docs]
- def crop_tool(
+ def crop_tool(
self,
raw_img: np.ndarray,
lens_mode: str,
@@ -941,6 +950,8 @@ Source code for specsanalyzer.core
- ek_range_max
- ang_range_min
- ang_range_max
+ - angle_offset_px
+ - rotation_angle
Other parameters are passed to ``convert_image()``.
"""
@@ -960,7 +971,7 @@ Source code for specsanalyzer.core
try:
mesh_obj = data_array.plot(ax=ax)
except AttributeError:
- print("Load the scan first!")
+ logger.info("Load the scan first!")
raise
lineh1 = ax.axhline(y=data_array.Angle[0])
@@ -1032,6 +1043,15 @@ Source code for specsanalyzer.core
vline_range = [ek_min, ek_max]
hline_range = [ang_min, ang_max]
+ angle_offset_px = kwds.get("angle_offset_px", self._config.get("angle_offset_px", 0))
+ rotation_angle = kwds.get("rotation_angle", self._config.get("rotation_angle", 0))
+
+ clim_slider = ipw.FloatRangeSlider(
+ description="colorbar limits",
+ value=[data_array.data.min(), data_array.data.max()],
+ min=data_array.data.min(),
+ max=data_array.data.max(),
+ )
vline_slider = ipw.FloatRangeSlider(
description="Ekin",
value=vline_range,
@@ -1046,14 +1066,33 @@ Source code for specsanalyzer.core
max=data_array.Angle[-1],
step=0.1,
)
- clim_slider = ipw.FloatRangeSlider(
- description="colorbar limits",
- value=[data_array.data.min(), data_array.data.max()],
- min=data_array.data.min(),
- max=data_array.data.max(),
+ ang_offset_slider = ipw.FloatSlider(
+ description="Angle offset",
+ value=angle_offset_px,
+ min=-20,
+ max=20,
+ step=1,
+ )
+ rotation_slider = ipw.FloatSlider(
+ description="Rotation angle",
+ value=rotation_angle,
+ min=-5,
+ max=5,
+ step=0.1,
)
- def update(hline, vline, v_vals):
+ def update(hline, vline, v_vals, angle_offset_px, rotation_angle):
+ data_array = self.convert_image(
+ raw_img=raw_img,
+ lens_mode=lens_mode,
+ kinetic_energy=kinetic_energy,
+ pass_energy=pass_energy,
+ work_function=work_function,
+ crop=False,
+ angle_offset_px=angle_offset_px,
+ rotation_angle=rotation_angle,
+ )
+ mesh_obj.update({"array": data_array.data})
lineh1.set_ydata([hline[0]])
lineh2.set_ydata([hline[1]])
linev1.set_xdata([vline[0]])
@@ -1066,9 +1105,11 @@ Source code for specsanalyzer.core
hline=hline_slider,
vline=vline_slider,
v_vals=clim_slider,
+ angle_offset_px=ang_offset_slider,
+ rotation_angle=rotation_slider,
)
- def cropit(val): # pylint: disable=unused-argument
+ def cropit(val): # noqa: ARG001
ang_min = min(hline_slider.value)
ang_max = max(hline_slider.value)
ek_min = min(vline_slider.value)
@@ -1111,6 +1152,8 @@ Source code for specsanalyzer.core
)
).item()
self._config["crop"] = True
+ self._config["angle_offset_px"] = ang_offset_slider.value
+ self._config["rotation_angle"] = rotation_slider.value
ax.cla()
self._data_array.plot(ax=ax, add_colorbar=False)
@@ -1120,6 +1163,8 @@ Source code for specsanalyzer.core
hline_slider.close()
clim_slider.close()
apply_button.close()
+ ang_offset_slider.close()
+ rotation_slider.close()
apply_button = ipw.Button(description="Crop")
display(apply_button)
@@ -1131,7 +1176,7 @@ Source code for specsanalyzer.core
[docs]
- def fft_tool(
+ def fft_tool(
self,
raw_image: np.ndarray,
apply: bool = False,
@@ -1177,7 +1222,7 @@ Source code for specsanalyzer.core
filtered = fourier_filter_2d(raw_image, peaks=fft_filter_peaks, ret="filtered")
except IndexError:
- print("Load the scan first!")
+ logger.warning("Load the scan first!")
raise
fig = plt.figure()
@@ -1252,7 +1297,7 @@ Source code for specsanalyzer.core
max=int(np.log10(np.abs(img).max())) + 1,
)
- def update(v_vals, pos_x, pos_y, sigma_x, sigma_y, amplitude):
+ def update(v_vals, pos_x, pos_y, sigma_x, sigma_y, amplitude):
fft_filter_peaks = create_fft_params(amplitude, pos_x, pos_y, sigma_x, sigma_y)
msk = fourier_filter_2d(raw_image, peaks=fft_filter_peaks, ret="mask")
filtered_new = fourier_filter_2d(raw_image, peaks=fft_filter_peaks, ret="filtered")
@@ -1289,7 +1334,7 @@ Source code for specsanalyzer.core
v_vals=clim_slider,
)
- def apply_fft(apply: bool): # pylint: disable=unused-argument
+ def apply_fft(apply: bool): # noqa: ARG001
amplitude = amplitude_slider.value
pos_x = pos_x_slider.value
pos_y = pos_y_slider.value
@@ -1329,7 +1374,7 @@ Source code for specsanalyzer.core
[docs]
-def create_fft_params(
+def create_fft_params(
amplitude: float,
pos_x: float,
pos_y: float,
diff --git a/specsanalyzer/develop/_modules/specsanalyzer/img_tools.html b/specsanalyzer/develop/_modules/specsanalyzer/img_tools.html
index 78931aa..ca940ae 100644
--- a/specsanalyzer/develop/_modules/specsanalyzer/img_tools.html
+++ b/specsanalyzer/develop/_modules/specsanalyzer/img_tools.html
@@ -7,7 +7,7 @@
- specsanalyzer.img_tools — specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsanalyzer.img_tools — specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -29,7 +29,7 @@
-
+
@@ -37,7 +37,7 @@
-
+
@@ -46,7 +46,7 @@
@@ -54,7 +54,7 @@
-
+
@@ -116,7 +116,7 @@
- specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -551,17 +551,17 @@
Source code for specsanalyzer.img_tools
"""This module contains image manipulation tools for the specsanalyzer package"""
-from __future__ import annotations
+from __future__ import annotations
-from typing import Sequence
+from typing import Sequence
-import numpy as np
-import xarray as xr
+import numpy as np
+import xarray as xr
[docs]
-def gauss2d(
+def gauss2d(
x: float | np.ndarray,
y: float | np.ndarray,
mx: float,
@@ -592,7 +592,7 @@ Source code for specsanalyzer.img_tools
[docs]
-def fourier_filter_2d(
+def fourier_filter_2d(
image: np.ndarray,
peaks: Sequence[dict],
ret: str = "filtered",
@@ -641,7 +641,7 @@ Source code for specsanalyzer.img_tools
raise KeyError(
f"The peaks input is supposed to be a list of dicts with the "
"following structure: pos_x, pos_y, sigma_x, sigma_y, amplitude.",
- ) from exc
+ ) from exc
# apply mask to the FFT, and transform back
filtered = np.fft.irfft2(np.fft.ifftshift(image_fft * mask, axes=0))
@@ -661,7 +661,7 @@ Source code for specsanalyzer.img_tools
[docs]
-def crop_xarray(
+def crop_xarray(
data_array: xr.DataArray,
x_min: float,
x_max: float,
diff --git a/specsanalyzer/develop/_modules/specsanalyzer/io.html b/specsanalyzer/develop/_modules/specsanalyzer/io.html
index 3fdc97b..fe83cd4 100644
--- a/specsanalyzer/develop/_modules/specsanalyzer/io.html
+++ b/specsanalyzer/develop/_modules/specsanalyzer/io.html
@@ -7,7 +7,7 @@
- specsanalyzer.io — specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsanalyzer.io — specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -29,7 +29,7 @@
-
+
@@ -37,7 +37,7 @@
-
+
@@ -46,7 +46,7 @@
@@ -54,7 +54,7 @@
-
+
@@ -116,7 +116,7 @@
- specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -551,17 +551,17 @@
Source code for specsanalyzer.io
"""This module contains file input/output functions for the specsanalyzer module"""
-from __future__ import annotations
+from __future__ import annotations
-from pathlib import Path
-from typing import Any
-from typing import Sequence
+from pathlib import Path
+from typing import Any
+from typing import Sequence
-import h5py
-import numpy as np
-import tifffile
-import xarray as xr
-from pynxtools.dataconverter.convert import convert
+import h5py
+import numpy as np
+import tifffile
+import xarray as xr
+from pynxtools.dataconverter.convert import convert
_IMAGEJ_DIMS_ORDER = "TZCYXS"
_IMAGEJ_DIMS_ALIAS = {
@@ -591,7 +591,7 @@ Source code for specsanalyzer.io
[docs]
-def recursive_write_metadata(h5group: h5py.Group, node: dict):
+def recursive_write_metadata(h5group: h5py.Group, node: dict):
"""Recurses through a python dictionary and writes it into an hdf5 file.
Args:
@@ -631,13 +631,13 @@ Source code for specsanalyzer.io
except BaseException as exc:
raise ValueError(
f"Unknown error occurred, cannot save {item} of type {type(item)}.",
- ) from exc
+ ) from exc
[docs]
-def recursive_parse_metadata(
+def recursive_parse_metadata(
node: h5py.Group | h5py.Dataset,
) -> dict:
"""Recurses through an hdf5 file, and parse it into a dictionary.
@@ -668,7 +668,7 @@ Source code for specsanalyzer.io
[docs]
-def to_h5(data: xr.DataArray, faddr: str, mode: str = "w"):
+def to_h5(data: xr.DataArray, faddr: str, mode: str = "w"):
"""Save xarray formatted data to hdf5
Args:
@@ -720,7 +720,7 @@ Source code for specsanalyzer.io
[docs]
-def load_h5(faddr: str, mode: str = "r") -> xr.DataArray:
+def load_h5(faddr: str, mode: str = "r") -> xr.DataArray:
"""Read xarray data from formatted hdf5 file
Args:
@@ -737,7 +737,7 @@ Source code for specsanalyzer.io
except KeyError as exc:
raise ValueError(
f"Wrong Data Format, the BinnedData were not found. The error was{exc}.",
- ) from exc
+ ) from exc
# Reading the axes
bin_axes = []
@@ -750,7 +750,7 @@ Source code for specsanalyzer.io
except KeyError as exc:
raise ValueError(
f"Wrong Data Format, the axes were not found. The error was {exc}",
- ) from exc
+ ) from exc
# load metadata
metadata = None
@@ -780,7 +780,7 @@ Source code for specsanalyzer.io
[docs]
-def to_tiff(
+def to_tiff(
data: xr.DataArray | np.ndarray,
faddr: Path | str,
alias_dict: dict = None,
@@ -845,7 +845,7 @@ Source code for specsanalyzer.io
[docs]
-def _sort_dims_for_imagej(dims: list, alias_dict: dict = None) -> list:
+def _sort_dims_for_imagej(dims: list, alias_dict: dict = None) -> list:
"""Guess the order of the dimensions from the alias dictionary
Args:
@@ -871,7 +871,7 @@ Source code for specsanalyzer.io
[docs]
-def _fill_missing_dims(dims: list, alias_dict: dict = None) -> list:
+def _fill_missing_dims(dims: list, alias_dict: dict = None) -> list:
"""Guess the order of the dimensions from the alias dictionary
Args:
@@ -925,7 +925,7 @@ Source code for specsanalyzer.io
[docs]
-def load_tiff(
+def load_tiff(
faddr: str | Path,
coords: dict = None,
dims: Sequence = None,
@@ -975,7 +975,7 @@ Source code for specsanalyzer.io
[docs]
-def to_nexus(
+def to_nexus(
data: xr.DataArray,
faddr: str,
reader: str,
@@ -1014,7 +1014,7 @@ Source code for specsanalyzer.io
[docs]
-def get_pair_from_list(list_line: list) -> list:
+def get_pair_from_list(list_line: list) -> list:
"""Returns key value pair for the read function
where a line in the file contains '=' character.
@@ -1047,7 +1047,7 @@ Source code for specsanalyzer.io
[docs]
-def read_calib2d(filepath: str) -> list:
+def read_calib2d(filepath: str) -> list:
"""Reads the calib2d file into a convenient list for the parser
function containing useful and cleaned data.
@@ -1090,7 +1090,7 @@ Source code for specsanalyzer.io
[docs]
-def parse_calib2d_to_dict(filepath: str) -> dict:
+def parse_calib2d_to_dict(filepath: str) -> dict:
"""Parses the given calib2d file into a nested dictionary structure
to provide parameters for image conversion.
@@ -1133,7 +1133,7 @@ Source code for specsanalyzer.io
[docs]
-def get_modes_from_calib_dict(calib_dict: dict) -> tuple[list, list]:
+def get_modes_from_calib_dict(calib_dict: dict) -> tuple[list, list]:
"""create a list of supported modes, divided in spatial and angular modes
Args:
diff --git a/specsanalyzer/develop/_modules/specsscan/core.html b/specsanalyzer/develop/_modules/specsscan/core.html
index 1604edb..1cf8c9f 100644
--- a/specsanalyzer/develop/_modules/specsscan/core.html
+++ b/specsanalyzer/develop/_modules/specsscan/core.html
@@ -7,7 +7,7 @@
- specsscan.core — specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsscan.core — specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -29,7 +29,7 @@
-
+
@@ -37,7 +37,7 @@
-
+
@@ -46,7 +46,7 @@
@@ -54,7 +54,7 @@
-
+
@@ -116,7 +116,7 @@
- specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -551,41 +551,47 @@
Source code for specsscan.core
"""This is the SpecsScan core class"""
-from __future__ import annotations
-
-import copy
-import os
-import pathlib
-from importlib.util import find_spec
-from logging import warn
-from pathlib import Path
-from typing import Any
-from typing import Sequence
-
-import matplotlib
-import numpy as np
-import xarray as xr
-from tqdm.auto import tqdm
-
-from specsanalyzer import SpecsAnalyzer
-from specsanalyzer.config import parse_config
-from specsanalyzer.io import to_h5
-from specsanalyzer.io import to_nexus
-from specsanalyzer.io import to_tiff
-from specsscan.helpers import get_coords
-from specsscan.helpers import get_scan_path
-from specsscan.helpers import handle_meta
-from specsscan.helpers import load_images
-from specsscan.helpers import parse_info_to_dict
-from specsscan.helpers import parse_lut_to_df
+from __future__ import annotations
+
+import copy
+import os
+import pathlib
+from importlib.util import find_spec
+from logging import warn
+from pathlib import Path
+from typing import Any
+from typing import Sequence
+
+import matplotlib
+import numpy as np
+import xarray as xr
+from tqdm.auto import tqdm
+
+from specsanalyzer import SpecsAnalyzer
+from specsanalyzer.config import parse_config
+from specsanalyzer.config import save_config
+from specsanalyzer.io import to_h5
+from specsanalyzer.io import to_nexus
+from specsanalyzer.io import to_tiff
+from specsanalyzer.logging import set_verbosity
+from specsanalyzer.logging import setup_logging
+from specsscan.helpers import get_coords
+from specsscan.helpers import get_scan_path
+from specsscan.helpers import handle_meta
+from specsscan.helpers import load_images
+from specsscan.helpers import parse_info_to_dict
+from specsscan.helpers import parse_lut_to_df
package_dir = os.path.dirname(find_spec("specsscan").origin)
+# Configure logging
+logger = setup_logging("specsscan")
+
[docs]
-class SpecsScan:
+class SpecsScan:
"""SpecsAnalyzer class for loading scans and data from SPECS Phoibos electron analyzers,
generated with the ARPESControl software at Fritz Haber Institute, Berlin, and EPFL, Lausanne.
@@ -595,10 +601,11 @@ Source code for specsscan.core
**kwds: Keyword arguments passed to ``parse_config``.
"""
- def __init__(
+ def __init__(
self,
metadata: dict = {},
config: dict | str = {},
+ verbose: bool = True,
**kwds,
):
"""SpecsScan constructor.
@@ -606,6 +613,7 @@ Source code for specsscan.core
Args:
metadata (dict, optional): Metadata dictionary. Defaults to {}.
config (Union[dict, str], optional): Metadata dictionary or file path. Defaults to {}.
+ verbose (bool, optional): Disable info logs if set to False.
**kwds: Keyword arguments passed to ``parse_config``.
"""
self._config = parse_config(
@@ -614,6 +622,8 @@ Source code for specsscan.core
**kwds,
)
+ set_verbosity(logger, verbose)
+
self.metadata = metadata
self._scan_info: dict[Any, Any] = {}
@@ -624,18 +634,20 @@ Source code for specsscan.core
folder_config={},
user_config={},
system_config={},
+ verbose=verbose,
)
except KeyError:
self.spa = SpecsAnalyzer(
folder_config={},
user_config={},
system_config={},
+ verbose=verbose,
)
self._result: xr.DataArray = None
# pylint: disable=duplicate-code
- def __repr__(self):
+ def __repr__(self):
if self._config is None:
pretty_str = "No configuration available"
else:
@@ -646,12 +658,12 @@ Source code for specsscan.core
return pretty_str if pretty_str is not None else ""
@property
- def config(self):
+ def config(self):
"""Get config"""
return self._config
@config.setter
- def config(self, config: dict | str):
+ def config(self, config: dict | str):
"""Set config"""
self._config = parse_config(
config,
@@ -663,13 +675,13 @@ Source code for specsscan.core
self.spa = SpecsAnalyzer()
@property
- def result(self):
+ def result(self):
"""Get result xarray"""
return self._result
[docs]
- def load_scan(
+ def load_scan(
self,
scan: int,
path: str | Path = "",
@@ -700,6 +712,7 @@ Source code for specsscan.core
xr.DataArray: xarray DataArray object with kinetic energy, angle/position and
optionally a third scanned axis (for ex., delay, temperature) as coordinates.
"""
+ token = kwds.pop("token", None)
scan_path = get_scan_path(path, scan, self._config["data_path"])
df_lut = parse_lut_to_df(scan_path)
@@ -792,10 +805,11 @@ Source code for specsscan.core
k: coordinate_mapping[k] for k in coordinate_mapping.keys() if k in res_xarray.dims
}
depends_dict = {
- rename_dict[k]: coordinate_depends[k]
+ rename_dict.get(k, k): coordinate_depends[k]
for k in coordinate_depends.keys()
if k in res_xarray.dims
}
+
res_xarray = res_xarray.rename(rename_dict)
for k, v in coordinate_mapping.items():
if k in fast_axes:
@@ -810,12 +824,13 @@ Source code for specsscan.core
"/entry/sample/transformations/sample_polar": "Polar",
"/entry/sample/transformations/sample_tilt": "Tilt",
"/entry/sample/transformations/sample_azimuth": "Azimuth",
+ "/entry/instrument/beam_pump/pulse_delay": "delay",
}
- # store link information for resolved axis coordinates
+ # store data for resolved axis coordinates
for k, v in depends_dict.items():
if v in axis_dict:
- self._scan_info[axis_dict[v]] = "@link:/entry/data/" + k
+ self._scan_info[axis_dict[v]] = res_xarray.coords[k].data
for name in res_xarray.dims:
try:
@@ -825,14 +840,16 @@ Source code for specsscan.core
self.metadata.update(
**handle_meta(
- df_lut,
- self._scan_info,
- self.config,
+ df_lut=df_lut,
+ scan_info=self._scan_info,
+ config=self.config.get("metadata", {}),
+ scan=scan,
fast_axes=list(fast_axes), # type: ignore
slow_axes=list(slow_axes),
projection=projection,
metadata=copy.deepcopy(metadata),
collect_metadata=collect_metadata,
+ token=token,
),
**{"loader": loader_dict},
**{"conversion_parameters": conversion_metadata},
@@ -846,7 +863,7 @@ Source code for specsscan.core
[docs]
- def crop_tool(self, scan: int = None, path: Path | str = "", **kwds):
+ def crop_tool(self, scan: int = None, path: Path | str = "", **kwds):
"""Cropping tool interface to crop_tool method of the SpecsAnalyzer class.
Args:
@@ -871,7 +888,7 @@ Source code for specsscan.core
try:
image = self.metadata["loader"]["raw_data"][0]
except KeyError as exc:
- raise ValueError("No image loaded, load image first!") from exc
+ raise ValueError("No image loaded, load image first!") from exc
self.spa.crop_tool(
image,
@@ -883,9 +900,44 @@ Source code for specsscan.core
)
+
+[docs]
+ def save_crop_params(
+ self,
+ filename: str = None,
+ overwrite: bool = False,
+ ):
+ """Save the generated crop parameters to the folder config file.
+
+ Args:
+ filename (str, optional): Filename of the config dictionary to save to.
+ Defaults to "specs_config.yaml" in the current folder.
+ overwrite (bool, optional): Option to overwrite the present dictionary.
+ Defaults to False.
+ """
+ if filename is None:
+ filename = "specs_config.yaml"
+ if "ek_range_min" not in self.spa.config:
+ raise ValueError("No crop parameters to save!")
+
+ config = {
+ "spa_params": {
+ "crop": self.spa.config["crop"],
+ "ek_range_min": self.spa.config["ek_range_min"],
+ "ek_range_max": self.spa.config["ek_range_max"],
+ "ang_range_min": self.spa.config["ang_range_min"],
+ "ang_range_max": self.spa.config["ang_range_max"],
+ "angle_offset_px": self.spa.config["angle_offset_px"],
+ "rotation_angle": self.spa.config["rotation_angle"],
+ },
+ }
+ save_config(config, filename, overwrite)
+ logger.info(f'Saved crop parameters to "{filename}".')
+
+
[docs]
- def fft_tool(self, scan: int = None, path: Path | str = "", **kwds):
+ def fft_tool(self, scan: int = None, path: Path | str = "", **kwds):
"""FFT tool to play around with the peak parameters in the Fourier plane. Built to filter
out the meshgrid appearing in the raw data images. The optimized parameters are stored in
the class config dict under fft_filter_peaks.
@@ -915,7 +967,7 @@ Source code for specsscan.core
try:
image = self.metadata["loader"]["raw_data"][0]
except KeyError as exc:
- raise ValueError("No image loaded, load image first!") from exc
+ raise ValueError("No image loaded, load image first!") from exc
self.spa.fft_tool(
image,
@@ -923,9 +975,39 @@ Source code for specsscan.core
)
+
+[docs]
+ def save_fft_params(
+ self,
+ filename: str = None,
+ overwrite: bool = False,
+ ):
+ """Save the generated fft filter parameters to the folder config file.
+
+ Args:
+ filename (str, optional): Filename of the config dictionary to save to.
+ Defaults to "specs_config.yaml" in the current folder.
+ overwrite (bool, optional): Option to overwrite the present dictionary.
+ Defaults to False.
+ """
+ if filename is None:
+ filename = "specs_config.yaml"
+ if len(self.spa.config["fft_filter_peaks"]) == 0:
+ raise ValueError("No fft parameters to save!")
+
+ config = {
+ "spa_params": {
+ "fft_filter_peaks": self.spa.config["fft_filter_peaks"],
+ "apply_fft_filter": self.spa.config["apply_fft_filter"],
+ },
+ }
+ save_config(config, filename, overwrite)
+ logger.info(f'Saved fft parameters to "{filename}".')
+
+
[docs]
- def check_scan(
+ def check_scan(
self,
scan: int,
delays: Sequence[int] | int,
@@ -955,6 +1037,7 @@ Source code for specsscan.core
Returns:
xr.DataArray: 3-D xarray of dimensions (Ekin, Angle, Iterations)
"""
+ token = kwds.pop("token", None)
scan_path = get_scan_path(path, scan, self._config["data_path"])
df_lut = parse_lut_to_df(scan_path)
@@ -1002,7 +1085,7 @@ Source code for specsscan.core
conversion_metadata = xr_list[0].attrs["conversion_parameters"]
- dims = get_coords(
+ dims = get_coords( # noqa: F841
scan_path=scan_path,
scan_type=scan_type,
scan_info=self._scan_info,
@@ -1030,14 +1113,16 @@ Source code for specsscan.core
self.metadata.update(
**handle_meta(
- df_lut,
- self._scan_info,
- self.config,
+ df_lut=df_lut,
+ scan_info=self._scan_info,
+ config=self.config.get("metadata", {}),
+ scan=scan,
fast_axes=list(fast_axes), # type: ignore
slow_axes=list(slow_axes),
projection=projection,
- metadata=metadata,
+ metadata=copy.deepcopy(metadata),
collect_metadata=collect_metadata,
+ token=token,
),
**{"loader": loader_dict},
**{"conversion_parameters": conversion_metadata},
@@ -1054,7 +1139,7 @@ Source code for specsscan.core
[docs]
- def save(
+ def save(
self,
faddr: str,
**kwds,
@@ -1140,7 +1225,7 @@ Source code for specsscan.core
[docs]
- def process_sweep_scan(
+ def process_sweep_scan(
self,
raw_data: list[np.ndarray],
kinetic_energy: np.ndarray,
@@ -1187,7 +1272,7 @@ Source code for specsscan.core
)
or not self.spa.config["crop"]
):
- warn("No valid cropping parameters found, consider using crop_tool() to set.")
+ logger.warning("No valid cropping parameters found, consider using crop_tool() to set.")
e_step = converted.Ekin[1] - converted.Ekin[0]
e0 = converted.Ekin[-1] - ekin_step
diff --git a/specsanalyzer/develop/_modules/specsscan/helpers.html b/specsanalyzer/develop/_modules/specsscan/helpers.html
index 1540213..cfb98d7 100644
--- a/specsanalyzer/develop/_modules/specsscan/helpers.html
+++ b/specsanalyzer/develop/_modules/specsscan/helpers.html
@@ -7,7 +7,7 @@
- specsscan.helpers — specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsscan.helpers — specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -29,7 +29,7 @@
-
+
@@ -37,7 +37,7 @@
-
+
@@ -46,7 +46,7 @@
@@ -54,7 +54,7 @@
-
+
@@ -116,7 +116,7 @@
- specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -551,27 +551,28 @@
Source code for specsscan.helpers
"""This script contains helper functions used by the specsscan class"""
-from __future__ import annotations
+from __future__ import annotations
-import datetime as dt
-import json
-from pathlib import Path
-from typing import Any
-from typing import Sequence
-from urllib.error import HTTPError
-from urllib.error import URLError
-from urllib.request import urlopen
+import datetime as dt
+import logging
+from pathlib import Path
+from typing import Any
+from typing import Sequence
-import numpy as np
-import pandas as pd
-from tqdm.auto import tqdm
+import numpy as np
+import pandas as pd
+from tqdm.auto import tqdm
-from specsanalyzer.config import complete_dictionary
+from specsanalyzer.config import complete_dictionary
+from specsscan.metadata import MetadataRetriever
+
+# Configure logging
+logger = logging.getLogger("specsanalyzer.specsscan")
[docs]
-def get_scan_path(path: Path | str, scan: int, basepath: Path | str) -> Path:
+def get_scan_path(path: Path | str, scan: int, basepath: Path | str) -> Path:
"""Returns the path to the given scan.
Args:
@@ -607,7 +608,7 @@ Source code for specsscan.helpers
[docs]
-def load_images(
+def load_images(
scan_path: Path,
df_lut: pd.DataFrame = None,
iterations: np.ndarray | slice | Sequence[int] | Sequence[slice] = None,
@@ -681,9 +682,9 @@ Source code for specsscan.helpers
"the chosen data. In case of a single scan, "
f"try without passing iterations inside the "
"load_scan method.",
- ) from exc
+ ) from exc
- print(f"Averaging over {avg_dim}...")
+ logger.info(f"Averaging over {avg_dim}...")
for dim in tqdm(raw_2d_sliced):
avg_list = []
for image in tqdm(dim, leave=False, disable=not tqdm_enable_nested):
@@ -718,7 +719,7 @@ Source code for specsscan.helpers
[docs]
-def get_raw2d(scan_list: list[str], raw_array: np.ndarray) -> np.ndarray:
+def get_raw2d(scan_list: list[str], raw_array: np.ndarray) -> np.ndarray:
"""Converts a 1-D array of raw scan names into 2-D based on the number of iterations
Args:
@@ -762,7 +763,7 @@ Source code for specsscan.helpers
[docs]
-def parse_lut_to_df(scan_path: Path) -> pd.DataFrame:
+def parse_lut_to_df(scan_path: Path) -> pd.DataFrame:
"""Loads the contents of LUT.txt file into a pandas data frame to be used as metadata.
Args:
@@ -776,14 +777,14 @@ Source code for specsscan.helpers
df_lut.reset_index(inplace=True)
new_cols = df_lut.columns.to_list()[1:]
- new_cols[new_cols.index("delaystage")] = "Delay"
+ new_cols[new_cols.index("delaystage")] = "DelayStage"
new_cols.insert(3, "delay (fs)") # Create label to drop the column later
df_lut = df_lut.set_axis(new_cols, axis="columns")
df_lut.drop(columns="delay (fs)", inplace=True)
except FileNotFoundError:
- print(
+ logger.info(
"LUT.txt not found. Storing metadata from info.txt",
)
return None
@@ -794,7 +795,7 @@ Source code for specsscan.helpers
[docs]
-def get_coords(
+def get_coords(
scan_path: Path,
scan_type: str,
scan_info: dict[Any, Any],
@@ -834,7 +835,7 @@ Source code for specsscan.helpers
return (np.array([]), "")
if df_lut is not None:
- print("scanvector.txt not found. Obtaining coordinates from LUT")
+ logger.info("scanvector.txt not found. Obtaining coordinates from LUT")
df_new: pd.DataFrame = df_lut.loc[:, df_lut.columns[2:]]
@@ -842,20 +843,28 @@ Source code for specsscan.helpers
dim = df_new.columns[index]
else:
- raise FileNotFoundError("scanvector.txt file not found!") from exc
+ raise FileNotFoundError("scanvector.txt file not found!") from exc
if scan_type == "delay":
- t_0 = scan_info["TimeZero"]
- coords -= t_0
- coords *= 2 / 3e11 * 1e15
+ t0 = scan_info["TimeZero"]
+ coords = mm_to_fs(coords, t0)
return coords, dim
+
+[docs]
+def mm_to_fs(delaystage, t0):
+ delay = delaystage - t0
+ delay *= 2 / 2.99792458e11 * 1e15
+ return delay
+
+
+
[docs]
-def compare_coords(axis_data: np.ndarray) -> tuple[np.ndarray, int]:
+def compare_coords(axis_data: np.ndarray) -> tuple[np.ndarray, int]:
"""Identifies the most changing column in a given 2-D numpy array.
Args:
@@ -881,7 +890,7 @@ Source code for specsscan.helpers
[docs]
-def parse_info_to_dict(path: Path) -> dict:
+def parse_info_to_dict(path: Path) -> dict:
"""Parses the contents of info.txt file into a dictionary
Args:
@@ -911,7 +920,10 @@ Source code for specsscan.helpers
info_dict[key] = value
except FileNotFoundError as exc:
- raise FileNotFoundError("info.txt file not found.") from exc
+ raise FileNotFoundError("info.txt file not found.") from exc
+
+ if "DelayStage" in info_dict and "TimeZero" in info_dict:
+ info_dict["delay"] = mm_to_fs(info_dict["DelayStage"], info_dict["TimeZero"])
return info_dict
@@ -919,15 +931,17 @@ Source code for specsscan.helpers
[docs]
-def handle_meta(
+def handle_meta(
df_lut: pd.DataFrame,
scan_info: dict,
config: dict,
+ scan: int,
fast_axes: list[str],
slow_axes: list[str],
projection: str,
metadata: dict = None,
collect_metadata: bool = False,
+ token: str = None,
) -> dict:
"""Helper function for the handling metadata from different files
@@ -936,22 +950,24 @@ Source code for specsscan.helpers
from ``parse_lut_to_df()``
scan_info (dict): scan_info class dict containing containing the contents of info.txt file
config (dict): config dictionary containing the contents of config.yaml file
+ scan (int): Scan number
fast_axes (list[str]): The fast-axis dimensions of the scan
slow_axes (list[str]): The slow-axis dimensions of the scan
metadata (dict, optional): Metadata dictionary with additional metadata for the scan.
Defaults to empty dictionary.
collect_metadata (bool, optional): Option to collect further metadata e.g. from EPICS
archiver needed for NeXus conversion. Defaults to False.
+ token (str, optional):: The elabFTW api token to use for fetching metadata
Returns:
dict: metadata dictionary containing additional metadata from the EPICS
- archive.
+ archive and elabFTW.
"""
if metadata is None:
metadata = {}
- print("Gathering metadata from different locations")
+ logger.info("Gathering metadata from different locations")
# get metadata from LUT dataframe
lut_meta = {}
energy_scan_mode = "snapshot"
@@ -969,10 +985,10 @@ Source code for specsscan.helpers
metadata["scan_info"] = complete_dictionary(
metadata.get("scan_info", {}),
- complete_dictionary(lut_meta, scan_info),
+ complete_dictionary(scan_info, lut_meta),
) # merging dictionaries
- print("Collecting time stamps...")
+ logger.info("Collecting time stamps...")
if "time" in metadata["scan_info"]:
time_list = [metadata["scan_info"]["time"][0], metadata["scan_info"]["time"][-1]]
elif "StartTime" in metadata["scan_info"]:
@@ -996,53 +1012,18 @@ Source code for specsscan.helpers
}
if collect_metadata:
- # Get metadata from Epics archive if not present already
- start = dt.datetime.utcfromtimestamp(ts_from).isoformat()
+ metadata_retriever = MetadataRetriever(config, token)
- # replace metadata names by epics channels
- try:
- replace_dict = config["epics_channels"]
- for key in list(metadata["scan_info"]):
- if key.lower() in replace_dict:
- metadata["scan_info"][replace_dict[key.lower()]] = metadata["scan_info"][key]
- metadata["scan_info"].pop(key)
- epics_channels = replace_dict.values()
- except KeyError:
- epics_channels = []
-
- channels_missing = set(epics_channels) - set(metadata["scan_info"].keys())
- if channels_missing:
- print("Collecting data from the EPICS archive...")
- for channel in channels_missing:
- try:
- _, vals = get_archiver_data(
- archiver_url=config.get("archiver_url"),
- archiver_channel=channel,
- ts_from=ts_from,
- ts_to=ts_to,
- )
- metadata["scan_info"][f"{channel}"] = np.mean(vals)
+ metadata = metadata_retriever.fetch_epics_metadata(
+ ts_from=ts_from,
+ ts_to=ts_to,
+ metadata=metadata,
+ )
- except IndexError:
- metadata["scan_info"][f"{channel}"] = np.nan
- print(
- f"Data for channel {channel} doesn't exist for time {start}",
- )
- except HTTPError as exc:
- print(
- f"Incorrect URL for the archive channel {channel}. "
- "Make sure that the channel name and file start and end times are "
- "correct.",
- )
- print("Error code: ", exc)
- except URLError as exc:
- print(
- f"Cannot access the archive URL for channel {channel}. "
- f"Make sure that you are within the FHI network."
- f"Skipping over channels {channels_missing}.",
- )
- print("Error code: ", exc)
- break
+ metadata = metadata_retriever.fetch_elab_metadata(
+ scan=scan,
+ metadata=metadata,
+ )
metadata["scan_info"]["energy_scan_mode"] = energy_scan_mode
@@ -1054,46 +1035,13 @@ Source code for specsscan.helpers
metadata["scan_info"]["slow_axes"] = slow_axes
metadata["scan_info"]["fast_axes"] = fast_axes
- print("Done!")
-
return metadata
-
-[docs]
-def get_archiver_data(
- archiver_url: str,
- archiver_channel: str,
- ts_from: float,
- ts_to: float,
-) -> tuple[np.ndarray, np.ndarray]:
- """Extract time stamps and corresponding data from and EPICS archiver instance
-
- Args:
- archiver_url (str): URL of the archiver data extraction interface
- archiver_channel (str): EPICS channel to extract data for
- ts_from (float): starting time stamp of the range of interest
- ts_to (float): ending time stamp of the range of interest
-
- Returns:
- tuple[List, List]: The extracted time stamps and corresponding data
- """
- iso_from = dt.datetime.utcfromtimestamp(ts_from).isoformat()
- iso_to = dt.datetime.utcfromtimestamp(ts_to).isoformat()
- req_str = archiver_url + archiver_channel + "&from=" + iso_from + "Z&to=" + iso_to + "Z"
- with urlopen(req_str) as req:
- data = json.load(req)
- secs = [x["secs"] + x["nanos"] * 1e-9 for x in data[0]["data"]]
- vals = [x["val"] for x in data[0]["data"]]
-
- return (np.asarray(secs), np.asarray(vals))
-
-
-
[docs]
-def find_scan(path: Path, scan: int) -> list[Path]:
+def find_scan(path: Path, scan: int) -> list[Path]:
"""Search function to locate the scan folder
Args:
@@ -1103,7 +1051,7 @@ Source code for specsscan.helpers
Returns:
List[Path]: scan_path: Path object pointing to the scan folder
"""
- print("Scan path not provided, searching directories...")
+ logger.info("Scan path not provided, searching directories...")
for file in path.iterdir():
if file.is_dir():
try:
@@ -1117,7 +1065,7 @@ Source code for specsscan.helpers
file.glob(f"*/*/Raw Data/{scan}"),
)
if scan_path:
- print("Scan found at path:", scan_path[0])
+ logger.info(f"Scan found at path: {scan_path[0]}")
break
else:
scan_path = []
@@ -1127,7 +1075,7 @@ Source code for specsscan.helpers
[docs]
-def find_scan_type(
+def find_scan_type(
path: Path,
scan_type: str,
):
diff --git a/specsanalyzer/develop/_sources/specsanalyzer/config.rst.txt b/specsanalyzer/develop/_sources/specsanalyzer/config.rst.txt
index 4165f69..34ce2f1 100644
--- a/specsanalyzer/develop/_sources/specsanalyzer/config.rst.txt
+++ b/specsanalyzer/develop/_sources/specsanalyzer/config.rst.txt
@@ -4,8 +4,8 @@ The config module contains a mechanics to collect configuration parameters from
It will load an (optional) provided config file, or alternatively use a passed python dictionary as initial config dictionary, and subsequently look for the following additional config files to load:
* ``folder_config``: A config file of name :file:`specs_config.yaml` in the current working directory. This is mostly intended to pass calibration parameters of the workflow between different notebook instances.
-* ``user_config``: A config file provided by the user, stored as :file:`.specsanalyzer/config.yaml` in the current user's home directly. This is intended to give a user the option for individual configuration modifications of system settings.
-* ``system_config``: A config file provided by the system administrator, stored as :file:`/etc/specsanalyzer/config.yaml` on Linux-based systems, and :file:`%ALLUSERSPROFILE%/specsanalyzer/config.yaml` on Windows. This should provide all necessary default parameters for using the specsanalyzer processor with a given setup. For an example for the setup at the Fritz Haber Institute setup, see :ref:`example_config`
+* ``user_config``: A config file provided by the user, stored as :file:`.config/specsanalyzer/config_v1.yaml` in the current user's home directly. This is intended to give a user the option for individual configuration modifications of system settings.
+* ``system_config``: A config file provided by the system administrator, stored as :file:`/etc/specsanalyzer/config_v1.yaml` on Linux-based systems, and :file:`%ALLUSERSPROFILE%/specsanalyzer/config_v1.yaml` on Windows. This should provide all necessary default parameters for using the specsanalyzer processor with a given setup. For an example for the setup at the Fritz Haber Institute setup, see :ref:`example_config`
* ``default_config``: The default configuration shipped with the package. Typically, all parameters here should be overwritten by any of the other configuration files.
The config mechanism returns the combined dictionary, and reports the loaded configuration files. In order to disable or overwrite any of the configuration files, they can be also given as optional parameters (path to a file, or python dictionary).
diff --git a/specsanalyzer/develop/_static/documentation_options.js b/specsanalyzer/develop/_static/documentation_options.js
index 8813e08..cb94bc8 100644
--- a/specsanalyzer/develop/_static/documentation_options.js
+++ b/specsanalyzer/develop/_static/documentation_options.js
@@ -1,5 +1,5 @@
const DOCUMENTATION_OPTIONS = {
- VERSION: '0.4.2.dev40+g8ed2f0c',
+ VERSION: '0.5.2.dev10+g554f714',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
diff --git a/specsanalyzer/develop/_static/pygments.css b/specsanalyzer/develop/_static/pygments.css
index 012e6a0..d7dd577 100644
--- a/specsanalyzer/develop/_static/pygments.css
+++ b/specsanalyzer/develop/_static/pygments.css
@@ -6,11 +6,11 @@ html[data-theme="light"] .highlight span.linenos.special { color: #000000; backg
html[data-theme="light"] .highlight .hll { background-color: #fae4c2 }
html[data-theme="light"] .highlight { background: #fefefe; color: #080808 }
html[data-theme="light"] .highlight .c { color: #515151 } /* Comment */
-html[data-theme="light"] .highlight .err { color: #a12236 } /* Error */
-html[data-theme="light"] .highlight .k { color: #6730c5 } /* Keyword */
-html[data-theme="light"] .highlight .l { color: #7f4707 } /* Literal */
+html[data-theme="light"] .highlight .err { color: #A12236 } /* Error */
+html[data-theme="light"] .highlight .k { color: #6730C5 } /* Keyword */
+html[data-theme="light"] .highlight .l { color: #7F4707 } /* Literal */
html[data-theme="light"] .highlight .n { color: #080808 } /* Name */
-html[data-theme="light"] .highlight .o { color: #00622f } /* Operator */
+html[data-theme="light"] .highlight .o { color: #00622F } /* Operator */
html[data-theme="light"] .highlight .p { color: #080808 } /* Punctuation */
html[data-theme="light"] .highlight .ch { color: #515151 } /* Comment.Hashbang */
html[data-theme="light"] .highlight .cm { color: #515151 } /* Comment.Multiline */
@@ -18,135 +18,135 @@ html[data-theme="light"] .highlight .cp { color: #515151 } /* Comment.Preproc */
html[data-theme="light"] .highlight .cpf { color: #515151 } /* Comment.PreprocFile */
html[data-theme="light"] .highlight .c1 { color: #515151 } /* Comment.Single */
html[data-theme="light"] .highlight .cs { color: #515151 } /* Comment.Special */
-html[data-theme="light"] .highlight .gd { color: #005b82 } /* Generic.Deleted */
+html[data-theme="light"] .highlight .gd { color: #005B82 } /* Generic.Deleted */
html[data-theme="light"] .highlight .ge { font-style: italic } /* Generic.Emph */
-html[data-theme="light"] .highlight .gh { color: #005b82 } /* Generic.Heading */
+html[data-theme="light"] .highlight .gh { color: #005B82 } /* Generic.Heading */
html[data-theme="light"] .highlight .gs { font-weight: bold } /* Generic.Strong */
-html[data-theme="light"] .highlight .gu { color: #005b82 } /* Generic.Subheading */
-html[data-theme="light"] .highlight .kc { color: #6730c5 } /* Keyword.Constant */
-html[data-theme="light"] .highlight .kd { color: #6730c5 } /* Keyword.Declaration */
-html[data-theme="light"] .highlight .kn { color: #6730c5 } /* Keyword.Namespace */
-html[data-theme="light"] .highlight .kp { color: #6730c5 } /* Keyword.Pseudo */
-html[data-theme="light"] .highlight .kr { color: #6730c5 } /* Keyword.Reserved */
-html[data-theme="light"] .highlight .kt { color: #7f4707 } /* Keyword.Type */
-html[data-theme="light"] .highlight .ld { color: #7f4707 } /* Literal.Date */
-html[data-theme="light"] .highlight .m { color: #7f4707 } /* Literal.Number */
-html[data-theme="light"] .highlight .s { color: #00622f } /* Literal.String */
+html[data-theme="light"] .highlight .gu { color: #005B82 } /* Generic.Subheading */
+html[data-theme="light"] .highlight .kc { color: #6730C5 } /* Keyword.Constant */
+html[data-theme="light"] .highlight .kd { color: #6730C5 } /* Keyword.Declaration */
+html[data-theme="light"] .highlight .kn { color: #6730C5 } /* Keyword.Namespace */
+html[data-theme="light"] .highlight .kp { color: #6730C5 } /* Keyword.Pseudo */
+html[data-theme="light"] .highlight .kr { color: #6730C5 } /* Keyword.Reserved */
+html[data-theme="light"] .highlight .kt { color: #7F4707 } /* Keyword.Type */
+html[data-theme="light"] .highlight .ld { color: #7F4707 } /* Literal.Date */
+html[data-theme="light"] .highlight .m { color: #7F4707 } /* Literal.Number */
+html[data-theme="light"] .highlight .s { color: #00622F } /* Literal.String */
html[data-theme="light"] .highlight .na { color: #912583 } /* Name.Attribute */
-html[data-theme="light"] .highlight .nb { color: #7f4707 } /* Name.Builtin */
-html[data-theme="light"] .highlight .nc { color: #005b82 } /* Name.Class */
-html[data-theme="light"] .highlight .no { color: #005b82 } /* Name.Constant */
-html[data-theme="light"] .highlight .nd { color: #7f4707 } /* Name.Decorator */
-html[data-theme="light"] .highlight .ni { color: #00622f } /* Name.Entity */
-html[data-theme="light"] .highlight .ne { color: #6730c5 } /* Name.Exception */
-html[data-theme="light"] .highlight .nf { color: #005b82 } /* Name.Function */
-html[data-theme="light"] .highlight .nl { color: #7f4707 } /* Name.Label */
+html[data-theme="light"] .highlight .nb { color: #7F4707 } /* Name.Builtin */
+html[data-theme="light"] .highlight .nc { color: #005B82 } /* Name.Class */
+html[data-theme="light"] .highlight .no { color: #005B82 } /* Name.Constant */
+html[data-theme="light"] .highlight .nd { color: #7F4707 } /* Name.Decorator */
+html[data-theme="light"] .highlight .ni { color: #00622F } /* Name.Entity */
+html[data-theme="light"] .highlight .ne { color: #6730C5 } /* Name.Exception */
+html[data-theme="light"] .highlight .nf { color: #005B82 } /* Name.Function */
+html[data-theme="light"] .highlight .nl { color: #7F4707 } /* Name.Label */
html[data-theme="light"] .highlight .nn { color: #080808 } /* Name.Namespace */
html[data-theme="light"] .highlight .nx { color: #080808 } /* Name.Other */
-html[data-theme="light"] .highlight .py { color: #005b82 } /* Name.Property */
-html[data-theme="light"] .highlight .nt { color: #005b82 } /* Name.Tag */
-html[data-theme="light"] .highlight .nv { color: #a12236 } /* Name.Variable */
-html[data-theme="light"] .highlight .ow { color: #6730c5 } /* Operator.Word */
+html[data-theme="light"] .highlight .py { color: #005B82 } /* Name.Property */
+html[data-theme="light"] .highlight .nt { color: #005B82 } /* Name.Tag */
+html[data-theme="light"] .highlight .nv { color: #A12236 } /* Name.Variable */
+html[data-theme="light"] .highlight .ow { color: #6730C5 } /* Operator.Word */
html[data-theme="light"] .highlight .pm { color: #080808 } /* Punctuation.Marker */
html[data-theme="light"] .highlight .w { color: #080808 } /* Text.Whitespace */
-html[data-theme="light"] .highlight .mb { color: #7f4707 } /* Literal.Number.Bin */
-html[data-theme="light"] .highlight .mf { color: #7f4707 } /* Literal.Number.Float */
-html[data-theme="light"] .highlight .mh { color: #7f4707 } /* Literal.Number.Hex */
-html[data-theme="light"] .highlight .mi { color: #7f4707 } /* Literal.Number.Integer */
-html[data-theme="light"] .highlight .mo { color: #7f4707 } /* Literal.Number.Oct */
-html[data-theme="light"] .highlight .sa { color: #00622f } /* Literal.String.Affix */
-html[data-theme="light"] .highlight .sb { color: #00622f } /* Literal.String.Backtick */
-html[data-theme="light"] .highlight .sc { color: #00622f } /* Literal.String.Char */
-html[data-theme="light"] .highlight .dl { color: #00622f } /* Literal.String.Delimiter */
-html[data-theme="light"] .highlight .sd { color: #00622f } /* Literal.String.Doc */
-html[data-theme="light"] .highlight .s2 { color: #00622f } /* Literal.String.Double */
-html[data-theme="light"] .highlight .se { color: #00622f } /* Literal.String.Escape */
-html[data-theme="light"] .highlight .sh { color: #00622f } /* Literal.String.Heredoc */
-html[data-theme="light"] .highlight .si { color: #00622f } /* Literal.String.Interpol */
-html[data-theme="light"] .highlight .sx { color: #00622f } /* Literal.String.Other */
-html[data-theme="light"] .highlight .sr { color: #a12236 } /* Literal.String.Regex */
-html[data-theme="light"] .highlight .s1 { color: #00622f } /* Literal.String.Single */
-html[data-theme="light"] .highlight .ss { color: #005b82 } /* Literal.String.Symbol */
-html[data-theme="light"] .highlight .bp { color: #7f4707 } /* Name.Builtin.Pseudo */
-html[data-theme="light"] .highlight .fm { color: #005b82 } /* Name.Function.Magic */
-html[data-theme="light"] .highlight .vc { color: #a12236 } /* Name.Variable.Class */
-html[data-theme="light"] .highlight .vg { color: #a12236 } /* Name.Variable.Global */
-html[data-theme="light"] .highlight .vi { color: #a12236 } /* Name.Variable.Instance */
-html[data-theme="light"] .highlight .vm { color: #7f4707 } /* Name.Variable.Magic */
-html[data-theme="light"] .highlight .il { color: #7f4707 } /* Literal.Number.Integer.Long */
+html[data-theme="light"] .highlight .mb { color: #7F4707 } /* Literal.Number.Bin */
+html[data-theme="light"] .highlight .mf { color: #7F4707 } /* Literal.Number.Float */
+html[data-theme="light"] .highlight .mh { color: #7F4707 } /* Literal.Number.Hex */
+html[data-theme="light"] .highlight .mi { color: #7F4707 } /* Literal.Number.Integer */
+html[data-theme="light"] .highlight .mo { color: #7F4707 } /* Literal.Number.Oct */
+html[data-theme="light"] .highlight .sa { color: #00622F } /* Literal.String.Affix */
+html[data-theme="light"] .highlight .sb { color: #00622F } /* Literal.String.Backtick */
+html[data-theme="light"] .highlight .sc { color: #00622F } /* Literal.String.Char */
+html[data-theme="light"] .highlight .dl { color: #00622F } /* Literal.String.Delimiter */
+html[data-theme="light"] .highlight .sd { color: #00622F } /* Literal.String.Doc */
+html[data-theme="light"] .highlight .s2 { color: #00622F } /* Literal.String.Double */
+html[data-theme="light"] .highlight .se { color: #00622F } /* Literal.String.Escape */
+html[data-theme="light"] .highlight .sh { color: #00622F } /* Literal.String.Heredoc */
+html[data-theme="light"] .highlight .si { color: #00622F } /* Literal.String.Interpol */
+html[data-theme="light"] .highlight .sx { color: #00622F } /* Literal.String.Other */
+html[data-theme="light"] .highlight .sr { color: #A12236 } /* Literal.String.Regex */
+html[data-theme="light"] .highlight .s1 { color: #00622F } /* Literal.String.Single */
+html[data-theme="light"] .highlight .ss { color: #005B82 } /* Literal.String.Symbol */
+html[data-theme="light"] .highlight .bp { color: #7F4707 } /* Name.Builtin.Pseudo */
+html[data-theme="light"] .highlight .fm { color: #005B82 } /* Name.Function.Magic */
+html[data-theme="light"] .highlight .vc { color: #A12236 } /* Name.Variable.Class */
+html[data-theme="light"] .highlight .vg { color: #A12236 } /* Name.Variable.Global */
+html[data-theme="light"] .highlight .vi { color: #A12236 } /* Name.Variable.Instance */
+html[data-theme="light"] .highlight .vm { color: #7F4707 } /* Name.Variable.Magic */
+html[data-theme="light"] .highlight .il { color: #7F4707 } /* Literal.Number.Integer.Long */
html[data-theme="dark"] .highlight pre { line-height: 125%; }
html[data-theme="dark"] .highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
html[data-theme="dark"] .highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
html[data-theme="dark"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
html[data-theme="dark"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
html[data-theme="dark"] .highlight .hll { background-color: #ffd9002e }
-html[data-theme="dark"] .highlight { background: #2b2b2b; color: #f8f8f2 }
-html[data-theme="dark"] .highlight .c { color: #ffd900 } /* Comment */
-html[data-theme="dark"] .highlight .err { color: #ffa07a } /* Error */
-html[data-theme="dark"] .highlight .k { color: #dcc6e0 } /* Keyword */
-html[data-theme="dark"] .highlight .l { color: #ffd900 } /* Literal */
-html[data-theme="dark"] .highlight .n { color: #f8f8f2 } /* Name */
-html[data-theme="dark"] .highlight .o { color: #abe338 } /* Operator */
-html[data-theme="dark"] .highlight .p { color: #f8f8f2 } /* Punctuation */
-html[data-theme="dark"] .highlight .ch { color: #ffd900 } /* Comment.Hashbang */
-html[data-theme="dark"] .highlight .cm { color: #ffd900 } /* Comment.Multiline */
-html[data-theme="dark"] .highlight .cp { color: #ffd900 } /* Comment.Preproc */
-html[data-theme="dark"] .highlight .cpf { color: #ffd900 } /* Comment.PreprocFile */
-html[data-theme="dark"] .highlight .c1 { color: #ffd900 } /* Comment.Single */
-html[data-theme="dark"] .highlight .cs { color: #ffd900 } /* Comment.Special */
-html[data-theme="dark"] .highlight .gd { color: #00e0e0 } /* Generic.Deleted */
+html[data-theme="dark"] .highlight { background: #2b2b2b; color: #F8F8F2 }
+html[data-theme="dark"] .highlight .c { color: #FFD900 } /* Comment */
+html[data-theme="dark"] .highlight .err { color: #FFA07A } /* Error */
+html[data-theme="dark"] .highlight .k { color: #DCC6E0 } /* Keyword */
+html[data-theme="dark"] .highlight .l { color: #FFD900 } /* Literal */
+html[data-theme="dark"] .highlight .n { color: #F8F8F2 } /* Name */
+html[data-theme="dark"] .highlight .o { color: #ABE338 } /* Operator */
+html[data-theme="dark"] .highlight .p { color: #F8F8F2 } /* Punctuation */
+html[data-theme="dark"] .highlight .ch { color: #FFD900 } /* Comment.Hashbang */
+html[data-theme="dark"] .highlight .cm { color: #FFD900 } /* Comment.Multiline */
+html[data-theme="dark"] .highlight .cp { color: #FFD900 } /* Comment.Preproc */
+html[data-theme="dark"] .highlight .cpf { color: #FFD900 } /* Comment.PreprocFile */
+html[data-theme="dark"] .highlight .c1 { color: #FFD900 } /* Comment.Single */
+html[data-theme="dark"] .highlight .cs { color: #FFD900 } /* Comment.Special */
+html[data-theme="dark"] .highlight .gd { color: #00E0E0 } /* Generic.Deleted */
html[data-theme="dark"] .highlight .ge { font-style: italic } /* Generic.Emph */
-html[data-theme="dark"] .highlight .gh { color: #00e0e0 } /* Generic.Heading */
+html[data-theme="dark"] .highlight .gh { color: #00E0E0 } /* Generic.Heading */
html[data-theme="dark"] .highlight .gs { font-weight: bold } /* Generic.Strong */
-html[data-theme="dark"] .highlight .gu { color: #00e0e0 } /* Generic.Subheading */
-html[data-theme="dark"] .highlight .kc { color: #dcc6e0 } /* Keyword.Constant */
-html[data-theme="dark"] .highlight .kd { color: #dcc6e0 } /* Keyword.Declaration */
-html[data-theme="dark"] .highlight .kn { color: #dcc6e0 } /* Keyword.Namespace */
-html[data-theme="dark"] .highlight .kp { color: #dcc6e0 } /* Keyword.Pseudo */
-html[data-theme="dark"] .highlight .kr { color: #dcc6e0 } /* Keyword.Reserved */
-html[data-theme="dark"] .highlight .kt { color: #ffd900 } /* Keyword.Type */
-html[data-theme="dark"] .highlight .ld { color: #ffd900 } /* Literal.Date */
-html[data-theme="dark"] .highlight .m { color: #ffd900 } /* Literal.Number */
-html[data-theme="dark"] .highlight .s { color: #abe338 } /* Literal.String */
-html[data-theme="dark"] .highlight .na { color: #ffd900 } /* Name.Attribute */
-html[data-theme="dark"] .highlight .nb { color: #ffd900 } /* Name.Builtin */
-html[data-theme="dark"] .highlight .nc { color: #00e0e0 } /* Name.Class */
-html[data-theme="dark"] .highlight .no { color: #00e0e0 } /* Name.Constant */
-html[data-theme="dark"] .highlight .nd { color: #ffd900 } /* Name.Decorator */
-html[data-theme="dark"] .highlight .ni { color: #abe338 } /* Name.Entity */
-html[data-theme="dark"] .highlight .ne { color: #dcc6e0 } /* Name.Exception */
-html[data-theme="dark"] .highlight .nf { color: #00e0e0 } /* Name.Function */
-html[data-theme="dark"] .highlight .nl { color: #ffd900 } /* Name.Label */
-html[data-theme="dark"] .highlight .nn { color: #f8f8f2 } /* Name.Namespace */
-html[data-theme="dark"] .highlight .nx { color: #f8f8f2 } /* Name.Other */
-html[data-theme="dark"] .highlight .py { color: #00e0e0 } /* Name.Property */
-html[data-theme="dark"] .highlight .nt { color: #00e0e0 } /* Name.Tag */
-html[data-theme="dark"] .highlight .nv { color: #ffa07a } /* Name.Variable */
-html[data-theme="dark"] .highlight .ow { color: #dcc6e0 } /* Operator.Word */
-html[data-theme="dark"] .highlight .pm { color: #f8f8f2 } /* Punctuation.Marker */
-html[data-theme="dark"] .highlight .w { color: #f8f8f2 } /* Text.Whitespace */
-html[data-theme="dark"] .highlight .mb { color: #ffd900 } /* Literal.Number.Bin */
-html[data-theme="dark"] .highlight .mf { color: #ffd900 } /* Literal.Number.Float */
-html[data-theme="dark"] .highlight .mh { color: #ffd900 } /* Literal.Number.Hex */
-html[data-theme="dark"] .highlight .mi { color: #ffd900 } /* Literal.Number.Integer */
-html[data-theme="dark"] .highlight .mo { color: #ffd900 } /* Literal.Number.Oct */
-html[data-theme="dark"] .highlight .sa { color: #abe338 } /* Literal.String.Affix */
-html[data-theme="dark"] .highlight .sb { color: #abe338 } /* Literal.String.Backtick */
-html[data-theme="dark"] .highlight .sc { color: #abe338 } /* Literal.String.Char */
-html[data-theme="dark"] .highlight .dl { color: #abe338 } /* Literal.String.Delimiter */
-html[data-theme="dark"] .highlight .sd { color: #abe338 } /* Literal.String.Doc */
-html[data-theme="dark"] .highlight .s2 { color: #abe338 } /* Literal.String.Double */
-html[data-theme="dark"] .highlight .se { color: #abe338 } /* Literal.String.Escape */
-html[data-theme="dark"] .highlight .sh { color: #abe338 } /* Literal.String.Heredoc */
-html[data-theme="dark"] .highlight .si { color: #abe338 } /* Literal.String.Interpol */
-html[data-theme="dark"] .highlight .sx { color: #abe338 } /* Literal.String.Other */
-html[data-theme="dark"] .highlight .sr { color: #ffa07a } /* Literal.String.Regex */
-html[data-theme="dark"] .highlight .s1 { color: #abe338 } /* Literal.String.Single */
-html[data-theme="dark"] .highlight .ss { color: #00e0e0 } /* Literal.String.Symbol */
-html[data-theme="dark"] .highlight .bp { color: #ffd900 } /* Name.Builtin.Pseudo */
-html[data-theme="dark"] .highlight .fm { color: #00e0e0 } /* Name.Function.Magic */
-html[data-theme="dark"] .highlight .vc { color: #ffa07a } /* Name.Variable.Class */
-html[data-theme="dark"] .highlight .vg { color: #ffa07a } /* Name.Variable.Global */
-html[data-theme="dark"] .highlight .vi { color: #ffa07a } /* Name.Variable.Instance */
-html[data-theme="dark"] .highlight .vm { color: #ffd900 } /* Name.Variable.Magic */
-html[data-theme="dark"] .highlight .il { color: #ffd900 } /* Literal.Number.Integer.Long */
\ No newline at end of file
+html[data-theme="dark"] .highlight .gu { color: #00E0E0 } /* Generic.Subheading */
+html[data-theme="dark"] .highlight .kc { color: #DCC6E0 } /* Keyword.Constant */
+html[data-theme="dark"] .highlight .kd { color: #DCC6E0 } /* Keyword.Declaration */
+html[data-theme="dark"] .highlight .kn { color: #DCC6E0 } /* Keyword.Namespace */
+html[data-theme="dark"] .highlight .kp { color: #DCC6E0 } /* Keyword.Pseudo */
+html[data-theme="dark"] .highlight .kr { color: #DCC6E0 } /* Keyword.Reserved */
+html[data-theme="dark"] .highlight .kt { color: #FFD900 } /* Keyword.Type */
+html[data-theme="dark"] .highlight .ld { color: #FFD900 } /* Literal.Date */
+html[data-theme="dark"] .highlight .m { color: #FFD900 } /* Literal.Number */
+html[data-theme="dark"] .highlight .s { color: #ABE338 } /* Literal.String */
+html[data-theme="dark"] .highlight .na { color: #FFD900 } /* Name.Attribute */
+html[data-theme="dark"] .highlight .nb { color: #FFD900 } /* Name.Builtin */
+html[data-theme="dark"] .highlight .nc { color: #00E0E0 } /* Name.Class */
+html[data-theme="dark"] .highlight .no { color: #00E0E0 } /* Name.Constant */
+html[data-theme="dark"] .highlight .nd { color: #FFD900 } /* Name.Decorator */
+html[data-theme="dark"] .highlight .ni { color: #ABE338 } /* Name.Entity */
+html[data-theme="dark"] .highlight .ne { color: #DCC6E0 } /* Name.Exception */
+html[data-theme="dark"] .highlight .nf { color: #00E0E0 } /* Name.Function */
+html[data-theme="dark"] .highlight .nl { color: #FFD900 } /* Name.Label */
+html[data-theme="dark"] .highlight .nn { color: #F8F8F2 } /* Name.Namespace */
+html[data-theme="dark"] .highlight .nx { color: #F8F8F2 } /* Name.Other */
+html[data-theme="dark"] .highlight .py { color: #00E0E0 } /* Name.Property */
+html[data-theme="dark"] .highlight .nt { color: #00E0E0 } /* Name.Tag */
+html[data-theme="dark"] .highlight .nv { color: #FFA07A } /* Name.Variable */
+html[data-theme="dark"] .highlight .ow { color: #DCC6E0 } /* Operator.Word */
+html[data-theme="dark"] .highlight .pm { color: #F8F8F2 } /* Punctuation.Marker */
+html[data-theme="dark"] .highlight .w { color: #F8F8F2 } /* Text.Whitespace */
+html[data-theme="dark"] .highlight .mb { color: #FFD900 } /* Literal.Number.Bin */
+html[data-theme="dark"] .highlight .mf { color: #FFD900 } /* Literal.Number.Float */
+html[data-theme="dark"] .highlight .mh { color: #FFD900 } /* Literal.Number.Hex */
+html[data-theme="dark"] .highlight .mi { color: #FFD900 } /* Literal.Number.Integer */
+html[data-theme="dark"] .highlight .mo { color: #FFD900 } /* Literal.Number.Oct */
+html[data-theme="dark"] .highlight .sa { color: #ABE338 } /* Literal.String.Affix */
+html[data-theme="dark"] .highlight .sb { color: #ABE338 } /* Literal.String.Backtick */
+html[data-theme="dark"] .highlight .sc { color: #ABE338 } /* Literal.String.Char */
+html[data-theme="dark"] .highlight .dl { color: #ABE338 } /* Literal.String.Delimiter */
+html[data-theme="dark"] .highlight .sd { color: #ABE338 } /* Literal.String.Doc */
+html[data-theme="dark"] .highlight .s2 { color: #ABE338 } /* Literal.String.Double */
+html[data-theme="dark"] .highlight .se { color: #ABE338 } /* Literal.String.Escape */
+html[data-theme="dark"] .highlight .sh { color: #ABE338 } /* Literal.String.Heredoc */
+html[data-theme="dark"] .highlight .si { color: #ABE338 } /* Literal.String.Interpol */
+html[data-theme="dark"] .highlight .sx { color: #ABE338 } /* Literal.String.Other */
+html[data-theme="dark"] .highlight .sr { color: #FFA07A } /* Literal.String.Regex */
+html[data-theme="dark"] .highlight .s1 { color: #ABE338 } /* Literal.String.Single */
+html[data-theme="dark"] .highlight .ss { color: #00E0E0 } /* Literal.String.Symbol */
+html[data-theme="dark"] .highlight .bp { color: #FFD900 } /* Name.Builtin.Pseudo */
+html[data-theme="dark"] .highlight .fm { color: #00E0E0 } /* Name.Function.Magic */
+html[data-theme="dark"] .highlight .vc { color: #FFA07A } /* Name.Variable.Class */
+html[data-theme="dark"] .highlight .vg { color: #FFA07A } /* Name.Variable.Global */
+html[data-theme="dark"] .highlight .vi { color: #FFA07A } /* Name.Variable.Instance */
+html[data-theme="dark"] .highlight .vm { color: #FFD900 } /* Name.Variable.Magic */
+html[data-theme="dark"] .highlight .il { color: #FFD900 } /* Literal.Number.Integer.Long */
\ No newline at end of file
diff --git a/specsanalyzer/develop/genindex.html b/specsanalyzer/develop/genindex.html
index 9688754..d47651f 100644
--- a/specsanalyzer/develop/genindex.html
+++ b/specsanalyzer/develop/genindex.html
@@ -7,7 +7,7 @@
- Index — specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ Index — specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -29,7 +29,7 @@
-
+
@@ -37,7 +37,7 @@
-
+
@@ -46,7 +46,7 @@
@@ -54,7 +54,7 @@
-
+
@@ -116,7 +116,7 @@
- specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -627,17 +627,15 @@ G
-
+
- get_pair_from_list() (in module specsanalyzer.io)
- get_raw2d() (in module specsscan.helpers)
@@ -679,6 +677,8 @@
M
- mcp_position_mm() (in module specsanalyzer.convert)
+
+ - mm_to_fs() (in module specsscan.helpers)
-
module
@@ -727,10 +727,12 @@
R
+ - recursive_parse_metadata() (in module specsanalyzer.io)
+
- recursive_write_metadata() (in module specsanalyzer.io)
- result (specsscan.core.SpecsScan property)
@@ -744,6 +746,12 @@
S
- save() (specsscan.core.SpecsScan method)
- save_config() (in module specsanalyzer.config)
+
+ - save_crop_params() (specsscan.core.SpecsScan method)
+
+ - save_env_var() (in module specsanalyzer.config)
+
+ - save_fft_params() (specsscan.core.SpecsScan method)
- second_closest_rr() (in module specsanalyzer.convert)
@@ -763,6 +771,8 @@ S
- module
+
+
-
specsanalyzer.core
@@ -770,8 +780,6 @@
S
- module
-
-
-
specsanalyzer.img_tools
diff --git a/specsanalyzer/develop/getting_started.html b/specsanalyzer/develop/getting_started.html
index ca9e96c..9719952 100644
--- a/specsanalyzer/develop/getting_started.html
+++ b/specsanalyzer/develop/getting_started.html
@@ -8,7 +8,7 @@
-
specsanalyzer — specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsanalyzer — specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -30,7 +30,7 @@
-
+
@@ -38,7 +38,7 @@
-
+
@@ -47,7 +47,7 @@
@@ -57,7 +57,7 @@
-
+
@@ -119,7 +119,7 @@
- specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsanalyzer 0.5.2.dev10+g554f714 documentation
diff --git a/specsanalyzer/develop/index.html b/specsanalyzer/develop/index.html
index c6380c8..be3a0b2 100644
--- a/specsanalyzer/develop/index.html
+++ b/specsanalyzer/develop/index.html
@@ -8,7 +8,7 @@
- Welcome to specsanalyzer’s documentation! — specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ Welcome to specsanalyzer’s documentation! — specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -30,7 +30,7 @@
-
+
@@ -38,7 +38,7 @@
-
+
@@ -49,7 +49,7 @@
@@ -58,7 +58,7 @@
-
+
@@ -120,7 +120,7 @@
- specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsanalyzer 0.5.2.dev10+g554f714 documentation
diff --git a/specsanalyzer/develop/misc/maintain.html b/specsanalyzer/develop/misc/maintain.html
index 8153840..f57b0c4 100644
--- a/specsanalyzer/develop/misc/maintain.html
+++ b/specsanalyzer/develop/misc/maintain.html
@@ -8,7 +8,7 @@
- 1. How to maintain — specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ 1. How to maintain — specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -30,7 +30,7 @@
-
+
@@ -38,7 +38,7 @@
-
+
@@ -47,7 +47,7 @@
@@ -56,7 +56,7 @@
-
+
@@ -118,7 +118,7 @@
- specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsanalyzer 0.5.2.dev10+g554f714 documentation
diff --git a/specsanalyzer/develop/objects.inv b/specsanalyzer/develop/objects.inv
index acf4fb1..fc6aa55 100644
Binary files a/specsanalyzer/develop/objects.inv and b/specsanalyzer/develop/objects.inv differ
diff --git a/specsanalyzer/develop/py-modindex.html b/specsanalyzer/develop/py-modindex.html
index 82fed6c..95809d9 100644
--- a/specsanalyzer/develop/py-modindex.html
+++ b/specsanalyzer/develop/py-modindex.html
@@ -7,7 +7,7 @@
- Python Module Index — specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ Python Module Index — specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -29,7 +29,7 @@
-
+
@@ -37,7 +37,7 @@
-
+
@@ -46,7 +46,7 @@
@@ -55,7 +55,7 @@
-
+
@@ -119,7 +119,7 @@
- specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsanalyzer 0.5.2.dev10+g554f714 documentation
diff --git a/specsanalyzer/develop/search.html b/specsanalyzer/develop/search.html
index c475a0a..41e4abd 100644
--- a/specsanalyzer/develop/search.html
+++ b/specsanalyzer/develop/search.html
@@ -6,7 +6,7 @@
- Search - specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ Search - specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -28,7 +28,7 @@
-
+
@@ -36,7 +36,7 @@
-
+
@@ -45,7 +45,7 @@
@@ -56,7 +56,7 @@
-
+
@@ -118,7 +118,7 @@
- specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsanalyzer 0.5.2.dev10+g554f714 documentation
diff --git a/specsanalyzer/develop/searchindex.js b/specsanalyzer/develop/searchindex.js
index 418017a..e4ce61f 100644
--- a/specsanalyzer/develop/searchindex.js
+++ b/specsanalyzer/develop/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"alltitles": {"API": [[3, "module-specsanalyzer.config"]], "Adjusting offsets and angle": [[10, "Adjusting-offsets-and-angle"]], "Config": [[3, null]], "Configuration and calib2d file": [[0, "configuration-and-calib2d-file"]], "Contributing": [[1, null]], "Conversion into spatially resolved modes": [[10, "Conversion-into-spatially-resolved-modes"]], "Conversion using conversion_parameters dict": [[10, "Conversion-using-conversion_parameters-dict"]], "Core functions (specsanalyzer.core)": [[5, null]], "Core functions (specsscan.core)": [[8, null]], "Cropping data": [[11, "Cropping-data"]], "Default specsanalyzer configuration settings": [[3, "default-specsanalyzer-configuration-settings"]], "Default specsscan configuration settings": [[3, "default-specsscan-configuration-settings"]], "Example 1: SpecsAnalyzer conversion": [[10, null]], "Example 2: SpecsScan loading": [[11, null]], "Example 3: Export to NeXus": [[12, null]], "Example 4: Sweep Scan loading": [[13, null]], "Example configuration file for the trARPES setup at FHI-Berlin": [[3, "example-configuration-file-for-the-trarpes-setup-at-fhi-berlin"]], "For Contributors": [[0, "for-contributors"]], "Getting Started": [[1, null]], "Helpers": [[9, null]], "How to maintain": [[2, null]], "Image conversion": [[10, "Image-conversion"]], "Indices and tables": [[1, "indices-and-tables"]], "Installation": [[0, "installation"]], "Loading data": [[11, "Loading-data"]], "Loading with selected iterations": [[11, "Loading-with-selected-iterations"]], "Pip (for users)": [[0, "pip-for-users"]], "Poetry (for maintainers)": [[0, "poetry-for-maintainers"]], "Removal of Mesh Artifact": [[11, "Removal-of-Mesh-Artifact"]], "Removal of mesh artefact": [[10, "Removal-of-mesh-artefact"]], "Saving": [[11, "Saving"]], "SpecsAnalyzer Core Modules": [[1, null]], "SpecsScan Core Modules": [[1, null]], "Welcome to specsanalyzer\u2019s documentation!": [[1, null]], "convert functions (specsanalyzer.convert)": [[4, null]], "image tool functions (specsanalyzer.img_tools)": [[6, null]], "io functions (specsanalyzer.io)": [[7, null]], "specsanalyzer": [[0, null]]}, "docnames": ["getting_started", "index", "misc/maintain", "specsanalyzer/config", "specsanalyzer/convert", "specsanalyzer/core", "specsanalyzer/img_tools", "specsanalyzer/io", "specsscan/core", "specsscan/helpers", "tutorial/1_specsanalyzer_conversion_examples", "tutorial/2_specsscan_example", "tutorial/3_specsscan_conversion_to_NeXus", "tutorial/4_specsscan_load_sweep_scan"], "envversion": {"nbsphinx": 4, "sphinx": 64, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.todo": 2, "sphinx.ext.viewcode": 1}, "filenames": ["getting_started.rst", "index.rst", "misc/maintain.rst", "specsanalyzer/config.rst", "specsanalyzer/convert.rst", "specsanalyzer/core.rst", "specsanalyzer/img_tools.rst", "specsanalyzer/io.rst", "specsscan/core.rst", "specsscan/helpers.rst", "tutorial/1_specsanalyzer_conversion_examples.ipynb", "tutorial/2_specsscan_example.ipynb", "tutorial/3_specsscan_conversion_to_NeXus.ipynb", "tutorial/4_specsscan_load_sweep_scan.ipynb"], "indexentries": {"_fill_missing_dims() (in module specsanalyzer.io)": [[7, "specsanalyzer.io._fill_missing_dims", false]], "_sort_dims_for_imagej() (in module specsanalyzer.io)": [[7, "specsanalyzer.io._sort_dims_for_imagej", false]], "bisection() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.bisection", false]], "calculate_jacobian() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.calculate_jacobian", false]], "calculate_matrix_correction() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.calculate_matrix_correction", false]], "calculate_polynomial_coef_da() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.calculate_polynomial_coef_da", false]], "calib2d (specsanalyzer.core.specsanalyzer property)": [[5, "specsanalyzer.core.SpecsAnalyzer.calib2d", false]], "check_scan() (specsscan.core.specsscan method)": [[8, "specsscan.core.SpecsScan.check_scan", false]], "compare_coords() (in module specsscan.helpers)": [[9, "specsscan.helpers.compare_coords", false]], "complete_dictionary() (in module specsanalyzer.config)": [[3, "specsanalyzer.config.complete_dictionary", false]], "config (specsanalyzer.core.specsanalyzer property)": [[5, "specsanalyzer.core.SpecsAnalyzer.config", false]], "config (specsscan.core.specsscan property)": [[8, "specsscan.core.SpecsScan.config", false]], "convert_image() (specsanalyzer.core.specsanalyzer method)": [[5, "specsanalyzer.core.SpecsAnalyzer.convert_image", false]], "correction_matrix_dict (specsanalyzer.core.specsanalyzer property)": [[5, "specsanalyzer.core.SpecsAnalyzer.correction_matrix_dict", false]], "create_fft_params() (in module specsanalyzer.core)": [[5, "specsanalyzer.core.create_fft_params", false]], "crop_tool() (specsanalyzer.core.specsanalyzer method)": [[5, "specsanalyzer.core.SpecsAnalyzer.crop_tool", false]], "crop_tool() (specsscan.core.specsscan method)": [[8, "specsscan.core.SpecsScan.crop_tool", false]], "crop_xarray() (in module specsanalyzer.img_tools)": [[6, "specsanalyzer.img_tools.crop_xarray", false]], "fft_tool() (specsanalyzer.core.specsanalyzer method)": [[5, "specsanalyzer.core.SpecsAnalyzer.fft_tool", false]], "fft_tool() (specsscan.core.specsscan method)": [[8, "specsscan.core.SpecsScan.fft_tool", false]], "find_scan() (in module specsscan.helpers)": [[9, "specsscan.helpers.find_scan", false]], "find_scan_type() (in module specsscan.helpers)": [[9, "specsscan.helpers.find_scan_type", false]], "fourier_filter_2d() (in module specsanalyzer.img_tools)": [[6, "specsanalyzer.img_tools.fourier_filter_2d", false]], "gauss2d() (in module specsanalyzer.img_tools)": [[6, "specsanalyzer.img_tools.gauss2d", false]], "get_archiver_data() (in module specsscan.helpers)": [[9, "specsscan.helpers.get_archiver_data", false]], "get_coords() (in module specsscan.helpers)": [[9, "specsscan.helpers.get_coords", false]], "get_damatrix_from_calib2d() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.get_damatrix_from_calib2d", false]], "get_modes_from_calib_dict() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.get_modes_from_calib_dict", false]], "get_pair_from_list() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.get_pair_from_list", false]], "get_raw2d() (in module specsscan.helpers)": [[9, "specsscan.helpers.get_raw2d", false]], "get_rr_da() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.get_rr_da", false]], "get_scan_path() (in module specsscan.helpers)": [[9, "specsscan.helpers.get_scan_path", false]], "handle_meta() (in module specsscan.helpers)": [[9, "specsscan.helpers.handle_meta", false]], "load_config() (in module specsanalyzer.config)": [[3, "specsanalyzer.config.load_config", false]], "load_h5() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.load_h5", false]], "load_images() (in module specsscan.helpers)": [[9, "specsscan.helpers.load_images", false]], "load_scan() (specsscan.core.specsscan method)": [[8, "specsscan.core.SpecsScan.load_scan", false]], "load_tiff() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.load_tiff", false]], "mcp_position_mm() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.mcp_position_mm", false]], "module": [[3, "module-specsanalyzer.config", false], [4, "module-specsanalyzer.convert", false], [5, "module-specsanalyzer.core", false], [6, "module-specsanalyzer.img_tools", false], [7, "module-specsanalyzer.io", false], [8, "module-specsscan.core", false], [9, "module-specsscan.helpers", false]], "parse_calib2d_to_dict() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.parse_calib2d_to_dict", false]], "parse_config() (in module specsanalyzer.config)": [[3, "specsanalyzer.config.parse_config", false]], "parse_info_to_dict() (in module specsscan.helpers)": [[9, "specsscan.helpers.parse_info_to_dict", false]], "parse_lut_to_df() (in module specsscan.helpers)": [[9, "specsscan.helpers.parse_lut_to_df", false]], "physical_unit_data() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.physical_unit_data", false]], "process_sweep_scan() (specsscan.core.specsscan method)": [[8, "specsscan.core.SpecsScan.process_sweep_scan", false]], "read_calib2d() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.read_calib2d", false]], "recursive_parse_metadata() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.recursive_parse_metadata", false]], "recursive_write_metadata() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.recursive_write_metadata", false]], "result (specsscan.core.specsscan property)": [[8, "specsscan.core.SpecsScan.result", false]], "save() (specsscan.core.specsscan method)": [[8, "specsscan.core.SpecsScan.save", false]], "save_config() (in module specsanalyzer.config)": [[3, "specsanalyzer.config.save_config", false]], "second_closest_rr() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.second_closest_rr", false]], "specsanalyzer (class in specsanalyzer.core)": [[5, "specsanalyzer.core.SpecsAnalyzer", false]], "specsanalyzer.config": [[3, "module-specsanalyzer.config", false]], "specsanalyzer.convert": [[4, "module-specsanalyzer.convert", false]], "specsanalyzer.core": [[5, "module-specsanalyzer.core", false]], "specsanalyzer.img_tools": [[6, "module-specsanalyzer.img_tools", false]], "specsanalyzer.io": [[7, "module-specsanalyzer.io", false]], "specsscan (class in specsscan.core)": [[8, "specsscan.core.SpecsScan", false]], "specsscan.core": [[8, "module-specsscan.core", false]], "specsscan.helpers": [[9, "module-specsscan.helpers", false]], "to_h5() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.to_h5", false]], "to_nexus() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.to_nexus", false]], "to_tiff() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.to_tiff", false]], "zinner() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.zinner", false]], "zinner_diff() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.zinner_diff", false]]}, "objects": {"specsanalyzer": [[3, 0, 0, "-", "config"], [4, 0, 0, "-", "convert"], [5, 0, 0, "-", "core"], [6, 0, 0, "-", "img_tools"], [7, 0, 0, "-", "io"]], "specsanalyzer.config": [[3, 1, 1, "", "complete_dictionary"], [3, 1, 1, "", "load_config"], [3, 1, 1, "", "parse_config"], [3, 1, 1, "", "save_config"]], "specsanalyzer.convert": [[4, 1, 1, "", "bisection"], [4, 1, 1, "", "calculate_jacobian"], [4, 1, 1, "", "calculate_matrix_correction"], [4, 1, 1, "", "calculate_polynomial_coef_da"], [4, 1, 1, "", "get_damatrix_from_calib2d"], [4, 1, 1, "", "get_rr_da"], [4, 1, 1, "", "mcp_position_mm"], [4, 1, 1, "", "physical_unit_data"], [4, 1, 1, "", "second_closest_rr"], [4, 1, 1, "", "zinner"], [4, 1, 1, "", "zinner_diff"]], "specsanalyzer.core": [[5, 2, 1, "", "SpecsAnalyzer"], [5, 1, 1, "", "create_fft_params"]], "specsanalyzer.core.SpecsAnalyzer": [[5, 3, 1, "", "calib2d"], [5, 3, 1, "", "config"], [5, 4, 1, "", "convert_image"], [5, 3, 1, "", "correction_matrix_dict"], [5, 4, 1, "", "crop_tool"], [5, 4, 1, "", "fft_tool"]], "specsanalyzer.img_tools": [[6, 1, 1, "", "crop_xarray"], [6, 1, 1, "", "fourier_filter_2d"], [6, 1, 1, "", "gauss2d"]], "specsanalyzer.io": [[7, 1, 1, "", "_fill_missing_dims"], [7, 1, 1, "", "_sort_dims_for_imagej"], [7, 1, 1, "", "get_modes_from_calib_dict"], [7, 1, 1, "", "get_pair_from_list"], [7, 1, 1, "", "load_h5"], [7, 1, 1, "", "load_tiff"], [7, 1, 1, "", "parse_calib2d_to_dict"], [7, 1, 1, "", "read_calib2d"], [7, 1, 1, "", "recursive_parse_metadata"], [7, 1, 1, "", "recursive_write_metadata"], [7, 1, 1, "", "to_h5"], [7, 1, 1, "", "to_nexus"], [7, 1, 1, "", "to_tiff"]], "specsscan": [[8, 0, 0, "-", "core"], [9, 0, 0, "-", "helpers"]], "specsscan.core": [[8, 2, 1, "", "SpecsScan"]], "specsscan.core.SpecsScan": [[8, 4, 1, "", "check_scan"], [8, 3, 1, "", "config"], [8, 4, 1, "", "crop_tool"], [8, 4, 1, "", "fft_tool"], [8, 4, 1, "", "load_scan"], [8, 4, 1, "", "process_sweep_scan"], [8, 3, 1, "", "result"], [8, 4, 1, "", "save"]], "specsscan.helpers": [[9, 1, 1, "", "compare_coords"], [9, 1, 1, "", "find_scan"], [9, 1, 1, "", "find_scan_type"], [9, 1, 1, "", "get_archiver_data"], [9, 1, 1, "", "get_coords"], [9, 1, 1, "", "get_raw2d"], [9, 1, 1, "", "get_scan_path"], [9, 1, 1, "", "handle_meta"], [9, 1, 1, "", "load_images"], [9, 1, 1, "", "parse_info_to_dict"], [9, 1, 1, "", "parse_lut_to_df"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"], "3": ["py", "property", "Python property"], "4": ["py", "method", "Python method"]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class", "3": "py:property", "4": "py:method"}, "terms": {"": [3, 7, 12], "0": [3, 5, 10, 11, 12, 13], "00": 12, "000000": 10, "0033": 10, "00645": 3, "01": 10, "02": [10, 12], "0258": 10, "03": [10, 12], "04": 10, "04428571e": 10, "05": 10, "066": 10, "07597844332538181": 12, "07597844332538357": 13, "08": [11, 12], "0x7f2454f43160": 13, "0x7f4cba5fe6e0": 12, "0x7f4d04d06aa0": 12, "0x7f7e45032710": 10, "0x7f7e45169ed0": 10, "0x7f7e4535b310": 10, "0x7f7e48e44c40": 10, "0x7f7e49273e20": 10, "0x7f7e4bb09030": 10, "0x7ffa709f5ea0": 11, "0x7ffa70a471c0": 11, "0x7ffa70a96f80": 11, "0x7ffa70b6ae00": 11, "0x7ffa7238c2b0": 11, "1": [1, 3, 4, 6, 8, 9, 11, 12, 13], "10": [3, 8, 9, 10, 11, 12, 13], "1024": 3, "108": 3, "109": 3, "11": [10, 11, 12], "116": 11, "12": [10, 11], "120": 12, "13": [10, 11, 13], "1376": 3, "14": [10, 11], "14195": 12, "1496": 12, "15": [3, 8, 9, 10, 11, 12, 13], "150": 12, "16453159041394336": 12, "16571429e": 10, "16732026143790849": 13, "17668": 3, "19828571e": 10, "19t10": 12, "2": [1, 6, 7, 9, 10, 12, 13], "20": 12, "2017": 12, "2020": 9, "20521429e": 10, "20f": 12, "21": 12, "224": 12, "23": 11, "2566412": 4, "270": 12, "2857142857142865": 10, "2d": [5, 6, 9], "3": [1, 3, 7, 8, 10, 11, 13], "30": 12, "300": 12, "34": 12, "34014286e": 10, "35": [10, 12], "36678571e": 10, "37997143e": 10, "39": [10, 11, 12], "3d": [9, 11], "4": [1, 3, 7, 10, 11, 12], "4450": 11, "4sigma": 12, "5": [3, 10, 11, 12], "500": 12, "53542857e": 10, "54": [3, 10], "55": 12, "59685714e": 10, "5e": 12, "6": [4, 10, 11, 12], "6455": 13, "7": [10, 11, 12], "70": 12, "7142857142857135": 10, "74571429e": 10, "78": 3, "79": 3, "8": [3, 10, 11, 12], "80": [3, 12], "800": 12, "800nm": 12, "81": 3, "82": [10, 11], "8449673202614381": 13, "85": 11, "85771429e": 10, "8771428571428571": 10, "88": 11, "8840087145969499": 12, "8965456312395133": 13, "9": [10, 11], "9117413199045858": 12, "95942857e": 10, "A": [0, 3, 4, 5, 8, 9, 12], "For": [3, 8, 9, 11], "If": [0, 7, 9, 10], "In": [3, 11], "It": 3, "Its": 8, "No": 10, "One": 11, "The": [0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "These": [3, 10, 12], "To": 0, "Will": 3, "__epicsarchiver_host__": 3, "_attr": 7, "_fill_missing_dim": 7, "_sort_dims_for_imagej": 7, "a_inn": [4, 10], "a_rang": [4, 10], "about": 6, "abov": 4, "access": [0, 11], "accessor": 11, "accord": 6, "acquir": 0, "activ": 0, "ad": [3, 7, 11], "add": 7, "addit": [3, 8, 9, 11, 13], "address": 12, "administr": 3, "affili": 12, "after": [4, 11, 12], "again": 11, "alia": 7, "alias": 8, "alias_dict": [7, 8], "all": [0, 3, 8, 9, 11, 13], "allusersprofil": 3, "along": [3, 4, 6, 11, 12], "alreadi": 11, "also": [3, 10, 11], "altern": [3, 10, 11], "amplitud": [3, 5, 6, 8, 11], "an": [0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "analyz": [0, 3, 4, 5, 8, 10], "analyzer_dispers": 3, "ang_range_max": [5, 11, 12, 13], "ang_range_min": [5, 11, 12, 13], "angl": [0, 3, 4, 5, 8, 11], "angle_axi": 4, "angle_offset_px": [3, 4, 10, 13], "angular": [0, 3, 4, 7, 11], "angular0": [3, 12], "angular1": [3, 12], "angular_correction_matrix": 4, "angular_resolut": 12, "ani": [3, 7, 9], "anoth": 11, "api": 0, "appear": [5, 8], "append": 8, "appli": [3, 5, 8, 10, 11], "applic": [3, 8], "apply_fft_filt": [3, 10, 11], "approach": 10, "ar": [0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13], "archiv": [3, 8, 9], "archiver_channel": 9, "archiver_url": [3, 9], "area": [4, 11], "argument": [3, 5, 7, 8, 10], "around": [4, 5, 8, 12], "arpescontrol": 8, "arrai": [4, 6, 7, 8, 9, 10], "arriv": 4, "artifact": [3, 6, 10], "associ": [4, 11], "assum": 7, "attr": [7, 10, 11], "attribut": [7, 10, 11], "attributeerror": 7, "automat": 7, "autoreload": [10, 11, 12, 13], "auxiliari": 4, "avail": [0, 10], "averag": [8, 9, 11], "average_pow": 12, "avg": 9, "ax": [3, 7, 12], "axi": [3, 4, 5, 7, 8, 9, 11, 12], "axis_data": 9, "axis_dict": 7, "azimuth": 3, "band": [11, 12], "bar": [3, 9], "base": [3, 4, 5, 8, 9], "base_dictionari": 3, "basepath": 9, "beam": 12, "been": 7, "befor": 11, "below": [0, 3, 4], "berlin": [8, 11, 12], "best": [4, 7], "between": [3, 4], "beyond": 11, "bin": [0, 3, 4, 10], "binarysearch": 4, "bisect": 4, "bool": [3, 5, 8, 9], "both": 9, "boundari": [4, 6, 11], "built": [5, 8], "c": 7, "calcul": [4, 6], "calculate_jacobian": 4, "calculate_matrix_correct": 4, "calculate_polynomial_coef_da": 4, "calib2": 10, "calib2d": [3, 4, 5, 7, 8, 10], "calib2d_dict": 4, "calib2d_fil": 3, "calib_dict": 7, "calibr": [0, 3, 7, 10], "camelcas": [5, 8], "camera": 5, "can": [0, 3, 7, 8, 9, 10, 11], "cannot": [3, 7, 9], "carv": [3, 12], "case": 11, "cd": 0, "center": [4, 6, 10], "certain": 4, "chang": [0, 3, 9, 11, 12], "channel": [3, 7, 9], "charact": 7, "check": [0, 5, 8], "check_scan": [8, 9, 11], "chemical_formula": 12, "chosen": 6, "class": [0, 5, 8, 9, 11, 12, 13], "clean": 7, "cleav": 12, "clone": 0, "closest": 4, "closest_rr_index": 4, "coeffici": 4, "collect": [3, 8, 9, 10, 11, 12, 13], "collect_metadata": [8, 9, 12], "column": 9, "com": [0, 4], "combin": 3, "come": 12, "command": 0, "common": 8, "compare_coord": 9, "comparison": 4, "compat": 7, "complet": [3, 7, 11], "complete_dictionari": 3, "concept": 1, "conda": 0, "config": [0, 1, 5, 8, 9, 10, 11, 12, 13], "config_dict": 3, "config_filteron": 10, "config_path": 3, "configur": [4, 7, 10, 11, 13], "consid": 7, "consist": [3, 8, 9], "constructor": 0, "contain": [0, 3, 4, 5, 6, 7, 8, 9, 11, 12], "content": [3, 9], "contribut": 0, "control": 3, "conveni": [7, 11], "convent": [5, 8], "convers": [0, 1, 3, 4, 5, 7, 8, 9, 11, 12, 13], "conversion_paramet": [5, 11], "convert": [0, 1, 5, 7, 8, 9, 10, 11, 12], "convert_imag": [5, 10], "coord": [7, 9], "coordin": [0, 4, 5, 6, 7, 8, 9, 11], "coordinate_depend": 3, "coordinate_map": 3, "copi": 10, "correct": [4, 5, 7], "correction_matrix_dict": 5, "correl": 6, "correspond": [0, 3, 4, 5, 6, 7, 9, 10, 11], "creat": [0, 3, 5, 7, 10, 11, 12, 13], "create_fft_param": 5, "crop": [3, 5, 6, 8, 12, 13], "crop_tool": [5, 8, 11], "crop_xarrai": 6, "crystal": 12, "cube": 12, "current": [3, 4, 7], "cut": 12, "d": [8, 9], "da": 4, "da1": 4, "da3": 4, "da7": 4, "da_matrix": [4, 10], "da_poly_matrix": 4, "dapolymatrix": 4, "data": [0, 3, 5, 6, 7, 8, 9, 10, 12, 13], "data9132_rawdata": 10, "data_arrai": 6, "data_path": [3, 8], "dataarrai": [5, 6, 7, 8], "databas": 4, "dataconvert": 7, "dataepfl": 10, "datafram": [9, 11, 12], "dataset": 7, "de": 12, "de1": [4, 10], "default": [5, 6, 7, 8, 9, 10, 11, 12, 13], "default_config": 3, "defin": [0, 3, 4, 5, 6, 10], "definit": [3, 7, 8, 12], "deg": 4, "degre": 3, "delai": [3, 8, 9, 11, 12], "delimit": 10, "demonstr": [10, 11], "depend": 0, "describ": 7, "descript": [1, 4, 12], "detail": 3, "detector": [0, 3, 4, 10, 11], "determin": [4, 5, 8], "dev": 0, "develop": 0, "deviat": 3, "df_lut": 9, "dict": [3, 4, 5, 6, 7, 8, 9], "dict_kei": 11, "dictionari": [3, 4, 5, 7, 8, 9, 13], "differ": [3, 9, 10, 11, 12, 13], "dim": [4, 6, 7, 9, 10, 11, 12], "dimens": [7, 8, 9, 10, 11], "dimension": [6, 7, 12], "direct": [3, 4, 6], "directli": [3, 5, 8, 11], "directori": [3, 9], "disabl": 3, "dispers": [3, 4, 11, 12], "distanc": 4, "divid": 7, "do": [4, 11], "doc": [0, 10, 11, 12, 13], "document": [0, 11], "doe": 7, "done": [0, 11, 12, 13], "drain_curr": 3, "drive": 11, "duplic": 7, "e": [0, 3, 4, 5, 6, 8, 9, 10, 11], "e_correct": 4, "e_rang": [4, 10], "e_shift": [4, 10], "each": [3, 4, 6, 8], "edg": 4, "edit": 0, "ef": 12, "either": [0, 8, 11], "ek_axi": 4, "ek_range_max": [5, 11, 12, 13], "ek_range_min": [5, 11, 12, 13], "ekin": [3, 8, 10, 11], "electron": [4, 8, 12], "electronanalys": [3, 12], "element": [6, 7], "eln": 3, "eln_data": 8, "email": 12, "emiss": [0, 4], "empti": [3, 8, 9], "enabl": [3, 9], "enable_nested_progress_bar": 3, "end": 9, "energi": [0, 3, 4, 5, 7, 8, 11, 12, 13], "energy_offset_px": [3, 4, 10], "energy_resolut": 12, "energydispers": 3, "engin": 3, "ensur": 0, "entri": [3, 6, 7, 11, 12], "entry_titl": 12, "environ": 0, "epfl": [0, 8], "epic": [3, 8, 9], "epics_channel": 3, "equidist": 13, "eshift": 4, "estim": 4, "etc": [0, 3, 9], "ev": 3, "even": 7, "ex": [8, 9], "exampl": [0, 1], "example_config_fhi": [12, 13], "example_data": 11, "exist": [3, 11], "experiment_summari": 12, "experiment_titl": 12, "explicitli": 10, "explor": 8, "export": 1, "express": 4, "extend": 7, "extens": 8, "extent": 12, "extract": 9, "f": [3, 12], "factor": [3, 4], "faddr": [7, 8], "fairmat": 12, "fals": [3, 5, 8, 9, 10, 11], "faradayweg": 12, "fast": 9, "fast_ax": 9, "featur": 6, "feel": 0, "fermi": 12, "fft": [5, 6, 8, 10, 11], "fft_filter_peak": [3, 5, 8, 10, 11], "fft_tool": [5, 8, 10, 11], "fhi": [0, 11, 12], "figur": [10, 11, 12, 13], "file": [5, 7, 8, 9, 10, 11, 12], "filenam": 8, "filenotfounderror": [3, 9], "filepath": 7, "fill": 12, "filter": [3, 5, 6, 8, 10, 11], "filtered_fft": 6, "find": 4, "find_scan": 9, "find_scan_typ": 9, "first": [0, 3, 6, 11, 12], "fit": 4, "fix": 11, "flag": [3, 6], "float": [4, 5, 6, 7, 8, 9], "fluenc": 12, "folder": [3, 8, 9, 10, 11], "folder_config": 3, "follow": [0, 3, 6, 7, 12], "format": [3, 7, 12], "found": [0, 3, 4, 7, 9, 10, 11, 12, 13], "fourier": [3, 5, 6, 8, 10], "fourier_filter_2d": 6, "fraction": 4, "frame": [8, 9], "free": 0, "frequenc": [5, 8, 12], "fritz": [3, 8, 12], "from": [0, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13], "front": 10, "fsmap": 12, "full": [6, 7], "fulli": 3, "function": [1, 3, 9, 10, 11], "further": [8, 9], "fwhm": 12, "g": [0, 3, 5, 6, 8, 9, 10, 11], "gamma": 12, "gather": [11, 12, 13], "gauss2d": 6, "gaussian": [3, 5, 6, 12], "gener": [8, 11, 12], "get": [4, 5, 8, 11], "get_archiver_data": 9, "get_coord": 9, "get_damatrix_from_calib2d": 4, "get_modes_from_calib_dict": 7, "get_pair_from_list": 7, "get_raw2d": 9, "get_rr_da": 4, "get_scan_path": 9, "getdata": 3, "git": 0, "github": [0, 2], "give": 3, "given": [3, 4, 6, 7, 8, 9, 11, 12], "grid": [3, 6, 8, 10, 11, 13], "group": 7, "gt": [10, 11, 12, 13], "guess": 7, "h5": [8, 11], "h5group": 7, "h5py": 7, "ha": [11, 12], "haber": [3, 8, 12], "handl": [0, 9], "handle_meta": 9, "have": [0, 7, 10], "hdf5": [7, 8, 11], "help": 0, "helper": 1, "here": [3, 11, 13], "hierarch": 3, "high": 4, "highmagnification2": 10, "home": [3, 10, 11, 12, 13], "horizont": [5, 8], "hostedtoolcach": [3, 10, 11, 12, 13], "how": 1, "http": [0, 3, 4], "i": [0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "ideal": 12, "identifi": 9, "ignor": 7, "igor": 4, "illumin": 11, "imag": [0, 1, 3, 4, 5, 7, 8, 9, 11, 13], "imagej": 7, "img_tool": 1, "import": [0, 10, 11, 12, 13], "importantli": 0, "incident_energi": 12, "incident_energy_spread": 12, "incident_polar": 12, "incident_wavelength": 12, "includ": [7, 11], "increas": 4, "independ": 6, "index": [1, 4, 8, 9, 11], "indexerror": 9, "indic": [4, 6, 8, 9], "individu": [3, 13], "infer": 7, "info": 9, "info_dict": 9, "inform": [6, 7, 11], "init": 0, "initi": 3, "inner": 4, "input": [3, 6, 7, 8, 9], "input_fil": [3, 7, 8], "instanc": [3, 9, 10, 11, 12, 13], "instead": 7, "institut": [3, 8, 12], "instrument": [3, 12], "int": [4, 8, 9], "integ": [4, 8, 9], "integr": 11, "intend": [0, 3], "intens": 6, "interact": [10, 11], "interest": [8, 9, 11], "interfac": [8, 9], "interpol": [4, 8, 10], "introduc": 10, "investig": 12, "io": 1, "ipykernel": 0, "ipython": 0, "item": 3, "iter": [3, 8, 9], "its": [11, 12], "j": 4, "jacobian": 4, "jacobian_determin": 4, "json": [3, 8, 12], "jupyt": 0, "k": 3, "keep": 3, "kei": [3, 7, 11], "kernel": 0, "keyerror": 4, "keyword": [5, 7, 8, 10, 11], "kinet": [4, 5, 8, 13], "kinetic_energi": [3, 4, 5, 8, 10], "kwd": [5, 7, 8, 10], "lab": [8, 12], "labview": 0, "later": [4, 11], "laurenz": 12, "lausann": 8, "len": [3, 4, 5, 7, 8], "lens_mod": [4, 5, 8, 10], "lib": [3, 10, 11, 12, 13], "librari": 3, "like": 7, "line": [4, 6, 7], "linear": 4, "linux": 3, "list": [0, 4, 5, 6, 7, 8, 9, 11], "list_lin": 7, "load": [0, 1, 3, 7, 8, 9, 10, 12], "load_config": 3, "load_ext": [10, 11, 12, 13], "load_h5": 7, "load_imag": 9, "load_scan": [8, 9, 11, 12, 13], "load_tiff": 7, "loader": [11, 12], "loadtxt": 10, "loc": [11, 12], "local": 0, "locat": [0, 9, 11, 12, 13], "look": 3, "low": 4, "lt": [10, 11, 12, 13], "lut": 9, "m": 0, "magnif": [3, 4, 10], "mai": 11, "maintain": 1, "make": [0, 11], "manipul": [6, 9], "manner": 3, "manual": [7, 12], "manufactur": 0, "map": 12, "map_coordin": 4, "mask": 6, "matplotlib": [10, 11, 12, 13], "matric": 4, "matrix": [4, 5], "max": 12, "maxim": 4, "maximum": [6, 9], "mcp": [0, 4, 10, 11], "mcp_position_mm": 4, "measur": [3, 12], "mechan": 3, "merg": [3, 13], "mesh": [5, 8], "meshgrid": [5, 8, 11], "metadata": [5, 7, 8, 9, 11, 12, 13], "method": [8, 9, 11, 12, 13], "might": 13, "millimet": [3, 4], "mimic": 4, "minim": 4, "minimum": 6, "mirror": [9, 11], "mirrori": 3, "mirrorx": [3, 11], "miss": 3, "mitig": 10, "mm": [3, 4], "mm_z": 4, "mode": [0, 4, 5, 7, 8, 11], "modif": 3, "modul": [0, 3, 4, 6, 7], "monoton": 4, "more": 7, "most": [0, 9], "mostli": 3, "mpe": [3, 12], "mpg": 12, "must": [4, 8], "mx": 6, "my": 6, "name": [0, 3, 5, 7, 8, 9, 12], "nameerror": 7, "nap32": 9, "ndarrai": [4, 5, 6, 7, 8, 9], "ndimag": 4, "nearest": 4, "necessari": 3, "need": [0, 4, 7, 8, 9, 12], "neither": [3, 9], "nest": [3, 7, 9], "new": [0, 11], "nexu": [1, 3, 7, 8, 9], "node": 7, "non": [4, 11, 13], "none": [3, 5, 7, 8, 9], "nor": [3, 9], "normal": [3, 4, 5, 8], "notebook": [0, 3, 8, 11, 12], "notimplementederror": 7, "now": 0, "np": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "number": [3, 4, 7, 8, 9, 11, 13], "numpi": [4, 5, 7, 8, 9, 10, 11, 12, 13], "nx": [8, 12], "nx_pixel": [3, 4], "nxmpes_arp": [3, 12], "nxmpes_arpes_config": [3, 12], "nxuser": 12, "ny_pixel": [3, 4], "o": 10, "object": [5, 7, 8, 9, 11], "obtain": 9, "offset": [3, 4], "omg": 3, "onc": 0, "one": [6, 7, 10, 11], "onli": [4, 7, 11], "onto": [8, 13], "open": 10, "opencomp": 0, "oper": [10, 11], "opt": [3, 10, 11, 12, 13], "optim": [5, 8, 10, 11], "option": [0, 3, 5, 6, 7, 8, 9, 11], "order": [3, 4, 7, 11], "org": 0, "other": [3, 5, 11], "otherwis": 7, "out": [0, 4, 5, 8], "output": [7, 12], "outsid": 4, "over": [3, 8, 9, 11], "overlap": [12, 13], "overwrit": [3, 5], "overwritten": 3, "p": 12, "p_rd": [3, 12], "pack": 4, "packag": [0, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13], "package_dir": 3, "page": 1, "pair": 7, "panda": 9, "paramet": [0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "pars": [7, 9], "parse_calib2d_to_dict": 7, "parse_config": [3, 5, 8], "parse_info_to_dict": 9, "parse_lut_to_df": 9, "parser": 7, "part": 0, "pass": [0, 3, 4, 5, 8, 10, 11], "pass_energi": [4, 5, 8, 10], "path": [3, 5, 7, 8, 9, 10, 11, 12, 13], "pattern": 6, "pd": 9, "peak": [3, 5, 6, 8, 10, 11], "per": [4, 11, 13], "perform": [4, 8, 9, 10, 13], "pesdata": 9, "phi": 3, "phoibo": [0, 5, 8, 10, 11], "phoibos150": [0, 3], "photoelectron": 4, "photoemiss": [4, 5], "physic": [0, 4, 5], "physical_unit_data": 4, "pixel": [3, 4], "pixel_s": [3, 4, 10], "place": [3, 5], "plai": [5, 8], "planck": 12, "plane": [3, 5, 8, 10], "pleas": 10, "plot": [10, 11, 12, 13], "plt": [10, 11, 12, 13], "point": [9, 11, 12], "pol": 12, "polar": 3, "polynomi": 4, "popul": 7, "pos_i": [3, 5, 6, 8, 11], "pos_x": [3, 5, 6, 8, 11], "posi": 7, "posit": [3, 4, 5, 6, 8, 10, 11], "poss": 4, "possibl": 6, "possibli": 3, "posx": 7, "pre": [3, 5], "prefer": 3, "preparation_d": 12, "preparation_descript": 12, "prerequisit": 0, "present": [3, 11], "preserv": 4, "press": 11, "pressur": 3, "pressureac": [3, 12], "previous": [8, 11], "princip": 12, "print": 9, "pro": 4, "probe": 12, "procedur": 0, "process": [8, 11], "process_sweep_scan": 8, "processor": 3, "produc": 13, "program": 4, "progress": [3, 9], "project": 9, "properti": [5, 8], "provid": [0, 3, 5, 6, 7, 8, 9, 10, 11, 13], "pull": 0, "pulse_dur": 12, "pulse_energi": 12, "pump": 12, "pv": 3, "pyenv": 0, "pynxtool": [7, 8, 12], "pypi": 0, "pyplot": [10, 11, 12, 13], "pyproject": 0, "python": [0, 3, 7, 10, 11, 12, 13], "python3": [3, 10, 11, 12, 13], "quadmesh": [10, 11, 12, 13], "queri": 9, "question": 4, "r": 7, "r9132": 10, "rais": [3, 4, 7, 8, 9], "rang": [4, 8, 9, 11, 12, 13], "ratio": 4, "raw": [4, 5, 8, 9], "raw_arrai": 9, "raw_data": 8, "raw_imag": 5, "raw_image_nam": 10, "raw_img": 5, "raw_list": 9, "rbv": 3, "read": [0, 7, 8, 9], "read_calib2d": 7, "reader": [3, 7, 8, 12], "real": 6, "record": 11, "recurs": [0, 7], "recursive_parse_metadata": 7, "recursive_write_metadata": 7, "refer": 2, "regular": 6, "rel": 11, "remov": [3, 6], "renam": 3, "report": 3, "repositori": 0, "repres": 7, "request": [0, 3, 4], "requir": [0, 11], "res_xarrai": [10, 11, 12, 13], "res_xarray_check": 11, "resolut": 12, "resolv": 4, "respect": [3, 4], "result": [3, 4, 8, 11, 12, 13], "ret": 6, "retain": 7, "retard": 4, "retardation_ratio": [4, 10], "retriev": 3, "rettig": 12, "return": [3, 4, 5, 6, 7, 8, 9, 13], "rewrit": 12, "right": 0, "rise": 7, "role": 12, "root": 13, "rotat": 10, "rotation_angl": [10, 13], "row": 4, "row0": 4, "row1": 4, "rr": 4, "rrvec": 4, "rudimentari": 9, "rule": 3, "run": 0, "runner": [10, 11, 12, 13], "s_": [8, 9, 11], "sai": 11, "sampl": [3, 12], "sample_azimuth": 3, "sample_histori": 12, "sample_polar": 3, "sample_tilt": 3, "save": [3, 7, 8, 12], "save_config": 3, "scale": 4, "scan": [0, 1, 4, 8, 9, 11, 12], "scan_info": [9, 11, 12], "scan_list": 9, "scan_path": 9, "scan_typ": 9, "scanvector": 9, "scipi": 4, "script": 9, "search": [1, 3, 8, 9], "second": [4, 6], "second_closest_rr": 4, "see": [0, 3, 11], "select": [5, 8], "sequenc": [6, 7, 8, 9], "server": 11, "set": [0, 4, 5, 8, 11, 12, 13], "sever": 0, "shell": 0, "shift": 4, "ship": 3, "should": [0, 3, 4, 7, 11, 12], "show": 11, "showcas": [10, 11, 12, 13], "sigma": [5, 6], "sigma_i": [3, 5, 6, 8, 11], "sigma_x": [3, 5, 6, 8, 11], "singl": [3, 7, 8, 9, 10, 12], "site": [3, 10, 11, 12, 13], "size": [3, 4, 9], "slice": [8, 9, 11, 12], "slow": 9, "slow_ax": 9, "so": 7, "societi": 12, "softwar": [0, 8, 11], "some": 10, "sort": 7, "sourc": [0, 3, 4, 5, 6, 7, 8, 9, 10], "sp": [11, 12, 13], "sp2": 10, "spa": 10, "spa_param": [3, 12, 13], "spatial": [3, 4, 5, 7, 8], "spatial0": 3, "spatial_resolut": 12, "spawn": 0, "spec": [0, 3, 4, 5, 8, 10], "specs_config": 3, "specs_kernel": 0, "specs_poetri": 0, "specsanalyz": [8, 11, 12, 13], "specsscan": [0, 9, 12, 13], "spectromet": 0, "split": 7, "src": [3, 12, 13], "stack": [7, 8], "stackoverflow": 4, "stamp": [9, 11, 12, 13], "standard": [3, 7], "start": [4, 9], "step": [0, 3, 8, 11, 13], "stoke": 12, "store": [3, 5, 7, 8, 10, 11], "str": [3, 4, 5, 6, 7, 8, 9], "string": [3, 4, 7, 8, 9, 11], "structur": 7, "subfunct": 7, "submit": 0, "submodul": 0, "subsequ": 3, "subtract": [3, 5, 8], "sum": [8, 11, 12, 13], "support": [3, 7, 8], "suppress": 6, "sure": 0, "surfac": 12, "sweep": [1, 8], "sx": 6, "sy": 6, "sync": 0, "system": [0, 3, 4], "system_config": [3, 11], "t": [7, 10, 12], "tabul": 4, "take": 3, "tbte3": 12, "temp_rbv": [3, 12], "tempa": 3, "temperatur": [3, 8, 9], "test": [0, 3, 10, 11, 12, 13], "text": 10, "th": [5, 8], "than": 7, "thei": 3, "them": 3, "therefor": [7, 11], "thi": [0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "third": [8, 11], "through": 7, "tht": 3, "tif": 8, "tiff": [7, 8], "tilt": [3, 12], "time": [7, 9, 11, 12, 13], "to_h5": 7, "to_nexu": 7, "to_tiff": 7, "todo": 1, "togeth": [0, 3], "toml": 0, "tool": [1, 5, 8, 10, 11], "topfloor": 9, "total_iter": 9, "tqdm_enable_nest": 9, "trans_i": 3, "trans_x": 3, "trans_z": 3, "transform": [3, 4], "trarp": [9, 11, 12], "tri": 7, "true": [3, 10, 11, 12, 13], "trx": 3, "try": 3, "trz": 3, "ts_from": 9, "ts_to": 9, "tsv": 10, "tsv_data": 10, "tupl": [4, 7, 8, 9], "tutori": 0, "two": 0, "txt": 9, "type": [0, 3, 4, 5, 6, 7, 8, 9], "typeerror": [3, 7], "typic": 3, "tzcyx": 7, "uhv": 12, "under": [5, 8, 9], "union": 8, "unit": [3, 4, 5], "unless": 4, "up": [0, 4], "updat": 0, "url": [3, 9], "us": [0, 3, 4, 5, 7, 8, 9, 11, 12, 13], "usag": 0, "user": [3, 11, 12, 13], "user0": 12, "user_config": [3, 11, 12, 13], "v": [3, 5], "valid": [4, 8, 9, 10], "valu": [3, 4, 5, 6, 7, 8], "valueerror": [4, 7, 8, 9], "variabl": 6, "variou": 3, "vector": [4, 12], "venv": 0, "verbos": 3, "version": 0, "vertic": [5, 8], "virtual": 0, "visual": 10, "voltag": [3, 8], "w": [7, 8, 10], "wa": 8, "want": 6, "warn": [7, 11, 13], "we": 11, "well": [2, 11], "when": [7, 8, 9], "where": [3, 6, 7, 8, 11], "which": [6, 8, 9, 10, 11, 12], "while": 11, "wide": [0, 3], "wideanglemod": [5, 8, 10], "widget": [10, 11, 12, 13], "width": [3, 5, 8], "wiki": 2, "window": 3, "wish": 0, "within": 0, "withing": 4, "without": [6, 10], "work": [0, 3, 4, 5, 8, 10, 11, 12, 13], "work_funct": [4, 5, 8, 10], "workflow": 3, "would": [8, 9], "write": [7, 8], "writer": 8, "wrong": 13, "x": [3, 5, 6, 7], "x64": [3, 10, 11, 12, 13], "x_max": 6, "x_min": 6, "xarrai": [3, 5, 6, 7, 8, 10, 11, 12, 13], "xgs600": [3, 12], "xr": [5, 6, 7, 8], "xuv": 12, "y": [3, 5, 6, 7], "y_max": 6, "y_min": 6, "yaml": [3, 9, 10, 11, 12, 13], "year": 9, "yet": 11, "you": [0, 4, 6], "your": [0, 3, 10], "z": [3, 7], "zinner": 4, "zinner_diff": 4, "\u00b5j": 12}, "titles": ["specsanalyzer", "Welcome to specsanalyzer\u2019s documentation!", "1. How to maintain", "Config", "2. convert functions (specsanalyzer.convert)
", "1. Core functions (specsanalyzer.core)
", "3. image tool functions (specsanalyzer.img_tools)
", "4. io functions (specsanalyzer.io)
", "1. Core functions (specsscan.core)
", "2. Helpers", "Example 1: SpecsAnalyzer conversion", "Example 2: SpecsScan loading", "Example 3: Export to NeXus", "Example 4: Sweep Scan loading"], "titleterms": {"": 1, "1": 10, "2": 11, "3": 12, "4": 13, "For": 0, "adjust": 10, "angl": 10, "api": 3, "artefact": 10, "artifact": 11, "berlin": 3, "calib2d": 0, "config": 3, "configur": [0, 3], "contribut": 1, "contributor": 0, "convers": 10, "conversion_paramet": 10, "convert": 4, "core": [1, 5, 8], "crop": 11, "data": 11, "default": 3, "dict": 10, "document": 1, "exampl": [3, 10, 11, 12, 13], "export": 12, "fhi": 3, "file": [0, 3], "function": [4, 5, 6, 7, 8], "get": 1, "helper": 9, "how": 2, "imag": [6, 10], "img_tool": 6, "indic": 1, "instal": 0, "io": 7, "iter": 11, "load": [11, 13], "maintain": [0, 2], "mesh": [10, 11], "mode": 10, "modul": 1, "nexu": 12, "offset": 10, "pip": 0, "poetri": 0, "remov": [10, 11], "resolv": 10, "save": 11, "scan": 13, "select": 11, "set": 3, "setup": 3, "spatial": 10, "specsanalyz": [0, 1, 3, 4, 5, 6, 7, 10], "specsscan": [1, 3, 8, 11], "start": 1, "sweep": 13, "tabl": 1, "tool": 6, "trarp": 3, "us": 10, "user": 0, "welcom": 1}})
\ No newline at end of file
+Search.setIndex({"alltitles": {"API": [[3, "module-specsanalyzer.config"]], "Adjusting offsets and angle": [[10, "Adjusting-offsets-and-angle"]], "Config": [[3, null]], "Configuration and calib2d file": [[0, "configuration-and-calib2d-file"]], "Contributing": [[1, null]], "Conversion into spatially resolved modes": [[10, "Conversion-into-spatially-resolved-modes"]], "Conversion using conversion_parameters dict": [[10, "Conversion-using-conversion_parameters-dict"]], "Core functions (specsanalyzer.core)": [[5, null]], "Core functions (specsscan.core)": [[8, null]], "Cropping data": [[11, "Cropping-data"]], "Default specsanalyzer configuration settings": [[3, "default-specsanalyzer-configuration-settings"]], "Default specsscan configuration settings": [[3, "default-specsscan-configuration-settings"]], "Example 1: SpecsAnalyzer conversion": [[10, null]], "Example 2: SpecsScan loading": [[11, null]], "Example 3: Export to NeXus": [[12, null]], "Example 4: Sweep Scan loading": [[13, null]], "Example configuration file for the trARPES setup at FHI-Berlin": [[3, "example-configuration-file-for-the-trarpes-setup-at-fhi-berlin"]], "For Contributors": [[0, "for-contributors"]], "Getting Started": [[1, null]], "Helpers": [[9, null]], "How to maintain": [[2, null]], "Image conversion": [[10, "Image-conversion"]], "Indices and tables": [[1, "indices-and-tables"]], "Installation": [[0, "installation"]], "Loading data": [[11, "Loading-data"]], "Loading with selected iterations": [[11, "Loading-with-selected-iterations"]], "Pip (for users)": [[0, "pip-for-users"]], "Poetry (for maintainers)": [[0, "poetry-for-maintainers"]], "Removal of Mesh Artifact": [[11, "Removal-of-Mesh-Artifact"]], "Removal of mesh artefact": [[10, "Removal-of-mesh-artefact"]], "Saving": [[11, "Saving"]], "SpecsAnalyzer Core Modules": [[1, null]], "SpecsScan Core Modules": [[1, null]], "Welcome to specsanalyzer\u2019s documentation!": [[1, null]], "convert functions (specsanalyzer.convert)": [[4, null]], "image tool functions (specsanalyzer.img_tools)": [[6, null]], "io functions (specsanalyzer.io)": [[7, null]], "specsanalyzer": [[0, null]]}, "docnames": ["getting_started", "index", "misc/maintain", "specsanalyzer/config", "specsanalyzer/convert", "specsanalyzer/core", "specsanalyzer/img_tools", "specsanalyzer/io", "specsscan/core", "specsscan/helpers", "tutorial/1_specsanalyzer_conversion_examples", "tutorial/2_specsscan_example", "tutorial/3_specsscan_conversion_to_NeXus", "tutorial/4_specsscan_load_sweep_scan"], "envversion": {"nbsphinx": 4, "sphinx": 64, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.todo": 2, "sphinx.ext.viewcode": 1}, "filenames": ["getting_started.rst", "index.rst", "misc/maintain.rst", "specsanalyzer/config.rst", "specsanalyzer/convert.rst", "specsanalyzer/core.rst", "specsanalyzer/img_tools.rst", "specsanalyzer/io.rst", "specsscan/core.rst", "specsscan/helpers.rst", "tutorial/1_specsanalyzer_conversion_examples.ipynb", "tutorial/2_specsscan_example.ipynb", "tutorial/3_specsscan_conversion_to_NeXus.ipynb", "tutorial/4_specsscan_load_sweep_scan.ipynb"], "indexentries": {"_fill_missing_dims() (in module specsanalyzer.io)": [[7, "specsanalyzer.io._fill_missing_dims", false]], "_sort_dims_for_imagej() (in module specsanalyzer.io)": [[7, "specsanalyzer.io._sort_dims_for_imagej", false]], "bisection() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.bisection", false]], "calculate_jacobian() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.calculate_jacobian", false]], "calculate_matrix_correction() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.calculate_matrix_correction", false]], "calculate_polynomial_coef_da() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.calculate_polynomial_coef_da", false]], "calib2d (specsanalyzer.core.specsanalyzer property)": [[5, "specsanalyzer.core.SpecsAnalyzer.calib2d", false]], "check_scan() (specsscan.core.specsscan method)": [[8, "specsscan.core.SpecsScan.check_scan", false]], "compare_coords() (in module specsscan.helpers)": [[9, "specsscan.helpers.compare_coords", false]], "complete_dictionary() (in module specsanalyzer.config)": [[3, "specsanalyzer.config.complete_dictionary", false]], "config (specsanalyzer.core.specsanalyzer property)": [[5, "specsanalyzer.core.SpecsAnalyzer.config", false]], "config (specsscan.core.specsscan property)": [[8, "specsscan.core.SpecsScan.config", false]], "convert_image() (specsanalyzer.core.specsanalyzer method)": [[5, "specsanalyzer.core.SpecsAnalyzer.convert_image", false]], "correction_matrix_dict (specsanalyzer.core.specsanalyzer property)": [[5, "specsanalyzer.core.SpecsAnalyzer.correction_matrix_dict", false]], "create_fft_params() (in module specsanalyzer.core)": [[5, "specsanalyzer.core.create_fft_params", false]], "crop_tool() (specsanalyzer.core.specsanalyzer method)": [[5, "specsanalyzer.core.SpecsAnalyzer.crop_tool", false]], "crop_tool() (specsscan.core.specsscan method)": [[8, "specsscan.core.SpecsScan.crop_tool", false]], "crop_xarray() (in module specsanalyzer.img_tools)": [[6, "specsanalyzer.img_tools.crop_xarray", false]], "fft_tool() (specsanalyzer.core.specsanalyzer method)": [[5, "specsanalyzer.core.SpecsAnalyzer.fft_tool", false]], "fft_tool() (specsscan.core.specsscan method)": [[8, "specsscan.core.SpecsScan.fft_tool", false]], "find_scan() (in module specsscan.helpers)": [[9, "specsscan.helpers.find_scan", false]], "find_scan_type() (in module specsscan.helpers)": [[9, "specsscan.helpers.find_scan_type", false]], "fourier_filter_2d() (in module specsanalyzer.img_tools)": [[6, "specsanalyzer.img_tools.fourier_filter_2d", false]], "gauss2d() (in module specsanalyzer.img_tools)": [[6, "specsanalyzer.img_tools.gauss2d", false]], "get_coords() (in module specsscan.helpers)": [[9, "specsscan.helpers.get_coords", false]], "get_damatrix_from_calib2d() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.get_damatrix_from_calib2d", false]], "get_modes_from_calib_dict() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.get_modes_from_calib_dict", false]], "get_pair_from_list() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.get_pair_from_list", false]], "get_raw2d() (in module specsscan.helpers)": [[9, "specsscan.helpers.get_raw2d", false]], "get_rr_da() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.get_rr_da", false]], "get_scan_path() (in module specsscan.helpers)": [[9, "specsscan.helpers.get_scan_path", false]], "handle_meta() (in module specsscan.helpers)": [[9, "specsscan.helpers.handle_meta", false]], "load_config() (in module specsanalyzer.config)": [[3, "specsanalyzer.config.load_config", false]], "load_h5() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.load_h5", false]], "load_images() (in module specsscan.helpers)": [[9, "specsscan.helpers.load_images", false]], "load_scan() (specsscan.core.specsscan method)": [[8, "specsscan.core.SpecsScan.load_scan", false]], "load_tiff() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.load_tiff", false]], "mcp_position_mm() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.mcp_position_mm", false]], "mm_to_fs() (in module specsscan.helpers)": [[9, "specsscan.helpers.mm_to_fs", false]], "module": [[3, "module-specsanalyzer.config", false], [4, "module-specsanalyzer.convert", false], [5, "module-specsanalyzer.core", false], [6, "module-specsanalyzer.img_tools", false], [7, "module-specsanalyzer.io", false], [8, "module-specsscan.core", false], [9, "module-specsscan.helpers", false]], "parse_calib2d_to_dict() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.parse_calib2d_to_dict", false]], "parse_config() (in module specsanalyzer.config)": [[3, "specsanalyzer.config.parse_config", false]], "parse_info_to_dict() (in module specsscan.helpers)": [[9, "specsscan.helpers.parse_info_to_dict", false]], "parse_lut_to_df() (in module specsscan.helpers)": [[9, "specsscan.helpers.parse_lut_to_df", false]], "physical_unit_data() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.physical_unit_data", false]], "process_sweep_scan() (specsscan.core.specsscan method)": [[8, "specsscan.core.SpecsScan.process_sweep_scan", false]], "read_calib2d() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.read_calib2d", false]], "read_env_var() (in module specsanalyzer.config)": [[3, "specsanalyzer.config.read_env_var", false]], "recursive_parse_metadata() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.recursive_parse_metadata", false]], "recursive_write_metadata() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.recursive_write_metadata", false]], "result (specsscan.core.specsscan property)": [[8, "specsscan.core.SpecsScan.result", false]], "save() (specsscan.core.specsscan method)": [[8, "specsscan.core.SpecsScan.save", false]], "save_config() (in module specsanalyzer.config)": [[3, "specsanalyzer.config.save_config", false]], "save_crop_params() (specsscan.core.specsscan method)": [[8, "specsscan.core.SpecsScan.save_crop_params", false]], "save_env_var() (in module specsanalyzer.config)": [[3, "specsanalyzer.config.save_env_var", false]], "save_fft_params() (specsscan.core.specsscan method)": [[8, "specsscan.core.SpecsScan.save_fft_params", false]], "second_closest_rr() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.second_closest_rr", false]], "specsanalyzer (class in specsanalyzer.core)": [[5, "specsanalyzer.core.SpecsAnalyzer", false]], "specsanalyzer.config": [[3, "module-specsanalyzer.config", false]], "specsanalyzer.convert": [[4, "module-specsanalyzer.convert", false]], "specsanalyzer.core": [[5, "module-specsanalyzer.core", false]], "specsanalyzer.img_tools": [[6, "module-specsanalyzer.img_tools", false]], "specsanalyzer.io": [[7, "module-specsanalyzer.io", false]], "specsscan (class in specsscan.core)": [[8, "specsscan.core.SpecsScan", false]], "specsscan.core": [[8, "module-specsscan.core", false]], "specsscan.helpers": [[9, "module-specsscan.helpers", false]], "to_h5() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.to_h5", false]], "to_nexus() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.to_nexus", false]], "to_tiff() (in module specsanalyzer.io)": [[7, "specsanalyzer.io.to_tiff", false]], "zinner() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.zinner", false]], "zinner_diff() (in module specsanalyzer.convert)": [[4, "specsanalyzer.convert.zinner_diff", false]]}, "objects": {"specsanalyzer": [[3, 0, 0, "-", "config"], [4, 0, 0, "-", "convert"], [5, 0, 0, "-", "core"], [6, 0, 0, "-", "img_tools"], [7, 0, 0, "-", "io"]], "specsanalyzer.config": [[3, 1, 1, "", "complete_dictionary"], [3, 1, 1, "", "load_config"], [3, 1, 1, "", "parse_config"], [3, 1, 1, "", "read_env_var"], [3, 1, 1, "", "save_config"], [3, 1, 1, "", "save_env_var"]], "specsanalyzer.convert": [[4, 1, 1, "", "bisection"], [4, 1, 1, "", "calculate_jacobian"], [4, 1, 1, "", "calculate_matrix_correction"], [4, 1, 1, "", "calculate_polynomial_coef_da"], [4, 1, 1, "", "get_damatrix_from_calib2d"], [4, 1, 1, "", "get_rr_da"], [4, 1, 1, "", "mcp_position_mm"], [4, 1, 1, "", "physical_unit_data"], [4, 1, 1, "", "second_closest_rr"], [4, 1, 1, "", "zinner"], [4, 1, 1, "", "zinner_diff"]], "specsanalyzer.core": [[5, 2, 1, "", "SpecsAnalyzer"], [5, 1, 1, "", "create_fft_params"]], "specsanalyzer.core.SpecsAnalyzer": [[5, 3, 1, "", "calib2d"], [5, 3, 1, "", "config"], [5, 4, 1, "", "convert_image"], [5, 3, 1, "", "correction_matrix_dict"], [5, 4, 1, "", "crop_tool"], [5, 4, 1, "", "fft_tool"]], "specsanalyzer.img_tools": [[6, 1, 1, "", "crop_xarray"], [6, 1, 1, "", "fourier_filter_2d"], [6, 1, 1, "", "gauss2d"]], "specsanalyzer.io": [[7, 1, 1, "", "_fill_missing_dims"], [7, 1, 1, "", "_sort_dims_for_imagej"], [7, 1, 1, "", "get_modes_from_calib_dict"], [7, 1, 1, "", "get_pair_from_list"], [7, 1, 1, "", "load_h5"], [7, 1, 1, "", "load_tiff"], [7, 1, 1, "", "parse_calib2d_to_dict"], [7, 1, 1, "", "read_calib2d"], [7, 1, 1, "", "recursive_parse_metadata"], [7, 1, 1, "", "recursive_write_metadata"], [7, 1, 1, "", "to_h5"], [7, 1, 1, "", "to_nexus"], [7, 1, 1, "", "to_tiff"]], "specsscan": [[8, 0, 0, "-", "core"], [9, 0, 0, "-", "helpers"]], "specsscan.core": [[8, 2, 1, "", "SpecsScan"]], "specsscan.core.SpecsScan": [[8, 4, 1, "", "check_scan"], [8, 3, 1, "", "config"], [8, 4, 1, "", "crop_tool"], [8, 4, 1, "", "fft_tool"], [8, 4, 1, "", "load_scan"], [8, 4, 1, "", "process_sweep_scan"], [8, 3, 1, "", "result"], [8, 4, 1, "", "save"], [8, 4, 1, "", "save_crop_params"], [8, 4, 1, "", "save_fft_params"]], "specsscan.helpers": [[9, 1, 1, "", "compare_coords"], [9, 1, 1, "", "find_scan"], [9, 1, 1, "", "find_scan_type"], [9, 1, 1, "", "get_coords"], [9, 1, 1, "", "get_raw2d"], [9, 1, 1, "", "get_scan_path"], [9, 1, 1, "", "handle_meta"], [9, 1, 1, "", "load_images"], [9, 1, 1, "", "mm_to_fs"], [9, 1, 1, "", "parse_info_to_dict"], [9, 1, 1, "", "parse_lut_to_df"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"], "3": ["py", "property", "Python property"], "4": ["py", "method", "Python method"]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class", "3": "py:property", "4": "py:method"}, "terms": {"": [3, 7, 12], "0": [3, 5, 10, 11, 12, 13], "00": 12, "000000": 10, "0033": 10, "00645": 3, "01": 10, "02": [10, 12], "0258": 10, "03": [10, 12], "04": 10, "04428571e": 10, "05": 10, "066": 10, "07597844332538181": 12, "07597844332538357": 13, "08": [11, 12], "0x7f23a5dc3fa0": 12, "0x7f23a70be260": 12, "0x7f390fba2740": 13, "0x7fa82cd2bf40": 11, "0x7fa82ce7dcc0": 11, "0x7fa82cf0b700": 11, "0x7fa82d084d60": 11, "0x7fa82e7dc550": 11, "0x7fbc0bf3d7e0": 10, "0x7fbc10084160": 10, "0x7fbc101a3760": 10, "0x7fbc14151b40": 10, "0x7fbc141a1a50": 10, "0x7fbc16b4dba0": 10, "1": [1, 3, 4, 6, 8, 9, 11, 12, 13], "10": [3, 8, 9, 10, 11, 12, 13], "1024": 3, "108": 3, "109": 3, "11": [10, 11, 12], "116": 11, "12": [10, 11], "120": 12, "13": [10, 11, 13], "1376": 3, "14": [10, 11], "14195": 12, "1496": 12, "15": [8, 9, 10, 11], "150": 12, "16": [3, 10, 11, 12, 13], "16453159041394336": 12, "16571429e": 10, "16732026143790849": 13, "17668": 3, "19828571e": 10, "19t10": 12, "2": [1, 3, 6, 7, 9, 10, 12, 13], "20": 12, "2017": 12, "2020": 9, "20521429e": 10, "20f": 12, "21": 12, "224": 12, "23": 11, "2566412": 4, "270": 12, "2857142857142865": 10, "2d": [5, 6, 9], "3": [1, 3, 7, 8, 10, 11, 13], "30": 12, "300": 12, "34": 12, "34014286e": 10, "35": [10, 12], "36678571e": 10, "37997143e": 10, "39": [10, 11, 12], "3d": [9, 11], "4": [1, 3, 7, 10, 11, 12], "4450": 11, "4sigma": 12, "5": [3, 10, 11, 12], "500": 12, "53542857e": 10, "54": [3, 10], "55": 12, "59685714e": 10, "5e": 12, "6": [4, 10, 11, 12], "6455": 13, "7": [10, 11, 12], "70": 12, "7142857142857135": 10, "74571429e": 10, "78": 3, "79": 3, "8": [3, 10, 11, 12], "80": [3, 12], "800": 12, "800nm": 12, "81": 3, "82": [10, 11], "8449673202614381": 13, "85": 11, "85771429e": 10, "8771428571428571": 10, "88": 11, "8840087145969499": 12, "8965456312395133": 13, "9": [10, 11], "9117413199045858": 12, "95942857e": 10, "A": [0, 3, 4, 5, 8, 9, 12], "For": [3, 8, 9, 11], "If": [0, 3, 7, 9, 10], "In": [3, 11], "It": 3, "Its": 8, "No": [10, 12], "One": 11, "The": [0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "These": [3, 10, 12], "To": 0, "Will": 3, "__elabftw_host__": 3, "__epicsarchiver_host__": 3, "_attr": 7, "_fill_missing_dim": 7, "_sort_dims_for_imagej": 7, "a_inn": [4, 10], "a_rang": [4, 10], "about": 6, "abov": 4, "access": [0, 11], "accessor": 11, "accord": 6, "acquir": 0, "activ": 0, "ad": [3, 7, 11], "add": 7, "addit": [3, 8, 9, 11, 13], "address": 12, "administr": 3, "affili": 12, "after": [4, 11, 12], "again": 11, "alia": 7, "alias": 8, "alias_dict": [7, 8], "all": [0, 3, 8, 9, 11, 13], "allusersprofil": 3, "along": [3, 4, 6, 11, 12], "alreadi": 11, "also": [3, 10, 11], "altern": [3, 10, 11], "amplitud": [3, 5, 6, 8, 11], "an": [0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "analyz": [0, 3, 4, 5, 8, 10], "analyzer_dispers": 3, "ang_range_max": [5, 11, 12, 13], "ang_range_min": [5, 11, 12, 13], "angl": [0, 3, 4, 5, 8, 11], "angle_axi": 4, "angle_offset_px": [3, 4, 5, 10, 13], "angular": [0, 3, 4, 7, 11], "angular0": [3, 12], "angular1": [3, 12], "angular_correction_matrix": 4, "angular_resolut": 12, "ani": [3, 7, 9], "anoth": 11, "api": 0, "appear": [5, 8], "append": 8, "appli": [3, 5, 8, 10, 11], "applic": [3, 8], "apply_fft_filt": [3, 10, 11], "approach": 10, "ar": [0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13], "archiv": [3, 8, 9], "archiver_url": 3, "area": [4, 11], "argument": [3, 5, 7, 8, 10], "around": [4, 5, 8, 12], "arpescontrol": 8, "arrai": [4, 6, 7, 8, 9, 10], "arriv": 4, "artifact": [3, 6, 10], "associ": [4, 11], "assum": 7, "attr": [7, 10, 11], "attribut": [7, 10, 11], "attributeerror": 7, "automat": 7, "autoreload": [10, 11, 12, 13], "auxiliari": 4, "avail": [0, 10], "averag": [8, 9, 11], "average_pow": 12, "avg": 9, "ax": [3, 7, 12], "axi": [3, 4, 5, 7, 8, 9, 11, 12], "axis_data": 9, "axis_dict": 7, "azimuth": 3, "band": [11, 12], "bar": [3, 9], "base": [3, 4, 5, 8, 9], "base_dictionari": 3, "basepath": 9, "beam": 12, "been": 7, "befor": 11, "below": [0, 3, 4], "berlin": [8, 11, 12], "best": [4, 7], "between": [3, 4], "beyond": 11, "bin": [0, 3, 4, 10], "binarysearch": 4, "bisect": 4, "bool": [3, 5, 8, 9], "both": 9, "boundari": [4, 6, 11], "built": [5, 8], "c": 7, "calcul": [4, 6], "calculate_jacobian": 4, "calculate_matrix_correct": 4, "calculate_polynomial_coef_da": 4, "calib2": 10, "calib2d": [3, 4, 5, 7, 8, 10], "calib2d_dict": 4, "calib2d_fil": 3, "calib_dict": 7, "calibr": [0, 3, 7, 10], "camelcas": [5, 8], "camera": 5, "can": [0, 3, 7, 8, 9, 10, 11], "cannot": [3, 7, 9], "carv": [3, 12], "case": 11, "cd": 0, "center": [4, 6, 10], "certain": 4, "chang": [0, 3, 9, 11, 12], "channel": [3, 7], "charact": 7, "check": [0, 5, 8], "check_scan": [8, 9, 11], "chemical_formula": 12, "chosen": 6, "class": [0, 5, 8, 9, 11, 12, 13], "clean": 7, "cleav": 12, "clone": 0, "closest": 4, "closest_rr_index": 4, "coeffici": 4, "collect": [3, 8, 9, 10, 11, 12, 13], "collect_metadata": [8, 9, 12], "column": 9, "com": [0, 4], "combin": 3, "come": 12, "command": 0, "common": 8, "compare_coord": 9, "comparison": 4, "compat": 7, "complet": [3, 7, 11], "complete_dictionari": 3, "concept": 1, "conda": 0, "config": [0, 1, 5, 8, 9, 10, 11, 12, 13], "config_dict": 3, "config_filteron": 10, "config_path": 3, "config_v1": 3, "configur": [4, 7, 10, 11, 13], "consid": 7, "consist": [3, 8, 9], "constructor": 0, "contain": [0, 3, 4, 5, 6, 7, 8, 9, 11, 12], "content": [3, 9], "contribut": 0, "control": 3, "conveni": [7, 11], "convent": [5, 8], "convers": [0, 1, 3, 4, 5, 7, 8, 9, 11, 12, 13], "conversion_paramet": [5, 11], "convert": [0, 1, 5, 7, 8, 9, 10, 11, 12], "convert_imag": [5, 10], "coord": [7, 9], "coordin": [0, 4, 5, 6, 7, 8, 9, 11], "coordinate_depend": 3, "coordinate_map": 3, "copi": 10, "correct": [4, 5, 7], "correction_matrix_dict": 5, "correl": 6, "correspond": [0, 3, 4, 5, 6, 7, 10, 11], "creat": [0, 3, 5, 7, 10, 11, 12, 13], "create_fft_param": 5, "crop": [3, 5, 6, 8, 12, 13], "crop_tool": [5, 8, 11], "crop_xarrai": 6, "crystal": 12, "cube": 12, "current": [3, 4, 7, 8], "cut": 12, "d": [8, 9], "da": 4, "da1": 4, "da3": 4, "da7": 4, "da_matrix": [4, 10], "da_poly_matrix": 4, "dapolymatrix": 4, "data": [0, 3, 5, 6, 7, 8, 9, 10, 12, 13], "data9132_rawdata": 10, "data_arrai": 6, "data_path": [3, 8], "dataarrai": [5, 6, 7, 8], "databas": 4, "dataconvert": 7, "dataepfl": 10, "datafram": [9, 11, 12], "dataset": 7, "de": 12, "de1": [4, 10], "default": [5, 6, 7, 8, 9, 10, 11, 12, 13], "default_config": 3, "defin": [0, 3, 4, 5, 6, 10], "definit": [3, 7, 8, 12], "deg": 4, "degre": 3, "delai": [3, 8, 9, 11, 12], "delaystag": 9, "delimit": 10, "demonstr": [10, 11], "depend": 0, "describ": 7, "descript": [1, 4, 12], "detail": 3, "detector": [0, 3, 4, 10, 11], "determin": [4, 5, 8], "dev": 0, "develop": 0, "deviat": 3, "df_lut": 9, "dict": [3, 4, 5, 6, 7, 8, 9], "dict_kei": 11, "dictionari": [3, 4, 5, 7, 8, 9, 13], "differ": [3, 9, 10, 11, 12, 13], "dim": [4, 6, 7, 9, 10, 11, 12], "dimens": [7, 8, 9, 10, 11], "dimension": [6, 7, 12], "direct": [3, 4, 6], "directli": [3, 5, 8, 11], "directori": [3, 9], "disabl": 3, "dispers": [3, 4, 11, 12], "distanc": 4, "divid": 7, "do": [4, 11], "doc": [0, 10, 11, 12, 13], "document": [0, 11], "doe": 7, "done": [0, 11], "drain_curr": 3, "drive": 11, "duplic": 7, "e": [0, 3, 4, 5, 6, 8, 9, 10, 11], "e_correct": 4, "e_rang": [4, 10], "e_shift": [4, 10], "each": [3, 4, 6, 8], "edg": 4, "edit": 0, "ef": 12, "either": [0, 8, 11, 12], "ek_axi": 4, "ek_range_max": [5, 11, 12, 13], "ek_range_min": [5, 11, 12, 13], "ekin": [3, 8, 10, 11], "elab_token": 12, "elab_url": 3, "elabftw": [3, 9], "electron": [4, 8, 12], "electronanalys": [3, 12], "element": [6, 7], "eln": 3, "eln_data": 8, "email": 12, "emiss": [0, 4], "empti": [3, 8, 9], "enabl": [3, 9], "enable_nested_progress_bar": 3, "energi": [0, 3, 4, 5, 7, 8, 11, 12, 13], "energy_offset_px": [3, 4, 10], "energy_resolut": 12, "energydispers": 3, "engin": 3, "ensur": 0, "entri": [3, 6, 7, 11, 12], "entry_titl": 12, "env": 3, "environ": [0, 3, 12], "epfl": [0, 8], "epic": [3, 8, 9], "epics_channel": 3, "equidist": 13, "eshift": 4, "estim": 4, "etc": [0, 3, 9], "ev": 3, "even": 7, "ex": [8, 9], "exampl": [0, 1], "example_config_fhi": [12, 13], "example_data": 11, "exist": [3, 11], "experiment_summari": 12, "experiment_titl": 12, "explicitli": 10, "explor": 8, "export": 1, "express": 4, "extend": 7, "extens": 8, "extent": 12, "f": [3, 12], "factor": [3, 4], "faddr": [7, 8], "fairmat": 12, "fals": [3, 5, 8, 9, 10, 11], "faradayweg": 12, "fast": 9, "fast_ax": 9, "featur": 6, "feel": 0, "fermi": 12, "fft": [5, 6, 8, 10, 11], "fft_filter_peak": [3, 5, 8, 10, 11], "fft_tool": [5, 8, 10, 11], "fhi": [0, 11, 12], "figur": [10, 11, 12, 13], "file": [5, 7, 8, 9, 10, 11, 12], "filenam": 8, "filenotfounderror": [3, 9], "filepath": 7, "fill": 12, "filter": [3, 5, 6, 8, 10, 11], "filtered_fft": 6, "find": 4, "find_scan": 9, "find_scan_typ": 9, "first": [0, 3, 6, 11, 12], "fit": 4, "fix": 11, "flag": [3, 6], "float": [4, 5, 6, 7, 8], "fluenc": 12, "folder": [3, 8, 9, 10, 11], "folder_config": 3, "follow": [0, 3, 6, 7, 12], "format": [3, 7, 12], "found": [0, 3, 4, 7, 9, 10, 11, 12, 13], "fourier": [3, 5, 6, 8, 10], "fourier_filter_2d": 6, "fraction": 4, "frame": [8, 9], "free": 0, "frequenc": [5, 8, 12], "fritz": [3, 8, 12], "from": [0, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13], "front": 10, "fsmap": 12, "full": [6, 7], "fulli": 3, "function": [1, 3, 9, 10, 11], "further": [8, 9], "fwhm": 12, "g": [0, 3, 5, 6, 8, 9, 10, 11], "gamma": 12, "gather": [11, 12, 13], "gauss2d": 6, "gaussian": [3, 5, 6, 12], "gener": [8, 11, 12], "get": [4, 5, 8, 11], "get_coord": 9, "get_damatrix_from_calib2d": 4, "get_modes_from_calib_dict": 7, "get_pair_from_list": 7, "get_raw2d": 9, "get_rr_da": 4, "get_scan_path": 9, "getdata": 3, "git": 0, "github": [0, 2], "give": 3, "given": [3, 4, 6, 7, 8, 9, 11, 12], "grid": [3, 6, 8, 10, 11, 13], "group": 7, "gt": [10, 11, 12, 13], "guess": 7, "h5": [8, 11], "h5group": 7, "h5py": 7, "ha": [11, 12], "haber": [3, 8, 12], "handl": [0, 9], "handle_meta": 9, "have": [0, 7, 10], "hdf5": [7, 8, 11], "help": 0, "helper": 1, "here": [3, 11, 13], "hierarch": 3, "high": 4, "highmagnification2": 10, "home": [3, 10, 11, 12, 13], "horizont": [5, 8], "hostedtoolcach": [3, 10, 11, 12, 13], "how": 1, "http": [0, 3, 4], "i": [0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "ideal": 12, "identifi": 9, "ignor": 7, "igor": 4, "illumin": 11, "imag": [0, 1, 3, 4, 5, 7, 8, 9, 11, 13], "imagej": 7, "img_tool": 1, "import": [0, 10, 11, 12, 13], "importantli": 0, "incident_energi": 12, "incident_energy_spread": 12, "incident_polar": 12, "incident_wavelength": 12, "includ": [7, 11], "increas": 4, "independ": 6, "index": [1, 4, 8, 9, 11], "indexerror": 9, "indic": [4, 6, 8, 9], "individu": [3, 13], "infer": 7, "info": [9, 10, 11, 12, 13], "info_dict": 9, "inform": [6, 7, 11], "init": 0, "initi": 3, "inner": 4, "input": [3, 6, 7, 8, 9], "input_fil": [3, 7, 8], "instanc": [3, 10, 11, 12, 13], "instead": 7, "institut": [3, 8, 12], "instrument": [3, 12], "int": [4, 8, 9], "integ": [4, 8, 9], "integr": 11, "intend": [0, 3], "intens": 6, "interact": [10, 11], "interest": [8, 9, 11], "interfac": [3, 8], "interpol": [4, 8, 10], "introduc": 10, "investig": 12, "io": 1, "ipykernel": 0, "ipython": 0, "item": 3, "iter": [3, 8, 9], "its": [11, 12], "j": 4, "jacobian": 4, "jacobian_determin": 4, "json": [3, 8, 12], "jupyt": 0, "k": 3, "keep": 3, "kei": [3, 7, 11], "kernel": 0, "keyerror": 4, "keyword": [5, 7, 8, 10, 11], "kinet": [4, 5, 8, 13], "kinetic_energi": [3, 4, 5, 8, 10], "kwd": [5, 7, 8, 10], "lab": [8, 12], "labview": 0, "later": [4, 11], "laurenz": 12, "lausann": 8, "len": [3, 4, 5, 7, 8], "lens_mod": [4, 5, 8, 10], "lib": [3, 10, 11, 12, 13], "librari": 3, "like": 7, "line": [4, 6, 7], "linear": 4, "linux": 3, "list": [0, 4, 5, 6, 7, 8, 9, 11], "list_lin": 7, "load": [0, 1, 3, 7, 8, 9, 10, 12], "load_config": 3, "load_ext": [10, 11, 12, 13], "load_h5": 7, "load_imag": 9, "load_scan": [8, 9, 11, 12, 13], "load_tiff": 7, "loader": [11, 12], "loadtxt": 10, "loc": [11, 12], "local": 0, "locat": [0, 3, 9, 11, 12, 13], "look": 3, "low": 4, "lt": [10, 11, 12, 13], "lut": 9, "m": 0, "magnif": [3, 4, 10], "mai": 11, "maintain": 1, "make": [0, 11], "manipul": [6, 9], "manner": 3, "manual": [7, 12], "manufactur": 0, "map": 12, "map_coordin": 4, "mask": 6, "matplotlib": [10, 11, 12, 13], "matric": 4, "matrix": [4, 5], "max": 12, "maxim": 4, "maximum": [6, 9], "mcp": [0, 4, 10, 11], "mcp_position_mm": 4, "measur": [3, 12], "mechan": 3, "merg": [3, 13], "mesh": [5, 8], "meshgrid": [5, 8, 11], "metadata": [3, 5, 7, 8, 9, 11, 12, 13], "method": [8, 9, 11, 12, 13], "might": 13, "millimet": [3, 4], "mimic": 4, "minim": 4, "minimum": 6, "mirror": [9, 11], "mirrori": 3, "mirrorx": [3, 11], "miss": 3, "mitig": 10, "mm": [3, 4], "mm_to_f": 9, "mm_z": 4, "mode": [0, 4, 5, 7, 8, 11], "modif": 3, "modul": [0, 3, 4, 6, 7], "monoton": 4, "more": 7, "most": [0, 9], "mostli": 3, "mpe": [3, 12], "mpg": 12, "multipl": 3, "must": [4, 8], "mx": 6, "my": 6, "name": [0, 3, 5, 7, 8, 9, 12], "nameerror": 7, "nap32": 9, "ndarrai": [4, 5, 6, 7, 8, 9], "ndimag": 4, "nearest": 4, "necessari": 3, "need": [0, 4, 7, 8, 9, 12], "neither": [3, 9], "nest": [3, 7, 9], "new": [0, 3, 11], "nexu": [1, 3, 7, 8, 9], "node": 7, "non": [4, 11, 13], "none": [3, 5, 7, 8, 9], "nor": [3, 9], "normal": [3, 4, 5, 8], "notebook": [0, 3, 8, 11, 12], "notimplementederror": 7, "now": 0, "np": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "number": [3, 4, 7, 8, 9, 11, 13], "numpi": [4, 5, 7, 8, 9, 10, 11, 12, 13], "nx": [8, 12], "nx_pixel": [3, 4], "nxmpes_arp": [3, 12], "nxmpes_arpes_config": [3, 12], "nxuser": 12, "ny_pixel": [3, 4], "o": [3, 10], "object": [5, 7, 8, 9, 11], "obtain": 9, "offset": [3, 4], "omg": 3, "onc": 0, "one": [6, 7, 10, 11], "onli": [4, 7, 11], "onto": [8, 13], "open": 10, "opencomp": 0, "oper": [10, 11], "opt": [3, 10, 11, 12, 13], "optim": [5, 8, 10, 11], "option": [0, 3, 5, 6, 7, 8, 9, 11], "order": [3, 4, 7, 11], "org": 0, "other": [3, 5, 11], "otherwis": 7, "out": [0, 4, 5, 8], "output": [7, 12], "outsid": 4, "over": [3, 8, 9, 11], "overlap": [12, 13], "overwrit": [3, 5, 8], "overwritten": 3, "p": 12, "p_rd": [3, 12], "pack": 4, "packag": [0, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13], "package_dir": 3, "page": 1, "pair": 7, "panda": 9, "paramet": [0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "pars": [7, 9], "parse_calib2d_to_dict": 7, "parse_config": [3, 5, 8], "parse_info_to_dict": 9, "parse_lut_to_df": 9, "parser": 7, "part": 0, "pass": [0, 3, 4, 5, 8, 10, 11], "pass_energi": [4, 5, 8, 10], "path": [3, 5, 7, 8, 9, 10, 11, 12, 13], "pattern": 6, "pd": 9, "peak": [3, 5, 6, 8, 10, 11], "per": [4, 11, 13], "perform": [4, 8, 9, 10, 13], "pesdata": 9, "phi": 3, "phoibo": [0, 5, 8, 10, 11], "phoibos150": [0, 3], "photoelectron": 4, "photoemiss": [4, 5], "physic": [0, 4, 5], "physical_unit_data": 4, "pixel": [3, 4], "pixel_s": [3, 4, 10], "place": [3, 5], "plai": [5, 8], "planck": 12, "plane": [3, 5, 8, 10], "pleas": 10, "plot": [10, 11, 12, 13], "plt": [10, 11, 12, 13], "point": [9, 11, 12], "pol": 12, "polar": 3, "polynomi": 4, "popul": 7, "pos_i": [3, 5, 6, 8, 11], "pos_x": [3, 5, 6, 8, 11], "posi": 7, "posit": [3, 4, 5, 6, 8, 10, 11], "poss": 4, "possibl": 6, "possibli": 3, "posx": 7, "pre": [3, 5], "prefer": 3, "preparation_d": 12, "preparation_descript": 12, "prerequisit": 0, "present": [3, 8, 11], "preserv": [3, 4], "press": 11, "pressur": 3, "pressureac": [3, 12], "previous": [8, 11], "princip": 12, "print": 9, "pro": 4, "probe": 12, "procedur": 0, "process": [8, 11], "process_sweep_scan": 8, "processor": 3, "produc": 13, "program": 4, "progress": [3, 9], "project": 9, "properti": [5, 8], "provid": [0, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13], "pull": 0, "pulse_dur": 12, "pulse_energi": 12, "pump": 12, "pv": 3, "pyenv": 0, "pynxtool": [7, 8, 12], "pypi": 0, "pyplot": [10, 11, 12, 13], "pyproject": 0, "python": [0, 3, 7, 10, 11, 12, 13], "python3": [3, 10, 11, 12, 13], "quadmesh": [10, 11, 12, 13], "queri": 9, "question": 4, "r": 7, "r9132": 10, "rais": [3, 4, 7, 8, 9], "rang": [4, 8, 11, 12, 13], "ratio": 4, "raw": [4, 5, 8, 9], "raw_arrai": 9, "raw_data": 8, "raw_imag": 5, "raw_image_nam": 10, "raw_img": 5, "raw_list": 9, "rbv": 3, "read": [0, 3, 7, 8, 9], "read_calib2d": 7, "read_env_var": 3, "reader": [3, 7, 8, 12], "real": 6, "record": 11, "recurs": [0, 7], "recursive_parse_metadata": 7, "recursive_write_metadata": 7, "refer": 2, "regular": 6, "rel": 11, "remov": [3, 6], "renam": 3, "report": 3, "repositori": 0, "repres": 7, "request": [0, 3, 4], "requir": [0, 11, 12], "res_xarrai": [10, 11, 12, 13], "res_xarray_check": 11, "resolut": 12, "resolv": 4, "respect": [3, 4], "result": [3, 4, 8, 11, 12, 13], "ret": 6, "retain": 7, "retard": 4, "retardation_ratio": [4, 10], "retriev": 3, "rettig": 12, "return": [3, 4, 5, 6, 7, 8, 9, 13], "rewrit": 12, "right": 0, "rise": 7, "role": 12, "root": 13, "rotat": 10, "rotation_angl": [5, 10, 13], "row": 4, "row0": 4, "row1": 4, "rr": 4, "rrvec": 4, "rudimentari": 9, "rule": 3, "run": 0, "runner": [10, 11, 12, 13], "s_": [8, 9, 11], "sai": 11, "sampl": [3, 12], "sample_azimuth": 3, "sample_histori": 12, "sample_polar": 3, "sample_tilt": 3, "save": [3, 7, 8, 12], "save_config": 3, "save_crop_param": 8, "save_env_var": 3, "save_fft_param": 8, "scale": 4, "scan": [0, 1, 4, 8, 9, 11, 12], "scan_info": [9, 11, 12], "scan_list": 9, "scan_path": 9, "scan_typ": 9, "scanvector": 9, "scipi": 4, "script": 9, "search": [1, 3, 8, 9], "second": [4, 6], "second_closest_rr": 4, "see": [0, 3, 11], "select": [5, 8], "sequenc": [6, 7, 8, 9], "server": 11, "set": [0, 4, 5, 8, 11, 12, 13], "sever": 0, "shell": 0, "shift": 4, "ship": 3, "should": [0, 3, 4, 7, 11, 12], "show": 11, "showcas": [10, 11, 12, 13], "sigma": [5, 6], "sigma_i": [3, 5, 6, 8, 11], "sigma_x": [3, 5, 6, 8, 11], "singl": [3, 7, 8, 9, 10, 12], "site": [3, 10, 11, 12, 13], "size": [3, 4, 9], "slice": [8, 9, 11, 12], "slow": 9, "slow_ax": 9, "so": 7, "societi": 12, "softwar": [0, 8, 11], "some": 10, "sort": 7, "sourc": [0, 3, 4, 5, 6, 7, 8, 9, 10], "sp": [11, 12, 13], "sp2": 10, "spa": 10, "spa_param": [3, 12, 13], "spatial": [3, 4, 5, 7, 8], "spatial0": 3, "spatial_resolut": 12, "spawn": 0, "spec": [0, 3, 4, 5, 8, 10], "specs_config": [3, 8], "specs_kernel": 0, "specs_poetri": 0, "specsanalyz": [8, 11, 12, 13], "specsscan": [0, 9, 12, 13], "spectromet": 0, "split": 7, "src": [3, 12, 13], "stack": [7, 8], "stackoverflow": 4, "stamp": [11, 12, 13], "standard": [3, 7], "start": 4, "step": [0, 3, 8, 11, 13], "stoke": 12, "store": [3, 5, 7, 8, 10, 11], "str": [3, 4, 5, 6, 7, 8, 9], "string": [3, 4, 7, 8, 9, 11], "structur": 7, "subfunct": 7, "submit": 0, "submodul": 0, "subsequ": 3, "subtract": [3, 5, 8], "sum": [8, 11, 12, 13], "support": [3, 7, 8], "suppress": 6, "sure": 0, "surfac": 12, "sweep": [1, 8], "sx": 6, "sy": 6, "sync": 0, "system": [0, 3, 4], "system_config": [3, 11], "t": [7, 10, 12], "t0": 9, "tabul": 4, "take": 3, "tbte3": 12, "temp_rbv": [3, 12], "tempa": 3, "temperatur": [3, 8, 9], "test": [0, 3, 10, 11, 12, 13], "text": 10, "th": [5, 8], "than": 7, "thei": 3, "them": 3, "therefor": [7, 11], "thi": [0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "third": [8, 11], "through": 7, "tht": 3, "tif": 8, "tiff": [7, 8], "tilt": [3, 12], "time": [7, 11, 12, 13], "to_h5": 7, "to_nexu": 7, "to_tiff": 7, "todo": 1, "togeth": [0, 3], "token": [9, 12], "toml": 0, "tool": [1, 5, 8, 10, 11], "topfloor": 9, "total_iter": 9, "tqdm_enable_nest": 9, "trans_i": 3, "trans_x": 3, "trans_z": 3, "transform": [3, 4], "trarp": [9, 11, 12], "tri": 7, "true": [3, 5, 8, 10, 11, 12, 13], "trx": 3, "try": 3, "trz": 3, "tsv": 10, "tsv_data": 10, "tupl": [4, 7, 8, 9], "tutori": 0, "two": 0, "txt": 9, "type": [0, 3, 4, 5, 6, 7, 8, 9], "typeerror": [3, 7], "typic": 3, "tzcyx": 7, "uhv": 12, "under": [5, 8, 9], "union": 8, "unit": [3, 4, 5], "unless": 4, "up": [0, 4], "updat": 0, "url": 3, "us": [0, 3, 4, 5, 7, 8, 9, 11, 12, 13], "usag": 0, "user": [3, 11, 12, 13], "user0": 12, "user_config": [3, 11, 12, 13], "v": [3, 5], "v2": 3, "valid": [4, 8, 9, 10, 12], "valu": [3, 4, 5, 6, 7, 8], "valueerror": [4, 7, 8, 9], "var_nam": 3, "variabl": [3, 6, 12], "variou": 3, "vector": [4, 12], "venv": 0, "verbos": [3, 5, 8], "version": 0, "vertic": [5, 8], "virtual": 0, "visual": 10, "voltag": [3, 8], "w": [7, 8, 10], "wa": 8, "want": 6, "warn": [7, 11, 12, 13], "we": 11, "well": [2, 11], "when": [7, 8, 9], "where": [3, 6, 7, 8, 11], "which": [6, 8, 9, 10, 11, 12], "while": 11, "wide": [0, 3], "wideanglemod": [5, 8, 10], "widget": [10, 11, 12, 13], "width": [3, 5, 8], "wiki": 2, "window": 3, "wish": 0, "within": 0, "withing": 4, "without": [6, 10], "work": [0, 3, 4, 5, 8, 10, 11, 12, 13], "work_funct": [4, 5, 8, 10], "workflow": 3, "would": [8, 9], "write": [7, 8], "writer": 8, "wrong": 13, "x": [3, 5, 6, 7], "x64": [3, 10, 11, 12, 13], "x_max": 6, "x_min": 6, "xarrai": [3, 5, 6, 7, 8, 10, 11, 12, 13], "xgs600": [3, 12], "xr": [5, 6, 7, 8], "xuv": 12, "y": [3, 5, 6, 7], "y_max": 6, "y_min": 6, "yaml": [3, 8, 9, 10, 11, 12, 13], "year": 9, "yet": 11, "you": [0, 4, 6], "your": [0, 3, 10], "z": [3, 7], "zinner": 4, "zinner_diff": 4, "\u00b5j": 12}, "titles": ["specsanalyzer", "Welcome to specsanalyzer\u2019s documentation!", "1. How to maintain", "Config", "2. convert functions (specsanalyzer.convert)
", "1. Core functions (specsanalyzer.core)
", "3. image tool functions (specsanalyzer.img_tools)
", "4. io functions (specsanalyzer.io)
", "1. Core functions (specsscan.core)
", "2. Helpers", "Example 1: SpecsAnalyzer conversion", "Example 2: SpecsScan loading", "Example 3: Export to NeXus", "Example 4: Sweep Scan loading"], "titleterms": {"": 1, "1": 10, "2": 11, "3": 12, "4": 13, "For": 0, "adjust": 10, "angl": 10, "api": 3, "artefact": 10, "artifact": 11, "berlin": 3, "calib2d": 0, "config": 3, "configur": [0, 3], "contribut": 1, "contributor": 0, "convers": 10, "conversion_paramet": 10, "convert": 4, "core": [1, 5, 8], "crop": 11, "data": 11, "default": 3, "dict": 10, "document": 1, "exampl": [3, 10, 11, 12, 13], "export": 12, "fhi": 3, "file": [0, 3], "function": [4, 5, 6, 7, 8], "get": 1, "helper": 9, "how": 2, "imag": [6, 10], "img_tool": 6, "indic": 1, "instal": 0, "io": 7, "iter": 11, "load": [11, 13], "maintain": [0, 2], "mesh": [10, 11], "mode": 10, "modul": 1, "nexu": 12, "offset": 10, "pip": 0, "poetri": 0, "remov": [10, 11], "resolv": 10, "save": 11, "scan": 13, "select": 11, "set": 3, "setup": 3, "spatial": 10, "specsanalyz": [0, 1, 3, 4, 5, 6, 7, 10], "specsscan": [1, 3, 8, 11], "start": 1, "sweep": 13, "tabl": 1, "tool": 6, "trarp": 3, "us": 10, "user": 0, "welcom": 1}})
\ No newline at end of file
diff --git a/specsanalyzer/develop/specsanalyzer/config.html b/specsanalyzer/develop/specsanalyzer/config.html
index 59ffb31..364a59a 100644
--- a/specsanalyzer/develop/specsanalyzer/config.html
+++ b/specsanalyzer/develop/specsanalyzer/config.html
@@ -8,7 +8,7 @@
- Config — specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ Config — specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -30,7 +30,7 @@
-
+
@@ -38,7 +38,7 @@
-
+
@@ -47,7 +47,7 @@
@@ -57,7 +57,7 @@
-
+
@@ -119,7 +119,7 @@
- specsanalyzer 0.4.2.dev40+g8ed2f0c documentation
+ specsanalyzer 0.5.2.dev10+g554f714 documentation
@@ -566,8 +566,8 @@ Config#
folder_config
: A config file of name specs_config.yaml
in the current working directory. This is mostly intended to pass calibration parameters of the workflow between different notebook instances.
-user_config
: A config file provided by the user, stored as .specsanalyzer/config.yaml
in the current user’s home directly. This is intended to give a user the option for individual configuration modifications of system settings.
-system_config
: A config file provided by the system administrator, stored as /etc/specsanalyzer/config.yaml
on Linux-based systems, and %ALLUSERSPROFILE%/specsanalyzer/config.yaml
on Windows. This should provide all necessary default parameters for using the specsanalyzer processor with a given setup. For an example for the setup at the Fritz Haber Institute setup, see Default specsanalyzer configuration settings
+user_config
: A config file provided by the user, stored as .config/specsanalyzer/config_v1.yaml
in the current user’s home directly. This is intended to give a user the option for individual configuration modifications of system settings.
+system_config
: A config file provided by the system administrator, stored as /etc/specsanalyzer/config_v1.yaml
on Linux-based systems, and %ALLUSERSPROFILE%/specsanalyzer/config_v1.yaml
on Windows. This should provide all necessary default parameters for using the specsanalyzer processor with a given setup. For an example for the setup at the Fritz Haber Institute setup, see Default specsanalyzer configuration settings
default_config
: The default configuration shipped with the package. Typically, all parameters here should be overwritten by any of the other configuration files.
The config mechanism returns the combined dictionary, and reports the loaded configuration files. In order to disable or overwrite any of the configuration files, they can be also given as optional parameters (path to a file, or python dictionary).
@@ -576,7 +576,7 @@ Config#This module contains a config library for loading yaml/json files into dicts
-
-specsanalyzer.config.parse_config(config=None, folder_config=None, user_config=None, system_config=None, default_config='/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/specsanalyzer/config/default.yaml', verbose=True)[source]#
+specsanalyzer.config.parse_config(config=None, folder_config=None, user_config=None, system_config=None, default_config='/opt/hostedtoolcache/Python/3.10.16/x64/lib/python3.10/site-packages/specsanalyzer/config/default.yaml', verbose=True)[source]#
Load the config dictionary from a file, or pass the provided config dictionary.
The content of the loaded config dictionary is then completed from a set of pre-configured
config files in hierarchical order, by adding missing items. These additional config files
@@ -594,12 +594,13 @@
Config#
user_config (dict | str, optional) – user-based config dictionary
or file path. The loaded dictionary is completed with the user-based values,
taking preference over system and default values.
-Defaults to the file “.specsanalyzer/config.yaml” in the current user’s home directory.
+Defaults to the file “.config/specsanalyzer/config_v1.yaml” in the current user’s home
+directory.
system_config (dict | str, optional) – system-wide config dictionary
or file path. The loaded dictionary is completed with the system-wide values,
taking preference over default values.
-Defaults to the file “/etc/specsanalyzer/config.yaml” on linux,
-and “%ALLUSERSPROFILE%/specsanalyzer/config.yaml” on windows.
+Defaults to the file “/etc/specsanalyzer/config_v1.yaml” on linux,
+and “%ALLUSERSPROFILE%/specsanalyzer/config_v1.yaml” on windows.
default_config (dict | str, optional) – default config dictionary
or file path. The loaded dictionary is completed with the default values.
Defaults to package_dir/config/default.yaml”.
@@ -684,6 +685,45 @@ Config#
+
+-
+specsanalyzer.config.read_env_var(var_name)[source]#
+Read an environment variable from multiple locations in order:
+1. OS environment variables
+2. .env file in current directory
+3. .env file in user config directory
+4. .env file in system config directory
+
+- Parameters:
+var_name (str) – Name of the environment variable to read
+
+- Returns:
+Value of the environment variable or None if not found
+
+- Return type:
+str | None
+
+
+
+
+