Skip to content

Commit

Permalink
fixing default arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
b-vanstraaten committed Jul 18, 2024
1 parent 368657e commit c0bded9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions examples/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

Cdd = [
[0., 0.2, 0.2, 0.5],
[0.2, 0., 0.5, 0.2],
[0.2, 0.5, 0.2, 0.],
[0.2, 0., 0.05, 0.2],
[0.2, 0.05, 0.2, 0.],
[0.5, 0.2, 0., 0]
]

Expand All @@ -34,4 +34,4 @@
implementation='rust', charge_carrier='h', T=0., threshold=1.,
max_charge_carriers=4,
)
model.run_gui(plot = 'colour_map', cmap = 'viridis')
model.run_gui(plot = 'changes')
2 changes: 1 addition & 1 deletion qarray/DotArrays/DotArray.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def compute_threshold_estimate(self):
"""
return compute_threshold(self.cdd)

def run_gui(self, port=27182, print_compute_time: bool = False, plot = 'changes', cmap = 'viridis'):
def run_gui(self, port=27182, print_compute_time: bool = False, plot = 'changes', cmap = None):
"""
Creates a GUI for the dot array
"""
Expand Down
3 changes: 1 addition & 2 deletions qarray/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,8 @@ def update(Cdd, Cgd, x_gate, x_amplitude, x_resolution, y_gate, y_amplitude, y_r
match plot:
case 'changes':
z = dot_occupation_changes(n).astype(float)

if cmap is None:
cmap = 'gray'
cmap = 'greys'

case 'colour_map':
z = charge_state_to_unique_index(n).astype(float)
Expand Down

0 comments on commit c0bded9

Please sign in to comment.