orto 1.11.1__py3-none-any.whl → 1.11.2__py3-none-any.whl
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.
- orto/__version__.py +1 -1
- orto/cli.py +15 -3
- orto/data.py +12 -25
- orto/plotter.py +3 -1
- {orto-1.11.1.dist-info → orto-1.11.2.dist-info}/METADATA +1 -1
- orto-1.11.2.dist-info/RECORD +17 -0
- orto-1.11.1.dist-info/RECORD +0 -17
- {orto-1.11.1.dist-info → orto-1.11.2.dist-info}/WHEEL +0 -0
- {orto-1.11.1.dist-info → orto-1.11.2.dist-info}/entry_points.txt +0 -0
- {orto-1.11.1.dist-info → orto-1.11.2.dist-info}/licenses/LICENSE +0 -0
- {orto-1.11.1.dist-info → orto-1.11.2.dist-info}/top_level.txt +0 -0
orto/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '1.11.
|
|
1
|
+
__version__ = '1.11.2'
|
orto/cli.py
CHANGED
|
@@ -929,6 +929,8 @@ def plot_xes_func(uargs):
|
|
|
929
929
|
x_values = np.asarray(data['energy (cm^-1)'])
|
|
930
930
|
elif uargs.x_unit == 'wavelength':
|
|
931
931
|
x_values = 1E7 / np.asarray(data['energy (cm^-1)'])
|
|
932
|
+
elif uargs.x_unit == 'wavelength_rev':
|
|
933
|
+
x_values = 1E7 / np.asarray(data['energy (cm^-1)'])
|
|
932
934
|
elif uargs.x_unit == 'energy':
|
|
933
935
|
x_values = np.asarray(data['energy (ev)'])
|
|
934
936
|
|
|
@@ -1202,14 +1204,23 @@ def plot_abs_func(uargs, save_data_only=False):
|
|
|
1202
1204
|
x_vals = abs_data.wavenumbers
|
|
1203
1205
|
min_factor = 0.8
|
|
1204
1206
|
max_factor = 1.1
|
|
1207
|
+
x_reversed = False
|
|
1205
1208
|
elif uargs.x_unit == 'wavelength':
|
|
1206
1209
|
x_vals = abs_data.wavelengths
|
|
1207
1210
|
max_factor = 1.1
|
|
1208
1211
|
min_factor = 0.8
|
|
1212
|
+
x_reversed = False
|
|
1213
|
+
elif uargs.x_unit == 'wavelength_rev':
|
|
1214
|
+
x_vals = abs_data.wavelengths
|
|
1215
|
+
max_factor = 1.1
|
|
1216
|
+
min_factor = 0.8
|
|
1217
|
+
x_reversed = True
|
|
1218
|
+
uargs.x_unit = 'wavelength'
|
|
1209
1219
|
elif uargs.x_unit == 'energy':
|
|
1210
1220
|
x_vals = abs_data.energies
|
|
1211
1221
|
min_factor = 0.9995
|
|
1212
1222
|
max_factor = 1.0005
|
|
1223
|
+
x_reversed = False
|
|
1213
1224
|
|
|
1214
1225
|
# Set x_min and x_max
|
|
1215
1226
|
if isinstance(uargs.x_lim[0], str):
|
|
@@ -1244,7 +1255,8 @@ def plot_abs_func(uargs, save_data_only=False):
|
|
|
1244
1255
|
num_points=10000,
|
|
1245
1256
|
x_min=x_min,
|
|
1246
1257
|
x_max=x_max,
|
|
1247
|
-
comment=unique_names[it]
|
|
1258
|
+
comment=unique_names[it],
|
|
1259
|
+
x_reversed=x_reversed
|
|
1248
1260
|
)
|
|
1249
1261
|
|
|
1250
1262
|
if save_data_only:
|
|
@@ -2540,9 +2552,9 @@ def read_args(arg_list=None):
|
|
|
2540
2552
|
plot_abs.add_argument(
|
|
2541
2553
|
'--x_unit',
|
|
2542
2554
|
type=str,
|
|
2543
|
-
choices=['energy', 'wavelength', 'wavenumber'],
|
|
2555
|
+
choices=['energy', 'wavelength', 'wavelength_rev', 'wavenumber'],
|
|
2544
2556
|
default='energy',
|
|
2545
|
-
help='x units to use for spectrum'
|
|
2557
|
+
help='x units to use for spectrum (rev = reversed axis direction)'
|
|
2546
2558
|
)
|
|
2547
2559
|
|
|
2548
2560
|
plot_abs.add_argument(
|
orto/data.py
CHANGED
|
@@ -33,6 +33,9 @@ class AbsorptionSpectrum():
|
|
|
33
33
|
Full width at half maximum used in spectrum generation
|
|
34
34
|
comment: str, default=''
|
|
35
35
|
Comment or metadata for the spectrum
|
|
36
|
+
x_reversed: bool, default False
|
|
37
|
+
Whether the x axis is reversed (e.g. for wavelength spectra)\n
|
|
38
|
+
By default, False - increasing x values from left to right
|
|
36
39
|
|
|
37
40
|
Attributes
|
|
38
41
|
----------
|
|
@@ -61,7 +64,7 @@ class AbsorptionSpectrum():
|
|
|
61
64
|
def __init__(self, x_grid: NDArray, x_unit: str, x_label: str,
|
|
62
65
|
x_label_mathmode: str, y_unit: str, y_label: str,
|
|
63
66
|
y_label_mathmode: str, y_values: NDArray, fwhm: float,
|
|
64
|
-
comment: str = '') -> None:
|
|
67
|
+
comment: str = '', x_reversed: bool = False) -> None:
|
|
65
68
|
self.x_grid = x_grid
|
|
66
69
|
self.x_unit = x_unit
|
|
67
70
|
self.x_label = x_label
|
|
@@ -72,30 +75,9 @@ class AbsorptionSpectrum():
|
|
|
72
75
|
self.fwhm = fwhm
|
|
73
76
|
self.y_values = y_values
|
|
74
77
|
self.comment = comment
|
|
78
|
+
self.x_reversed = x_reversed
|
|
75
79
|
return
|
|
76
80
|
|
|
77
|
-
@classmethod
|
|
78
|
-
def from_data(cls, x_grid: NDArray, y_values: NDArray,
|
|
79
|
-
fwhm: float) -> 'AbsorptionSpectrum':
|
|
80
|
-
'''
|
|
81
|
-
Creates AbsorptionSpectrum object from data
|
|
82
|
-
|
|
83
|
-
Parameters
|
|
84
|
-
----------
|
|
85
|
-
x_grid: NDArray
|
|
86
|
-
Grid of x values (energies, wavelengths, or wavenumbers)
|
|
87
|
-
y_values: NDArray
|
|
88
|
-
Absorption spectrum values at each point in x_grid
|
|
89
|
-
fwhm: float
|
|
90
|
-
Full width at half maximum used in spectrum generation
|
|
91
|
-
|
|
92
|
-
Returns
|
|
93
|
-
-------
|
|
94
|
-
AbsorptionSpectrum
|
|
95
|
-
Created AbsorptionSpectrum object
|
|
96
|
-
'''
|
|
97
|
-
return cls(x_grid, y_values, fwhm)
|
|
98
|
-
|
|
99
81
|
|
|
100
82
|
class AbsorptionData():
|
|
101
83
|
'''
|
|
@@ -282,7 +264,8 @@ class AbsorptionData():
|
|
|
282
264
|
def generate_spectrum(self, fwhm: float, lineshape: str, x_min: float,
|
|
283
265
|
x_max: float, num_points: int,
|
|
284
266
|
x_type: str = 'energy',
|
|
285
|
-
comment: str = ''
|
|
267
|
+
comment: str = '',
|
|
268
|
+
x_reversed: bool = False) -> AbsorptionSpectrum:
|
|
286
269
|
'''
|
|
287
270
|
Generates absorption spectrum using Gaussian broadening
|
|
288
271
|
|
|
@@ -306,6 +289,9 @@ class AbsorptionData():
|
|
|
306
289
|
'wavenumber' (cm^-1)
|
|
307
290
|
comment: str
|
|
308
291
|
Comment to add to spectrum metadata
|
|
292
|
+
x_reversed: bool
|
|
293
|
+
Whether to reverse the x axis (e.g. for wavelength spectra)\n
|
|
294
|
+
By default, False - increasing x values from left to right
|
|
309
295
|
|
|
310
296
|
Returns
|
|
311
297
|
-------
|
|
@@ -387,7 +373,8 @@ class AbsorptionData():
|
|
|
387
373
|
y_label_mathmode=y_label_mathmode,
|
|
388
374
|
y_values=y_vals,
|
|
389
375
|
fwhm=fwhm,
|
|
390
|
-
comment=comment
|
|
376
|
+
comment=comment,
|
|
377
|
+
x_reversed=x_reversed
|
|
391
378
|
)
|
|
392
379
|
|
|
393
380
|
self.spectrum = spectrum
|
orto/plotter.py
CHANGED
|
@@ -118,7 +118,6 @@ def plot_absorption_spectrum(abs_data: data.AbsorptionData,
|
|
|
118
118
|
ax.set_ylabel(abs_data.spectrum.y_label_mathmode)
|
|
119
119
|
|
|
120
120
|
if abs_data.spectrum.x_label.split()[0].lower() == 'wavelength':
|
|
121
|
-
ax.invert_xaxis()
|
|
122
121
|
stick_x_values = [
|
|
123
122
|
wavelength + x_shift
|
|
124
123
|
for wavelength in abs_data.wavelengths
|
|
@@ -134,6 +133,9 @@ def plot_absorption_spectrum(abs_data: data.AbsorptionData,
|
|
|
134
133
|
for wavenumber in abs_data.wavenumbers
|
|
135
134
|
]
|
|
136
135
|
|
|
136
|
+
if abs_data.spectrum.x_reversed:
|
|
137
|
+
ax.invert_xaxis()
|
|
138
|
+
|
|
137
139
|
x_values = abs_data.spectrum.x_grid + x_shift
|
|
138
140
|
|
|
139
141
|
# Main spectrum
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
orto/__init__.py,sha256=IedlltYr3qYZxChNUdz62qogXA9Pos_MUvXdGXqAa0E,41
|
|
2
|
+
orto/__version__.py,sha256=k_9xGm1wdecel8QkX-itmu1beg8G5BX8XXrnN7ZTFjc,23
|
|
3
|
+
orto/cli.py,sha256=Nt6ErYBeU9YX5FGj-cgR7xfekIt4QmDnuaAqjL6ji7A,96715
|
|
4
|
+
orto/constants.py,sha256=anxaiTykO8Q_CXliR7zuOAdnXZrQ2-C4ndaviyl7kGc,419
|
|
5
|
+
orto/data.py,sha256=qs0UsCMOHqhsXYSCT8Kcmq988jQSMuGW4ZceelON0fo,14739
|
|
6
|
+
orto/exceptions.py,sha256=D7oNeAEGeJNt5thzt6PaCn5FY6JcbJOWUE1N1LVhhuE,159
|
|
7
|
+
orto/extractor.py,sha256=GKCFU7oSawYCYjOizER8e6HSp4bOsyqOxYcTPQHwdjM,84923
|
|
8
|
+
orto/input.py,sha256=uUQV6A-8D0GZpRoY1rKK_aUPmk9kVVTnMzTHuisP5t4,11888
|
|
9
|
+
orto/job.py,sha256=tDiz9omFwinoYJamgz66MZez0Ee9HMhuCIAeHMhXRF8,5916
|
|
10
|
+
orto/plotter.py,sha256=FqeH6xh2MpDmX_n0AtZaIddgNyCcuXwwrDqJBGhQsG4,17837
|
|
11
|
+
orto/utils.py,sha256=GcMZ9uebOSnkPQT_U5O0X49LUtTu8YpXZxEsNKgXNTY,9838
|
|
12
|
+
orto-1.11.2.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
|
13
|
+
orto-1.11.2.dist-info/METADATA,sha256=fegThcazVixL23e9n5k_kR6CVOummgf0Eoeui9J6y44,1185
|
|
14
|
+
orto-1.11.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
15
|
+
orto-1.11.2.dist-info/entry_points.txt,sha256=HXenCglMp_03JkN34pK2phkjXK9CFcXTGHKv5QaVY8I,39
|
|
16
|
+
orto-1.11.2.dist-info/top_level.txt,sha256=hQ-z28gTN_FZ2B5Kiwxr_9cUTcCoib9W5HjbkceDXw4,5
|
|
17
|
+
orto-1.11.2.dist-info/RECORD,,
|
orto-1.11.1.dist-info/RECORD
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
orto/__init__.py,sha256=IedlltYr3qYZxChNUdz62qogXA9Pos_MUvXdGXqAa0E,41
|
|
2
|
-
orto/__version__.py,sha256=QO79Qbu7GOTJ8NOEAJNkDnn8Y7OBA5xNxoQgCyKm6NU,23
|
|
3
|
-
orto/cli.py,sha256=c9DN29Xn9nxpCzPHHJYo-BirBOviUACsFmIEiJyrGe8,96209
|
|
4
|
-
orto/constants.py,sha256=anxaiTykO8Q_CXliR7zuOAdnXZrQ2-C4ndaviyl7kGc,419
|
|
5
|
-
orto/data.py,sha256=ONG8poKWkJIO1wVfcWh-83zmcy_VxatB0OffaWE_9aI,14911
|
|
6
|
-
orto/exceptions.py,sha256=D7oNeAEGeJNt5thzt6PaCn5FY6JcbJOWUE1N1LVhhuE,159
|
|
7
|
-
orto/extractor.py,sha256=GKCFU7oSawYCYjOizER8e6HSp4bOsyqOxYcTPQHwdjM,84923
|
|
8
|
-
orto/input.py,sha256=uUQV6A-8D0GZpRoY1rKK_aUPmk9kVVTnMzTHuisP5t4,11888
|
|
9
|
-
orto/job.py,sha256=tDiz9omFwinoYJamgz66MZez0Ee9HMhuCIAeHMhXRF8,5916
|
|
10
|
-
orto/plotter.py,sha256=_t9bow6sUMoRAvD6gVFGJTc-_ifW7RmeR0JAPWK_lm4,17799
|
|
11
|
-
orto/utils.py,sha256=GcMZ9uebOSnkPQT_U5O0X49LUtTu8YpXZxEsNKgXNTY,9838
|
|
12
|
-
orto-1.11.1.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
|
13
|
-
orto-1.11.1.dist-info/METADATA,sha256=9IDbC1oGlxYfpGxhcLLxgKEWwKDosU79RZw8ZHNrENA,1185
|
|
14
|
-
orto-1.11.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
15
|
-
orto-1.11.1.dist-info/entry_points.txt,sha256=HXenCglMp_03JkN34pK2phkjXK9CFcXTGHKv5QaVY8I,39
|
|
16
|
-
orto-1.11.1.dist-info/top_level.txt,sha256=hQ-z28gTN_FZ2B5Kiwxr_9cUTcCoib9W5HjbkceDXw4,5
|
|
17
|
-
orto-1.11.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|