Skip to content

Commit 033046e

Browse files
committed
Validate bias source limit
Set min outside exclusion region
1 parent 02a7e43 commit 033046e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

script-gen-manager/src/instr_metadata/mpsu50_metadata.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl Mpsu50Metadata {
3535
max_supported_current,
3636
);
3737

38-
base.add_range("source.limiti".to_string(), 0.01, 5.1);
38+
base.add_range("source.limiti".to_string(), -5.1, 5.1);
3939

4040
base.add_range("source.step_to_sweep_delay".to_string(), 0.0, 100.0);
4141

@@ -44,21 +44,21 @@ impl Mpsu50Metadata {
4444
let exclude_i = NumberLimit::new(-10.0e-9, 10.0e-9, false, None);
4545
let mut region_map_metadata = RegionMapMetadata::new(None, exclude_i);
4646

47-
region_map_metadata.add_region(1, 0.0, 0.0, 10.0, max_supported_current);
48-
region_map_metadata.add_region(1, 0.0, 0.0, -10.0, -max_supported_current);
47+
region_map_metadata.add_region(1, 0.0, 10.0e-9, 10.0, max_supported_current);
48+
region_map_metadata.add_region(1, 0.0, -10.0e-9, -10.0, -max_supported_current);
4949

5050
Self::add_1st_quadrant_curved_region(
5151
10.0,
5252
max_supported_voltage,
5353
0.0001,
54-
0.0,
54+
10.0e-9,
5555
&mut region_map_metadata,
5656
); //First quadrant curve
5757
Self::add_3rd_quadrant_curved_region(
5858
-10.0,
5959
-max_supported_voltage,
6060
-0.0001,
61-
0.0,
61+
-10.0e-9,
6262
&mut region_map_metadata,
6363
); //Third quadrant curve
6464

script-gen-manager/src/model/chan_data/bias_channel.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ impl BiasChannel {
2626

2727
pub fn evaluate(&mut self) {
2828
self.common_chan_attributes.evaluate();
29+
self.common_chan_attributes.evaluate_source_limits(&self.bias, &self.bias); //Use the bias value for both start and stop as the absolute max is used
2930
self.determine_bias_value();
3031
}
3132

0 commit comments

Comments
 (0)