Ejemplo n.º 1
0
files provided. All subplots share a common colorbar (in red/green/blue).

Command line arguments:
    * `files`: NPY stacks to be plotted.
    (multiple arguments possible)
"""

import numpy as np
from sys import argv
from matplotlib import pyplot as plt
from spectacle import plot, io, analyse
from spectacle.general import gaussMd

# Get the data folder from the command line
files = io.path_from_input(argv)
roots = [io.find_root_folder(path) for path in files]

# Future command line arguments
save_to = io.results_folder / "RGBG.pdf"
colorbar_label = 40 * " " + "Read noise (ADU)"

# Load Camera object
cameras = [io.load_camera(root) for root in roots]
print(f"Loaded Camera objects: {cameras}")

# Load the data
data_all = [np.load(path) for path in files]

# Demosaick the data
RGBGs_all = [camera.demosaick(data) for data, camera in zip(data_all, cameras)]
Ejemplo n.º 2
0
also included in the histogram.

Command line arguments:
    * `folders`: folders containing the Pearson r maps. These r maps should be
    NPY stacks generated using linearity_raw.py and/or linearity_jpeg.py.
    (multiple arguments possible)
"""

import numpy as np
from sys import argv
from matplotlib import pyplot as plt
from spectacle import io, linearity as lin, plot

# Get the data folder from the command line
folders = io.path_from_input(argv)
roots = [io.find_root_folder(folder) for folder in folders]
r_raw_paths = [
    root / "intermediaries/linearity/linearity_raw.npy" for root in roots
]
r_jpeg_paths = [
    root / "intermediaries/linearity/linearity_jpeg.npy" for root in roots
]
save_to = io.results_folder

# Load Camera objects
cameras = [io.load_camera(root) for root in roots]
print(f"Loaded Camera objects: {cameras}")


def load_jpeg(path):
    """
Ejemplo n.º 3
0
Command line arguments:
    * `folder`: the folder containing linearity data stacks. These should be
    NPY stacks taken at different exposure conditions, with the same ISO speed.
    (multiple arguments possible)
"""

import numpy as np
from sys import argv
from spectacle import io, plot, linearity as lin
from spectacle.general import RMS
from matplotlib import pyplot as plt

# Get the data folder from the command line
folders = io.path_from_input(argv)
roots = [io.find_root_folder(f) for f in folders]

# Load Camera objects
cameras = [io.load_camera(root) for root in roots]
print(f"Loaded Camera objects: {cameras}")

save_to = io.results_folder

# Lists to hold the data for each device
intensities_all = []
intensities_error_all = []
mean_raw_all = []
mean_jpeg_all = []

# Loop over the given folders
for folder, camera in zip(folders, cameras):