Skip to content

Commit

Permalink
Merge pull request #32 from ImperialCollegeLondon/vNext
Browse files Browse the repository at this point in the history
Update software to v3.4.1
  • Loading branch information
mfacchinelli authored Mar 13, 2024
2 parents 33bd437 + 7fbc1dc commit c38561c
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/matlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
if: github.ref == 'refs/heads/main'
needs: test
env:
VERSION: "3.4.0"
VERSION: "3.4.1"
steps:
- name: Check out repository
uses: actions/checkout@v3
Expand Down
Binary file modified app/DataVisualization.mlapp
Binary file not shown.
16 changes: 5 additions & 11 deletions resources/ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
# App

- Add button to close generated figures
- Fix issue with assigning value of `DebugStatus` when more than one breakpoint is set
- Make sure to reset everything when "Reset" button is pressed

# Software

- Add description of both Normal and Burst mode in `mag.event.ModeChange`, regardless of the active mode
- Add mode events in I-ALiRT timestamp comparison plot in `mag.graphics.view.IALiRT`
- Allow specifying multiple labels and label alignment in `mag.graphics.chart.Line`
- Move removal of all-zero vectors in data after removal of missing data
- Improve algorithm to find closest science and I-ALiRT timestamps
- Make sure all I-ALiRT right-hand side graphs have `YAxisLocation` set to `right`
- Fix issue with `UNCHANGED` data frequency appearing as `NaN` in event log
- Fix issue with filtering I-ALiRT secondary data in `mag.graphics.view.IALiRT`
- Fix issue with PSDs showing large noise in mode and range cycling
- Fix issue with exporting empty HK
- Fix issue with plotting CPT data with no mode cycling information
- Fix issue with `tiledlayout` spacing when tile indexing is column-major
- Fix issue with naming HK close up figure
15 changes: 10 additions & 5 deletions src/analyze/+mag/@IMAPTestingAnalysis/IMAPTestingAnalysis.m
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,18 @@ function load(this)
idxFirst = find(modeEvents.Mode == "Normal", 1);
idxLast = find(diff(modeEvents.Mode == "Normal") == 0, 1);

finalTime = events(find([events.Time] == modeEvents.Time(idxLast), 1) + 1, :).Time;
modeEvents = modeEvents(idxFirst:idxLast, :);

if isempty(modeEvents)
if isempty(modeEvents) && isempty(idxFirst) && isempty(idxLast)
period = timerange(NaT(TimeZone = "UTC"), NaT(TimeZone = "UTC"));
else
period = timerange(modeEvents.Time(1), finalTime, "closedleft");

finalTime = events(find([events.Time] == modeEvents.Time(idxLast), 1) + 1, :).Time;
modeEvents = modeEvents(idxFirst:idxLast, :);

if isempty(modeEvents)
period = timerange(NaT(TimeZone = "UTC"), NaT(TimeZone = "UTC"));
else
period = timerange(modeEvents.Time(1), finalTime, "closedleft");
end
end
end

Expand Down
6 changes: 5 additions & 1 deletion src/io/+mag/+io/+format/HKMAT.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@

arguments
exportedData (1, 1) struct
data (1, 1) mag.HK
data mag.HK {mustBeScalarOrEmpty}
matTypeName (1, 1) string
end

if isempty(data)
return;
end

exportedData.HK.(matTypeName).Time = data.Time;

for p = string(data.Data.Properties.VariableNames)
Expand Down
2 changes: 1 addition & 1 deletion src/visualize/+mag/+graphics/+view/HK.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function visualize(this)
[mag.graphics.style.LeftRight(Title = "+8 V", LeftLabel = "[V]", RightLabel = "[mA]", Charts = [mag.graphics.chart.Plot(YVariables = "P8V"), mag.graphics.chart.Plot(YVariables = "P8VI")]), ...
mag.graphics.style.LeftRight(Title = "-8 V", LeftLabel = "[V]", RightLabel = "[mA]", Charts = [mag.graphics.chart.Plot(YVariables = "N8V"), mag.graphics.chart.Plot(YVariables = "N8VI")]), ...
mag.graphics.style.LeftRight(Title = "2.5 V", LeftLabel = "[V]", RightLabel = "[mA]", Charts = [mag.graphics.chart.Plot(YVariables = "P2V5V"), mag.graphics.chart.Plot(YVariables = "P2V5I")])], ...
Title = compose("From: (t_{0} + %s) - To: (t_{end} - %s)", string(scienceStartTime - pwr.Time(1)), string(pwr.Time(end) - scienceEndTime)), ...
Title = compose("From: (t_{0} + %s) - To: (t_{end} - %s)", string(scienceStartTime - pwr.Time(1)), string(abs(pwr.Time(end) - scienceEndTime))), ...
Name = "+-8V Close Up", ...
Arrangement = [3, 1], ...
LinkXAxes = true, ...
Expand Down
19 changes: 10 additions & 9 deletions src/visualize/+mag/+graphics/cptPlots.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,22 @@
%% Modes

modeCycling = analysis.getModeCycling();
views(end + 1) = mag.graphics.view.Field(modeCycling, Event = "Mode", Name = "Mode Cycling", Title = string.empty());

if ~isempty(modeCycling)

views(end + 1) = mag.graphics.view.Field(modeCycling, Event = "Mode", Name = "Mode Cycling", Title = string.empty());
views(end + 1) = mag.graphics.view.PSD(modeCycling, Name = "Mode Cycling PSD Analysis", Event = "DataFrequency");
end

%% Ranges

rangeCycling = analysis.getRangeCycling();

if ~isempty(rangeCycling) && rangeCycling.HasData

% Plot all ranges.
% Plot all ranges and PSDs.
views(end + 1) = mag.graphics.view.Field(rangeCycling, Event = "Range", Name = "Range Cycling", Title = string.empty());
views(end + 1) = mag.graphics.view.PSD(rangeCycling, Name = "Range Cycling PSD Analysis", Event = "Range");

% Plot ranges without range 0.
locNoRangeZero = (rangeCycling.Primary.Range ~= 0) & (rangeCycling.Secondary.Range ~= 0);
Expand All @@ -49,14 +55,9 @@
%% Ramp

rampMode = analysis.getRampMode();
views(end + 1) = mag.graphics.view.RampMode(rampMode);

%% PSD

views(end + 1) = mag.graphics.view.PSD(modeCycling, Name = "Mode Cycling PSD Analysis", Event = "DataFrequency");

if ~isempty(rangeCycling) && rangeCycling.HasData
views(end + 1) = mag.graphics.view.PSD(rangeCycling, Name = "Range Cycling PSD Analysis", Event = "Range");
if ~isempty(rampMode)
views(end + 1) = mag.graphics.view.RampMode(rampMode);
end

%% Final Normal Mode
Expand Down
8 changes: 7 additions & 1 deletion src/visualize/+mag/+graphics/visualize.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@
arrangement = num2cell(options.Arrangement);
end

t = tiledlayout(f, arrangement{:}, TileSpacing = "tight", TileIndexing = options.TileIndexing);
if isequal(options.TileIndexing, "columnmajor")
spacing = "compact";
else
spacing = "tight";
end

t = tiledlayout(f, arrangement{:}, TileSpacing = spacing, TileIndexing = options.TileIndexing);
t.Title.String = options.Title;

axes = matlab.graphics.axis.Axes.empty();
Expand Down

0 comments on commit c38561c

Please sign in to comment.