%
% DESCRIPTION: Program to create the Ray Tracing Angles file in the Matlab format.
%
% [TimeZone] and [Description] have text format so the values give in ''


clear;clc;
[FormatName] = 'GDF';
[FormatVersion] = 2.1;
[CRS] = 'n/a'%['EPSG:' num2str(input('[CRS] EPSG code (just number) = '))];
[TimeZone] = 'UTC';%input('TimeZone (char) = ');
[Description] = 'Description of dataset'; %input('Description of data (char) = ');

[FieldDescription] = {
    'Epicentral_distance','Distance from event to point'
    'Depth','Depth below elevation'
    'Vp','Velocity of P wave'
    'Distance','Raypath distance'
    'Take_off_angle','Take-off angle'
    'Incidence_angle','Incidence angle'
    };
[FieldType] = {
    'Epicentral_distance',24
    'Depth',34
    'Vp',14
    'Distance',24
    'Take_off_angle',34
    'Incidence_angle',24
    };
[FieldUnit] = {
    'Epicentral_distance','m'
    'Depth','m'
    'Vp','m/s'
    'Distance','m'
    'Take_off_angle','angle'
    'Incidence_angle','angle'
    };
[d] = struct();


d.Epicentral_distance=[1;1;1;1;1];
d.Depth=[0.1000;0.2000;0.3000;0.4000;0.5000];
d.Vp=[2.5000;2.5000;4.4000;4.4000;6.1000];
d.Distance=[1.0050;1.0200;1.0440;1.0770;1.1180];
d.Take_off_angle=[95.7100;101.3000;106.7000;111.8000;116.6000];
d.Incidence_angle=[84.2800;78.6900;73.3000;68.1900;63.4300];
 
 
clear k 
save('GDF_EpisodeName_Ray_Tracing_Angles_example.mat')
