slippy.surface.read_surface¶
- slippy.surface.read_surface(file_name, **kwargs)[source]¶
Read a surface from a file
- Parameters
file_name (str) – The full path to the data file
delim (str optional (',')) – The delimiter used in the data file, only needed for csv or txt files
p_name (str optional ('profile')) – The name of the variable containing the profile data, needed if a .mat file is given
gs_name (str optional ('grid_spacing')) – The name of the variable containing the grid_spacing, needed if a .mat file is given
- Return type
A surface object generated from the file
See also
Surface,alicona_read,scipy.io.loadmatNotes
This function directly invokes the surface class, any other keywords that can be passed to that class can be passed to this function
Examples
>>> # Read a csv file with tab delimiters >>> my_surface=read_surface('data.csv', delim=' ')
>>> # Read a .al3d file >>> my_surface=read_surface('data.al3d')
>>> # Read a .mat file with variables called prof and gs >>> my_surface=read_surface('data.mat', p_name='prof', gs_name='gs')