Skip to content

Commit

Permalink
[Easy] fix imagestack.write so that it correctly appends json suffix …
Browse files Browse the repository at this point in the history
…to experiment.json (#450)

* make actions consistent with documentation.
  • Loading branch information
ambrosejcarr authored Aug 20, 2018
1 parent ef3c72c commit 35b1a71
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions starfish/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,12 +761,12 @@ def tile_shape(self):
return self._tile_shape

def write(self, filepath: str, tile_opener=None) -> None:
"""write the image tensor to disk
"""write the image tensor to disk in spaceTx format
Parameters
----------
filepath : str
path + prefix for writing the image tensor
Path + prefix for the images and hybridization_images.json written by this function
tile_opener : TODO ttung: doc me.
"""
Expand Down Expand Up @@ -823,6 +823,8 @@ def tile_opener(tileset_path, tile, ext):
),
"wb")

if not filepath.endswith('.json'):
filepath += '.json'
Writer.write_to_path(
self._image_partition,
filepath,
Expand Down

0 comments on commit 35b1a71

Please sign in to comment.