Giter Club home page Giter Club logo

swotmodule_jax's Introduction

SWOTmodule_JAX

Introduction

This repository contains a Python implementation of a denoising algorithm for Sea Surface Height (SSH) data, particularly from SWOT (Surface Water and Ocean Topography) satellite observations. The algorithm uses the LBFGS optimization method to minimize a cost function that includes Laplacian and third-order regularization terms. This method helps to remove noise from SSH images, improving data quality for further analysis.

Requirements

To run the code, you need the following Python libraries:

  • jax
  • jax.numpy
  • jaxopt
  • pandas
  • matplotlib
  • netCDF4
  • xarray

You can install these libraries using pip:

pip install jax jaxopt pandas matplotlib netCDF4 xarray

Usage

Import Packages: The code begins with importing necessary packages for computation, data manipulation, and visualization.

Reading Data: The read_data function reads SSH data from a NetCDF file. This function requires the filename and the variables to be read as input arguments.

Adding Noise: The add_gaussian_noise function adds Gaussian noise to the original SSH image to simulate noisy observations.

Computing Derivatives and Laplacian:

  • derivative function computes partial derivatives using a second-order centered scheme.
  • gradient function computes the gradient of the input field.
  • laplacian function computes the Laplacian of the input field.
  • third_order_terms function calculates third-order terms inspired by the Quasi-Geostrophic model.

Cost Functions:

  • cost_function calculates the cost function with Laplacian regularization.
  • cost_function_third_order_terms calculates the cost function with both Laplacian and third-order regularization terms.

RMSE Calculation: The rmse function computes the Root Mean Square Error (RMSE) between two images.

Plotting: The splot function visualizes the SSH data, providing options to plot the

swotmodule_jax's People

Contributors

arbaz-khalid avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.