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 pickle | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
from tqdm import tqdm, trange | |
from scipy.ndimage import zoom, binary_fill_holes | |
from skimage.color import label2rgb | |
from skimage.filters import sobel | |
from skimage.measure import label |
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
#Libraries | |
from pyueye import ueye | |
import numpy as np | |
import pyqtgraph as pg | |
from scipy.signal import savgol_filter | |
import warnings | |
from contextlib import contextmanager | |
class uEye_camera: | |
def __init__(self, HID=0): |
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
""" | |
Create a Blender curve from a 3D parametric function. | |
This allows for a 3D plot to be made of the function, which can be converted into a mesh. | |
I have documented the inner workings here, but if you're not interested and just want to | |
suit this to your own function, scroll down to the bottom and edit the `f(t)` function and | |
the iteration count to your liking. | |
This code has been checked to work on Blender 2.79 and Blender 2.80b. |
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/python | |
"""\ | |
3D plot of all spectra in a single 2D scan, using Blender to render surfaces. | |
Must have Blender installed. Uses bundled version of Python. | |
Requires Blender | |
Usage: | |
Unless you build Blender yourself as a stand-along package, your scripts |