batplot 1.8.7__tar.gz → 1.8.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {batplot-1.8.7/batplot.egg-info → batplot-1.8.9}/PKG-INFO +1 -1
- {batplot-1.8.7 → batplot-1.8.9}/batplot/__init__.py +1 -1
- {batplot-1.8.7 → batplot-1.8.9}/batplot/batplot.py +34 -5
- {batplot-1.8.7 → batplot-1.8.9/batplot.egg-info}/PKG-INFO +1 -1
- {batplot-1.8.7 → batplot-1.8.9}/pyproject.toml +1 -1
- {batplot-1.8.7 → batplot-1.8.9}/LICENSE +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/MANIFEST.in +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/README.md +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/USER_MANUAL.md +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/args.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/batch.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/cif.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/cli.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/color_utils.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/config.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/converters.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/cpc_interactive.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/data/USER_MANUAL.md +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/electrochem_interactive.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/interactive.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/manual.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/modes.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/operando.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/operando_ec_interactive.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/plotting.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/readers.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/session.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/style.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/ui.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/utils.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot/version_check.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot.egg-info/SOURCES.txt +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot.egg-info/dependency_links.txt +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot.egg-info/entry_points.txt +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot.egg-info/requires.txt +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot.egg-info/top_level.txt +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/__init__.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/args.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/batch.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/batplot.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/cif.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/cli.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/color_utils.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/config.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/converters.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/cpc_interactive.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/electrochem_interactive.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/interactive.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/modes.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/operando.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/operando_ec_interactive.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/plotting.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/readers.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/session.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/style.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/ui.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/utils.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251121_223043/version_check.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/__init__.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/args.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/batch.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/batplot.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/cif.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/cli.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/color_utils.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/config.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/converters.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/cpc_interactive.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/electrochem_interactive.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/interactive.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/manual.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/modes.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/operando.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/operando_ec_interactive.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/plotting.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/readers.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/session.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/style.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/ui.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/utils.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/batplot_backup_20251221_101150/version_check.py +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/setup.cfg +0 -0
- {batplot-1.8.7 → batplot-1.8.9}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: batplot
|
|
3
|
-
Version: 1.8.
|
|
3
|
+
Version: 1.8.9
|
|
4
4
|
Summary: Interactive plotting tool for material science (1D plot) and electrochemistry (GC, CV, dQ/dV, CPC, operando) with batch processing
|
|
5
5
|
Author-email: Tian Dai <tianda@uio.no>
|
|
6
6
|
License: MIT License
|
|
@@ -2763,7 +2763,17 @@ def batplot_main() -> int:
|
|
|
2763
2763
|
any_cif = any(f.lower().endswith(".cif") for f in args.files)
|
|
2764
2764
|
non_cif_count = sum(0 if f.lower().endswith('.cif') else 1 for f in args.files)
|
|
2765
2765
|
cif_only = any_cif and non_cif_count == 0
|
|
2766
|
-
|
|
2766
|
+
# Check for wavelength parameters (file:wl), but exclude Windows drive letters (C:\...)
|
|
2767
|
+
def has_wavelength_param(f):
|
|
2768
|
+
if ":" not in f:
|
|
2769
|
+
return False
|
|
2770
|
+
# Check if it's a Windows path (single letter followed by :\ or :/)
|
|
2771
|
+
if len(f) >= 2 and f[1] == ':' and len(f[0]) == 1 and f[0].isalpha():
|
|
2772
|
+
# This is a Windows drive letter, check after the drive path
|
|
2773
|
+
# Look for additional colons beyond the drive letter
|
|
2774
|
+
return ":" in f[2:]
|
|
2775
|
+
return True
|
|
2776
|
+
any_lambda = any(has_wavelength_param(f) for f in args.files) or args.wl is not None
|
|
2767
2777
|
|
|
2768
2778
|
# Incompatibilities (no mixing of fundamentally different axis domains)
|
|
2769
2779
|
if sum(bool(x) for x in (any_gr, any_nor, any_chik, any_chir, (any_qye or any_lambda or any_cif))) > 1:
|
|
@@ -3089,16 +3099,35 @@ def batplot_main() -> int:
|
|
|
3089
3099
|
# Step 2: Convert Q back to 2theta using second wavelength
|
|
3090
3100
|
# Q = 4π sin(θ) / λ => sin(θ) = Qλ / (4π) => θ = arcsin(Qλ / (4π))
|
|
3091
3101
|
sin_theta = Q * conversion_wavelength / (4 * np.pi)
|
|
3092
|
-
#
|
|
3093
|
-
|
|
3102
|
+
# Check for physically impossible Q values (would require sin(θ) > 1)
|
|
3103
|
+
valid_mask = np.abs(sin_theta) <= 1.0
|
|
3104
|
+
if not np.all(valid_mask):
|
|
3105
|
+
# Some Q values are too high for the target wavelength
|
|
3106
|
+
n_invalid = np.sum(~valid_mask)
|
|
3107
|
+
q_max_possible = 4 * np.pi / conversion_wavelength
|
|
3108
|
+
print(f"Warning: {n_invalid} data points exceed Q_max={q_max_possible:.2f} Å⁻¹ for λ={conversion_wavelength} Å")
|
|
3109
|
+
print(f" Truncating data to physically accessible range.")
|
|
3110
|
+
# Truncate to valid range instead of clipping (which creates artificial data)
|
|
3111
|
+
x = x[valid_mask]
|
|
3112
|
+
y = y[valid_mask]
|
|
3113
|
+
sin_theta = sin_theta[valid_mask]
|
|
3094
3114
|
theta_new_rad = np.arcsin(sin_theta)
|
|
3095
3115
|
x_plot = np.degrees(2 * theta_new_rad)
|
|
3096
3116
|
elif use_2th and file_ext == ".qye" and wavelength_file:
|
|
3097
3117
|
# Convert Q to 2theta for .qye files when wavelength is provided
|
|
3098
3118
|
# Q = 4π sin(θ) / λ => sin(θ) = Qλ / (4π) => θ = arcsin(Qλ / (4π))
|
|
3099
3119
|
sin_theta = x * wavelength_file / (4 * np.pi)
|
|
3100
|
-
#
|
|
3101
|
-
|
|
3120
|
+
# Check for physically impossible Q values
|
|
3121
|
+
valid_mask = np.abs(sin_theta) <= 1.0
|
|
3122
|
+
if not np.all(valid_mask):
|
|
3123
|
+
n_invalid = np.sum(~valid_mask)
|
|
3124
|
+
q_max_possible = 4 * np.pi / wavelength_file
|
|
3125
|
+
print(f"Warning: {n_invalid} data points exceed Q_max={q_max_possible:.2f} Å⁻¹ for λ={wavelength_file} Å")
|
|
3126
|
+
print(f" Truncating data to physically accessible range.")
|
|
3127
|
+
# Truncate to valid range
|
|
3128
|
+
x = x[valid_mask]
|
|
3129
|
+
y = y[valid_mask]
|
|
3130
|
+
sin_theta = sin_theta[valid_mask]
|
|
3102
3131
|
theta_rad = np.arcsin(sin_theta)
|
|
3103
3132
|
x_plot = np.degrees(2 * theta_rad)
|
|
3104
3133
|
elif use_Q and file_ext not in (".qye", ".gr", ".nor"):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: batplot
|
|
3
|
-
Version: 1.8.
|
|
3
|
+
Version: 1.8.9
|
|
4
4
|
Summary: Interactive plotting tool for material science (1D plot) and electrochemistry (GC, CV, dQ/dV, CPC, operando) with batch processing
|
|
5
5
|
Author-email: Tian Dai <tianda@uio.no>
|
|
6
6
|
License: MIT License
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "batplot"
|
|
7
|
-
version = "1.8.
|
|
7
|
+
version = "1.8.9"
|
|
8
8
|
description = "Interactive plotting tool for material science (1D plot) and electrochemistry (GC, CV, dQ/dV, CPC, operando) with batch processing"
|
|
9
9
|
authors = [
|
|
10
10
|
{ name = "Tian Dai", email = "tianda@uio.no" }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|