Skip to content

Commit

Permalink
push for johnson
Browse files Browse the repository at this point in the history
  • Loading branch information
cudmore committed Feb 8, 2025
1 parent 5148be5 commit 9eec932
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions src/pymapmanager/interface2/core/dendrogram_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ def rePlot(self, updateHighlighter = True):

self.static_canvas.draw()


def dendrogramReplot(self, newSegmentID):
""" Recalculate all values needed to plot the dendrogram
Expand Down Expand Up @@ -1098,6 +1099,9 @@ def dendrogramReplot(self, newSegmentID):
spineY = []
savedSpineIndex = []

_numSpines = len(spineIndex)
spineX = [None] * _numSpines

for i, index in enumerate(spineIndex):
if self.spineLengthCheckbox.isChecked():
# logger.info("Spine length checked")
Expand All @@ -1109,12 +1113,19 @@ def dendrogramReplot(self, newSegmentID):
direction = spineSide[index] # need to index to get first and only value in series
savedSpineIndex.append(index)
# Determine direction
# from mapmanagercore.schemas.spine import SpineSide
# if(direction == SpineSide.Left.value):
if(direction == "Left"):
xVal = -1 * xVal
spineX.append(xVal)
# spineX.append(xVal)
# spineX.append(-1 * xVal)
elif(direction == "Right"):
spineX.append(xVal)
pass
# spineX.append(xVal)
elif (direction == 'Undefined'):
# spineX.append(np.nan)
xVal = np.nan
spineX[i] = xVal

# Calculate Y
if self.spineAngleCheckbox.isChecked():
Expand Down
2 changes: 1 addition & 1 deletion src/pymapmanager/tests/test_timeseries_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def test_single_timepoint():
print('=== after stp moveSpine() stp points[:] is now:')
print(stp.points[:])

def test_ome_zarr():
def _hide_test_ome_zarr():
path = '/Users/cudmore/Sites/MapManagerCore-Data/data/single_timepoint.ome.zarr'
logger.info(f'loading TimeSeriesCore from {path}')
tsc = TimeSeriesCore(path)
Expand Down

0 comments on commit 9eec932

Please sign in to comment.