lime-stable 1.3.0__tar.gz → 2.0.dev2__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.
Files changed (63) hide show
  1. lime_stable-2.0.dev2/MANIFEST.in +7 -0
  2. {lime-stable-1.3.0/src/lime_stable.egg-info → lime_stable-2.0.dev2}/PKG-INFO +28 -23
  3. lime_stable-2.0.dev2/pyproject.toml +47 -0
  4. lime_stable-2.0.dev2/setup.cfg +4 -0
  5. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/src/lime/__init__.py +10 -12
  6. lime_stable-2.0.dev2/src/lime/archives/__init__.py +0 -0
  7. {lime-stable-1.3.0/src/lime → lime_stable-2.0.dev2/src/lime/archives}/read_fits.py +59 -13
  8. {lime-stable-1.3.0/src/lime → lime_stable-2.0.dev2/src/lime/archives}/tables.py +4 -4
  9. lime_stable-2.0.dev2/src/lime/changelog.txt +108 -0
  10. lime_stable-2.0.dev2/src/lime/fitting/__init__.py +0 -0
  11. lime-stable-1.3.0/src/lime/model.py → lime_stable-2.0.dev2/src/lime/fitting/lines.py +202 -143
  12. lime_stable-2.0.dev2/src/lime/fitting/redshift.py +310 -0
  13. lime_stable-2.0.dev2/src/lime/inference/detection.py +15 -0
  14. lime_stable-2.0.dev2/src/lime/inference/intensity_threshold.py +205 -0
  15. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/src/lime/io.py +14 -46
  16. lime_stable-2.0.dev2/src/lime/lime.toml +3 -0
  17. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/src/lime/observations.py +50 -67
  18. lime_stable-2.0.dev2/src/lime/plotting/__init__.py +0 -0
  19. lime_stable-2.0.dev2/src/lime/plotting/bokeh_plots.py +508 -0
  20. lime_stable-2.0.dev2/src/lime/plotting/format.py +213 -0
  21. {lime-stable-1.3.0/src/lime → lime_stable-2.0.dev2/src/lime/plotting}/plots.py +286 -408
  22. {lime-stable-1.3.0/src/lime → lime_stable-2.0.dev2/src/lime/plotting}/plots_interactive.py +176 -207
  23. lime_stable-2.0.dev2/src/lime/plotting/theme_lime.toml +131 -0
  24. lime_stable-2.0.dev2/src/lime/plotting/utils.py +65 -0
  25. lime_stable-2.0.dev2/src/lime/resources/__init__.py +0 -0
  26. lime_stable-2.0.dev2/src/lime/resources/lines_database_formatting.py +113 -0
  27. lime_stable-2.0.dev2/src/lime/resources/lines_database_v2.0.0.txt +152 -0
  28. {lime-stable-1.3.0/src/lime → lime_stable-2.0.dev2/src/lime/resources}/logo.py +5 -5
  29. lime_stable-2.0.dev2/src/lime/retrieve/__init__.py +0 -0
  30. lime_stable-2.0.dev2/src/lime/retrieve/peaks.py +205 -0
  31. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/src/lime/tools.py +10 -101
  32. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/src/lime/transitions.py +243 -69
  33. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/src/lime/workflow.py +466 -275
  34. {lime-stable-1.3.0 → lime_stable-2.0.dev2/src/lime_stable.egg-info}/PKG-INFO +28 -23
  35. lime_stable-2.0.dev2/src/lime_stable.egg-info/SOURCES.txt +48 -0
  36. lime_stable-2.0.dev2/src/lime_stable.egg-info/requires.txt +28 -0
  37. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/tests/test_astro.py +3 -3
  38. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/tests/test_cube.py +4 -4
  39. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/tests/test_line.py +18 -17
  40. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/tests/test_model.py +2 -4
  41. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/tests/test_spectrum.py +8 -7
  42. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/tests/test_tools.py +9 -3
  43. lime-stable-1.3.0/MANIFEST.in +0 -2
  44. lime-stable-1.3.0/pyproject.toml +0 -36
  45. lime-stable-1.3.0/setup.cfg +0 -22
  46. lime-stable-1.3.0/setup.py +0 -36
  47. lime-stable-1.3.0/src/lime/config.toml +0 -259
  48. lime-stable-1.3.0/src/lime/recognition.py +0 -669
  49. lime-stable-1.3.0/src/lime/resources/formatting_bands.py +0 -38
  50. lime-stable-1.3.0/src/lime/resources/miri_lines.txt +0 -32
  51. lime-stable-1.3.0/src/lime/resources/parent_bands.txt +0 -115
  52. lime-stable-1.3.0/src/lime/resources/parent_bands_BackUp.txt +0 -117
  53. lime-stable-1.3.0/src/lime/resources/test_df.txt +0 -115
  54. lime-stable-1.3.0/src/lime_stable.egg-info/SOURCES.txt +0 -40
  55. lime-stable-1.3.0/src/lime_stable.egg-info/requires.txt +0 -19
  56. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/LICENSE.rst +0 -0
  57. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/README.rst +0 -0
  58. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/src/lime/resources/types_params.txt +0 -0
  59. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/src/lime_stable.egg-info/dependency_links.txt +0 -0
  60. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/src/lime_stable.egg-info/top_level.txt +0 -0
  61. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/tests/test_io.py +0 -0
  62. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/tests/test_read_fits.py +0 -0
  63. {lime-stable-1.3.0 → lime_stable-2.0.dev2}/tests/test_sample.py +0 -0
@@ -0,0 +1,7 @@
1
+ include src/reader/*.toml
2
+ include src/lime/lime.toml
3
+ include src/lime/changelog.txt
4
+ include src/lime/resources/parent_mask.txt
5
+ include src/lime/resources/types_params.txt
6
+ include src/lime/resources/lines_database_v2.0.0.txt
7
+ include src/lime/plotting/theme_lime.toml
@@ -1,33 +1,38 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: lime-stable
3
- Version: 1.3.0
3
+ Version: 2.0.dev2
4
4
  Summary: Line measuring algorithm for astronomical spectra
5
- Home-page: https://github.com/Vital-Fernandez/lime
6
- Author: Vital Fernandez
7
5
  Author-email: Vital Fernández <vgf@umich.edu>
8
- Classifier: License :: OSI Approved :: MIT License
6
+ License-Expression: GPL-3.0-or-later
9
7
  Classifier: Programming Language :: Python :: 3
10
- Classifier: Programming Language :: Python :: 3.7
11
- Requires-Python: >=3.8
8
+ Classifier: Programming Language :: Python :: 3.11
9
+ Requires-Python: >=3.11
12
10
  Description-Content-Type: text/x-rst
13
11
  License-File: LICENSE.rst
14
- Requires-Dist: asdf~=3.0
15
- Requires-Dist: astropy~=6.0
16
- Requires-Dist: joblib~=1.3
17
- Requires-Dist: lmfit~=1.2
18
- Requires-Dist: matplotlib~=3.7
19
- Requires-Dist: mplcursors~=0.5
20
- Requires-Dist: nbsphinx~=0.9
21
- Requires-Dist: numpy~=1.24
22
- Requires-Dist: openpyxl~=3.1
23
- Requires-Dist: pandas~=2.0
24
- Requires-Dist: PyLaTeX~=1.4
25
- Requires-Dist: pytest~=7.4
26
- Requires-Dist: pytest-cov~=4.1
27
- Requires-Dist: pytest-mpl~=0.16
28
- Requires-Dist: scipy~=1.10
29
- Requires-Dist: toml~=0.10
12
+ Requires-Dist: astropy~=7.0
13
+ Requires-Dist: lmfit~=1.3
14
+ Requires-Dist: matplotlib~=3.10
15
+ Requires-Dist: numpy~=2.2
16
+ Requires-Dist: pandas~=2.2
17
+ Requires-Dist: scipy~=1.15
30
18
  Requires-Dist: tomli>=2.0.0; python_version < "3.11"
19
+ Provides-Extra: full
20
+ Requires-Dist: asdf~=4.1; extra == "full"
21
+ Requires-Dist: aspect-stable~=0.3.0; extra == "full"
22
+ Requires-Dist: bokeh~=3.6; extra == "full"
23
+ Requires-Dist: mplcursors~=0.6; extra == "full"
24
+ Requires-Dist: openpyxl~=3.1; extra == "full"
25
+ Requires-Dist: PyLaTeX~=1.4; extra == "full"
26
+ Requires-Dist: toml~=0.10; extra == "full"
27
+ Provides-Extra: docs
28
+ Requires-Dist: nbsphinx~=0.9; extra == "docs"
29
+ Requires-Dist: ipympl~=0.9; extra == "docs"
30
+ Requires-Dist: sphinx-rtd-theme~=3.0; extra == "docs"
31
+ Provides-Extra: tests
32
+ Requires-Dist: pytest~=8.3; extra == "tests"
33
+ Requires-Dist: pytest-cov~=6.0; extra == "tests"
34
+ Requires-Dist: pytest-mpl~=0.17; extra == "tests"
35
+ Dynamic: license-file
31
36
 
32
37
 
33
38
  .. image:: https://github.com/Vital-Fernandez/lime/blob/0afedb150b0169deec6c7f159def99750a3a30da/docs/source/_static/logo_transparent.png?raw=true
@@ -0,0 +1,47 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "lime-stable"
7
+ version = "2.0.dev2"
8
+ readme = "README.rst"
9
+ requires-python = ">=3.11"
10
+ license = "GPL-3.0-or-later"
11
+ authors = [{name = "Vital Fernández", email = "vgf@umich.edu"}]
12
+ description = "Line measuring algorithm for astronomical spectra"
13
+
14
+ dependencies = ["astropy~=7.0",
15
+ "lmfit~=1.3",
16
+ "matplotlib~=3.10",
17
+ "numpy~=2.2",
18
+ "pandas~=2.2",
19
+ "scipy~=1.15",
20
+ "tomli >= 2.0.0 ; python_version < '3.11'"]
21
+
22
+ classifiers = ["Programming Language :: Python :: 3",
23
+ "Programming Language :: Python :: 3.11"]
24
+
25
+ [project.optional-dependencies]
26
+ full = ["asdf~=4.1",
27
+ "aspect-stable~=0.3.0",
28
+ "bokeh~=3.6",
29
+ "mplcursors~=0.6",
30
+ "openpyxl~=3.1",
31
+ "PyLaTeX~=1.4",
32
+ "toml~=0.10",]
33
+
34
+ docs = ["nbsphinx~=0.9",
35
+ "ipympl~=0.9",
36
+ "sphinx-rtd-theme~=3.0"]
37
+
38
+ tests = ["pytest~=8.3",
39
+ "pytest-cov~=6.0",
40
+ "pytest-mpl~=0.17"]
41
+
42
+ [tool.pytest.ini_options]
43
+ pythonpath = ["src"]
44
+ mpl-baseline-path = 'tests/baseline'
45
+ mpl-results-path = 'tests/outputs'
46
+ mpl-results-always = false
47
+ addopts = "-p no:asdf_schema_tester"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -26,25 +26,23 @@ __python_version__ = sys.version_info
26
26
 
27
27
  # Read lime configuration .toml
28
28
  _inst_dir = Path(__file__).parent
29
- _conf_path = _inst_dir/'config.toml'
29
+ _conf_path = _inst_dir/'lime.toml'
30
30
  with open(_conf_path, mode="rb") as fp:
31
31
  _setup_cfg = tomllib.load(fp)
32
32
 
33
33
  __version__ = _setup_cfg['metadata']['version']
34
- _lines_database_path = (os.path.join(_inst_dir, 'resources/parent_bands.txt'))
35
34
 
36
35
  # Logging configuration
37
36
  _logger.debug(f'Launching LiMe {__version__} in Python {__python_version__}')
38
37
 
39
38
 
40
- class Error(Exception):
41
- """LiMe exception function"""
39
+ # class Error(Exception):
40
+ # """LiMe exception function"""
42
41
 
43
- from .observations import Spectrum, Sample, Cube
44
- from .io import *
45
- from .tools import *
46
- from .transitions import Line, label_decomposition, bands_from_frame
47
- from .read_fits import OpenFits, show_instrument_cfg
48
- from .recognition import detection_function
49
- from .plots import theme
50
- from .workflow import line_bands
42
+ from lime.observations import Spectrum, Sample, Cube
43
+ from lime.io import *
44
+ from lime.tools import *
45
+ from lime.transitions import Line, label_decomposition, bands_from_frame
46
+ from lime.archives.read_fits import OpenFits, show_instrument_cfg
47
+ from lime.plotting.plots import theme
48
+ from lime.workflow import line_bands
File without changes
@@ -5,7 +5,7 @@ from astropy.io import fits
5
5
  from astropy.wcs import WCS
6
6
  import logging
7
7
 
8
- from .io import LiMe_Error
8
+ from lime.io import LiMe_Error
9
9
  from urllib.parse import urlparse
10
10
 
11
11
  try:
@@ -32,7 +32,10 @@ SPECTRUM_FITS_PARAMS = {'nirspec': {'redshift': None, 'norm_flux': None, 'res_po
32
32
  'units_flux': '1e-17*FLAM', 'pixel_mask': 'nan', 'id_label': None},
33
33
 
34
34
  'desi': {'redshift': None, 'norm_flux': None, 'res_power': None, 'units_wave': 'Angstrom',
35
- 'units_flux': '1e-17*FLAM', 'pixel_mask': "nan", 'id_label': None}}
35
+ 'units_flux': '1e-17*FLAM', 'pixel_mask': "nan", 'id_label': None},
36
+
37
+ 'text': {'redshift': None, 'norm_flux': None, 'res_power': None, 'units_wave': 'Angstrom',
38
+ 'units_flux': 'FLAM', 'pixel_mask': None, 'id_label': None}}
36
39
 
37
40
  CUBE_FITS_PARAMS = {'manga': {'redshift': None, 'norm_flux': None, 'res_power': None, 'units_wave': 'Angstrom',
38
41
  'units_flux': '1e-17*FLAM', 'pixel_mask': "nan", 'id_label': None},
@@ -51,13 +54,13 @@ CUBE_FITS_PARAMS = {'manga': {'redshift': None, 'norm_flux': None, 'res_power':
51
54
 
52
55
  def show_instrument_cfg():
53
56
 
54
- print(f'\nSingle ".fits" spectra files configuration:')
57
+ print(f'\nLong-slit ".fits" observation instrument configuration:')
55
58
  for i, items in enumerate(SPECTRUM_FITS_PARAMS.items()):
56
59
  key, value = items
57
60
  print(f'{i} {key}) \t units_wave: {value["units_wave"]}, units_flux: {value["units_flux"]}, '
58
61
  f'pixel_mask: {value["pixel_mask"]}, res_power: {value["res_power"]}')
59
62
 
60
- print(f'\nCube ".fits" spectra files configuration:')
63
+ print(f'\nCube ".fits" observation instrument configuration:')
61
64
  for i, items in enumerate(CUBE_FITS_PARAMS.items()):
62
65
  key, value = items
63
66
  print(f'{i} {key}) \t units_wave: {value["units_wave"]}, units_flux: {value["units_flux"]},'
@@ -264,6 +267,26 @@ def check_fits_instructions(fits_source, online_provider=False):
264
267
 
265
268
  return fits_reader
266
269
 
270
+ def load_txt(text_address):
271
+
272
+ # Columns
273
+ out_array = np.loadtxt(text_address)
274
+
275
+ # Transform foot comments as dictionary data
276
+ params_dict = {}
277
+ with open(text_address, "r") as f:
278
+
279
+ # Reverse loop while the lines start by a "#"
280
+ for line in reversed(f.readlines()):
281
+ line = line.strip()
282
+ if not line.startswith("#") or (line.startswith("# LiMe")):
283
+ break
284
+
285
+ # Extract key-value pairs
286
+ key, value = line[1:].split(":", 1) # Split at the first ':'
287
+ params_dict[key.strip()] = value.strip()
288
+
289
+ return out_array, params_dict
267
290
 
268
291
  def load_fits(fits_address, data_ext_list=None, hdr_ext_list=None, url_check=False):
269
292
 
@@ -347,9 +370,9 @@ class OpenFits:
347
370
  # Mask requested entries
348
371
  if pixel_mask is not None:
349
372
  pixel_mask = np.atleast_1d(pixel_mask)
350
- mask_array = np.zeros(flux_array.shape).astype(bool)
373
+ mask_bool_array = np.zeros(flux_array.shape).astype(bool)
351
374
 
352
- # String array:
375
+ # String array: TODO Lime2.0 make this a method and add it to the spectrum and flux entries and add inf
353
376
  if pixel_mask.dtype.kind in ['U', 'S']:
354
377
  for entry in pixel_mask:
355
378
  if entry == 'negative':
@@ -361,24 +384,24 @@ class OpenFits:
361
384
  else:
362
385
  raise LiMe_Error(f'Pixel entry "{entry}" is not recognized. Only boolean masks for the masked '
363
386
  f'data or these strings are supported: "nan", "negative", "zero"')
364
- mask_array[idcs] = True
387
+ mask_bool_array[idcs] = True
365
388
 
366
389
  # Boolean mask
367
390
  else:
368
391
  assert flux_array.shape == pixel_mask.shape, LiMe_Error(f'- Input pixel mask shape {pixel_mask.shape}'
369
392
  f'is different from data array shape {flux_array.shape}')
370
- mask_array = pixel_mask
393
+ mask_bool_array = pixel_mask
371
394
 
372
395
  else:
373
- mask_array = None
396
+ mask_bool_array = None
374
397
 
375
398
  # Construct attributes for LiMe object
376
- fits_args = {'input_wave': wave_array, 'input_flux': flux_array, 'input_err': err_array}#'pixel_mask': mask_array}
399
+ fits_args = {'input_wave': wave_array, 'input_flux': flux_array, 'input_err': err_array}
377
400
  fits_args.update(fits_params)
378
401
 
379
402
  # Add mask entry
380
- if mask_array is not None:
381
- fits_args['pixel_mask'] = mask_array
403
+ if mask_bool_array is not None:
404
+ fits_args['pixel_mask'] = mask_bool_array
382
405
 
383
406
  return fits_args
384
407
 
@@ -416,6 +439,30 @@ class OpenFits:
416
439
 
417
440
  return fits_args
418
441
 
442
+ @staticmethod
443
+ def text(file_address):
444
+
445
+ # Read text file dividing the columns into the spectrum axis and the comments as its parameters
446
+ data_arr, params_dict = load_txt(file_address)
447
+
448
+ # Unpack the columns into the spectrum axes
449
+ wave_array, flux_array = data_arr[:, 0], data_arr[:, 1]
450
+
451
+ # Check if pixel error and masks are included
452
+ err_array = data_arr[:, 2] if data_arr.shape[1] > 2 else None
453
+ mask_array = data_arr[:, 3] if data_arr.shape[1] > 3 else None
454
+
455
+ # Convert strings to expected format
456
+ params_dict['redshift'] = float(params_dict['redshift']) if 'redshift' in params_dict else None
457
+ params_dict['norm_flux'] = float(params_dict['norm_flux']) if 'norm_flux' in params_dict else None
458
+ params_dict['id_label'] = params_dict['id_label'] if 'norm_flux' in params_dict else None
459
+ params_dict['pixel_mask'] = mask_array
460
+
461
+ # metadata['units_wave'] = au.Unit(metadata['units_wave']) if 'units_wave' in metadata else au.Unit('AA')
462
+ # metadata['units_flux'] = au.Unit(metadata['units_flux']) if 'units_flux' in metadata else au.Unit('FLAM')
463
+
464
+ return wave_array, flux_array, err_array, None, params_dict
465
+
419
466
  @staticmethod
420
467
  def nirspec(fits_address, data_ext_list=1, hdr_ext_list=(0, 1), pixel_mask=None):
421
468
 
@@ -776,7 +823,6 @@ class OpenFits:
776
823
 
777
824
  return wave_array, flux_cube, err_cube, header_list, fits_params
778
825
 
779
-
780
826
  @staticmethod
781
827
  def desi(target_id, root_url='https://data.desi.lbl.gov/public/edr/spectro/redux', **kwargs):
782
828
 
@@ -111,7 +111,7 @@ def table_fluxes(lines_df, table_address, header_format_latex, table_type='pdf',
111
111
  pdf.addTableRow(row_raw, last_row=lastRow_check)
112
112
 
113
113
  for key, value in kwargs.items():
114
- text_line = r'{}:{}'.format(key.replace('_', '\_'), value)
114
+ text_line = r'{}:{}'.format(key.replace('_', r'\_'), value)
115
115
  pdf.table.add_row([pylatex.NoEscape(r'\footnotesize{{{}}}'.format(text_line))],
116
116
  escape=False, strict=False)
117
117
 
@@ -139,7 +139,7 @@ class PdfMaker:
139
139
  self.table = None
140
140
  self.theme_table = None
141
141
 
142
- # TODO add dictionary with numeric formats for tables depending on the variable
142
+ # TODO add dictionary with numeric formats for archives depending on the variable
143
143
 
144
144
  def create_pdfDoc(self, pdf_type=None, geometry_options=None, document_class=u'article', theme='white'):
145
145
  """
@@ -176,8 +176,8 @@ class PdfMaker:
176
176
  self.pdfDoc = pylatex.Document(documentclass=document_class, geometry_options=self.pdf_geometry_options)
177
177
 
178
178
  if theme == 'dark':
179
- self.pdfDoc.append(pylatex.NoEscape('\definecolor{background}{rgb}{0.169, 0.169, 0.169}'))
180
- self.pdfDoc.append(pylatex.NoEscape('\definecolor{foreground}{rgb}{0.702, 0.780, 0.847}'))
179
+ self.pdfDoc.append(pylatex.NoEscape(r'\definecolor{background}{rgb}{0.169, 0.169, 0.169}'))
180
+ self.pdfDoc.append(pylatex.NoEscape(r'\definecolor{foreground}{rgb}{0.702, 0.780, 0.847}'))
181
181
  self.pdfDoc.append(pylatex.NoEscape(r'\arrayrulecolor{foreground}'))
182
182
 
183
183
  if pdf_type == 'table':
@@ -0,0 +1,108 @@
1
+ LiMe release - 1.0.0 - 04/29/2024
2
+ - First stable release
3
+
4
+ LiMe minor update - 1.0.1 - 05/04/2024
5
+ - Created lime.io.parce_lime_cfg function to convert the .toml sections with lime suffix to the expected format to be its own operation
6
+ - Created lime.plots.spectrum_labels to generate spectrum figure axis labels
7
+ - Delete "log" attribute from lime.Cube class
8
+ - Fix error normalize_fluxes was not cropping the lines frame for an input line list. Need to fix normalize flux error
9
+ - log now returns the dataframe
10
+
11
+ LiMe minor update - 1.0.2 - 05/09/2024
12
+ - SDSS lime.Spectrum.from_file no reads redshift from fits header
13
+
14
+ LiMe minor update - 1.0.3 - 05/09/2024
15
+ - Restored deleted config.toml
16
+
17
+ LiMe minor update - 1.0.4 - 05/17/2024
18
+ - Corrected MANGA flux error measurement
19
+ - New tests for comparison between standard and lime loading of SDSS and MANGA observations
20
+ - Change cm.get_cmap to plt.get_cmap due to matplotlib depreciation
21
+ - Bug fix for multi-index flux extraction function due to pandas depreciation
22
+
23
+ LiMe minor update - 1.0.5 - 05/25/2024
24
+ - Change "continuum_fit" keyword for toml keyword in continuum fitting configuration to "continuum" to match function name
25
+
26
+ LiMe minor update - 1.0.6 - 06/20/2024
27
+ - Fix error in unit conversion of Cubes
28
+ - Clearer messages for bands not matching the spectrum wavelength range
29
+ - Added test for line fitting with line detection using implicit and explicit configuration and bands declaration
30
+ - Plots using the automatic scale now show the scale as in figure text.
31
+ - Added own stringBool from distiutils because it is being discontinued in python 3.12
32
+
33
+ LiMe minor update - 1.0.7 - 07/19/2024
34
+ - define_masks function has been replaces by line.index_bands()
35
+ - The line.index_bands() now warns if line does not have bands at the point of indexing an input spectrum wavelength.
36
+ - Corrections on the measurements documentation page
37
+
38
+ LiMe minor update - 1.0.8 - 09/15/2024
39
+ - The check_fit_cfg function now reviews if the continuum and line_detection functions parameters are present and gives a warning if not.
40
+ - show_masks attribute in Spectrum.plot.spectrum to hide the pixels masks on the output plot.
41
+
42
+ LiMe medium update - 1.1.0 - 09/30/2024
43
+ - By default LiMe will now mask the input spectrum if "nan" and "inf" entries are present in the flux and err_flux arrays but the user does not provide a pixel mask. If the user provides a mask but "nan" or "inf" entries are detected only a warning will be provided.
44
+ - The website now includes the changelog with the LiMe updates.
45
+ - Fixed bug where nan entries would cause an error in the line band detection.
46
+ - New logic operator to store bands which only cover one pixel in band detection.
47
+ - Documentation corrections by E.C. Herenz
48
+
49
+ LiMe minor update - 1.1.1 - 10/29/2024
50
+ - Adding bands from frame function
51
+ - Bug fix for re-normalization in the units_conversion function
52
+ - Bug fix to normalize by 1 if nanmedian flux is <= 0
53
+ - Added security fix for re-normalization in the units_conversion function
54
+ - The review_bands function now checks if all the line_band pixels flux and all the continuum_band pixels flux sum is zero. This is done to avoid all zero line or continuum entries.
55
+
56
+ LiMe medium update - 1.2.0 - 11/05/2024
57
+ - The unit_conversion functions have been updated to avoid bugs on betwen certain units
58
+ - The unit_conversion functions now review the normalization and masking the same way as in the spectrum creation
59
+ - The line detection function has been updated to account for masked data within the input line bands
60
+ - The automatic normalization function now using the mean instead of median as the scale_flux
61
+ - If the scale flux is negative the normalization will remove the lowest pixel value from the mean flux for the automatic normalization.
62
+ - Initial introduction for aspect functions for thea automatic detection of spectral features.
63
+ - New checks to avoid the measurements of bands where all the entries are masked.
64
+
65
+ LiMe minor update - 1.2.1 - 10/29/2024
66
+ - Rename the "line_bands" argument in the lime.Spectrum.plot.spectrum function to "bands" to match library style
67
+ - The lime.Spectrum.plot.spectrum function will now only display "bands" w3 and w4 values are within the rest wavelength range (no need to crop the bands in advance now).
68
+ - Added support for reading MIRI IFU observations with MJy/str and um units
69
+ - Corrected bug on the latex label generation in the lime.line_bands command not reproducing the expected format
70
+ - The unit_conversion function for Cube observations now uses the format from the previous update.
71
+
72
+ LiMe medium update - 1.3.0 - 10/29/2024
73
+ - This update includes ASPECT as an optional dependency and has adapted several functions to include the possibility to use its predictions
74
+ - Added the Spectrum.retrieve attribute to group tasks which return data for the user related to the spectrum
75
+ - Added the Spectrum.retrieve.line_bands to return the line bands which match the observation redshift, wave interval and components detection.
76
+ - The lime.line_bands and Spectrum.retrieve.line_bands now use the argument "redshift" to adjust the output bands which are within a "wave_intvl" for that redshift (for the Spectrum.retrieve.line_bands this is always the case)
77
+ - The lime.line_bands has been moved to the workflow.py file
78
+ - The ".line_bands" have now use the new unit conversion function and includes more functionality via new update_labels=True, update_latex=True.
79
+ - The inst_FWHM at the creation of observations has been replaced by res_power (resolving power) and now can be a float or an array (same length as the observation wavelength). This provides a more robust computation of the sigma_instr
80
+ - The sigma_instr and sigma_thermal corrections are not computed within the sigma_corrections function
81
+ - During the lime.Sample.get_spectrum the user can now specify kwargs arguments to update the creation kwargs for that object.
82
+ - Several bugs were corrected on the lime.redshift_calculation to avoid very large errors when weak lines were present.
83
+ - Bug correction on the previous update lime.Spectrum.plot.spectrum to plot bands within the observation wavelength range.
84
+ - The lime.Sample.check.redshift function now has a new "initial_z" argument for the initial guess of the redshift measurement.
85
+ - The lime.Sample.check.redshift "title_label" argument has been renamed -> "title" for consistency
86
+ - The air_to_vacuum_function now only applies the theoretical relation, its inputs and outputs are wavelength arrays.
87
+ - The new lime.Line.update_label function can be used to update the line label by reviewing the line properties.
88
+
89
+ LiMe Mayor update - 2.0.0 - XX/XX/XXXX
90
+ - Change installer convention from "setup.py + requirements.txt" to pyproject.toml
91
+ - Updated dependencies to current version of packages and for python 3.12
92
+ - Renamed cfg.toml to lime.toml
93
+ - Arrange library .py files into folder structure reproducing the .fit, .infer, .retrieve, .plot functions. The functions related to file types are are located in archives folder.
94
+ - Added new mechanic to compute the lines continuum from the line band edges or the continua bands.
95
+ - Added new mechanic to compute the pixel uncertainty from the provided uncertainty flux or the adjacent continua bands.
96
+ - Fix error where the error from the line profile center and sigma parameters was uncertainty was 0 if the line kinematics were imported from a previously measured line.
97
+ - Added support for bokeh plots.
98
+ - The theme configuration parameters are stored now in the src/plotting/theme_lime.toml.
99
+ - The .fit.report function now formats the output report to include the component label name and has the argument return_text=False to give the option to return the report message as a variable instead of printing on the terminal.
100
+ - Fix a bug where the kinematics export function was not applying the correct rest frame wavelength length on the radial velocity calculation.
101
+ - New ".infer" to host high level functions to predict spectroscopic features
102
+ - The "Spectrum.line_detection()" has been moved to "Spectrum.infer.peaks_troughs()". The old function now raises and error moving to the new function.
103
+ - Now the observations wave, flux, err_flux and wave_rest arrays are always masked arrays
104
+ - The lines database name has been changed from parent_bands.txt to "lines_database_v2.0.0.txt". The wavelength are based on van Hoof, P.A.M., 2018, Galaxies, 6, 63 and Roueff+ (2019).
105
+ - The central wavelenght bands are now calculated assuming a bands_vsigma=70 and n_sigma=4
106
+ - The function lime.Spectrum.retrieve.spectrum() returns the spectrum axes as a recarray or saves it into a text file if the user provides a file address.
107
+ - lime.Spectrum.from_file("fname", instrument='text') can now read the file from a text file following the format from the lime.Spectrum.retrieve.spectrum() function.
108
+ - Bug the .plot.spectrum(include_fittings) does not show the combined profile
File without changes