oscura 0.7.0__py3-none-any.whl → 0.8.0__py3-none-any.whl

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 (40) hide show
  1. oscura/__init__.py +1 -1
  2. oscura/analyzers/eye/__init__.py +5 -1
  3. oscura/analyzers/eye/generation.py +501 -0
  4. oscura/analyzers/jitter/__init__.py +6 -6
  5. oscura/analyzers/jitter/timing.py +419 -0
  6. oscura/analyzers/patterns/__init__.py +28 -0
  7. oscura/analyzers/patterns/reverse_engineering.py +991 -0
  8. oscura/analyzers/power/__init__.py +35 -12
  9. oscura/analyzers/statistics/__init__.py +4 -0
  10. oscura/analyzers/statistics/basic.py +149 -0
  11. oscura/analyzers/statistics/correlation.py +47 -6
  12. oscura/analyzers/waveform/__init__.py +2 -0
  13. oscura/analyzers/waveform/measurements.py +145 -23
  14. oscura/analyzers/waveform/spectral.py +361 -8
  15. oscura/automotive/__init__.py +1 -1
  16. oscura/automotive/dtc/data.json +102 -17
  17. oscura/core/config/loader.py +0 -1
  18. oscura/core/schemas/device_mapping.json +8 -2
  19. oscura/core/schemas/packet_format.json +24 -4
  20. oscura/core/schemas/protocol_definition.json +12 -2
  21. oscura/core/types.py +108 -0
  22. oscura/reporting/__init__.py +88 -1
  23. oscura/reporting/automation.py +348 -0
  24. oscura/reporting/citations.py +374 -0
  25. oscura/reporting/core.py +54 -0
  26. oscura/reporting/formatting/__init__.py +11 -0
  27. oscura/reporting/formatting/measurements.py +279 -0
  28. oscura/reporting/html.py +57 -0
  29. oscura/reporting/interpretation.py +431 -0
  30. oscura/reporting/summary.py +329 -0
  31. oscura/reporting/visualization.py +542 -0
  32. oscura/visualization/__init__.py +2 -1
  33. oscura/visualization/batch.py +521 -0
  34. oscura/workflows/__init__.py +2 -0
  35. oscura/workflows/waveform.py +783 -0
  36. {oscura-0.7.0.dist-info → oscura-0.8.0.dist-info}/METADATA +1 -1
  37. {oscura-0.7.0.dist-info → oscura-0.8.0.dist-info}/RECORD +40 -29
  38. {oscura-0.7.0.dist-info → oscura-0.8.0.dist-info}/WHEEL +0 -0
  39. {oscura-0.7.0.dist-info → oscura-0.8.0.dist-info}/entry_points.txt +0 -0
  40. {oscura-0.7.0.dist-info → oscura-0.8.0.dist-info}/licenses/LICENSE +0 -0
@@ -149,14 +149,20 @@
149
149
  "type": "array",
150
150
  "description": "Device IDs to include (whitelist)",
151
151
  "items": {
152
- "oneOf": [{ "type": "integer" }, { "type": "string", "pattern": "^0[xX][0-9A-Fa-f]+$" }]
152
+ "oneOf": [
153
+ { "type": "integer" },
154
+ { "type": "string", "pattern": "^0[xX][0-9A-Fa-f]+$" }
155
+ ]
153
156
  }
154
157
  },
155
158
  "exclude_devices": {
156
159
  "type": "array",
157
160
  "description": "Device IDs to exclude (blacklist)",
158
161
  "items": {
159
- "oneOf": [{ "type": "integer" }, { "type": "string", "pattern": "^0[xX][0-9A-Fa-f]+$" }]
162
+ "oneOf": [
163
+ { "type": "integer" },
164
+ { "type": "string", "pattern": "^0[xX][0-9A-Fa-f]+$" }
165
+ ]
160
166
  }
161
167
  },
162
168
  "include_categories": {
@@ -118,7 +118,10 @@
118
118
  },
119
119
  "value": {
120
120
  "description": "Expected constant value for validation",
121
- "oneOf": [{ "type": "integer" }, { "type": "array", "items": { "type": "integer" } }]
121
+ "oneOf": [
122
+ { "type": "integer" },
123
+ { "type": "array", "items": { "type": "integer" } }
124
+ ]
122
125
  },
123
126
  "description": {
124
127
  "type": "string",
@@ -185,7 +188,18 @@
185
188
  },
186
189
  "type": {
187
190
  "type": "string",
188
- "enum": ["uint8", "uint16", "uint32", "uint64", "int8", "int16", "int32", "int64", "float32", "float64"],
191
+ "enum": [
192
+ "uint8",
193
+ "uint16",
194
+ "uint32",
195
+ "uint64",
196
+ "int8",
197
+ "int16",
198
+ "int32",
199
+ "int64",
200
+ "float32",
201
+ "float64"
202
+ ],
189
203
  "description": "Sample data type"
190
204
  },
191
205
  "endian": {
@@ -289,7 +303,10 @@
289
303
  },
290
304
  "expected": {
291
305
  "description": "Expected value",
292
- "oneOf": [{ "type": "integer" }, { "type": "array", "items": { "type": "integer" } }]
306
+ "oneOf": [
307
+ { "type": "integer" },
308
+ { "type": "array", "items": { "type": "integer" } }
309
+ ]
293
310
  },
294
311
  "on_failure": {
295
312
  "type": "string",
@@ -362,7 +379,10 @@
362
379
  },
363
380
  "pattern": {
364
381
  "description": "Idle pattern to detect",
365
- "oneOf": [{ "type": "string", "enum": ["auto", "zeros", "ones"] }, { "type": "integer" }]
382
+ "oneOf": [
383
+ { "type": "string", "enum": ["auto", "zeros", "ones"] },
384
+ { "type": "integer" }
385
+ ]
366
386
  },
367
387
  "min_duration": {
368
388
  "type": "integer",
@@ -241,7 +241,12 @@
241
241
  },
242
242
  "value": {
243
243
  "description": "Expected constant value for validation",
244
- "oneOf": [{ "type": "integer" }, { "type": "number" }, { "type": "string" }, { "type": "array" }]
244
+ "oneOf": [
245
+ { "type": "integer" },
246
+ { "type": "number" },
247
+ { "type": "string" },
248
+ { "type": "array" }
249
+ ]
245
250
  },
246
251
  "condition": {
247
252
  "type": "string",
@@ -326,7 +331,12 @@
326
331
  },
327
332
  "expected": {
328
333
  "description": "Expected value",
329
- "oneOf": [{ "type": "integer" }, { "type": "number" }, { "type": "string" }, { "type": "array" }]
334
+ "oneOf": [
335
+ { "type": "integer" },
336
+ { "type": "number" },
337
+ { "type": "string" },
338
+ { "type": "array" }
339
+ ]
330
340
  },
331
341
  "on_mismatch": {
332
342
  "type": "string",
oscura/core/types.py CHANGED
@@ -240,6 +240,42 @@ class WaveformTrace:
240
240
  return 0.0
241
241
  return (len(self.data) - 1) * self.metadata.time_base
242
242
 
243
+ @property
244
+ def is_analog(self) -> bool:
245
+ """Check if this is an analog signal trace.
246
+
247
+ Returns:
248
+ True for WaveformTrace (always analog).
249
+ """
250
+ return True
251
+
252
+ @property
253
+ def is_digital(self) -> bool:
254
+ """Check if this is a digital signal trace.
255
+
256
+ Returns:
257
+ False for WaveformTrace (always analog).
258
+ """
259
+ return False
260
+
261
+ @property
262
+ def is_iq(self) -> bool:
263
+ """Check if this is an I/Q signal trace.
264
+
265
+ Returns:
266
+ False for WaveformTrace.
267
+ """
268
+ return False
269
+
270
+ @property
271
+ def signal_type(self) -> str:
272
+ """Get the signal type identifier.
273
+
274
+ Returns:
275
+ "analog" for WaveformTrace.
276
+ """
277
+ return "analog"
278
+
243
279
  def __len__(self) -> int:
244
280
  """Return number of samples in the trace."""
245
281
  return len(self.data)
@@ -323,6 +359,42 @@ class DigitalTrace:
323
359
  return []
324
360
  return [ts for ts, is_rising in self.edges if not is_rising]
325
361
 
362
+ @property
363
+ def is_analog(self) -> bool:
364
+ """Check if this is an analog signal trace.
365
+
366
+ Returns:
367
+ False for DigitalTrace (always digital).
368
+ """
369
+ return False
370
+
371
+ @property
372
+ def is_digital(self) -> bool:
373
+ """Check if this is a digital signal trace.
374
+
375
+ Returns:
376
+ True for DigitalTrace (always digital).
377
+ """
378
+ return True
379
+
380
+ @property
381
+ def is_iq(self) -> bool:
382
+ """Check if this is an I/Q signal trace.
383
+
384
+ Returns:
385
+ False for DigitalTrace.
386
+ """
387
+ return False
388
+
389
+ @property
390
+ def signal_type(self) -> str:
391
+ """Get the signal type identifier.
392
+
393
+ Returns:
394
+ "digital" for DigitalTrace.
395
+ """
396
+ return "digital"
397
+
326
398
  def __len__(self) -> int:
327
399
  """Return number of samples in the trace."""
328
400
  return len(self.data)
@@ -421,6 +493,42 @@ class IQTrace:
421
493
  return 0.0
422
494
  return (len(self.i_data) - 1) * self.metadata.time_base
423
495
 
496
+ @property
497
+ def is_analog(self) -> bool:
498
+ """Check if this is an analog signal trace.
499
+
500
+ Returns:
501
+ False for IQTrace (complex I/Q data).
502
+ """
503
+ return False
504
+
505
+ @property
506
+ def is_digital(self) -> bool:
507
+ """Check if this is a digital signal trace.
508
+
509
+ Returns:
510
+ False for IQTrace (complex I/Q data).
511
+ """
512
+ return False
513
+
514
+ @property
515
+ def is_iq(self) -> bool:
516
+ """Check if this is an I/Q signal trace.
517
+
518
+ Returns:
519
+ True for IQTrace (always I/Q).
520
+ """
521
+ return True
522
+
523
+ @property
524
+ def signal_type(self) -> str:
525
+ """Get the signal type identifier.
526
+
527
+ Returns:
528
+ "iq" for IQTrace.
529
+ """
530
+ return "iq"
531
+
424
532
  def __len__(self) -> int:
425
533
  """Return number of samples in the trace."""
426
534
  return len(self.i_data)
@@ -18,6 +18,12 @@ from oscura.reporting.auto_report import (
18
18
  from oscura.reporting.auto_report import (
19
19
  generate_report as generate_auto_report,
20
20
  )
21
+ from oscura.reporting.automation import (
22
+ auto_interpret_results,
23
+ flag_anomalies,
24
+ identify_issues,
25
+ suggest_follow_up_analyses,
26
+ )
21
27
  from oscura.reporting.batch import (
22
28
  BatchReportResult,
23
29
  aggregate_batch_measurements,
@@ -30,6 +36,13 @@ from oscura.reporting.chart_selection import (
30
36
  get_axis_scaling,
31
37
  recommend_chart_with_reasoning,
32
38
  )
39
+ from oscura.reporting.citations import (
40
+ Citation,
41
+ CitationManager,
42
+ auto_cite_measurement,
43
+ get_standard_info,
44
+ list_available_standards,
45
+ )
33
46
  from oscura.reporting.comparison import (
34
47
  compare_waveforms,
35
48
  generate_comparison_report,
@@ -73,8 +86,12 @@ from oscura.reporting.export import (
73
86
  export_report,
74
87
  )
75
88
  from oscura.reporting.formatting import (
89
+ MeasurementFormatter,
76
90
  NumberFormatter,
91
+ convert_to_measurement_dict,
77
92
  format_margin,
93
+ format_measurement,
94
+ format_measurement_dict,
78
95
  format_pass_fail,
79
96
  format_value,
80
97
  format_with_context,
@@ -82,6 +99,7 @@ from oscura.reporting.formatting import (
82
99
  format_with_units,
83
100
  )
84
101
  from oscura.reporting.html import (
102
+ embed_plots,
85
103
  generate_html_report,
86
104
  save_html_report,
87
105
  )
@@ -89,6 +107,16 @@ from oscura.reporting.index import (
89
107
  IndexGenerator,
90
108
  TemplateEngine,
91
109
  )
110
+ from oscura.reporting.interpretation import (
111
+ ComplianceStatus,
112
+ MeasurementInterpretation,
113
+ QualityLevel,
114
+ compliance_check,
115
+ generate_finding,
116
+ interpret_measurement,
117
+ interpret_results_batch,
118
+ quality_score,
119
+ )
92
120
  from oscura.reporting.multichannel import (
93
121
  generate_multichannel_report,
94
122
  )
@@ -127,6 +155,12 @@ from oscura.reporting.standards import (
127
155
  format_executive_summary_html,
128
156
  generate_executive_summary,
129
157
  )
158
+ from oscura.reporting.summary import (
159
+ ExecutiveSummarySection,
160
+ identify_key_findings,
161
+ recommendations_from_findings,
162
+ summarize_measurements,
163
+ )
130
164
  from oscura.reporting.summary_generator import (
131
165
  Finding,
132
166
  Summary,
@@ -144,6 +178,10 @@ from oscura.reporting.template_system import (
144
178
  list_templates,
145
179
  load_template,
146
180
  )
181
+ from oscura.reporting.visualization import (
182
+ IEEEPlotGenerator,
183
+ PlotStyler,
184
+ )
147
185
 
148
186
  __all__ = [
149
187
  # Comprehensive Analysis Report API (CAR-001 through CAR-007)
@@ -160,30 +198,46 @@ __all__ = [
160
198
  "BatchReportResult",
161
199
  # Chart Selection (REPORT-028)
162
200
  "ChartType",
201
+ # Citations (NEW)
202
+ "Citation",
203
+ "CitationManager",
163
204
  # Standards (REPORT-001, REPORT-002, REPORT-004)
164
205
  "ColorScheme",
206
+ # Compliance (NEW)
207
+ "ComplianceStatus",
165
208
  "DataOutputConfig",
166
209
  "DomainConfig",
167
210
  # Enhanced Reports (Feature 6)
168
211
  "EnhancedReportConfig",
169
212
  "EnhancedReportGenerator",
170
213
  "ExecutiveSummary",
214
+ # Executive Summary (NEW)
215
+ "ExecutiveSummarySection",
171
216
  # Summary Generation
172
217
  "Finding",
173
218
  "FormatStandards",
219
+ # IEEE Visualization (NEW)
220
+ "IEEEPlotGenerator",
174
221
  "IndexGenerator",
175
222
  "InputType",
223
+ # Formatting (REPORT-026)
224
+ "MeasurementFormatter",
225
+ # Measurement Interpretation (NEW)
226
+ "MeasurementInterpretation",
176
227
  # Multi-format (REPORT-010)
177
228
  "MultiFormatRenderer",
178
- # Formatting (REPORT-026)
179
229
  "NumberFormatter",
180
230
  "OutputManager",
181
231
  # PPTX Export (REPORT-023)
182
232
  "PPTXPresentation",
183
233
  "PPTXSlide",
184
234
  "PlotGenerator",
235
+ # Plot Styling (NEW)
236
+ "PlotStyler",
185
237
  "ProgressCallback",
186
238
  "ProgressInfo",
239
+ # Quality Assessment (NEW)
240
+ "QualityLevel",
187
241
  # Core
188
242
  "Report",
189
243
  "ReportConfig",
@@ -199,12 +253,18 @@ __all__ = [
199
253
  "VisualEmphasis",
200
254
  "aggregate_batch_measurements",
201
255
  "analyze",
256
+ # Automation (NEW)
257
+ "auto_cite_measurement",
258
+ "auto_interpret_results",
202
259
  "auto_select_chart",
203
260
  # Export
204
261
  "batch_export_formats",
205
262
  "batch_report",
206
263
  # Comparison
207
264
  "compare_waveforms",
265
+ # Compliance (NEW)
266
+ "compliance_check",
267
+ "convert_to_measurement_dict",
208
268
  # Tables
209
269
  "create_comparison_table",
210
270
  # Sections
@@ -220,12 +280,18 @@ __all__ = [
220
280
  "create_violations_section",
221
281
  # Multi-format (REPORT-010)
222
282
  "detect_format_from_extension",
283
+ # HTML Generation
284
+ "embed_plots",
223
285
  "export_multiple_reports",
224
286
  "export_pptx",
225
287
  "export_report",
288
+ # Anomaly Detection (NEW)
289
+ "flag_anomalies",
226
290
  "format_batch_summary_table",
227
291
  "format_executive_summary_html",
228
292
  "format_margin",
293
+ "format_measurement",
294
+ "format_measurement_dict",
229
295
  "format_pass_fail",
230
296
  "format_value",
231
297
  "format_with_context",
@@ -235,6 +301,8 @@ __all__ = [
235
301
  "generate_batch_report",
236
302
  "generate_comparison_report",
237
303
  "generate_executive_summary",
304
+ # Findings (NEW)
305
+ "generate_finding",
238
306
  # HTML Generation
239
307
  "generate_html_report",
240
308
  # Multi-Channel
@@ -246,12 +314,31 @@ __all__ = [
246
314
  "generate_summary",
247
315
  "get_available_analyses",
248
316
  "get_axis_scaling",
317
+ # Citations (NEW)
318
+ "get_standard_info",
319
+ # Issue Identification (NEW)
320
+ "identify_issues",
321
+ # Key Findings (NEW)
322
+ "identify_key_findings",
323
+ # Interpretation (NEW)
324
+ "interpret_measurement",
325
+ "interpret_results_batch",
326
+ # Standards (NEW)
327
+ "list_available_standards",
249
328
  "list_templates",
250
329
  "load_template",
330
+ # Quality (NEW)
331
+ "quality_score",
251
332
  "recommend_chart_with_reasoning",
333
+ # Recommendations (NEW)
334
+ "recommendations_from_findings",
252
335
  "register_plot",
253
336
  # Multi-format (REPORT-010)
254
337
  "render_all_formats",
255
338
  "save_html_report",
256
339
  "save_pdf_report",
340
+ # Follow-up Analysis (NEW)
341
+ "suggest_follow_up_analyses",
342
+ # Summary (NEW)
343
+ "summarize_measurements",
257
344
  ]