2
2
# this is ProfileProcessing.jl
3
3
# It contains functions and type definitions to gather selected data for given profiles
4
4
5
- export ProfileData, extract_profile_data , create_ProfileData, GMG_Dataset, load_dataset_file, combine_vol_data
6
- export extract_profile_data !, read_picked_profiles
5
+ export ProfileData, extract_ProfileData , create_ProfileData, GMG_Dataset, load_dataset_file, combine_vol_data
6
+ export extract_ProfileData !, read_picked_profiles
7
7
import Base: show
8
8
9
9
"""
@@ -348,11 +348,11 @@ end
348
348
349
349
350
350
"""
351
- extract_profile_data !(Profile::ProfileData,VolData::GeoData, SurfData::NamedTuple, PointData::NamedTuple; DimsVolCross=(100,100),Depth_extent=nothing,DimsSurfCross=(100,),section_width=50)
351
+ extract_ProfileData !(Profile::ProfileData,VolData::GeoData, SurfData::NamedTuple, PointData::NamedTuple; DimsVolCross=(100,100),Depth_extent=nothing,DimsSurfCross=(100,),section_width=50)
352
352
353
353
Extracts data along a vertical or horizontal profile
354
354
"""
355
- function extract_profile_data ! (Profile:: ProfileData ,VolData:: Union{Nothing,GeoData} = nothing , SurfData:: NamedTuple = NamedTuple (), PointData:: NamedTuple = NamedTuple (); DimsVolCross= (100 ,100 ),Depth_extent= nothing ,DimsSurfCross= (100 ,),section_width= 50 km)
355
+ function extract_ProfileData ! (Profile:: ProfileData ,VolData:: Union{Nothing,GeoData} = nothing , SurfData:: NamedTuple = NamedTuple (), PointData:: NamedTuple = NamedTuple (); DimsVolCross= (100 ,100 ),Depth_extent= nothing ,DimsSurfCross= (100 ,),section_width= 50 km)
356
356
357
357
if ! isnothing (VolData)
358
358
create_profile_volume! (Profile, VolData; DimsVolCross= DimsVolCross, Depth_extent= Depth_extent)
@@ -383,11 +383,11 @@ end
383
383
384
384
# this is mostly for backwards compatibility
385
385
"""
386
- extract_profile_data (ProfileCoordFile::String,ProfileNumber::Int64,DataSetFile::String; DimsVolCross=(100,100),DepthVol=nothing,DimsSurfCross=(100,),WidthPointProfile=50km)
386
+ extract_ProfileData (ProfileCoordFile::String,ProfileNumber::Int64,DataSetFile::String; DimsVolCross=(100,100),DepthVol=nothing,DimsSurfCross=(100,),WidthPointProfile=50km)
387
387
388
388
This is a convenience function (mostly for backwards compatibility with the MATLAB GUI) that loads the data from file & projects it onto a profile
389
389
"""
390
- function extract_profile_data (ProfileCoordFile:: String ,ProfileNumber:: Int64 ,DataSetFile:: String ; DimsVolCross= (100 ,100 ),DepthVol= nothing ,DimsSurfCross= (100 ,),WidthPointProfile= 50 km)
390
+ function extract_ProfileData (ProfileCoordFile:: String ,ProfileNumber:: Int64 ,DataSetFile:: String ; DimsVolCross= (100 ,100 ),DepthVol= nothing ,DimsSurfCross= (100 ,),WidthPointProfile= 50 km)
391
391
392
392
# read profile
393
393
profile_list = read_picked_profiles (ProfileCoordFile)
@@ -408,7 +408,7 @@ function extract_profile_data(ProfileCoordFile::String,ProfileNumber::Int64,Data
408
408
VolData_combined = combine_vol_data (VolData)
409
409
410
410
# project data onto profile:
411
- extract_profile_data ! (profile, VolData_combined, SurfData, PointData,
411
+ extract_ProfileData ! (profile, VolData_combined, SurfData, PointData,
412
412
DimsVolCross= DimsVolCross, DimsSurfCross= DimsSurfCross,
413
413
Depth_extent= DepthVol, section_width= WidthPointProfile)
414
414
420
420
421
421
# Boris: I don't know exactly in which format you have your current files;
422
422
### wrapper function to extract data for a single profile
423
- function extract_profile_data (ProfileCoordFile,ProfileNumber,DataSetName,DataSetFile,DataSetType,DimsVolCross,DepthVol,DimsSurfCross,WidthPointProfile)
423
+ function extract_ProfileData (ProfileCoordFile,ProfileNumber,DataSetName,DataSetFile,DataSetType,DimsVolCross,DepthVol,DimsSurfCross,WidthPointProfile)
424
424
425
425
# start and end points are saved in a text file
426
426
profile_data = readdlm(ProfileCoordFile,skipstart=1,',')
@@ -479,7 +479,7 @@ function create_ProfileData(file_profiles,file_datasets;Depth_extent=(-300,0),Di
479
479
for iprofile = 1:length(ProfileNumber)
480
480
481
481
# 2. process the profiles
482
- ExtractedData = extract_profile_data (file_profiles,ProfileNumber[iprofile],DataSetName,DataSetFile,DataSetType,DimsVolCross,Depth_extent,DimsSurfCross,WidthPointProfile)
482
+ ExtractedData = extract_ProfileData (file_profiles,ProfileNumber[iprofile],DataSetName,DataSetFile,DataSetType,DimsVolCross,Depth_extent,DimsSurfCross,WidthPointProfile)
483
483
484
484
# 3. save data as JLD2
485
485
fn = "Profile"*string(ProfileNumber[iprofile])
0 commit comments