Skip to content

Useful functions I developed to perform some tasks during my PhD

License

Notifications You must be signed in to change notification settings

frbione/useful_functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Useful functions

This is a set of useful functions developed by frbione in order to automate some tasks during his PhD thesis development.

bathy_extractor

extract_from_tif

This function can sample Z-values from paleobathymetric maps (rasters), based on time-varying point coordinates, which are input from .csv points files. The rasters + points set derives from plate tectonics kinematic models, such as GPlates or pyGplates.

Important instructions
Raster files:

  • Can be in .tif or .grd formats
  • Must be named according to the corresponding age. e.g., for 100 Ma: 100.tif

Point coordinates:

  • Must be in .csv format
  • Each .csv file must correspond to a unique well/point with a time-varying location
  • Each .csv file must be named according to the well/point name. e.g., well_X.csv | X.csv | etc.
  • Each .csv file must contain at least 3 columns: 'Time (Ma)' | 'Lat' | 'Lon'
  • The column 'Time (Ma)' will be used to associate the correspondent coordinates to the raster of the same age

PS: It is extremely recommended that both rasters and sampling points had been created using the same plate rotation model.
PS2: It is not necessary to have all the rasters-equivalent ages in each point or vice-versa.



grd_maker

xyz_to_grd

This function can convert tabular XYZ data from .txt or .csv files to grid text file format (.grd). Example here.

Important instructions
XYZ files:

  • Can be in .txt or .csv formats
  • Must be tab '\t' separated, but this can be changed in the original function for comma-separated files
  • This function only converts the file, it does not resize or reshape the original grid.

About

Useful functions I developed to perform some tasks during my PhD

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages