lime-stable 2.0.dev2__tar.gz → 2.0.dev3__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.
- {lime_stable-2.0.dev2/src/lime_stable.egg-info → lime_stable-2.0.dev3}/PKG-INFO +2 -2
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/pyproject.toml +2 -2
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/archives/read_fits.py +2 -1
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/lime.toml +1 -1
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/plotting/plots.py +1 -1
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/plotting/plots_interactive.py +22 -31
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3/src/lime_stable.egg-info}/PKG-INFO +2 -2
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime_stable.egg-info/requires.txt +1 -1
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/LICENSE.rst +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/MANIFEST.in +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/README.rst +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/setup.cfg +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/__init__.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/archives/__init__.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/archives/tables.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/changelog.txt +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/fitting/__init__.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/fitting/lines.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/fitting/redshift.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/inference/detection.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/inference/intensity_threshold.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/io.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/observations.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/plotting/__init__.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/plotting/bokeh_plots.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/plotting/format.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/plotting/theme_lime.toml +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/plotting/utils.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/resources/__init__.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/resources/lines_database_formatting.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/resources/lines_database_v2.0.0.txt +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/resources/logo.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/resources/types_params.txt +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/retrieve/__init__.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/retrieve/peaks.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/tools.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/transitions.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/workflow.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime_stable.egg-info/SOURCES.txt +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime_stable.egg-info/dependency_links.txt +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime_stable.egg-info/top_level.txt +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/tests/test_astro.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/tests/test_cube.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/tests/test_io.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/tests/test_line.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/tests/test_model.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/tests/test_read_fits.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/tests/test_sample.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/tests/test_spectrum.py +0 -0
- {lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/tests/test_tools.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lime-stable
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.dev3
|
|
4
4
|
Summary: Line measuring algorithm for astronomical spectra
|
|
5
5
|
Author-email: Vital Fernández <vgf@umich.edu>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
@@ -15,10 +15,10 @@ Requires-Dist: matplotlib~=3.10
|
|
|
15
15
|
Requires-Dist: numpy~=2.2
|
|
16
16
|
Requires-Dist: pandas~=2.2
|
|
17
17
|
Requires-Dist: scipy~=1.15
|
|
18
|
+
Requires-Dist: aspect-stable~=0.3.1
|
|
18
19
|
Requires-Dist: tomli>=2.0.0; python_version < "3.11"
|
|
19
20
|
Provides-Extra: full
|
|
20
21
|
Requires-Dist: asdf~=4.1; extra == "full"
|
|
21
|
-
Requires-Dist: aspect-stable~=0.3.0; extra == "full"
|
|
22
22
|
Requires-Dist: bokeh~=3.6; extra == "full"
|
|
23
23
|
Requires-Dist: mplcursors~=0.6; extra == "full"
|
|
24
24
|
Requires-Dist: openpyxl~=3.1; extra == "full"
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "lime-stable"
|
|
7
|
-
version = "2.0.
|
|
7
|
+
version = "2.0.dev3"
|
|
8
8
|
readme = "README.rst"
|
|
9
9
|
requires-python = ">=3.11"
|
|
10
10
|
license = "GPL-3.0-or-later"
|
|
@@ -17,6 +17,7 @@ dependencies = ["astropy~=7.0",
|
|
|
17
17
|
"numpy~=2.2",
|
|
18
18
|
"pandas~=2.2",
|
|
19
19
|
"scipy~=1.15",
|
|
20
|
+
"aspect-stable~=0.3.1",
|
|
20
21
|
"tomli >= 2.0.0 ; python_version < '3.11'"]
|
|
21
22
|
|
|
22
23
|
classifiers = ["Programming Language :: Python :: 3",
|
|
@@ -24,7 +25,6 @@ classifiers = ["Programming Language :: Python :: 3",
|
|
|
24
25
|
|
|
25
26
|
[project.optional-dependencies]
|
|
26
27
|
full = ["asdf~=4.1",
|
|
27
|
-
"aspect-stable~=0.3.0",
|
|
28
28
|
"bokeh~=3.6",
|
|
29
29
|
"mplcursors~=0.6",
|
|
30
30
|
"openpyxl~=3.1",
|
|
@@ -4,6 +4,7 @@ import numpy as np
|
|
|
4
4
|
from astropy.io import fits
|
|
5
5
|
from astropy.wcs import WCS
|
|
6
6
|
import logging
|
|
7
|
+
from io import IOBase
|
|
7
8
|
|
|
8
9
|
from lime.io import LiMe_Error
|
|
9
10
|
from urllib.parse import urlparse
|
|
@@ -180,7 +181,7 @@ def check_fits_location(fits_address, lime_object=None, source=None):
|
|
|
180
181
|
output = None, False
|
|
181
182
|
|
|
182
183
|
# Streamlit BytesIO input
|
|
183
|
-
elif type(fits_address).__name__ == 'UploadedFile':
|
|
184
|
+
elif (type(fits_address).__name__ == 'UploadedFile') or isinstance(fits_address, IOBase):
|
|
184
185
|
output = fits_address, False
|
|
185
186
|
|
|
186
187
|
# File address or url
|
|
@@ -881,7 +881,7 @@ class SpectrumFigures(Plotter):
|
|
|
881
881
|
|
|
882
882
|
"""
|
|
883
883
|
|
|
884
|
-
This function plots the spectrum flux versus wavelength.
|
|
884
|
+
This function plots the spectrum flux versus wavelength.z
|
|
885
885
|
|
|
886
886
|
The user can include the line bands on the plot if added via the ``line_bands`` attribute.
|
|
887
887
|
|
|
@@ -549,7 +549,7 @@ class RedshiftInspectionSingle:
|
|
|
549
549
|
|
|
550
550
|
def redshift(self, reference_lines, output_file_log=None, output_idcs=None, redshift_column='redshift',
|
|
551
551
|
none_value=np.nan, unknown_value=0.0, legend_handle='levels', maximize=False, title_label=None,
|
|
552
|
-
output_address=None,
|
|
552
|
+
output_address=None, fig_cfg={}, ax_cfg={}, in_fig=None):
|
|
553
553
|
|
|
554
554
|
# Assign the attributes
|
|
555
555
|
self._obj_idcs = None
|
|
@@ -581,16 +581,12 @@ class RedshiftInspectionSingle:
|
|
|
581
581
|
idcs_sorted = np.argsort(_waves_array)
|
|
582
582
|
self._waves_array, self._latex_array = _waves_array[idcs_sorted], _latex_array[idcs_sorted]
|
|
583
583
|
|
|
584
|
-
# Set
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
plt_cfg.setdefault('xtick.labelsize', 10)
|
|
588
|
-
plt_cfg.setdefault('ytick.labelsize', 10)
|
|
584
|
+
# Set the plot format where the user's overwrites the default
|
|
585
|
+
size_conf = {'figure.figsize': (10, 6), 'axes.labelsize': 12, 'xtick.labelsize': 10, 'ytick.labelsize': 10}
|
|
586
|
+
size_conf = size_conf if fig_cfg is None else {**size_conf, **fig_cfg}
|
|
589
587
|
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
PLT_CONF, self._AXES_CONF = self._figure_format(plt_cfg, ax_cfg, norm_flux=norm_flux, units_wave=units_wave,
|
|
593
|
-
units_flux=units_flux)
|
|
588
|
+
PLT_CONF = theme.fig_defaults(size_conf)
|
|
589
|
+
self._AXES_CONF = theme.ax_defaults(ax_cfg, self._spec.units_wave, self._spec.units_flux, self._spec.norm_flux, fig_type=None)
|
|
594
590
|
|
|
595
591
|
# Create and fill the figure
|
|
596
592
|
with rc_context(PLT_CONF):
|
|
@@ -601,15 +597,12 @@ class RedshiftInspectionSingle:
|
|
|
601
597
|
self._ax = self._fig.add_subplot(gs[0])
|
|
602
598
|
self._ax.set(**self._AXES_CONF)
|
|
603
599
|
|
|
604
|
-
#
|
|
600
|
+
# Create the RadioButtons widget for the lines
|
|
605
601
|
buttoms_ax = self._fig.add_subplot(gs[1])
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
circle.set_width(0.075)
|
|
611
|
-
for r in radio.labels:
|
|
612
|
-
r.set_fontsize(6)
|
|
602
|
+
labels_buttons = [r'$None$'] + list(self._latex_array) + [r'$Unknown$']
|
|
603
|
+
radio_props = {'s': [10] * len(labels_buttons)}
|
|
604
|
+
label_props = {'fontsize': [6] * len(labels_buttons)}
|
|
605
|
+
radio = RadioButtons(buttoms_ax, labels_buttons, radio_props=radio_props, label_props=label_props)
|
|
613
606
|
|
|
614
607
|
# Plot the spectrum
|
|
615
608
|
self._launch_plots_ZI()
|
|
@@ -894,16 +887,12 @@ class RedshiftInspection:
|
|
|
894
887
|
self._ax = self._fig.add_subplot(gs[0])
|
|
895
888
|
self._ax.set(**self._AXES_CONF)
|
|
896
889
|
|
|
897
|
-
#
|
|
890
|
+
# Create the RadioButtons widget for the lines
|
|
898
891
|
buttoms_ax = self._fig.add_subplot(gs[1])
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
circle.set_width(0.075)
|
|
904
|
-
circle.set_edgecolor(theme.colors['fg']) # or any color like 'black', '#333333', etc.
|
|
905
|
-
for r in radio.labels:
|
|
906
|
-
r.set_fontsize(6)
|
|
892
|
+
labels_buttons = [r'$None$'] + list(self._latex_array) + [r'$Unknown$']
|
|
893
|
+
radio_props = {'s': [10] * len(labels_buttons)}
|
|
894
|
+
label_props = {'fontsize': [6] * len(labels_buttons)}
|
|
895
|
+
radio = RadioButtons(buttoms_ax, labels_buttons, radio_props=radio_props, label_props=label_props)
|
|
907
896
|
|
|
908
897
|
# Plot the spectrum
|
|
909
898
|
self._launch_plots_ZI()
|
|
@@ -1349,10 +1338,12 @@ class CubeInspection:
|
|
|
1349
1338
|
# Buttons axis if provided
|
|
1350
1339
|
if len(self.masks_dict) > 0:
|
|
1351
1340
|
self._ax2 = self._fig.add_subplot(gs_image[1])
|
|
1352
|
-
radio = RadioButtons(self._ax2, list(self.masks_dict.keys()))
|
|
1353
1341
|
|
|
1354
|
-
|
|
1355
|
-
|
|
1342
|
+
# Create the RadioButtons widget with the specified properties
|
|
1343
|
+
labels_buttons = list(self.masks_dict.keys())
|
|
1344
|
+
radio_props = {'s': [10] * len(labels_buttons)}
|
|
1345
|
+
label_props = {'fontsize': [5] * len(labels_buttons)}
|
|
1346
|
+
radio = RadioButtons(self._ax2, labels_buttons, radio_props=radio_props, label_props=label_props)
|
|
1356
1347
|
|
|
1357
1348
|
# Plot the data
|
|
1358
1349
|
self.data_plots()
|
|
@@ -1733,7 +1724,7 @@ class MaskInspection:
|
|
|
1733
1724
|
return
|
|
1734
1725
|
|
|
1735
1726
|
|
|
1736
|
-
class SpectrumCheck(Plotter,
|
|
1727
|
+
class SpectrumCheck(Plotter, RedshiftInspectionSingle, BandsInspection):
|
|
1737
1728
|
|
|
1738
1729
|
def __init__(self, spectrum):
|
|
1739
1730
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lime-stable
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.dev3
|
|
4
4
|
Summary: Line measuring algorithm for astronomical spectra
|
|
5
5
|
Author-email: Vital Fernández <vgf@umich.edu>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
@@ -15,10 +15,10 @@ Requires-Dist: matplotlib~=3.10
|
|
|
15
15
|
Requires-Dist: numpy~=2.2
|
|
16
16
|
Requires-Dist: pandas~=2.2
|
|
17
17
|
Requires-Dist: scipy~=1.15
|
|
18
|
+
Requires-Dist: aspect-stable~=0.3.1
|
|
18
19
|
Requires-Dist: tomli>=2.0.0; python_version < "3.11"
|
|
19
20
|
Provides-Extra: full
|
|
20
21
|
Requires-Dist: asdf~=4.1; extra == "full"
|
|
21
|
-
Requires-Dist: aspect-stable~=0.3.0; extra == "full"
|
|
22
22
|
Requires-Dist: bokeh~=3.6; extra == "full"
|
|
23
23
|
Requires-Dist: mplcursors~=0.6; extra == "full"
|
|
24
24
|
Requires-Dist: openpyxl~=3.1; extra == "full"
|
|
@@ -4,6 +4,7 @@ matplotlib~=3.10
|
|
|
4
4
|
numpy~=2.2
|
|
5
5
|
pandas~=2.2
|
|
6
6
|
scipy~=1.15
|
|
7
|
+
aspect-stable~=0.3.1
|
|
7
8
|
|
|
8
9
|
[:python_version < "3.11"]
|
|
9
10
|
tomli>=2.0.0
|
|
@@ -15,7 +16,6 @@ sphinx-rtd-theme~=3.0
|
|
|
15
16
|
|
|
16
17
|
[full]
|
|
17
18
|
asdf~=4.1
|
|
18
|
-
aspect-stable~=0.3.0
|
|
19
19
|
bokeh~=3.6
|
|
20
20
|
mplcursors~=0.6
|
|
21
21
|
openpyxl~=3.1
|
|
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
|
{lime_stable-2.0.dev2 → lime_stable-2.0.dev3}/src/lime/resources/lines_database_formatting.py
RENAMED
|
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
|