Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kmarkert/empiricalorthogonalfunctions.jl
Julia package for calculating Empirical Orthogonal Functions from spatiotemporal datasets.
https://github.com/kmarkert/empiricalorthogonalfunctions.jl
julia-language signal-processing spatial-temporal-data
Last synced: 3 months ago
JSON representation
Julia package for calculating Empirical Orthogonal Functions from spatiotemporal datasets.
- Host: GitHub
- URL: https://github.com/kmarkert/empiricalorthogonalfunctions.jl
- Owner: KMarkert
- License: mit
- Created: 2022-01-10T02:30:37.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-14T22:57:04.000Z (almost 3 years ago)
- Last Synced: 2024-10-11T14:41:38.749Z (3 months ago)
- Topics: julia-language, signal-processing, spatial-temporal-data
- Language: Julia
- Homepage: https://kmarkert.github.io/EmpiricalOrthogonalFunctions.jl/dev/
- Size: 4.67 MB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EmpiricalOrthogonalFunctions.jl
Julia package for calculating Empirical Orthogonal Functions from spatiotemporal datasets.This package was heavily inspired by the [`eofs` Python package](https://github.com/ajdawson/eofs) and a good amount of code was translated to Julia from this package.
## Installation
```julia
using Pkg
Pkg.add("EmpiricalOrthogonalFunctions")
```## Example
This example will highlight extracting the spatial and temporal flooding signals from a series of satellite imagery over Southeast Asia
```julia
using EmpiricalOrthogonalFunctions
using NCDatasets#load in the data
ds = NCDataset("sar_stack.nc","r");
datain = ds["VV"][:];# apply EOF
eof = EmpiricalOrthogonalFunction(datain; timedim=3)# rotate the EOFs using varimax rotations
nmodes = 4
reof = orthorotation(eof,n=nmodes)# extract out the signals
# the spatial signals are reshaped back to the original dimensions
temporalsignal = pcs(reof)
spatialsignal = reshape(eofs(reof),(size(datain)[1:2]..., nmodes))
```When plotting the first four spatial signals we will get the following plot.
![](docs/src/assets/spatialmodes.png)Below is the temporal signals corresponding to the spatial signals above
![](docs/src/assets/temporalmodes.png)