Skip to content

Commit

Permalink
Fix issue with plotting last event mode and range in `mag.graphics.vi…
Browse files Browse the repository at this point in the history
…ew.HK` when data is cropped
  • Loading branch information
mfacchinelli committed Mar 18, 2024
1 parent ab04150 commit 72e7dae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions resources/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
- Add `mag.process.Separate` to HK processing
- Add export of whole science data
- Fix issue with processing data ready time in `mag.process.Units` when not enough digits are present
- Fix issue with plotting last event mode and range in `mag.graphics.view.HK` when data is cropped
2 changes: 1 addition & 1 deletion src/visualize/+mag/+graphics/+chart/+custom/Event.m
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
plotColors = this.getColors(variable);

for i = 1:numel(variable)
graph(i) = plot(axes, plotTime(:, i), plotVariable(:, i), Color = plotColors(i, :), LineWidth = 3.5); %#ok<AGROW>
graph(i) = plot(axes, plotTime(:, i), plotVariable(:, i), Color = plotColors(i, :), LineWidth = 3.5);
end

% Plot vertical lines between mode changes.
Expand Down
8 changes: 4 additions & 4 deletions src/visualize/+mag/+graphics/+view/HK.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ function visualize(this)
mag.graphics.style.LeftRight(Title = "1.8 V", LeftLabel = "[V]", RightLabel = "[mA]", LLimits = 1.8 + this.VOffset, Charts = [mag.graphics.chart.Plot(YVariables = "P1V8V"), mag.graphics.chart.Plot(YVariables = "P1V8I")]), ...
mag.graphics.style.LeftRight(Title = "3.3 V", LeftLabel = "[V]", RightLabel = "[mA]", LLimits = 3.3 + this.VOffset, Charts = [mag.graphics.chart.Plot(YVariables = "P3V3V"), mag.graphics.chart.Plot(YVariables = "P3V3I")]), ...
mag.graphics .style.Default(Title = "2.4 V", YLabel = "[V]", YAxisLocation = "right", Charts = mag.graphics.chart.Plot(YVariables = "P2V4V"))], ...
primary.Events, mag.graphics.style.Default(Title = compose("%s Modes", primarySensor), YLabel = "mode [-]", YLimits = "manual", Charts = mag.graphics.chart.custom.Event(EventOfInterest = "DataFrequency")), ...
secondary.Events, mag.graphics.style.Default(Title = compose("%s Modes", secondarySensor), YLabel = "mode [-]", YLimits = "manual", YAxisLocation = "right", Charts = mag.graphics.chart.custom.Event(EventOfInterest = "DataFrequency")), ...
primary.Events, mag.graphics.style.Default(Title = compose("%s Ranges", primarySensor), YLabel = "range [-]", YLimits = "manual", Charts = mag.graphics.chart.custom.Event(EventOfInterest = "Range", YOffset = 0.1, IgnoreMissing = false)), ...
secondary.Events, mag.graphics.style.Default(Title = compose("%s Ranges", secondarySensor), YLabel = "range [-]", YLimits = "manual", YAxisLocation = "right", Charts = mag.graphics.chart.custom.Event(EventOfInterest = "Range", YOffset = 0.1, IgnoreMissing = false)), ...
primary.Events, mag.graphics.style.Default(Title = compose("%s Modes", primarySensor), YLabel = "mode [-]", YLimits = "manual", Charts = mag.graphics.chart.custom.Event(EventOfInterest = "DataFrequency", EndTime = primary.Time(end))), ...
secondary.Events, mag.graphics.style.Default(Title = compose("%s Modes", secondarySensor), YLabel = "mode [-]", YLimits = "manual", YAxisLocation = "right", Charts = mag.graphics.chart.custom.Event(EventOfInterest = "DataFrequency", EndTime = secondary.Time(end))), ...
primary.Events, mag.graphics.style.Default(Title = compose("%s Ranges", primarySensor), YLabel = "range [-]", YLimits = "manual", Charts = mag.graphics.chart.custom.Event(EventOfInterest = "Range", YOffset = 0.1, IgnoreMissing = false, EndTime = primary.Time(end))), ...
secondary.Events, mag.graphics.style.Default(Title = compose("%s Ranges", secondarySensor), YLabel = "range [-]", YLimits = "manual", YAxisLocation = "right", Charts = mag.graphics.chart.custom.Event(EventOfInterest = "Range", YOffset = 0.1, IgnoreMissing = false, EndTime = secondary.Time(end))), ...
Name = "HK & Events", ...
Arrangement = [4, 2], ...
LinkXAxes = true, ...
Expand Down

0 comments on commit 72e7dae

Please sign in to comment.