-
Notifications
You must be signed in to change notification settings - Fork 0
/
sinusoidal_cycling_caract.py
714 lines (595 loc) · 26.3 KB
/
sinusoidal_cycling_caract.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
import logging
import sys
import time
from time import sleep
from pymeasure.instruments.tektronix.tek371A import Tektronix371A
log = logging.getLogger(__name__)
log.addHandler(logging.NullHandler())
class TektronixCurveTracer:
""" Represents a generic Tektronix Curve Tracer
and provides a high-level interface for interacting with
the instrument using the SCPI command set.
.. code-block:: python
tct = TektronixCurveTracer("GPIB0::23::INSTR")
print(tct.id)
"""
VALID_PEAK_POWER = [300, 3000]
N_HORIZONTAL_DIVS = 10
N_VERTICAL_DIVS = 10
STEPGEN_MIN_OFFSET = 0.0
STEPGEN_OFFSET_RESOLUTION = 0.01
COLLECTOR_SUPPLY_RESOLUTION = 0.1
def __init__(self, concrete_tek_ct=Tektronix371A):
self.concrete_tek_ct = concrete_tek_ct
def initialize(self):
self.concrete_tek_ct.initialize()
time.sleep(2)
# COLLECTOR SUPPLY
self.concrete_tek_ct.cs_peakpower = 300
self.concrete_tek_ct.cs_polarity = "POS"
self.concrete_tek_ct.cs_collector_supply = 0
# STEP GEN
self.concrete_tek_ct.stepgen_step_source_and_size = ("VOLTAGE", 5.0)
self.concrete_tek_ct.stepgen_number_steps = 0
self.concrete_tek_ct.stepgen_offset = 0
# DISPLAY
self.concrete_tek_ct.diplay_store_mode = "STO"
self.concrete_tek_ct.display_horizontal_source_sensitivity = ("COLLECT", 1.0E-1)
self.concrete_tek_ct.display_vertical_source_sensitivity = ("COLLECT", 500.0E-3)
self.concrete_tek_ct.set_cursor_mode("DOT", 1)
# MEASUREMENT
self.concrete_tek_ct.measure_mode = "REP"
def initialize_per_3Q_measure(self,
peakpower=3000,
step_gen_offset=0,
vertical_sens=2.0,
horizontal_sens=0.5):
# COLLECTOR SUPPLY
self.concrete_tek_ct.cs_peakpower = peakpower
self.concrete_tek_ct.cs_polarity = "NEG"
self.concrete_tek_ct.cs_collector_supply = 0
# STEP GEN
self.concrete_tek_ct.stepgen_step_source_and_size = ("VOLTAGE", 5.0)
self.concrete_tek_ct.stepgen_number_steps = 0
self.concrete_tek_ct.stepgen_offset = step_gen_offset
# DISPLAY
self.concrete_tek_ct.diplay_store_mode = "STO"
self.concrete_tek_ct.display_horizontal_source_sensitivity = ("COLLECT", horizontal_sens)
self.concrete_tek_ct.display_vertical_source_sensitivity = ("COLLECT", vertical_sens)
self.concrete_tek_ct.set_cursor_mode("DOT", 1)
# MEASUREMENT
self.concrete_tek_ct.measure_mode = "REP"
def initialize_per_output_characteristics_measure(self,
peakpower=3000,
step_gen_offset=0,
vertical_sens=2.0,
horizontal_sens=0.5):
# COLLECTOR SUPPLY
self.concrete_tek_ct.cs_peakpower = peakpower
self.concrete_tek_ct.cs_polarity = "POS"
self.concrete_tek_ct.cs_collector_supply = 0
# STEP GEN
self.concrete_tek_ct.stepgen_step_source_and_size = ("VOLTAGE", 5.0)
self.concrete_tek_ct.stepgen_number_steps = 0
self.concrete_tek_ct.stepgen_offset = step_gen_offset
# DISPLAY
self.concrete_tek_ct.diplay_store_mode = "STO"
self.concrete_tek_ct.display_horizontal_source_sensitivity = ("COLLECT", horizontal_sens)
self.concrete_tek_ct.display_vertical_source_sensitivity = ("COLLECT", vertical_sens)
self.concrete_tek_ct.set_cursor_mode("DOT", 1)
# MEASUREMENT
self.concrete_tek_ct.measure_mode = "REP"
def initialize_per_transfer_characteristics_measure(self,
peakpower=3000,
collector_supply=66.6,
step_gen_offset=0,
vertical_sens=2.0,
horizontal_sens=1.0):
# STEP GEN
self.concrete_tek_ct.stepgen_step_source_and_size = ("VOLTAGE", 5.0)
self.concrete_tek_ct.stepgen_number_steps = 0
self.concrete_tek_ct.stepgen_offset = step_gen_offset
# COLLECTOR SUPPLY
self.concrete_tek_ct.cs_peakpower = peakpower
self.concrete_tek_ct.cs_polarity = "POS"
self.concrete_tek_ct.cs_collector_supply = collector_supply
# DISPLAY
self.concrete_tek_ct.diplay_store_mode = "STO"
self.concrete_tek_ct.display_horizontal_source_sensitivity = ("STP", horizontal_sens)
self.concrete_tek_ct.display_vertical_source_sensitivity = ("COLLECT", vertical_sens)
self.concrete_tek_ct.set_cursor_mode("DOT", 1)
# MEASUREMENT
self.concrete_tek_ct.measure_mode = "REP"
def get_peak_power(self):
return self.concrete_tek_ct.cs_peakpower
def set_peak_power(self, pp):
if pp not in self.VALID_PEAK_POWER:
raise Exception(
"Peak Power must be one of the values:"
+ str(self.VALID_PEAK_POWER)
)
else:
self.concrete_tek_ct.cs_peakpower = pp
def reset_peak_power(self):
self.set_peak_power(self.VALID_PEAK_POWER[0])
def increase_peak_power(self):
self.set_peak_power(self.VALID_PEAK_POWER[1])
def decrease_peak_power(self):
self.set_peak_power(self.VALID_PEAK_POWER[0])
def get_collector_suplly(self):
return self.concrete_tek_ct.cs_collector_supply
def set_collector_suplly(self, value):
self.concrete_tek_ct.cs_collector_supply = value
def change_collector_supply(self, increase=True, delta=COLLECTOR_SUPPLY_RESOLUTION):
"""
changes the actual value of the collector supply
:param increase: if increase is True then the collector supply will change in order to rise the
power applied to the DUT. Otherwise if False.
:param delta: is the variation or delta (in %) we want to vary the collector supply. Min
allowed increments of 0.1%
:return: None
"""
actual_cs = self.concrete_tek_ct.cs_collector_supply
_delta = self.COLLECTOR_SUPPLY_RESOLUTION if delta < self.COLLECTOR_SUPPLY_RESOLUTION else abs(
delta)
if not increase:
_delta = - _delta
self.set_collector_suplly(actual_cs + delta)
def increase_collector_supply(self, delta=COLLECTOR_SUPPLY_RESOLUTION):
self.change_collector_supply(increase=True, delta=delta)
def decrease_collector_supply(self, delta=COLLECTOR_SUPPLY_RESOLUTION):
self.change_collector_supply(increase=False, delta=delta)
def reset_collector_supply(self):
self.set_collector_suplly(0.0)
def reset_horizontal_sensitivity(self):
horizontal_sensitivities = self.get_valid_horizontal_sensitivities()
self.set_horizontal_sensitivity(horizontal_sensitivities[0])
def set_horizontal_sensitivity(self, sensitivity):
h_source = self.concrete_tek_ct.display_horizontal_source_sensitivity[0]
self.concrete_tek_ct.display_horizontal_source_sensitivity = (h_source, sensitivity)
def get_horizontal_sensitivity(self):
return self.concrete_tek_ct.display_horizontal_source_sensitivity[1]
def change_horizontal_sensitivity(self, increase=True):
"""
changes the actual value of the horizontal sensitivity
:param increase: if increase is True then the horizontal sensitivity will change in order to reduce the
volts/div. If False the will change will change in order to raise the volts/div.
:return: None
"""
horizontal_sensitivity = self.get_horizontal_sensitivity()
horizontal_sensitivities = self.get_valid_horizontal_sensitivities()
index = horizontal_sensitivities.index(horizontal_sensitivity)
new_index = index + 1
if increase:
new_index = index - 1
try:
self.set_horizontal_sensitivity(horizontal_sensitivities[new_index])
except (Exception,):
pass
def increase_horizontal_sensitivity(self):
self.change_horizontal_sensitivity(increase=True)
def decrease_horizontal_sensitivity(self):
self.change_horizontal_sensitivity(increase=False)
def get_valid_horizontal_sensitivities(self):
horizontal_source = self.concrete_tek_ct.display_horizontal_source_sensitivity[0]
pp = self.get_peak_power()
return self.concrete_tek_ct. \
HORIZONTAL_DISPLAY_SENSITIVITY_VALID_SELECTIONS_VS_PEAKPOWER_FOR_SOURCE[
horizontal_source][pp]
def get_horizontal_range(self):
return self.get_horizontal_sensitivity() * self.N_HORIZONTAL_DIVS
def reset_horizontal_range(self):
self.reset_horizontal_sensitivity()
def increase_horizontal_range(self):
self.decrease_horizontal_sensitivity()
def decrease_horizontal_range(self):
self.increase_horizontal_sensitivity()
def reset_vertical_sensitivity(self):
vertical_sensitivities = self.get_valid_vertical_sensitivities()
self.set_vertical_sensitivity(vertical_sensitivities[0])
def set_vertical_sensitivity(self, sensitivity):
vertical_source = self.concrete_tek_ct.display_vertical_source_sensitivity[0]
self.concrete_tek_ct.display_vertical_source_sensitivity = (vertical_source, sensitivity)
def get_vertical_sensitivity(self):
return self.concrete_tek_ct.display_vertical_source_sensitivity[1]
def change_vertical_sensitivity(self, increase=True):
"""
changes the actual value of the vertical sensitivity
:param increase: if increase is True then the vertical sensitivity will change in order to reduce the
amps/div. If False the will change will change in order to raise the amps/div.
:return: None
"""
vertical_sensitivity = self.get_vertical_sensitivity()
vertical_sensitivities = self.get_valid_vertical_sensitivities()
index = vertical_sensitivities.index(vertical_sensitivity)
new_index = index + 1
if increase:
new_index = index - 1
try:
self.set_vertical_sensitivity(vertical_sensitivities[new_index])
except (Exception,):
pass
def increase_vertical_sensitivity(self):
self.change_vertical_sensitivity(increase=True)
def decrease_vertical_sensitivity(self):
self.change_vertical_sensitivity(increase=False)
def get_valid_vertical_sensitivities(self):
vertical_source = self.concrete_tek_ct.display_vertical_source_sensitivity[0]
pp = self.get_peak_power()
return self.concrete_tek_ct. \
VERTICAL_DISPLAY_SENSITIVITY_VALID_SELECTIONS_VS_PEAKPOWER_FOR_SOURCE[vertical_source][
pp]
def get_vertical_range(self):
return self.get_vertical_sensitivity() * self.N_VERTICAL_DIVS
def reset_vertical_range(self):
self.reset_vertical_sensitivity()
def increase_vertical_range(self):
self.decrease_vertical_sensitivity()
def decrease_vertical_range(self):
self.increase_vertical_sensitivity()
def reset_number_of_steps(self):
self.set_number_of_steps(0)
def set_number_of_steps(self, n_steps):
self.concrete_tek_ct.stepgen_number_steps = n_steps
def get_number_of_steps(self):
return self.concrete_tek_ct.stepgen_number_steps
def change_number_of_steps(self, increase=True):
"""
changes the actual value of the number of steps in the step generator
:param increase: if increase is True then the number of steps in the step generator will raise by one.
Otherwise will decrease by one.
:return: None
"""
n_steps = self.get_number_of_steps()
if increase:
n_steps = n_steps + 1
else:
n_steps = n_steps - 1
try:
self.set_number_of_steps(n_steps)
except (Exception,):
pass
def increase_number_of_steps(self):
self.change_number_of_steps(increase=True)
def decrease_number_of_steps(self):
self.change_number_of_steps(increase=False)
def reset_stepgen_offset(self):
self.set_stepgen_offset(self.STEPGEN_MIN_OFFSET)
def set_stepgen_offset(self, offset):
self.concrete_tek_ct.stepgen_offset = offset
def get_stepgen_offset(self):
return self.concrete_tek_ct.stepgen_offset
def __change_stepgen_offset(self, delta=0.1, limit=10, increase=True):
offset = self.get_stepgen_offset()
r_offset = round(offset, 2)
abs_limit_value = abs(limit)
if -abs_limit_value >= r_offset or r_offset >= abs_limit_value:
return
step = self.get_stepgen_step_size()
min_delta = - self.STEPGEN_OFFSET_RESOLUTION * step
min_delta = max(round(min_delta, ndigits=3), abs(delta))
if not increase:
min_delta = - min_delta
self.set_stepgen_offset(offset + min_delta)
def vary_stepgen_offset(self, delta=0.1, limit=10):
"""
Changes the step generator offset following the variation which can be negative.
:param delta: the amount of variaton
:param limit: the -limit, limit imposed to the minimum or maximun value
that the offset can reach.
:return: None
"""
if delta <= 0:
self.__change_stepgen_offset(delta, limit, increase=False)
else:
self.__change_stepgen_offset(delta, limit, increase=True)
def reset_stepgen_step_size(self):
stepgen_sizes = self.get_valid_stepgen_step_sizes()
self.set_stepgen_step_size(stepgen_sizes[0])
def set_stepgen_step_size(self, step_size):
stepgen_source = self.concrete_tek_ct.stepgen_step_source_and_size[0]
self.concrete_tek_ct.stepgen_step_source_and_size = (stepgen_source, step_size)
def get_stepgen_step_size(self):
return self.concrete_tek_ct.stepgen_step_source_and_size[1]
def change_stepgen_step_size(self, increase=True):
"""
changes the actual value of the step size in the step generator
:param increase: if increase is True then the step size in the step generator will raise.
Otherwise will decrease.
:return: None
"""
stepgen_size = self.get_stepgen_step_size()
stepgen_sizes = self.get_valid_stepgen_step_sizes()
index = stepgen_sizes.index(stepgen_size)
if increase:
if not (index == (len(stepgen_sizes) - 1)):
index = index + 1
else:
if not (index == 0):
index = index - 1
try:
self.set_stepgen_step_size(stepgen_sizes[index])
except (Exception,):
pass
def increase_stepgen_step_size(self):
self.change_stepgen_step_size(increase=True)
def decrease_stepgen_step_size(self):
self.change_stepgen_step_size(increase=False)
def get_valid_stepgen_step_sizes(self):
stepgen_source = self.get_stepgen_source()
pp = self.get_peak_power()
return self.concrete_tek_ct. \
STEP_GENERATOR_VALID_STEP_SELECTIONS_FOR_STEP_SOURCE[stepgen_source][pp]
def set_stepgen_source(self, stepgen_source):
stepgen_sizes = self.get_valid_stepgen_step_sizes()
self.concrete_tek_ct.stepgen_step_source_and_size = (stepgen_source, stepgen_sizes[0])
def get_stepgen_source(self):
return self.concrete_tek_ct.stepgen_step_source_and_size[0]
def get_current_readout(self):
return self.concrete_tek_ct.crt_readout_v
def get_voltage_readout(self):
return self.concrete_tek_ct.crt_readout_h
def activate_srq(self):
self.concrete_tek_ct.enable_srq_event()
def wait_for_srq(self):
self.concrete_tek_ct.wait_for_srq()
def start_sweep(self):
self.concrete_tek_ct.measure_mode = "SWEep"
def get_curve(self):
return self.concrete_tek_ct.get_curve()
def set_number_of_curve_points(self, n):
self.concrete_tek_ct.waveform_points = n
def measure_3Q(tct,
peakpower=3000,
step_gen_offset=0,
vertical_sens=2.0,
horizontal_sens=0.5,
min_i=-20,
min_v=-5,
results_file_name="test",
repeat=2):
"""
:type tct:TektronixCurveTracer
"""
n_measures = 0
while n_measures < repeat:
print("MEASURING 3Q WITH Vgs=", step_gen_offset, "V. Measure number ", n_measures + 1)
tct.initialize_per_3Q_measure(peakpower,
step_gen_offset,
vertical_sens,
horizontal_sens)
tct.activate_srq()
i_cursor = 0
v_cursor = 0
sleep(0.1)
while i_cursor > min_i and v_cursor > min_v:
tct.increase_collector_supply(1.0)
sleep(0.5)
i_cursor = tct.get_current_readout()
v_cursor = tct.get_voltage_readout()
print(v_cursor, i_cursor)
tct.start_sweep()
tct.wait_for_srq()
curve = tct.get_curve() # list of tuples [(x0, y0), (x1, y1) .... (xn-1, yn-1)]
time.sleep(2) # wait for instrment response
curve_points = curve.points
curve_points.reverse()
print(curve_points)
with open(results_file_name + '_' + str(n_measures + 1), 'w') as file:
for curve_point in curve_points:
row_text = str(curve_point[0]) + '\t' + str(curve_point[1]) + '\n'
file.write(row_text)
tct.concrete_tek_ct.discard_and_disable_all_events()
n_measures = n_measures + 1
def measure_IdVd(tct,
peakpower=3000,
step_gen_offset=0,
vertical_sens=2.0,
horizontal_sens=0.5,
max_i=20,
max_v=5,
results_file_name="test",
repeat=2):
"""
:type tct:TektronixCurveTracer
"""
n_measures = 0
while n_measures < repeat:
print("MEASURING IdVd WITH Vgs=", step_gen_offset, "V. Measure number ", n_measures + 1)
tct.initialize_per_output_characteristics_measure(peakpower,
step_gen_offset,
vertical_sens,
horizontal_sens)
tct.activate_srq()
i_cursor = 0
v_cursor = 0
sleep(0.1)
while i_cursor < max_i and v_cursor < max_v:
tct.increase_collector_supply(1.0)
sleep(0.5)
i_cursor = tct.get_current_readout()
v_cursor = tct.get_voltage_readout()
print(v_cursor, i_cursor)
tct.start_sweep()
tct.wait_for_srq()
curve = tct.get_curve() # list of tuples [(x0, y0), (x1, y1) .... (xn-1, yn-1)]
time.sleep(2) # wait for instrment response
curve_points = curve.points
curve_points.reverse()
print(curve_points)
with open(results_file_name + '_' + str(n_measures + 1), 'w') as file:
for curve_point in curve_points:
row_text = str(curve_point[0]) + '\t' + str(curve_point[1]) + '\n'
file.write(row_text)
tct.concrete_tek_ct.discard_and_disable_all_events()
n_measures = n_measures + 1
def measure_IdVgs(tct,
peakpower=3000,
collector_suplly=66.6,
collector_voltage=30,
step_gen_offset=0,
limit_stegen_offset=15.0,
vertical_sens=2.0,
horizontal_sens=0.5,
max_i=20,
max_v=5,
results_file_name="test",
repeat=2):
"""
:type tct:TektronixCurveTracer
"""
n_measures = 0
while n_measures < repeat:
print("MEASURING IdVGS WITH Vds=", collector_voltage, "V. Measure number ", n_measures + 1)
tct.initialize_per_transfer_characteristics_measure(peakpower,
collector_suplly,
step_gen_offset,
vertical_sens,
horizontal_sens)
tct.activate_srq()
i_cursor = 0
v_cursor = 0
sleep(0.1)
while i_cursor < max_i and v_cursor < max_v:
tct.vary_stepgen_offset(delta=0.3,
limit=limit_stegen_offset)
sleep(0.5)
i_cursor = tct.get_current_readout()
v_cursor = tct.get_voltage_readout()
print(v_cursor, i_cursor)
tct.start_sweep()
tct.wait_for_srq()
curve = tct.get_curve() # list of tuples [(x0, y0), (x1, y1) .... (xn-1, yn-1)]
time.sleep(2) # wait for instrment response
curve_points = curve.points
curve_points.reverse()
print(curve_points)
with open(results_file_name + '_' + str(n_measures + 1), 'w') as file:
for curve_point in curve_points:
row_text = str(curve_point[0]) + '\t' + str(curve_point[1]) + '\n'
file.write(row_text)
tct.concrete_tek_ct.discard_and_disable_all_events()
n_measures = n_measures + 1
def main() -> int:
ct371a = Tektronix371A("GPIB0::23::INSTR",
name="Tektronix Curve Tracer model 371A",
query_delay=0.1,
write_delay=0.1,
)
tct = TektronixCurveTracer(ct371a)
number_of_cycles = 622000
device_ref = "G4R12MT07-CAU_3"
# ##############################################################################################
# ##############################################################################################
# ##############################################################################################
# peakpower = 3000
# step_gen_offset = 0
# vertical_sens = 10.0
# horizontal_sens = 1.0
# min_i = -100
# min_v = -7
# curve_name = "ID_Vds@Vgs=0(3ERQ)"
# results_file_name = '(' + str(number_of_cycles) + 'cycles)' + device_ref + curve_name
#
# measure_3Q(tct,
# peakpower,
# step_gen_offset,
# vertical_sens,
# horizontal_sens,
# min_i,
# min_v,
# results_file_name,
# repeat=4)
# ##############################################################################################
# ##############################################################################################
# ##############################################################################################
# peakpower = 3000
# step_gen_offset = -5
# vertical_sens = 10.0
# horizontal_sens = 1.0
# min_i = -100
# min_v = -7
# curve_name = "ID_Vds@Vgs=-5(3ERQ)"
# results_file_name = '(' + str(number_of_cycles) + 'cycles)' + device_ref + curve_name
#
# measure_3Q(tct,
# peakpower,
# step_gen_offset,
# vertical_sens,
# horizontal_sens,
# min_i,
# min_v,
# results_file_name,
# repeat=4)
# ##############################################################################################
# ##############################################################################################
# ##############################################################################################
# peakpower = 3000
# step_gen_offset = 15
# vertical_sens = 10.0
# horizontal_sens = 0.2
# max_i = 100
# max_v = 2
# curve_name = "ID_Vds@Vgs=15V"
# results_file_name = '(' + str(number_of_cycles) + 'cycles)' + device_ref + curve_name
#
# measure_IdVd(tct,
# peakpower,
# step_gen_offset,
# vertical_sens,
# horizontal_sens,
# max_i,
# max_v,
# results_file_name,
# repeat=4)
# ##############################################################################################
# ##############################################################################################
# ##############################################################################################
peakpower = 3000
step_gen_offset = 0
vertical_sens = 10.0
horizontal_sens = 1.0
max_i = 100
max_v = 10
curve_name = "ID_Vds@Vgs=Vds"
results_file_name = '(' + str(number_of_cycles) + 'cycles)' + device_ref + curve_name
measure_IdVd(tct,
peakpower,
step_gen_offset,
vertical_sens,
horizontal_sens,
max_i,
max_v,
results_file_name,
repeat=4)
##############################################################################################
##############################################################################################
##############################################################################################
# peakpower = 3000
# collector_supply = 66.6
# collector_voltage = 30
# step_gen_offset = 0
# limit_stegen_offset = 15.0
# vertical_sens = 2.0
# horizontal_sens = 1.0
# max_i = 20
# max_v = 10
# curve_name = "ID_Vgs@Vds=20"
# results_file_name = '(' + str(number_of_cycles) + 'cycles)' + device_ref + curve_name
#
# measure_IdVgs(tct,
# peakpower,
# collector_supply,
# collector_voltage,
# step_gen_offset,
# limit_stegen_offset,
# vertical_sens,
# horizontal_sens,
# max_i,
# max_v,
# results_file_name,
# repeat=4)
tct.set_collector_suplly(0)
tct.set_stepgen_offset(0)
if __name__ == '__main__':
sys.exit(main()) # next section explains the use of sys