Skip to content

Commit

Permalink
add warning if trying to plot complex valued SO3FunHarmonics
Browse files Browse the repository at this point in the history
  • Loading branch information
num3RIK committed Sep 5, 2023
1 parent dde5acc commit b0a05c9
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SO3Fun/@SO3Fun/plot3d.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
function plot3d(odf,varargin)
% plots odf

if ~isa(odf,'SO3FunHarmonic')
warning('Imaginary parts of complex X and/or Y arguments ignored.')
end

if odf.antipodal, ap = {'antipodal'}; else, ap = {}; end

[oP, isNew] = newOrientationPlot(odf.CS,odf.SS,ap{:},'project2FundamentalRegion',...
Expand Down
5 changes: 5 additions & 0 deletions SO3Fun/@SO3FunHarmonic/plot.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ function plot(SO3F,varargin)
warning(['You try to plot an multivariate function. Plot the desired components ' ...
'manually. In the following the first component is plotted.'])
end
if ~SO3F.isReal
warning(['Imaginary part of complex valued SO3FunHarmonic is ignored. ' ...
'In the following only the real part is plotted.'])
SO3F.isReal=1;
end

plot@SO3Fun(SO3F.subSet(1),varargin{:});

Expand Down
5 changes: 5 additions & 0 deletions SO3Fun/@SO3FunHarmonic/plot3d.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ function plot3d(SO3F,varargin)
warning(['You try to plot an multivariate function. Plot the desired components ' ...
'manually. In the following the first component is plotted.'])
end
if ~SO3F.isReal
warning(['Imaginary part of complex valued SO3FunHarmonic is ignored. ' ...
'In the following only the real part is plotted.'])
SO3F.isReal=1;
end

plot3d@SO3Fun(SO3F.subSet(1),varargin{:});

Expand Down
6 changes: 6 additions & 0 deletions SO3Fun/@SO3FunHarmonic/plotFibre.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
% S2Grid/plot savefigure Plotting Annotations_demo ColorCoding_demo PlotTypes_demo
% SphericalProjection_demo

if ~SO3F.isReal
warning(['Imaginary part of complex valued SO3FunHarmonic is ignored. ' ...
'In the following only the real part is plotted.'])
SO3F.isReal=1;
end

[x,omega] = plotFibre@SO3Fun(SO3F.subSet(':'),f,varargin{:});

if nargout == 0, clear x omega; end
Expand Down
5 changes: 5 additions & 0 deletions SO3Fun/@SO3FunHarmonic/plotIPDF.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ function plotIPDF(SO3F,r,varargin)
warning(['You try to plot an multivariate function. Plot the desired components ' ...
'manually. In the following the first component is plotted.'])
end
if ~SO3F.isReal
warning(['Imaginary part of complex valued SO3FunHarmonic is ignored. ' ...
'In the following only the real part is plotted.'])
SO3F.isReal=1;
end

plotIPDF@SO3Fun(SO3F.subSet(1),r,varargin{:});

Expand Down
5 changes: 5 additions & 0 deletions SO3Fun/@SO3FunHarmonic/plotPDF.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ function plotPDF(SO3F,h,varargin)
warning(['You try to plot an multivariate function. Plot the desired components ' ...
'manually. In the following the first component is plotted.'])
end
if ~SO3F.isReal
warning(['Imaginary part of complex valued SO3FunHarmonic is ignored. ' ...
'In the following only the real part is plotted.'])
SO3F.isReal=1;
end

plotPDF@SO3Fun(SO3F.subSet(1),h,varargin{:});

Expand Down
5 changes: 5 additions & 0 deletions SO3Fun/@SO3FunHarmonic/plotSection.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ function plotSection(SO3F,varargin)
'manually. In the following the first component is plotted.'])
SO3F = SO3F.subSet(1);
end
if ~SO3F.isReal
warning(['Imaginary part of complex valued SO3FunHarmonic is ignored. ' ...
'In the following only the real part is plotted.'])
SO3F.isReal=1;
end


if SO3F.antipodal, ap = {'antipodal'}; else, ap = {}; end
Expand Down

0 comments on commit b0a05c9

Please sign in to comment.