Untitled
unknown
python
a year ago
1.0 kB
3
Indexable
Never
from matplotlib import pyplot as plt from pysilsub import problems from pysilsub import observers from pysilsub.devices import StimulationDevice import matplotlib.pyplot as plt filepath = "/Users/hheinrichs/Documents/projects/civibe/devices/nvbl/calibration/data/20230803_scaled_spectra_0OD/20230805_scaled_spectrum_L.csv" device = StimulationDevice( calibration=filepath, calibration_wavelengths=[380, 781, 1], primary_resolutions=[100, 100, 100, 100, 100, 100], primary_colors=["blueviolet", "royalblue", "cyan", "green", "orange", "red"], name="NVBL", config=dict(calibration_units="W/m$^2$/nm"), # $\mu$W/m$^2$/nm' ) device.calibration fig = device.plot_calibration_spds_and_gamut() fig.show() fig = device.observer.plot_action_spectra(figsize=(7.08, 3)) plt.show() primary_spd = device.predict_primary_spd( primary=2, primary_input=0.5, name="Primary 2 (half power)" ) print(primary_spd) primary_spd.plot(ylabel="W/m$^2$/nm", c=device.primary_colors[2], legend=True)