Skip to content

Commit

Permalink
Moving to v0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sjcross committed Jun 6, 2024
1 parent 2474137 commit d0259c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 25 deletions.
23 changes: 0 additions & 23 deletions kymotools/io.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
from kymotools.kymos.detect import gauss_1D, get_raw_profile
from kymotools.kymos.kymo import TrackMeasures
from lumicks import pylake
from matplotlib.colors import hsv_to_rgb
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont

import csv
import kymotools.utils.fileutils as fu
import kymotools.utils.imageutils as iu
import imageio.v3 as io
import math
import matplotlib.pyplot as plt
import numpy as np
import os
import pkg_resources
import random
import re
Expand Down Expand Up @@ -41,25 +37,6 @@ def save_kymo(kymo, output_filename, output_range=None):
metadata={"OutputRange":or_str}
)

def batch_save_kymos(input_path, output_path, output_range=None, verbose=False):
# Creating output folder (if it doesn't already exist)
os.makedirs(output_path) if not os.path.exists(output_path) else None

# Iterating over all files in the input folder
for filename in os.listdir(input_path):

# Processing all .h5 files (doesn't matter if they have 'Kymograph' in the name)
if filename.endswith(".h5"):
print("Importing "+filename)
file = pylake.File(input_path + filename)

# Getting kymographs and saving one-by-one
kymos = file.kymos
for kymo_id in kymos:
kymo = kymos.get(kymo_id)
output_filename = output_path + fu.strip_ext(filename) + "_kymo" + kymo_id + ".tiff"
save_kymo(kymo, output_filename, output_range=output_range)

def read_image(path,channel,x_range=None):
image = io.imread(path)
if len(image.shape) == 3:
Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "kymotools"
version = "0.4.0"
version = "0.4.1"
authors = [
{ name="Stephen Cross", email="[email protected]" },
]
Expand All @@ -9,7 +9,10 @@ readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">=3.8"
dependencies = [
"pylake>=0.1.0"
"matplotlib>=3.0.0",
"scipy>=1.0.0",
"tifffile>=2021.1.8",
"tqdm>=4.1.0"
]
classifiers = [
"Programming Language :: Python :: 3",
Expand Down

0 comments on commit d0259c2

Please sign in to comment.