Skip to content

Instantly share code, notes, and snippets.

View mraspaud's full-sized avatar
💭
Fixing everything

Martin Raspaud mraspaud

💭
Fixing everything
View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Martin Raspaud
# Author(s):
# Martin Raspaud <[email protected]>
# This program is free software: you can redistribute it and/or modify
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mraspaud
mraspaud / create_contributor_map.py
Created August 17, 2017 12:24 — forked from djhoese/create_contributor_map.py
Script to generate a map of PyTroll contributors
#!/usr/bin/env python3
# encoding: utf-8
import getpass
import logging
import sys
import geocoder
import numpy as np
from github import Github
from PIL import Image
@mraspaud
mraspaud / neck.py
Last active January 28, 2025 07:07
Quick and dirty python script to compute the facet sizes for shaping a guitar neck
#!/usr/bin/python
# Copyright (c) 2019.
#
# Author(s):
# Martin Raspaud <[email protected]>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@mraspaud
mraspaud / s3_olci_sand.py
Last active February 25, 2020 10:26
Sand over canaries with sentinel 3
from datetime import datetime
from satpy import Scene, find_files_and_readers
if __name__ == '__main__':
files = find_files_and_readers(start_time=datetime(2020, 2, 22, 11, 0),
end_time=datetime(2020, 2, 22, 12, 0),
base_dir="/data/Sentinel-3/",
reader='olci_l1b')
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from appdirs import AppDirs
class LutDirs:
"""Lut class."""
@mraspaud
mraspaud / create_stub_hdf5.py
Created December 2, 2020 13:12
Example on exporting hdf5 file to a python dictionary
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2019 Satpy developers
#
# This file is part of satpy.
#
# satpy is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
@mraspaud
mraspaud / sar-ice-log.py
Created March 5, 2021 11:01
Create a SAR-ICE-Log composite image and save to disk from EW, GRD Sentinel 1 data.
# Create a SAR-ICE-Log composite image and save to disk from EW, GRD Sentinel 1 data.
from datetime import datetime
from satpy.scene import Scene
from satpy import find_files_and_readers
if __name__ == '__main__':
files = find_files_and_readers(
base_dir="/data/satellite/Sentinel-1/",
# Gulf of bothnia
@mraspaud
mraspaud / remote_olci_true_color.py
Created January 9, 2023 09:41
Read olci level 1 data remotely and create a true_color image.
"""This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>.
"""
@mraspaud
mraspaud / release.sh
Last active March 17, 2023 13:46
For making pytroll releases
#!/bin/bash
set -x
# exit when any command fails
set -e
git version
gh version
main_branch=main