import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt import numpy as np from pyfpm.fpmmath import * import pyfpm.data as dt from pyfpm.data import save_yaml_metadata import pyfpm.local as local from pyfpm.coordinates import PlatformCoordinates # Simulation parameters CONFIG_FILE = '/home/lec/pyfpm/config.yaml' cfg = dt.load_config(CONFIG_FILE) client = local.SimClient(cfg=cfg) iterator = set_iterator(cfg) # pc = PlatformCoordinates(theta=0, phi=0, height=cfg.sample_height, cfg=cfg) image_dict = dict() fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(25, 15)) fig.show() for index, theta, phi in iterator: # pupil = generate_pupil(theta, phi, power, cfg.video_size, # cfg.wavelength, cfg.pixel_size, cfg.objective_na) pc.set_coordinates(theta=theta, phi=phi, units='degrees') t_corr, p_corr = pc.source_coordinates(mode='angular')
import os import serial import time import yaml from io import BytesIO # import picamera import numpy as np from . import camera from rgbmatrix import RGBMatrix, RGBMatrixOptions import pyfpm.data as dt import pyfpm.fpmmath as fpmm # from pyfpm.cordinates import PlatformCoordinates cfg = dt.load_config() class LedMatrixRGB(object): """ Gives interface for the 3D. """ def __init__(self, nx=None, ny=None, color=None, power=0): self.matrix_opts = RGBMatrixOptions() self.set_power(0) self.nx = nx self.ny = ny self.set_options() def set_options(self): self.matrix_opts.rows = 32 self.matrix_opts.chain_length = 1