Skip to content

Commit

Permalink
task: remove use of computePSD
Browse files Browse the repository at this point in the history
  • Loading branch information
mfacchinelli committed Dec 16, 2024
1 parent eda1862 commit 02ebcdc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions resources/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
# Software

- Add support for PSD and Spectrogram for HelioSwarm data visualization
- Remove use of `mag.Science/computePSD` and warn for deprecation
3 changes: 3 additions & 0 deletions src/data/+mag/Science.m
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ function replace(this, timeFilter, filler)
end

function data = computePSD(this, varargin)

warning("""computePSD"" will be removed in a future release. With appropriate changes, use ""mag.psd"" instead.");

data = mag.psd(this, varargin{:});
end
end
Expand Down
2 changes: 1 addition & 1 deletion src/mission/imap/+mag/+imap/+view/EventPSD.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function visualize(this)
if (duration > 0) && (height(data.Data(timerange(startTime, startTime + duration, "closed"), :)) > 7)

% Compute PSD.
psd = data.computePSD(Start = startTime, Duration = duration);
psd = mag.psd(data, Start = startTime, Duration = duration);

% Add plot.
charts = [charts, {psd, ...
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/data/tScience.m
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ function computePSD_sineWave_default(testCase)
science = testCase.createSineWaveTestData();

% Execute.
psd = science.computePSD();
psd = testCase.verifyWarning(@() science.computePSD(), "");

% Verify.
[~, idxMax] = max([psd.X, psd.Y, psd.Z]);
Expand All @@ -386,7 +386,7 @@ function computePSD_sineWave_startAndDuration(testCase)
science = testCase.createSineWaveTestData();

% Execute.
psd = science.computePSD(Start = science.Time(10), Duration = milliseconds(500));
psd = testCase.verifyWarning(@() science.computePSD(Start = science.Time(10), Duration = milliseconds(500)), "");

% Verify.
[~, idxMax] = max([psd.X, psd.Y, psd.Z]);
Expand Down

0 comments on commit 02ebcdc

Please sign in to comment.