Skip to content

Commit

Permalink
Update curation (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamltyson authored Feb 12, 2020
1 parent a627661 commit 9b0d5a8
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cellfinder/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "0.3.6"
__version__ = "0.3.7"
__author__ = "Adam Tyson, Christian Niedworok, Charly Rousseau"
__license__ = "GPL-3.0"
10 changes: 6 additions & 4 deletions cellfinder/train/curation.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ def main():
f"directory to: {output_directory}"
)
else:
output_directory = args.output
output_directory = Path(args.output)

ensure_directory_exists(output_directory)
ensure_directory_exists(str(output_directory))
output_filename = output_directory / OUTPUT_NAME

img_paths = get_sorted_file_paths(
Expand Down Expand Up @@ -232,9 +232,11 @@ def run_extraction(
save_empty_cubes,
):
planes_paths = {}
planes_paths[0] = get_sorted_file_paths(signal_paths, file_extension="tif")
planes_paths[0] = get_sorted_file_paths(
signal_paths, file_extension=".tif"
)
planes_paths[1] = get_sorted_file_paths(
background_paths, file_extension="tif"
background_paths, file_extension=".tif"
)

all_candidates = get_cells(str(output_filename))
Expand Down
2 changes: 1 addition & 1 deletion cellfinder/viewer/two_dimensional.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get_cell_arrays(cells_file):


def estimate_image_max(image_paths, multiplier=2):
centre_plane = int(len(image_paths)/2)
centre_plane = int(len(image_paths) / 2)
max_value = imread(image_paths[centre_plane]).max()
return int(multiplier * max_value)

Expand Down
4 changes: 4 additions & 0 deletions docs/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,10 @@ div.code-block-caption + div > div.highlight > pre {
margin-top: 0;
}

div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
}

div.code-block-caption span.caption-number {
padding: 0.1em 0.3em;
font-style: italic;
Expand Down
1 change: 1 addition & 0 deletions docs/_static/documentation_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var DOCUMENTATION_OPTIONS = {
VERSION: '',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
Expand Down
6 changes: 3 additions & 3 deletions docs/_static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ var Search = {
if (results.length) {
var item = results.pop();
var listItem = $('<li style="display:none"></li>');
if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
// dirhtml builder
var dirname = item[0] + '/';
if (dirname.match(/\/index\/$/)) {
Expand Down Expand Up @@ -424,15 +424,15 @@ var Search = {
for (j = 0; j < _files.length; j++) {
file = _files[j];
if (!(file in scoreMap))
scoreMap[file] = {}
scoreMap[file] = {};
scoreMap[file][word] = o.score;
}
});

// create the mapping
for (j = 0; j < files.length; j++) {
file = files[j];
if (file in fileMap)
if (file in fileMap && fileMap[file].indexOf(word) === -1)
fileMap[file].push(word);
else
fileMap[file] = [word];
Expand Down
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

setup(
name="cellfinder",
version="0.3.6",
version="0.3.7",
description="Cell detection for whole-brain microscopy",
install_requires=requirements,
extras_require={
Expand Down

0 comments on commit 9b0d5a8

Please sign in to comment.