lime-stable 2.0.dev6__tar.gz → 2.0.dev7__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.dev6/src/lime_stable.egg-info → lime_stable-2.0.dev7}/PKG-INFO +1 -1
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/pyproject.toml +1 -1
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/lime.toml +1 -1
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/plotting/bokeh_plots.py +11 -2
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/plotting/plots.py +5 -5
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/plotting/utils.py +5 -5
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7/src/lime_stable.egg-info}/PKG-INFO +1 -1
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/LICENSE.rst +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/MANIFEST.in +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/README.rst +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/setup.cfg +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/__init__.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/archives/__init__.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/archives/read_fits.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/archives/tables.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/changelog.txt +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/fitting/__init__.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/fitting/lines.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/fitting/redshift.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/inference/detection.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/inference/intensity_threshold.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/io.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/observations.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/plotting/__init__.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/plotting/format.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/plotting/plots_interactive.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/plotting/theme_lime.toml +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/resources/__init__.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/resources/lines_database_formatting.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/resources/lines_database_v2.0.0.txt +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/resources/logo.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/resources/types_params.txt +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/retrieve/__init__.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/retrieve/peaks.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/tools.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/transitions.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime/workflow.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime_stable.egg-info/SOURCES.txt +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime_stable.egg-info/dependency_links.txt +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime_stable.egg-info/requires.txt +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/src/lime_stable.egg-info/top_level.txt +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/tests/test_astro.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/tests/test_cube.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/tests/test_io.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/tests/test_line.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/tests/test_model.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/tests/test_read_fits.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/tests/test_sample.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/tests/test_spectrum.py +0 -0
- {lime_stable-2.0.dev6 → lime_stable-2.0.dev7}/tests/test_tools.py +0 -0
|
@@ -117,16 +117,25 @@ def bands_filling_bokeh(fig, x, y, z_corr, idcs_mask, label, exclude_continua=Fa
|
|
|
117
117
|
low_lim = 0 if np.isnan(low_lim) else low_lim
|
|
118
118
|
|
|
119
119
|
# Central bands
|
|
120
|
+
print('1',x[idcs_mask[2]:idcs_mask[3]]/z_corr)
|
|
121
|
+
print('1',y[idcs_mask[2]:idcs_mask[3]]*z_corr)
|
|
122
|
+
print('1',low_lim*z_corr)
|
|
120
123
|
fig.varea_step(x=x[idcs_mask[2]:idcs_mask[3]]/z_corr, y1=low_lim*z_corr, y2=y[idcs_mask[2]:idcs_mask[3]]*z_corr,
|
|
121
124
|
step_mode="center", fill_alpha=0.25, color=color_dict['line_band'])
|
|
122
125
|
|
|
123
126
|
# Continua bands exclusion
|
|
124
127
|
if exclude_continua is False:
|
|
128
|
+
print('2', x[idcs_mask[0]:idcs_mask[1]]/z_corr)
|
|
129
|
+
print('2', low_lim*z_corr)
|
|
130
|
+
print('2', y[idcs_mask[0]:idcs_mask[1]]*z_corr)
|
|
125
131
|
fig.varea_step(x=x[idcs_mask[0]:idcs_mask[1]]/z_corr,
|
|
126
132
|
y1=low_lim*z_corr,
|
|
127
133
|
y2=y[idcs_mask[0]:idcs_mask[1]]*z_corr,
|
|
128
134
|
step_mode="center", fill_alpha=0.25, color=color_dict['cont_band'])
|
|
129
135
|
|
|
136
|
+
print('3', x[idcs_mask[4]:idcs_mask[5]]/z_corr)
|
|
137
|
+
print('3', low_lim*z_corr)
|
|
138
|
+
print('3', y[idcs_mask[4]:idcs_mask[5]]*z_corr)
|
|
130
139
|
fig.varea_step(x=x[idcs_mask[4]:idcs_mask[5]]/z_corr,
|
|
131
140
|
y1=low_lim*z_corr,
|
|
132
141
|
y2=y[idcs_mask[4]:idcs_mask[5]]*z_corr,
|
|
@@ -186,7 +195,7 @@ class BokehFigures:
|
|
|
186
195
|
|
|
187
196
|
return
|
|
188
197
|
|
|
189
|
-
def bands(self, label, output_address=None,
|
|
198
|
+
def bands(self, label, output_address=None, bands=None, include_fits=True, rest_frame=False, log_scale=True,
|
|
190
199
|
exclude_continua=True, fig_cfg=None, ax_cfg=None, return_fig=False):
|
|
191
200
|
|
|
192
201
|
|
|
@@ -198,7 +207,7 @@ class BokehFigures:
|
|
|
198
207
|
legend_check = True if label is not None else False
|
|
199
208
|
|
|
200
209
|
# Check which line should be plotted
|
|
201
|
-
line = parse_bands_arguments(label, log,
|
|
210
|
+
line = parse_bands_arguments(label, log, bands, norm_flux)
|
|
202
211
|
|
|
203
212
|
# Proceed to plot
|
|
204
213
|
if line is not None:
|
|
@@ -1269,8 +1269,8 @@ class SpectrumFigures(Plotter):
|
|
|
1269
1269
|
|
|
1270
1270
|
return in_fig
|
|
1271
1271
|
|
|
1272
|
-
def bands(self, label=None,
|
|
1273
|
-
ax_cfg=None, in_fig=None, maximize=False, show_err=False):
|
|
1272
|
+
def bands(self, label=None, bands=None, output_address=None, include_fits=True, rest_frame=False, y_scale='auto', fig_cfg=None,
|
|
1273
|
+
ax_cfg=None, in_fig=None, maximize=False, show_err=False, exclude_continua=False):
|
|
1274
1274
|
|
|
1275
1275
|
"""
|
|
1276
1276
|
|
|
@@ -1327,7 +1327,7 @@ class SpectrumFigures(Plotter):
|
|
|
1327
1327
|
display_check = True if in_fig is None else False
|
|
1328
1328
|
|
|
1329
1329
|
# Check which line should be plotted
|
|
1330
|
-
line = parse_bands_arguments(label,
|
|
1330
|
+
line = parse_bands_arguments(label, bands, log, norm_flux)
|
|
1331
1331
|
|
|
1332
1332
|
# Check the observation has uncertainty to display
|
|
1333
1333
|
if show_err and (self._spec.err_flux is None):
|
|
@@ -1372,13 +1372,13 @@ class SpectrumFigures(Plotter):
|
|
|
1372
1372
|
idcs_bands = line.index_bands(self._spec.wave, self._spec.redshift, just_band_edges=True)
|
|
1373
1373
|
|
|
1374
1374
|
# Plot the spectrum
|
|
1375
|
-
label_leg = line.latex_label if (line.latex_label is not None and include_fits is False) else None
|
|
1375
|
+
label_leg = line.latex_label[0] if (line.latex_label[0] is not None and include_fits is False) else None
|
|
1376
1376
|
in_ax[0].step(wave_plot[idcs_bands[0]:idcs_bands[5]] / z_corr, flux_plot[idcs_bands[0]:idcs_bands[5]] * z_corr,
|
|
1377
1377
|
where='mid', color=theme.colors['fg'], label=label_leg, linewidth=theme.plt['spectrum_width'])
|
|
1378
1378
|
|
|
1379
1379
|
# Continuum bands
|
|
1380
1380
|
bands_filling_plot(in_ax[0], wave_plot, flux_plot, z_corr, idcs_bands, line, color_dict=theme.colors,
|
|
1381
|
-
show_central=not show_err)
|
|
1381
|
+
show_central=not show_err, exclude_continua=exclude_continua)
|
|
1382
1382
|
|
|
1383
1383
|
if show_err:
|
|
1384
1384
|
err_plot = self._spec.err_flux.data
|
|
@@ -7,21 +7,21 @@ from lime.io import _PARENT_BANDS
|
|
|
7
7
|
_logger = logging.getLogger('LiMe')
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
def parse_bands_arguments(label,
|
|
10
|
+
def parse_bands_arguments(label, bands, log, norm_flux):
|
|
11
11
|
|
|
12
12
|
line = None
|
|
13
13
|
if label is None and (log.index.size > 0):
|
|
14
14
|
label = log.index[-1]
|
|
15
15
|
line = Line.from_log(label, log, norm_flux)
|
|
16
16
|
|
|
17
|
+
# The user provided a reference band to check the region use it
|
|
18
|
+
elif label is not None and bands is not None:
|
|
19
|
+
line = Line(label, bands)
|
|
20
|
+
|
|
17
21
|
# Line has been measured before
|
|
18
22
|
elif label is not None and (log.index.size > 0):
|
|
19
23
|
line = Line.from_log(label, log, norm_flux)
|
|
20
24
|
|
|
21
|
-
# The user provided a reference band to check the region use it
|
|
22
|
-
elif label is not None and ref_bands is not None:
|
|
23
|
-
line = Line(label, ref_bands)
|
|
24
|
-
|
|
25
25
|
elif label is not None and label in _PARENT_BANDS.index:
|
|
26
26
|
line = Line(label, band=_PARENT_BANDS.loc[label, 'w1':'w6'].to_numpy())
|
|
27
27
|
|
|
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.dev6 → lime_stable-2.0.dev7}/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
|
|
File without changes
|