Skip to content

Commit

Permalink
Merge pull request #21 from stfc-aeg/fix/heatmap-row-count
Browse files Browse the repository at this point in the history
Rows numbers now correct on heatmap
  • Loading branch information
josephnobes-stfc authored Aug 3, 2023
2 parents 87d6227 + 2826b74 commit 408bad8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions control/src/mercury/carrier/Carrier.py
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,7 @@ def create_reshaped_array():

self._segment_data = self._segment_data + reshaped

blank_segment = [[0] * 80]*4

try:

Expand All @@ -1093,7 +1094,11 @@ def create_reshaped_array():
for segment in range(20):
create_reshaped_array()
else:
for i in range(0, segment):
self._segment_data = self._segment_data + blank_segment
create_reshaped_array()
for i in range (segment+1, 20):
self._segment_data = self._segment_data + blank_segment


self._segment_ready = True
Expand Down
4 changes: 4 additions & 0 deletions control/test/static/js/carrier.js
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,7 @@ function update_loki_asic_segment_data() {

function readout_output(segment_data) {

var first_row = segment_current*4;

var data = [
{
Expand Down Expand Up @@ -1306,6 +1307,9 @@ function readout_output(segment_data) {
if (all_segments_displayed) {
layout["title"] = 'All Segments';
layout.coloraxis["colorbar"] = "v";
} else {
layout.yaxis.autorange=false;
layout.yaxis.range=[first_row+3.5,first_row-0.5];
};

Plotly.newPlot('graph_output', data, layout, config);
Expand Down

0 comments on commit 408bad8

Please sign in to comment.