Automatically run latex whenever a file changes: https://tex.stackexchange.com/questions/15342/automatically-start-the-necessary-pdflatex-runs-if-tex-has-changed-macos-x
latexmk -pdf -pvc file.tex
--- | |
title: ".txt file image compensation" | |
author: 'Vito Zanotelli et al.' | |
output: | |
html_document: | |
df_print: paged | |
keep_md: true | |
--- | |
# Aim | |
This shows how to compensate a .txt file using CATALYST |
Automatically run latex whenever a file changes: https://tex.stackexchange.com/questions/15342/automatically-start-the-necessary-pdflatex-runs-if-tex-has-changed-macos-x
latexmk -pdf -pvc file.tex
# run: conda env create -f cp318_environment.yml | |
# run: conda env update -f cp318_environment.yml | |
# activate: conda activate cellprofiler318 | |
name: cellprofiler318 | |
# in order of priority: highest (top) to lowest (bottom) | |
channels: | |
- anaconda | |
- goodman # mysql-python for mac | |
- bioconda | |
- cyclus # java-jdk for windows |
asdf |
from skimage import color | |
def cmap_to_bw(cmap, minlight = 60): | |
""" | |
Converts a hex colormap to a colormap of contrasting black and white colors. | |
Args: | |
cmap: a colormap as iterable of hex values, eg bokeh.palettes.plasma(10) | |
minlight: a threshold for the lightness | |
""" | |
cols = [tuple(int(h[i+1:i+3], 16)/256 for i in (0, 2, 4)) for h in cmap] |