Skip to content

Instantly share code, notes, and snippets.

View josePhoenix's full-sized avatar

Joseph Long josePhoenix

View GitHub Profile
require "formula"
class GalSim < Formula
homepage "https://github.com/GalSim-developers/GalSim"
url "https://github.com/GalSim-developers/GalSim/archive/v1.2.0.tar.gz"
sha1 "0437b4a55c6a73ad547e5e0ff3643bc0d26134c6"
head "https://github.com/GalSim-developers/GalSim.git"
depends_on "scons" => :build
depends_on "fftw"
require "formula"
class GalSim < Formula
desc "A modular galaxy image simulation toolkit"
homepage "https://github.com/GalSim-developers/GalSim"
url "https://github.com/GalSim-developers/GalSim/archive/v1.3.0.tar.gz"
sha256 "4afd3284adfd12845b045ea3c8e293b63057c7da57872bc9eecd005cf0a763c0"
head "https://github.com/GalSim-developers/GalSim.git"
depends_on "scons" => :build
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
protable = Table[{r, N[Re[SpheroidalS1[0, 0, \[Pi], r]]]}, {r, -5, 5, 0.01}]
Export["SpheroidalS1_0_0_pi.csv", protable, "CSV"]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import sys
import multiprocessing
import logging
import logging.handlers
import datetime
import time
import random
N_PROCESSES = 32
import numpy as np
from bokeh.io import vform
from bokeh.models import CustomJS, ColumnDataSource, Slider
from bokeh.plotting import figure, output_file, show
output_file("callback.html")
orig_x, orig_y = np.arange(100), np.random.rand(100)
x, y = orig_x.copy(), orig_y.copy()
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import AxesGrid
def get_demo_image():
import numpy as np
from matplotlib.cbook import get_sample_data
f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False)
z = np.load(f)
# z is a numpy array of 15x15
return z, (-3, 4, -4, 3)