### Install spektrafilm with pip from cloned repository Source: https://github.com/andreavolpato/spektrafilm/blob/main/README.md Clone the repository, install the package in editable mode, and run the spektrafilm command. Default install includes desktop app and LUT creator. ```bash # install the default package (desktop app + LUT creator included): git clone https://github.com/andreavolpato/spektrafilm.git cd spektrafilm pip install -e . # run spektrafilm ``` -------------------------------- ### Install package with dev dependencies and run the test suite Source: https://github.com/andreavolpato/spektrafilm/blob/main/README.md Install the package with the development dependencies and run the test suite with pytest. The command 'python -c "import sys; print(sys.version)' is not part of the source, but the provided commands are exactly as shown in the source. ```bash pip install -e "[dev]" ``` ```bash python -m pytest tests -v ``` -------------------------------- ### Install uv on Windows Source: https://github.com/andreavolpato/spektrafilm/blob/main/README.md One-time command to install uv on Windows using PowerShell. Execute only once. ```bash # ! you only need to exeucte this command the first time to install uv! powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" ``` -------------------------------- ### Install spektrafilm permanently with uv tool install Source: https://github.com/andreavolpato/spektrafilm/blob/main/README.md Install spektrafilm permanently using uv tool install, providing the spektrafilm command. Requires Python 3.13. ```bash uv tool install --python 3.13 git+https://github.com/andreavolpato/spektrafilm.git ``` -------------------------------- ### Minimal runtime API: create_params and simulate Source: https://github.com/andreavolpato/spektrafilm/blob/main/README.md Use the runtime API to create parameters for a film and print profile, then simulate an image. The example uses 'kodak_portra_400' and 'kodak_porta_endura' profiles. ```python from spektrafilm import create_params, simulate params = create_params( film_profile="kodak_portra_400", print_profile="kodak_porta_endura", ) result = simulate(image, params) ``` -------------------------------- ### Install spektrafilm in conda environment with pip Source: https://github.com/andreavolpato/spektrafilm/blob/main/README.md Install the spektrafilm package in editable mode from the repository folder. ```bash pip install -e . ``` -------------------------------- ### Run QA suite for a bundle Source: https://github.com/andreavolpato/spektrafilm/blob/main/src/spektrafilm_lut_creator/qa/README.md Builds a bundle from a BundleSpec and runs the QA suite, writing report.md, figures/*.png, and cache/*.npz to out_dir. print_index controls which LUT is tested; iterate over range(len(bundle.luts)) to QA all prints. ```python from spektrafilm_lut_creator.builders import BundleBuilder from spektrafilm_lut_creator.bundles import BundleSpec from spektrafilm_lut_creator.qa import run spec = BundleSpec(...) bundle = BundleBuilder(spec).build() results = run(spec, bundle, out_dir="qa/my_bundle", print_index=0) ``` -------------------------------- ### Minimal LUT-bake API: BundleBuilder and BundleSpec Source: https://github.com/andreavolpato/spektrafilm/blob/main/README.md Use the LUT creator API to build a LUT bundle with a 1-LUT topology, optional OCIO config and QA suite, and a special target for Lumix realtime. The output lands in build/lut_bundles//. ```python from spektrafilm_lut_creator.builders import BundleBuilder from spektrafilm_lut_creator.bundles import BundleSpec spec = BundleSpec( film_profile="kodak_portra_400", print_profiles=("kodak_porta_endura",), input_color_space="Panasonic V-Log", output_color_space="sRGB", topology="1lut", resolution=33, ocio_config=True, # opt-in: also emit a standalone OCIO 2 config qa=True, # opt-in: run the QA suite and emit report.html target="lumix_reatlime_vlog", # special .cube files for lumix realtime ) builder = BundleBuilder(spec) builder.write(builder.build()) # lands in build/lut_bundles// ``` -------------------------------- ### Command-line LUT build and discovery commands Source: https://github.com/andreavolpato/spektrafilm/blob/main/README.md Equivalent command-line usage of the LUT builder. The build command accepts color space slugs like 'vlog' and 'srgb'. The list commands discover registered profiles, input/output color spaces, and supported targets. ```bash spektrafilm-lut build \ --film kodak_portra_400 \ --print kodak_porta_endura \ --input vlog --output srgb \ --topology 1lut \ --resolution 33 \ --qa \ --ocio-config \ --out ./build/lut_bundles/ spektrafilm-lut list film # discover registered profiles spektrafilm-lut list print # discover registered profiles spektrafilm-lut list input # discover input color spaces spektrafilm-lut list output # discover output color spaces spektrafilm-lut list target # discover supported target (eg lumix realtime) ``` -------------------------------- ### Run spektrafilm from a local working copy with uvx Source: https://github.com/andreavolpato/spektrafilm/blob/main/README.md Use uvx to run spektrafilm from a local working copy. Requires Python 3.13 and includes desktop GUI and LUT-creator dependencies. ```bash uvx --python 3.13 --from /path/to/local/working_copy spektrafilm ``` -------------------------------- ### Run spektrafilm directly from Git repository with uvx Source: https://github.com/andreavolpato/spektrafilm/blob/main/README.md Use uvx to run the latest version of spektrafilm directly from the Git repository. Requires Python 3.13 and includes desktop GUI and LUT-creator dependencies. ```bash uvx --python 3.13 --from git+https://github.com/andreavolpato/spektrafilm.git spektrafilm ``` -------------------------------- ### QA module layout Source: https://github.com/andreavolpato/spektrafilm/blob/main/src/spektrafilm_lut_creator/qa/README.md Shows the module file layout for the QA suite, listing each file and its purpose. ```text qa/ __init__.py # public API result.py # Result dataclass evaluators.py # trilinear + tetrahedral LUT application reference.py # pipeline ground-truth cache patterns.py # stimulus generators (neutral ramp, Planckian, ...) metrics.py # ΔE₀₀, ΔITP, Jacobian, TV, hue rotation, ... viz.py # all plot functions (returns Figure, tests save) tests.py # the eleven test functions suite.py # QAContext + run() + markdown report emission ``` -------------------------------- ### Launch spektrafilm GUI from conda environment Source: https://github.com/andreavolpato/spektrafilm/blob/main/README.md Launch the spektrafilm GUI after activating the environment. ```bash spektrafilm ``` -------------------------------- ### Create and activate conda environment for spektrafilm Source: https://github.com/andreavolpato/spektrafilm/blob/main/README.md Create a new conda environment named spektrafilm with Python 3.13 and activate it. ```bash conda create -n spektrafilm python=3.13 conda activate spektrafilm ``` -------------------------------- ### Remove conda environment for spektrafilm Source: https://github.com/andreavolpato/spektrafilm/blob/main/README.md Remove the spektrafilm conda environment. ```bash conda env remove -n spektrafilm ``` -------------------------------- ### Regenerate regression snapshots Source: https://github.com/andreavolpato/spektrafilm/blob/main/README.md Run the script to regenerate regression snapshots when a simulation change is intentional. The snapshot files are stored as committed `.npz` files in `tests/baselines/` and are checked by `tests/test_regression_baselines.py`. Snapshot files are never updated automatically during pytest runs. ```bash python scripts/regenerate_test_baselines.py ```