Skip to content

Instantly share code, notes, and snippets.

View ycopin's full-sized avatar

Yannick Copin ycopin

View GitHub Profile
@ycopin
ycopin / Isothermes_vdWaals.svg
Created November 15, 2020 20:18
Isothermes de van der Waals
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ycopin
ycopin / restride.py
Created May 22, 2020 08:51
Rebin ND-array using stride tricks.
# Copyright: This document has been placed in the public domain.
__author__ = "Yannick Copin <yannick.copin@laposte.net>"
import numpy as N
def restride(arr, binfactor, squeezed=True, flattened=False):
"""
Rebin ND-array `arr` by `binfactor`.
@ycopin
ycopin / GD71_07_253_090_B.txt
Created April 19, 2017 15:41
Simulation of seeing in large telescopes (D>>r0), tested against SNfactory ad-hoc PSF models.
# lbda: 4327A
# radius[spx] flux
0.716608613055 12.3552
0.745272338424 11.5852
0.745343175736 11.7769
0.834997936881 10.4475
1.55358944456 4.54829
1.57210666273 4.74318
1.61169010512 4.2645
1.68493686848 3.5319
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ycopin
ycopin / interneuclid.cls
Last active February 9, 2022 20:20
XeLaTeX template for Euclid Internal Notes.
% Time-stamp: <2015-04-14 22:08:01 ycopin>
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{interneuclid}[2015/04/09 Euclid Internal Note Class]
% All options are passed to article class
\LoadClassWithOptions{article}
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Time-stamp: <2015-04-07 18:58:52 ycopin>
from __future__ import division, print_function
"""
Gauss-Hermite line profile.
"""
@ycopin
ycopin / exitLogger.py
Created March 30, 2015 13:22
Example of implicit logging management.
#!/usr/bin/env python
# Time-stamp: <2015-03-30 15:21:15 ycopin>
from __future__ import division, print_function
"""
Example of implicit logging management.
"""
import sys, atexit, traceback
@ycopin
ycopin / euclidator.py
Last active September 21, 2022 09:52
Euclid Acronym Translator.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
EUCLID Acronym translaTOR.
DEPRECATED: official repo is now https://gitlab.euclid-sgs.uk/ycopin/euclidator,
with a shiny web interface at http://ycopin.pages.euclid-sgs.uk/euclidator/
"""
@ycopin
ycopin / bug_hammer.py
Created February 22, 2013 11:05
Test script for matplotlib.basemap issues #100 and #101
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Time-stamp: <2013-02-22 12:00:07 ycopin>
import numpy as N
import matplotlib.pyplot as P
from mpl_toolkits.basemap import Basemap
xs = N.linspace(0,30,5)
ys = N.linspace(20,50,5)