Skip to content

Instantly share code, notes, and snippets.

View aasensio's full-sized avatar

Andrés Asensio Ramos aasensio

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "confirmed-childhood",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
@aasensio
aasensio / healpy_alpha.ipynb
Created April 27, 2021 08:29
Healpy alpha channel example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aasensio
aasensio / healpy_alpha.ipynb
Created April 27, 2021 08:27
healpy alpha channel example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import pandas as pd
import numpy as np
import matplotlib.pyplot as pl
from sklearn.gaussian_process import GaussianProcessRegressor
from sklearn.gaussian_process.kernels import RBF, ConstantKernel as C
from sklearn.gaussian_process.kernels import DotProduct
def calculate(which, ax):
print("Reading data...")
if (which == 0):
import napari
import numpy as np
import matplotlib.pyplot as pl
import h5py
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure
#from qtpy.QtWidgets import QApplication, QMainWindow, QPushButton, QMenu, QVBoxLayout, QSizePolicy, QMessageBox, QWidget, QPushButton
import pyqtgraph as pg
from pyqtgraph.Qt import QtGui, QtCore
import sys
@aasensio
aasensio / gist:f56a765d2e184a4e50027504dd9bc3df
Created July 18, 2017 15:05
Nearest-Neighbor Gaussian Process in Theano
import numpy as np
import matplotlib.pyplot as pl
import scipy.stats as st
import theano.tensor as tt
import theano.tensor.slinalg as sl
from ipdb import set_trace as stop
from sklearn.neighbors import NearestNeighbors
def chol_invert(A):
"""
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aasensio
aasensio / gist:5611869
Created May 20, 2013 12:09
Faraday rotation IPython Notebook
{
"metadata": {
"name": "Faraday rotation"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@aasensio
aasensio / gist:5611861
Last active December 17, 2015 12:39
Bayesian Linear Regression
{
"metadata": {
"name": "Bayesian linear regression"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{