Skip to content
Snippets Groups Projects
Commit 04b632fd authored by Daniel Filbert's avatar Daniel Filbert
Browse files

Extended implementation of class DAFF

parent efe87c90
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,8 @@ classdef DAFF < handle ...@@ -5,6 +5,8 @@ classdef DAFF < handle
end end
methods methods
function obj = DAFF( filepath ) function obj = DAFF( filepath )
%% Create DAFF class and load from file
% filepath Path to DAFF file
if( nargin > 0 ) if( nargin > 0 )
open( filepath ) open( filepath )
end end
...@@ -12,14 +14,56 @@ classdef DAFF < handle ...@@ -12,14 +14,56 @@ classdef DAFF < handle
function open( obj, filepath ) function open( obj, filepath )
obj.daffhandle = DAFFv17( 'open', filepath ); obj.daffhandle = DAFFv17( 'open', filepath );
end end
function close( obj )
end
function set_data_view( obj ) function set_data_view( obj )
obj.view = 'data'; obj.view = 'data';
end end
function set_object_view( obj ) function set_object_view( obj )
obj.view = 'object'; obj.view = 'object';
end end
function metadata = get_metadata(obj)
%% Returns the metadata of an opened DAFF file
metadata = DAFFv17('getMetadata', obj.daffhandle);
end
function metadata = get_record_metadata( obj, index )
%% Returns the record metadata of an opened DAFF file
metadata = DAFFv17('getRecordMetadata', obj.daffhandle, index);
end
function props = get_properties( obj )
%% Returns the properties of an opened DAFF file
props = DAFFv17( 'getProperties', obj.daffhandle );
function coords = get_record_coords( obj, index )
%% Returns the coordinates of a grid point
coords = DAFFv17( 'getRecordCoords', obj.daffhandle, obj.view, index );
end
function idx = get_nearest_neighbour_index( obj, azi_deg, ele_deg ) function idx = get_nearest_neighbour_index( obj, azi_deg, ele_deg )
idx = DAFFv17( obj.daffhandle, 'getNearestNeighbourIndex', obj.view, azi_deg, ele_deg ); %% Returns the data at the nearest neighbour grid point to the given direction
idx = DAFFv17( 'getNearestNeighbourIndex', obj.daffhandle, obj.view, azi_deg, ele_deg );
end
function data = get_nearest_neighbour_record( obj, azi_deg, ele_deg )
%% Returns the data at the nearest neighbour grid point to the given direction
data = DAFFv17( 'getNearestNeighbourRecord', obj.daffhandle, obj.view, azi_deg, ele_deg );
end
function rec = get_record_by_index( obj, idx )
%% Returns the data at a grid of the given index
rec = DAFFv17( 'getRecordByIndex', obj.daffhandle, idx );
end
function data = get_cell_records( obj, azi_deg, ele_deg )
%% Returns the data of all four records of the surrounding cell to the given direction
data = DAFFv17('getCellRecords', obj.daffhandle, obj.view, azi_deg, ele_deg );
end
function idx = get_cell( obj, azi_deg, ele_deg )
%% Returns the data at the nearest neighbour grid point to the given direction
idx = DAFFv17( 'getCell', obj.daffhandle, obj.view, azi_deg, ele_deg );
end
function get_version( obj )
%% Returns the OpenDAFF version
DAFFv17('getVersion')
end
function help( obj )
DAFFv17('help');
end end
end end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment