forked from M-Labs/nix-servo
Add hardware specific patch to linien
- Correct MHz and Voltage Scaling - Hide Analog Out related GUI Elements - Change default amplitude and frequency values
This commit is contained in:
parent
372aac6a44
commit
b87fad5ed4
15
fast-servo/linien-common-fast-servo-hardware-specific.patch
Normal file
15
fast-servo/linien-common-fast-servo-hardware-specific.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
diff --git a/linien-common/linien_common/common.py b/linien-common/linien_common/common.py
|
||||||
|
index 854d776..a310dbe 100644
|
||||||
|
--- a/linien-common/linien_common/common.py
|
||||||
|
+++ b/linien-common/linien_common/common.py
|
||||||
|
@@ -25,8 +25,8 @@ from typing import Dict, Iterable, List, Tuple, Union
|
||||||
|
import numpy as np
|
||||||
|
from scipy.signal import correlate, resample
|
||||||
|
|
||||||
|
-MHz = 0x10000000 / 8
|
||||||
|
-Vpp = ((1 << 14) - 1) / 4
|
||||||
|
+MHz = 0x10000000 / 8 * 125 / 100
|
||||||
|
+Vpp = (1 << 14) * 0.5 / 0.425 - 1
|
||||||
|
# conversion of bits to V
|
||||||
|
ANALOG_OUT_V = 1.8 / ((2**15) - 1)
|
||||||
|
|
227
fast-servo/linien-gui-fast-servo-hardware-specific.patch
Normal file
227
fast-servo/linien-gui-fast-servo-hardware-specific.patch
Normal file
@ -0,0 +1,227 @@
|
|||||||
|
diff --git a/linien-gui/linien_gui/ui/general_panel.ui b/linien_gui/ui/general_panel.ui
|
||||||
|
index 7cf74a7..6c2bd45 100644
|
||||||
|
--- a/linien-gui/linien_gui/ui/general_panel.ui
|
||||||
|
+++ b/linien_gui/ui/general_panel.ui
|
||||||
|
@@ -128,11 +128,6 @@
|
||||||
|
<string>FAST OUT 2</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
- <item>
|
||||||
|
- <property name="text">
|
||||||
|
- <string>ANALOG OUT 0</string>
|
||||||
|
- </property>
|
||||||
|
- </item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
@@ -213,11 +208,6 @@
|
||||||
|
<string>FAST OUT 2</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
- <item>
|
||||||
|
- <property name="text">
|
||||||
|
- <string>ANALOG OUT 0</string>
|
||||||
|
- </property>
|
||||||
|
- </item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>disabled</string>
|
||||||
|
@@ -389,6 +379,9 @@
|
||||||
|
<property name="text">
|
||||||
|
<string>ANALOG OUT 0</string>
|
||||||
|
</property>
|
||||||
|
+ <property name="visible">
|
||||||
|
+ <bool>false</bool>
|
||||||
|
+ </property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
@@ -399,6 +392,9 @@
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
+ <property name="visible">
|
||||||
|
+ <bool>false</bool>
|
||||||
|
+ </property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>positive</string>
|
||||||
|
@@ -619,6 +615,9 @@
|
||||||
|
<property name="title">
|
||||||
|
<string>Slow Analog Outputs (0-1.8V)</string>
|
||||||
|
</property>
|
||||||
|
+ <property name="visible">
|
||||||
|
+ <bool>false</bool>
|
||||||
|
+ </property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_20">
|
||||||
|
diff --git a/linien-gui/linien_gui/ui/main_window.ui b/linien_gui/ui/main_window.ui
|
||||||
|
index 3d8b8bf..72f6159 100644
|
||||||
|
--- a/linien-gui/linien_gui/ui/main_window.ui
|
||||||
|
+++ b/linien_gui/ui/main_window.ui
|
||||||
|
@@ -145,10 +145,10 @@ p, li { white-space: pre-wrap; }
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
- <double>-1.000000000000000</double>
|
||||||
|
+ <double>-0.500000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
- <double>1.000000000000000</double>
|
||||||
|
+ <double>0.500000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<double>0.100000000000000</double>
|
||||||
|
@@ -199,13 +199,13 @@ p, li { white-space: pre-wrap; }lin
|
||||||
|
<double>0.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
- <double>1.000000000000000</double>
|
||||||
|
+ <double>0.500000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<double>0.100000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
- <double>1.000000000000000</double>
|
||||||
|
+ <double>0.500000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
@@ -242,7 +242,6 @@ p, li { white-space: pre-wrap; }
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
- <weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
@@ -278,7 +277,6 @@ p, li { white-space: pre-wrap; }
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
- <weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
@@ -366,7 +364,6 @@ p, li { white-space: pre-wrap; }
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
- <weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
diff --git a/linien-gui/linien_gui/ui/modulation_sweep_panel.ui b/linien_gui/ui/modulation_sweep_panel.ui
|
||||||
|
index 6d8af14..29c8a63 100644
|
||||||
|
--- a/linien-gui/linien_gui/ui/modulation_sweep_panel.ui
|
||||||
|
+++ b/linien_gui/ui/modulation_sweep_panel.ui
|
||||||
|
@@ -68,7 +68,7 @@
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
- <double>2.000000000000000</double>
|
||||||
|
+ <double>0.500000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<double>0.100000000000000</double>
|
||||||
|
@@ -105,82 +105,82 @@
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
- <string>3.8 kHz</string>
|
||||||
|
+ <string>3.04 kHz</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
- <string>1.9 kHz</string>
|
||||||
|
+ <string>1.52 kHz</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
- <string>954 Hz</string>
|
||||||
|
+ <string>763 Hz</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
- <string>477 Hz</string>
|
||||||
|
+ <string>382 Hz</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
- <string>238 Hz</string>
|
||||||
|
+ <string>190 Hz</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
- <string>119 Hz</string>
|
||||||
|
+ <string>95 Hz</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
- <string>59 Hz</string>
|
||||||
|
+ <string>47 Hz</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
- <string>30 Hz</string>
|
||||||
|
+ <string>24 Hz</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
- <string>15 Hz</string>
|
||||||
|
+ <string>12 Hz</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
- <string>7.5 Hz</string>
|
||||||
|
+ <string>6 Hz</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
- <string>3.7 Hz</string>
|
||||||
|
+ <string>2.96 Hz</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
- <string>1.9 Hz</string>
|
||||||
|
+ <string>1.52 Hz</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
- <string>0.93 Hz</string>
|
||||||
|
+ <string>0.74 Hz</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
- <string>0.47 Hz</string>
|
||||||
|
+ <string>0.38 Hz</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
- <string>0.23 Hz</string>
|
||||||
|
+ <string>0.18 Hz</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
- <string>0.12 Hz</string>
|
||||||
|
+ <string>0.10 Hz</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
22
fast-servo/linien-server-fast-servo-hardware-specific.patch
Normal file
22
fast-servo/linien-server-fast-servo-hardware-specific.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
diff --git a/linien-server/linien_server/parameters.py b/linien-server/linien_server/parameters.py
|
||||||
|
index 12f16ed..287f304 100644
|
||||||
|
--- a/linien-server/linien_server/parameters.py
|
||||||
|
+++ b/linien-server/linien_server/parameters.py
|
||||||
|
@@ -311,7 +311,7 @@ class Parameters:
|
||||||
|
# ------------------- MODULATION PARAMETERS ------------------------------------
|
||||||
|
|
||||||
|
self.modulation_amplitude = Parameter(
|
||||||
|
- min_=0, max_=(1 << 14) - 1, start=1 * Vpp, restorable=True, loggable=True
|
||||||
|
+ min_=0, max_=(1 << 14) - 1, start=0.1 * Vpp, restorable=True, loggable=True
|
||||||
|
)
|
||||||
|
"""
|
||||||
|
The amplitude of the modulation in internal units. Use Vpp for conversion to
|
||||||
|
@@ -320,7 +320,7 @@ class Parameters:
|
||||||
|
"""
|
||||||
|
|
||||||
|
self.modulation_frequency = Parameter(
|
||||||
|
- min_=0, max_=0xFFFFFFFF, start=15 * MHz, restorable=True, loggable=True
|
||||||
|
+ min_=0, max_=0xFFFFFFFF, start=1 * MHz, restorable=True, loggable=True
|
||||||
|
)
|
||||||
|
"""
|
||||||
|
Frequency of the modulation in internal units. Use MHz for conversion to
|
@ -28,6 +28,9 @@
|
|||||||
cp -r ${./fast-servo/linien-gateware}/. fast_servo/gateware
|
cp -r ${./fast-servo/linien-gateware}/. fast_servo/gateware
|
||||||
'';
|
'';
|
||||||
patches = [
|
patches = [
|
||||||
|
./fast-servo/linien-common-fast-servo-hardware-specific.patch
|
||||||
|
./fast-servo/linien-server-fast-servo-hardware-specific.patch
|
||||||
|
./fast-servo/linien-gui-fast-servo-hardware-specific.patch
|
||||||
./fast-servo/linien-client-ssh-port-change.patch
|
./fast-servo/linien-client-ssh-port-change.patch
|
||||||
./fast-servo/linien-server-fast-servo.patch
|
./fast-servo/linien-server-fast-servo.patch
|
||||||
./fast-servo/linien-gateware-fast-servo.patch
|
./fast-servo/linien-gateware-fast-servo.patch
|
||||||
|
Loading…
Reference in New Issue
Block a user