@oqtopus-team/pi-qdash 0.1.4 → 0.1.5
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.
- package/README.md +2 -1
- package/extensions/lib/forum-images.ts +82 -0
- package/extensions/lib/investigation-context.ts +169 -0
- package/extensions/lib/timeseries-analysis.ts +609 -0
- package/extensions/lib/write-gate.ts +1 -0
- package/extensions/qdash.ts +175 -4
- package/extensions/tools/timeseries.ts +211 -0
- package/package.json +4 -3
- package/skills/qdash/SKILL.md +32 -5
- package/skills/qdash-timeseries-diagnosis/SKILL.md +150 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qdash-timeseries-diagnosis
|
|
3
|
+
description: Diagnose common-mode drift, shared periodicity, phase relationships, and possible environmental coupling across arbitrary QDash metrics and external sensor CSV logs. Use when calibration metrics oscillate, drift together, appear delayed or anti-correlated, or may be influenced by cryostat/environmental cycles.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# QDash Timeseries Diagnosis
|
|
7
|
+
|
|
8
|
+
Use this skill for evidence-based multi-timeseries investigation. Keep the
|
|
9
|
+
measurement schema and physical interpretation separate: the comparison tool
|
|
10
|
+
extracts mechanical evidence, while this skill guides conclusions and next
|
|
11
|
+
checks.
|
|
12
|
+
|
|
13
|
+
## Principles
|
|
14
|
+
|
|
15
|
+
- Do not hard-code metric names, targets, sensors, units, CSV columns, periods,
|
|
16
|
+
or timezone assumptions.
|
|
17
|
+
- Preserve both raw and transformed results. A visually clean transformed plot
|
|
18
|
+
must not replace the raw evidence.
|
|
19
|
+
- Correlation, shared periodicity, and phase alignment establish association,
|
|
20
|
+
not causal direction.
|
|
21
|
+
- Consider a shared driver when multiple targets and an environmental sensor
|
|
22
|
+
move together. The sensor itself may be a proxy for an unmeasured actuator,
|
|
23
|
+
vibration, electrical noise, magnetic noise, or control cycle.
|
|
24
|
+
- Count observed cycles, not raw sample points, when judging periodic evidence.
|
|
25
|
+
|
|
26
|
+
## Workflow
|
|
27
|
+
|
|
28
|
+
### 1. Fix the investigation scope
|
|
29
|
+
|
|
30
|
+
Record the reusable scope with `/qdash-investigation-setup` when multiple
|
|
31
|
+
comparison passes are expected. The JSON context accepts arbitrary QDash
|
|
32
|
+
series, CSV mappings, window/timezone, and transform defaults. Record:
|
|
33
|
+
|
|
34
|
+
- QDash profile and chip
|
|
35
|
+
- metrics and target IDs
|
|
36
|
+
- tags
|
|
37
|
+
- start/end timestamps
|
|
38
|
+
- timezone for every source
|
|
39
|
+
- expected cadence and units
|
|
40
|
+
- local CSV path, time column, value columns, and any row filters
|
|
41
|
+
|
|
42
|
+
For timestamps without an explicit zone, require a declared offset. Never infer
|
|
43
|
+
a timezone from the host machine.
|
|
44
|
+
|
|
45
|
+
### 2. Inspect source integrity
|
|
46
|
+
|
|
47
|
+
Before comparing, use `qdash_inspect_timeseries_csv` for local files whose
|
|
48
|
+
schema or time encoding is not already established. Then:
|
|
49
|
+
|
|
50
|
+
- verify first/last timestamps and overlap
|
|
51
|
+
- check source point counts and cadence
|
|
52
|
+
- identify duplicate timestamps, missing intervals, and long gaps
|
|
53
|
+
- verify scale and offset conversions
|
|
54
|
+
- ensure labels are unique
|
|
55
|
+
|
|
56
|
+
Do not bridge long outages. Set `maxInterpolationGapMinutes` explicitly when the
|
|
57
|
+
default is unsuitable for the slowest source.
|
|
58
|
+
|
|
59
|
+
### 3. Establish a raw baseline
|
|
60
|
+
|
|
61
|
+
Call `qdash_compare_timeseries` first with:
|
|
62
|
+
|
|
63
|
+
- no smoothing
|
|
64
|
+
- no detrending
|
|
65
|
+
- no normalization
|
|
66
|
+
- no period search unless a period was specified independently
|
|
67
|
+
|
|
68
|
+
Report ranges, units, overlap, and raw correlation. Different units are fine for
|
|
69
|
+
correlation, but do not visually overlay incomparable scales without separate
|
|
70
|
+
axes or normalization.
|
|
71
|
+
|
|
72
|
+
### 4. Compare oscillatory components
|
|
73
|
+
|
|
74
|
+
When looking for common cycles, rerun with explicit settings such as:
|
|
75
|
+
|
|
76
|
+
- a smoothing window justified by source cadence
|
|
77
|
+
- `detrend: linear` when slow drift would dominate
|
|
78
|
+
- `normalize: zscore` for shape/phase comparison
|
|
79
|
+
- a period-search range chosen from prior evidence or a broad physically
|
|
80
|
+
plausible interval
|
|
81
|
+
|
|
82
|
+
Report all transform settings with the result. Compare:
|
|
83
|
+
|
|
84
|
+
- full transformed correlation
|
|
85
|
+
- selected shared period
|
|
86
|
+
- per-series periodic explained fraction
|
|
87
|
+
- pairwise phase differences
|
|
88
|
+
- observed cycle count
|
|
89
|
+
|
|
90
|
+
A near-0° phase difference indicates in-phase periodic components. A near-180°
|
|
91
|
+
difference indicates anti-phase components. Intermediate phase may represent a
|
|
92
|
+
delay, but phase alone does not identify response direction.
|
|
93
|
+
|
|
94
|
+
### 5. Grade the evidence conservatively
|
|
95
|
+
|
|
96
|
+
Use qualitative language:
|
|
97
|
+
|
|
98
|
+
- **weak**: unstable period/phase, low explained fraction, or fewer than about
|
|
99
|
+
three observed cycles
|
|
100
|
+
- **suggestive**: similar periods with plausible phase but short observation or
|
|
101
|
+
substantial residual variation
|
|
102
|
+
- **strong association**: repeated common period and stable phase across
|
|
103
|
+
multiple targets/sensors, with substantial explained fractions
|
|
104
|
+
- **causal evidence**: requires intervention, independently controlled input,
|
|
105
|
+
repeated response, or evidence excluding plausible shared drivers
|
|
106
|
+
|
|
107
|
+
These are reasoning categories, not fixed acceptance thresholds. Explain which
|
|
108
|
+
facts support the chosen category.
|
|
109
|
+
|
|
110
|
+
### 6. Test alternatives
|
|
111
|
+
|
|
112
|
+
For apparent environmental or cryostat coupling, distinguish:
|
|
113
|
+
|
|
114
|
+
1. the measured sensor variable directly affecting the metric
|
|
115
|
+
2. a controller/refrigerator cycle affecting both
|
|
116
|
+
3. periodic measurement or scheduling artifacts
|
|
117
|
+
4. timestamp offset or resampling artifacts
|
|
118
|
+
5. target-local behavior coincidentally near the same frequency
|
|
119
|
+
|
|
120
|
+
Check additional targets in different control/readout groups and, when
|
|
121
|
+
available, actuator state, compressor/pulse-tube, vibration, rack temperature,
|
|
122
|
+
magnetic field, pressure, and control-system logs.
|
|
123
|
+
|
|
124
|
+
### 7. Recommend discriminating measurements
|
|
125
|
+
|
|
126
|
+
Prefer measurements that separate hypotheses:
|
|
127
|
+
|
|
128
|
+
- extend observation to cover at least 8–10 candidate cycles
|
|
129
|
+
- preserve the same cadence and synchronized clocks
|
|
130
|
+
- record actuator/controller state in addition to sensor output
|
|
131
|
+
- test multiple targets and control/readout groups
|
|
132
|
+
- perform a safe controlled setpoint or operating-state change when authorized
|
|
133
|
+
- compare lag/phase stability across independent runs
|
|
134
|
+
|
|
135
|
+
Do not initiate operational changes without an explicit plan and user
|
|
136
|
+
confirmation.
|
|
137
|
+
|
|
138
|
+
## Reporting template
|
|
139
|
+
|
|
140
|
+
Include:
|
|
141
|
+
|
|
142
|
+
1. sources and exact time window
|
|
143
|
+
2. timezone and unit conversions
|
|
144
|
+
3. raw-data integrity and overlap
|
|
145
|
+
4. transformation settings
|
|
146
|
+
5. raw/transformed correlations
|
|
147
|
+
6. shared period, phase, explained fraction, and observed cycles
|
|
148
|
+
7. strongest association statement
|
|
149
|
+
8. causal alternatives still open
|
|
150
|
+
9. next measurement that best discriminates those alternatives
|