You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Or you read in the data as before and store it using `writeh5(filename::String, typed_table)` where `typed_table` is your output from `read_data_from_struck()`.
43
-
44
-
**Please note that you can't store an array of vectors/arrays in HDF5! You have to convert that array with `VectorOfArrays(ARRAY)` first.**
45
-
58
+
46
59
### Example
47
60
48
61
```julia
49
62
filename ="path/to/h5/file.h5"
50
63
file_info =get_h5_info_old(filename)
51
-
i =1
52
-
i_max =length(file_info["names"])
53
64
54
-
while i <= i_max
65
+
for i ineachindex(file_info["names"])
55
66
data =read_old_h5_structure(filename, subfiles=[i])
56
67
# Do analysis separate for each subfile to avoid OutOfMemory() issues
57
-
i +=1
58
68
end
59
69
```
60
70
61
71
72
+
## Store Struck data as HDF5
73
+
74
+
You can directly convert `*.dat` files to `*.h5` by using:
Or you read in the data as before and store it using `writeh5(filename::String, tt)` where `tt` is your output from `read_data_from_struck()`.
79
+
80
+
**Please note that you can't store an array of vectors/arrays in HDF5! You have to convert that array with `VectorOfArrays(ARRAY)` first.**
81
+
82
+
83
+
62
84
63
85
## Take data with the Struck ADC
64
86
@@ -73,20 +95,110 @@ Creates an individual `pmt_daq.scala` file and takes data which are converted to
73
95
### Example settings
74
96
75
97
```julia
76
-
settings = (fadc ="gelab-fadc08",
77
-
output_basename ="test-measurement",
78
-
data_dir ="../data/",
79
-
conv_data_dir ="../conv_data/",
80
-
measurement_time =20,
81
-
number_of_measurements =5,
82
-
channels = [1,2,3,4,5,6],
83
-
trigger_threshold = [55],
84
-
trigger_pmt = [5,6],
85
-
peakTime =2,
86
-
gapTime =2,
87
-
nPreTrig =192,
88
-
nSamples =256,
89
-
saveEnergy =true,
90
-
delete_dat =true
98
+
settings = (
99
+
fadc ="gelab-fadc08", # Your Struck device
100
+
output_basename ="test-measurement",
101
+
data_dir ="../data/", # where you want to store the raw data (*.dat)
102
+
conv_data_dir ="../conv_data/", # where you want to store the converted data (*.h5)
103
+
measurement_time =20,
104
+
number_of_measurements =5, # rather take more measurements instead of creating huge files
105
+
channels = [1,2,3,4,5,6],
106
+
trigger_threshold = [55], # in ADC
107
+
trigger_pmt = [5,6],
108
+
peakTime =2,
109
+
gapTime =2,
110
+
nPreTrig =192,
111
+
nSamples =256,
112
+
saveEnergy =true, # actually not implemented
113
+
delete_dat =true# delete the raw data file after converting
91
114
)
92
115
```
116
+
117
+
118
+
## XIMC motorised stages
119
+
120
+
To start the connection to the motors, use `motor = mymotor()`. It will automatically save the settings needed for the motors. They will be initialized when starting the connection, but can always be intialized by calling `Initialize(motor)`. This overwrites the settings which might have changed after a power outage.
121
+
122
+
To calibrate the motors, i.e. to set the 0 to the end of the motor stage at the bottom left of the setup, the functions `CalibrateX` and `CalibrateY` are used.
123
+
For example, `CalibrateX(motor)` calibrates the X-motor. If both motors should be calibrated, call `Calibrate(motor)`.
124
+
125
+
To move the motors, the commands `XMoveMM` and `YMoveMM` are used. These functions take as arguments the position in mm and the motor.
126
+
For example `XMoveMM(15,motor)` moves the X-motor to 15mm. This function blocks the program until the final destination is reached.
127
+
To avoid the block, call the function with the keyword argument `XMoveMM(15,motor,block_till_arrival = false)`.
128
+
129
+
To get the position of the motors, call `PosX(motor)` and `PosY(motor)`. They are given in units of mm. To print it to the terminal, `Pos(motor)` can be used. Note that the value at 0 has a negative sign, as the motor stage coordinates are inverted during the conversion to mm.
130
+
131
+
### Example:
132
+
```julia
133
+
# Initialize
134
+
motor =mymotor()
135
+
Calibrate(motor)
136
+
137
+
# Get current position
138
+
pos_x =PosX(motor)
139
+
pos_y =PosY(motor)
140
+
@info(pos_x, pos_y)
141
+
142
+
# Move stage to x = 42, y = 24 in units of mm
143
+
XMoveMM(42.0,motor)
144
+
YMoveMM(24.0,motor)
145
+
```
146
+
When changing the connection of the motors to the serial hub (or using a different serial hub), please use:
147
+
```julia
148
+
device ="gelab-serialXX"
149
+
ports = [2001, 2011]
150
+
motor =mymotor(device, ports)
151
+
```
152
+
153
+
## HV control
154
+
The HV supply for the PMTs can be controlled as follows:
155
+
156
+
Define the login details to establish the connection:
This function can used to perform an automate scan in 2D (x,y axis)
182
+
This function requires as input the starting point (x_start,y_start), and the end point (x_ends,y_ends) as well
183
+
as the step sizes in both axis(step_x,step_y). All values are in mm. The range specified muss be in the interval `x in [0.0,100.0]`, `y in [0.0,100.0]`
184
+
In addition you can specify the name of the holder or sample and time of data taking for each position
Example: `PENBBScan2D(0.0,0.0,20.0,20.0,40.0,40.0,"small",2)` will do a scan in the rectangle x: 0.0->40 mm; y: 0.0 -> 40 mm with steps of 20. mm in each direction
188
+
189
+
190
+
### Arguments
191
+
-`x_start`: intial point in x
192
+
-`y_start`: intial point in y
193
+
-`step_x`: step size in x
194
+
-`step_y`: step size in y
195
+
-`x_ends`: final point in x
196
+
-`y_ends`: final point in y
197
+
-`HolderName::String`: name of the holder of piece you are scanning
198
+
-`time_per_point`: time of data taking in each point.
0 commit comments