This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef EIGEN_SVDLIBCSUPPORT_H | |
#define EIGEN_SVDLIBCSUPPORT_H | |
#include <Eigen/Sparse> | |
namespace Eigen | |
{ | |
namespace svdlib_h | |
{ | |
extern "C" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################################################## | |
# One command to edit files from the command line. Helps your muscle memory. # | |
# # | |
# Do you instinctively write `mate` or `atom` to edit files, only to get # | |
# told `command not found` because you forgot you are in a SSH session? # | |
# The `edit` script is a simple wrapper that launches the command specified # | |
# through the `$EDITOR`, `$VISUAL` or `$EDIT_EDITOR` environment variable. # | |
# In this way, you will always use the same command to start editing files. # |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#### | |
# small command line tool to get a BibTeX bibliography from ADS bibcodes | |
# | |
# $ adsbibq.py '2015A&A...580A..79T' '2016MNRAS.463.3115T' | |
# | |
# Query Results from the ADS Database | |
# | |
# Retrieved 2 abstracts, starting with number 1. Total number selected: 2. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#### | |
# list "unneccessary" installed packages (i.e. not needed by any other package) | |
# | |
# save: $ curl -Lo /usr/local/bin/brew-unnecessary https://git.io/brew-unnecessary | |
# chmod: $ chmod +x /usr/local/bin/brew-unnecessary | |
# run: $ brew unnecessary | |
#### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Module to apply window function matrix to Cls | |
Compatible with matrices generated by https://github.com/ntessore/clwin. | |
Configuration: | |
Add an entry of the form `m_<spectrum> = <matrix.fits>` for each spectrum that | |
needs to be modified. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export FC='/opt/local/bin/gfortran-mp-4.8' | |
set -e | |
mkdir lensed | |
pushd lensed | |
git clone --depth=1 https://github.com/farhanferoz/MultiNest | |
pushd MultiNest/MultiNest_v3.11_cmake/multinest | |
mkdir build | |
pushd build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# download file if not already downloaded | |
def dl(url, file=None): | |
from urllib.request import urlretrieve | |
from urllib.parse import urlparse | |
import os.path | |
if file is None: | |
file = os.path.basename(urlparse(url).path) | |
if not os.path.exists(file): | |
urlretrieve(url, file) | |
return file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from scipy.fft import rfft, irfft | |
from scipy.special import loggamma | |
# constants | |
LN_2 = np.log(2) | |
LN_10 = np.log(10) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// compute the logarithm of Bessel functions of large argument and order | |
// | |
// author: Nicolas Tessore <n.tessore@ucl.ac.uk> | |
// date: 6 Dec 2020 | |
// | |
#include <math.h> | |
// compute the Bessel function ratio J_{nu-1}(x)/J_nu(x) from a continued |
OlderNewer