JanusReader 0.2.1__tar.gz → 0.3.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: JanusReader
3
- Version: 0.2.1
3
+ Version: 0.3.0
4
4
  Author-email: Romolo Politi <Romolo.Politi@inaf.it>
5
5
  License: GNU GPL ver3
6
6
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "JanusReader"
3
- version = "0.2.1"
3
+ version = "0.3.0"
4
4
  dependencies = [
5
5
  "numpy",
6
6
  'importlib-metadata; python_version>"3.10"',
@@ -83,7 +83,39 @@ class AcquisitionParameter:
83
83
  tb.add_row("Multifilter","", str(self.multifilter))
84
84
  return tb
85
85
 
86
-
86
+ class OnBoardProcessing:
87
+
88
+ def __init__(self,proc):
89
+ self.badPixelCorrection = int(getValue(
90
+ proc, 'juice_janus:bad_pixel_correction'))
91
+ self.badPixelMapName = getValue(
92
+ proc, 'juice_janus:bad_pixel_map_name')
93
+ self.badPixelCount = int(getValue(proc, 'juice_janus:bad_pixel_count'))
94
+ self.dnsuCorrection = int(getValue(proc, 'juice_janus:dsnu_correction'))
95
+ self.dnsuMapName = getValue(proc, 'juice_janus:dsnu_map_name')
96
+ self.spikeMaximumValue = int(
97
+ getValue(proc, 'juice_janus:spike_maximum_value'))
98
+ self.spikeDistance = int(getValue(proc, 'juice_janus:spike_distance'))
99
+ self.spikeCount = int(getValue(proc, 'juice_janus:spike_count'))
100
+
101
+ def Show(self):
102
+ tb = Table(expand=False, show_header=False,
103
+ show_lines=False, box=box.SIMPLE_HEAD,
104
+ title="Onboard Processing", title_style="italic yellow")
105
+ tb.add_column(style='yellow', justify='left')
106
+ tb.add_column()
107
+ tb.add_column()
108
+ tb.add_row("Bad Pixels Correction", "",str(self.badPixelCorrection))
109
+ tb.add_row("Bad Pixel Map Name","", self.badPixelMapName)
110
+ tb.add_row("Bad Pixel Count","", str(self.badPixelCount))
111
+ tb.add_section()
112
+ tb.add_row("DSNU Correction", "", str(self.dnsuCorrection))
113
+ tb.add_row("DSNU Map Name","", self.dnsuMapName)
114
+ tb.add_section()
115
+ tb.add_row("Spike Maximum Value", "", str(self.spikeMaximumValue))
116
+ tb.add_row("Spike Distance","", str(self.spikeDistance))
117
+ tb.add_row("Spike Distance","", str(self.spikeDistance))
118
+ return tb
87
119
 
88
120
  class JanusReader:
89
121
  """Reader of the JANUS Data File
@@ -185,7 +217,8 @@ class JanusReader:
185
217
 
186
218
  acqPar = getElement(idObs, "juice_janus:Acquisition_Properties")
187
219
  self.AcquisitionParameter=AcquisitionParameter(acqPar)
188
- self.onBoardProcessing=None
220
+ obProc = getElement(idObs, "juice_janus:Onboard_Processing")
221
+ self.onBoardProcessing=OnBoardProcessing(obProc)
189
222
  self.onGroundProcessing=None
190
223
  self.HK=None
191
224
  self.Downsamplig=None
@@ -243,7 +276,7 @@ class JanusReader:
243
276
  tb.add_row("Pointing Mode", "", self.pointingMode)
244
277
  tb.add_row("Observation Identifier", "", self.obsIdentifier)
245
278
  tb.add_section()
246
- tb.add_row("On Board processing", "",str(self.onBoardProcessing))
279
+ # tb.add_row("On Board processing", "",str(self.onBoardProcessing))
247
280
  tb.add_row("On Ground Processing","",str(self.onGroundProcessing))
248
281
  tb.add_row("HK","",str(self.HK))
249
282
  tb.add_row("Downsampling","",str(self.Downsamplig))
@@ -251,9 +284,9 @@ class JanusReader:
251
284
  tb.add_row("On Board Compression","",str(self.onBoardCompression))
252
285
  tb.add_row("SubFrame","",str(self.subFrame))
253
286
  tb.add_row("Header","", str(self.Header))
254
- tb.add_row("Image","",str(self.image))
287
+ # tb.add_row("Image","",str(self.image))
255
288
  if all:
256
- col = Columns([tb, self.AcquisitionParameter.Show()],expand=False)
289
+ col = Columns([tb, self.AcquisitionParameter.Show(), self.onBoardProcessing.Show()],expand=False)
257
290
  else:
258
291
  col = tb
259
292
  self.console.print(Panel(col ,title=f"Label for {self.fileName.name}", border_style='yellow', expand=False))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: JanusReader
3
- Version: 0.2.1
3
+ Version: 0.3.0
4
4
  Author-email: Romolo Politi <Romolo.Politi@inaf.it>
5
5
  License: GNU GPL ver3
6
6
  Description-Content-Type: text/markdown
File without changes
File without changes