Skip to content

Instantly share code, notes, and snippets.

@wtbarnes
wtbarnes / aia-prep-pipeline.py
Created June 10, 2021 13:30
Pipeline for creating aligned, level 1.5 cutouts from level 1 AIA images
"""
Process images from level 1 FITS to level 1.5 aligned cutouts in Zarr
"""
import copy
import glob
import os
import aiapy.calibrate as ac
import astropy.units as u
from astropy.coordinates import SkyCoord
@dstansby
dstansby / clean_mdi_synoptic.py
Created February 19, 2021 22:39
Cleaning MDI synoptic map metadata
self.m.meta['CTYPE1'] = 'CRLN-CEA'
self.m.meta['CTYPE2'] = 'CRLT-CEA'
self.m.meta['CDELT1'] = np.abs(self.m.meta['CDELT1'])
self.m.meta['CDELT2'] = 180 / np.pi * self.m.meta['CDELT2']
self.m.meta['CRVAL1'] = 0.0
self.m.meta['CUNIT1'] = 'deg'
self.m.meta['CUNIT2'] = 'deg'
self.m.meta['date-obs'] = parse_time(self.m.meta['t_start']).isot
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jdbrice
jdbrice / marp-example.md
Created July 13, 2020 20:48
Marp style block for custom css in preview AND export
theme _class backgroundColor marp footer tags
gaia
lead
true
Daniel Brandenburg | 07142020
<style> /* this works for export */
@wtbarnes
wtbarnes / push-to-someone-elses-pr.md
Created March 5, 2020 04:49
Brief instructions for how to modify and push to someone else's PR on github

How to Push to Someone Else's Pull Request

Let's say contributor has submitted a pull request to your (author) project (repo). They have made changes on their branch feature and have proposed to merge this into origin/master, where

origin -> https://github.com/author/repo.git

Now say you would like to make commits to their PR and push those changes. First, add their fork as a remote called

@wtbarnes
wtbarnes / .zshrc
Last active February 28, 2022 13:46
A list of applications to install on every machine and some useful install scripts and configuration files
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wtbarnes
wtbarnes / animate_map.ipynb
Created November 19, 2018 23:57
Create a matplotlib funcanimation using a SunPy Map
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.