Skip to content

Instantly share code, notes, and snippets.

from dataclasses import dataclass
import re
from typing import Generator
from lxml import objectify
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.collections import PatchCollection
import numpy as np
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@taoning
taoning / rcontrib_pass.ipynb
Last active July 13, 2022 06:57
Do "pass" style annual simulation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@taoning
taoning / get_pgii_tdd.py
Created June 30, 2022 05:29
Compute integration from goniophotometer measurements.
import argparse
import glob
import numpy as np
import scipy.spatial
def trapezoidal_area(xyz):
"""Calculate volume under a surface defined by irregularly spaced points
using delaunay triangulation. "x,y,z" is a <numpoints x 3> shaped ndarray."""
grid = scipy.spatial.Delaunay(xyz[:,:2])
@taoning
taoning / visualize_anisotropic_tensor_tree.ipynb
Created March 28, 2022 18:11
Visualize anisotropic tensor tree data, in two ways
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@taoning
taoning / PlotSpatialDaylightAutonomy.ipynb
Last active September 16, 2021 21:21
Plot Spatial Daylight Autonomy
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.