SimbioReader 0.5.9__tar.gz → 0.5.11__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 (26) hide show
  1. {simbioreader-0.5.9/src/SimbioReader.egg-info → simbioreader-0.5.11}/PKG-INFO +2 -2
  2. {simbioreader-0.5.9 → simbioreader-0.5.11}/README.md +1 -1
  3. {simbioreader-0.5.9 → simbioreader-0.5.11}/pyproject.toml +1 -1
  4. {simbioreader-0.5.9 → simbioreader-0.5.11}/src/SimbioReader/__main__.py +17 -1
  5. {simbioreader-0.5.9 → simbioreader-0.5.11}/src/SimbioReader/constants.py +1 -1
  6. {simbioreader-0.5.9 → simbioreader-0.5.11}/src/SimbioReader/tools.py +3 -1
  7. {simbioreader-0.5.9 → simbioreader-0.5.11/src/SimbioReader.egg-info}/PKG-INFO +2 -2
  8. {simbioreader-0.5.9 → simbioreader-0.5.11}/LICENSE +0 -0
  9. {simbioreader-0.5.9 → simbioreader-0.5.11}/setup.cfg +0 -0
  10. {simbioreader-0.5.9 → simbioreader-0.5.11}/src/SimbioReader/__init__.py +0 -0
  11. {simbioreader-0.5.9 → simbioreader-0.5.11}/src/SimbioReader/exceptions.py +0 -0
  12. {simbioreader-0.5.9 → simbioreader-0.5.11}/src/SimbioReader/filters.py +0 -0
  13. {simbioreader-0.5.9 → simbioreader-0.5.11}/src/SimbioReader/filters_tools.py +0 -0
  14. {simbioreader-0.5.9 → simbioreader-0.5.11}/src/SimbioReader/infocli.py +0 -0
  15. {simbioreader-0.5.9 → simbioreader-0.5.11}/src/SimbioReader/phases.py +0 -0
  16. {simbioreader-0.5.9 → simbioreader-0.5.11}/src/SimbioReader/simbioInfo.py +0 -0
  17. {simbioreader-0.5.9 → simbioreader-0.5.11}/src/SimbioReader/subphases.py +0 -0
  18. {simbioreader-0.5.9 → simbioreader-0.5.11}/src/SimbioReader/tests.py +0 -0
  19. {simbioreader-0.5.9 → simbioreader-0.5.11}/src/SimbioReader/version.py +0 -0
  20. {simbioreader-0.5.9 → simbioreader-0.5.11}/src/SimbioReader.egg-info/SOURCES.txt +0 -0
  21. {simbioreader-0.5.9 → simbioreader-0.5.11}/src/SimbioReader.egg-info/dependency_links.txt +0 -0
  22. {simbioreader-0.5.9 → simbioreader-0.5.11}/src/SimbioReader.egg-info/entry_points.txt +0 -0
  23. {simbioreader-0.5.9 → simbioreader-0.5.11}/src/SimbioReader.egg-info/requires.txt +0 -0
  24. {simbioreader-0.5.9 → simbioreader-0.5.11}/src/SimbioReader.egg-info/top_level.txt +0 -0
  25. {simbioreader-0.5.9 → simbioreader-0.5.11}/test/test_db.py +0 -0
  26. {simbioreader-0.5.9 → simbioreader-0.5.11}/test/test_tools.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SimbioReader
3
- Version: 0.5.9
3
+ Version: 0.5.11
4
4
  Summary: Python Reader for the data from SIMBIO-SYS instrument suite on-board the ESA mission BepiColombo
5
5
  Author-email: Romolo Politi <Romolo.Politi@inaf.it>
6
6
  License: GNU GPL ver3
@@ -21,7 +21,7 @@ Provides-Extra: docs
21
21
  Requires-Dist: sphinx; extra == "docs"
22
22
  Dynamic: license-file
23
23
 
24
- ![Version 0.5.9](https://img.shields.io/badge/version-0.5.9-blue?style=plastic)
24
+ ![Version 0.5.10](https://img.shields.io/badge/version-0.5.10-blue?style=plastic)
25
25
  ![Language Python 3.13](https://img.shields.io/badge/python-3.13-orange?style=plastic&logo=python)
26
26
  ![BepiColombo SIMBIO-SYS](https://img.shields.io/badge/BepiColombo-SIMBIO--SYS-blue?style=plastic)
27
27
  [![Upload Python Package](https://github.com/SIMBIO-SYS/SimbioReader/actions/workflows/python-publish.yml/badge.svg)](https://github.com/SIMBIO-SYS/SimbioReader/actions/workflows/python-publish.yml)
@@ -1,4 +1,4 @@
1
- ![Version 0.5.9](https://img.shields.io/badge/version-0.5.9-blue?style=plastic)
1
+ ![Version 0.5.10](https://img.shields.io/badge/version-0.5.10-blue?style=plastic)
2
2
  ![Language Python 3.13](https://img.shields.io/badge/python-3.13-orange?style=plastic&logo=python)
3
3
  ![BepiColombo SIMBIO-SYS](https://img.shields.io/badge/BepiColombo-SIMBIO--SYS-blue?style=plastic)
4
4
  [![Upload Python Package](https://github.com/SIMBIO-SYS/SimbioReader/actions/workflows/python-publish.yml/badge.svg)](https://github.com/SIMBIO-SYS/SimbioReader/actions/workflows/python-publish.yml)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "SimbioReader"
3
- version = "0.5.9"
3
+ version = "0.5.11"
4
4
  description="Python Reader for the data from SIMBIO-SYS instrument suite on-board the ESA mission BepiColombo"
5
5
  dependencies = [
6
6
 
@@ -443,6 +443,8 @@ class SimbioReader:
443
443
  idArea = getElement(doc, 'Identification_Area')
444
444
  self.title = getValue(idArea, 'title')
445
445
  self.dataModelVersion = getValue(idArea, 'information_model_version')
446
+ self.version =getValue(idArea, 'version_id')
447
+ self.lid = getValue(idArea, 'logical_identifier')
446
448
  # TODO: Check on the datamodel version
447
449
 
448
450
  obsArea = getElement(doc, 'Observation_Area')
@@ -528,6 +530,16 @@ class SimbioReader:
528
530
  self.console.print(f"{MSG.INFO}Dimension of the old image array: {self.img.ndim}")
529
531
  # print(f"Size of the old image array: {self.img.size}")
530
532
 
533
+ @property
534
+ def lvid(self)->str:
535
+ """Returns the LIDVID of the SIMBIO-SYS file.
536
+
537
+ Returns:
538
+ str: The LIDVID of the SIMBIO-SYS file.
539
+ """
540
+
541
+ return f"{self.lid}::{self.version}"
542
+
531
543
  def Show(self, hk:bool=False, detector:bool=False, data_structure:bool=False, all_info:bool=False)->Columns:
532
544
  """Displays information about the loaded SIMBIO-SYS file.
533
545
 
@@ -685,7 +697,11 @@ class SimbioReader:
685
697
  from xml.dom.minidom import parse, parseString, Element
686
698
  import hashlib
687
699
  tree = parse(new_label)
688
- new_lid=lidUpdate(tree, new_label)
700
+ if 'cal' in self.fileName.stem:
701
+ calib=True
702
+ else:
703
+ calib=False
704
+ new_lid=lidUpdate(tree, new_label,calib=calib)
689
705
  creatTime=datetime.now()
690
706
  updateXML(tree, "modification_date", creatTime.strftime("%Y-%m-%d"), idx=0)
691
707
  file_version=new_filename.split('__')[1].split('.')[0]
@@ -19,7 +19,7 @@ CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
19
19
  progEpilog = "- For any information or suggestion please contact " \
20
20
  "[bold magenta]Romolo.Politi@inaf.it[/bold magenta]"
21
21
 
22
- VERSION = (0,5,9,'d',1)
22
+ VERSION = (0,5,11,'f',1)
23
23
 
24
24
  datamodel='1.22.0.0'
25
25
 
@@ -109,7 +109,7 @@ def getFromXml(xml:md.Element, label, idx=0):
109
109
  def lidGenerator(old_lid: str , file_name: Path, calib:bool=False)-> str:
110
110
  parts = old_lid.split(':')
111
111
  if calib:
112
- parts[-2] = 'data_calibrated'
112
+ parts[-2] = 'browse_calibrated'
113
113
  parts[-1] = file_name.stem.split('__')[0]
114
114
  newLid = ':'.join(parts)
115
115
  return newLid
@@ -132,6 +132,8 @@ def lidUpdate(tree, fileName, calib: bool = False):
132
132
  def new_lvid(old:str, file_name: Path, file_version:str):
133
133
  parts=old.split('::')
134
134
  new_main=parts[0].split(':')
135
+ if 'cal' in file_name.stem:
136
+ new_main[-2]='data_calibrated'
135
137
  newLVID=f"{':'.join(new_main[0:-1])}:{file_name.stem.split('__')[0]}::{file_version}"
136
138
  return newLVID
137
139
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SimbioReader
3
- Version: 0.5.9
3
+ Version: 0.5.11
4
4
  Summary: Python Reader for the data from SIMBIO-SYS instrument suite on-board the ESA mission BepiColombo
5
5
  Author-email: Romolo Politi <Romolo.Politi@inaf.it>
6
6
  License: GNU GPL ver3
@@ -21,7 +21,7 @@ Provides-Extra: docs
21
21
  Requires-Dist: sphinx; extra == "docs"
22
22
  Dynamic: license-file
23
23
 
24
- ![Version 0.5.9](https://img.shields.io/badge/version-0.5.9-blue?style=plastic)
24
+ ![Version 0.5.10](https://img.shields.io/badge/version-0.5.10-blue?style=plastic)
25
25
  ![Language Python 3.13](https://img.shields.io/badge/python-3.13-orange?style=plastic&logo=python)
26
26
  ![BepiColombo SIMBIO-SYS](https://img.shields.io/badge/BepiColombo-SIMBIO--SYS-blue?style=plastic)
27
27
  [![Upload Python Package](https://github.com/SIMBIO-SYS/SimbioReader/actions/workflows/python-publish.yml/badge.svg)](https://github.com/SIMBIO-SYS/SimbioReader/actions/workflows/python-publish.yml)
File without changes
File without changes