Compare commits
No commits in common. "2bfedf54ad34b070e44203d6c29b63193dca4f6f" and "0c7108b3ec5f0f69b56e6e91c9a2fcbc5728fa12" have entirely different histories.
2bfedf54ad
...
0c7108b3ec
@ -15,8 +15,7 @@ def getImageFilePath(imageIndex):
|
||||
|
||||
def getImageColorChannel(imageIndex, color):
|
||||
imageFilePath = getImageFilePath(imageIndex)
|
||||
colorChannel = getColorChannel(imageFilePath, color)
|
||||
return colorChannel
|
||||
return getColorChannel(imageFilePath, color)
|
||||
|
||||
def crop(image, interestingPosition, yRange, xRange):
|
||||
return image[interestingPosition[0] - yRange: interestingPosition[0] + yRange, interestingPosition[1] - xRange: interestingPosition[1] + xRange]
|
||||
|
@ -31,13 +31,11 @@ for axis in Axis:
|
||||
axisProfile = PROFILES_OF_AXES[axis]
|
||||
colorsOfAxes[axis] = plt.plot(axisProfile, label = axis)[0].get_color()
|
||||
|
||||
'''
|
||||
for axis in Axis:
|
||||
for interestingValueOfAxisIndex, interestingValueOfAxis in enumerate(INTERESTING_VALUES_OF_AXES[axis]):
|
||||
linestyle = ':' if interestingValueOfAxisIndex % 2 == 0 else '--'
|
||||
label = f'{axis} local {"minimum" if interestingValueOfAxisIndex == 0 else "maximum"}' if interestingValueOfAxisIndex <= 1 else None
|
||||
plt.axvline(interestingValueOfAxis, color = colorsOfAxes[axis], alpha = 0.3, linestyle = linestyle, label = label)
|
||||
'''
|
||||
|
||||
def flattenDictValues(dict_):
|
||||
return itertools.chain(*dict_.values())
|
||||
@ -45,7 +43,6 @@ def flattenDictValues(dict_):
|
||||
# TODO: How to avoid hardcoding the default color being `black`?
|
||||
MATPLOTLIB_DEFAULT_COLOR = 'black'
|
||||
|
||||
'''
|
||||
allInterestingValuesOfAxes = list(set(flattenDictValues(INTERESTING_VALUES_OF_AXES)))
|
||||
ticks = list(plt.xticks()[0]) + allInterestingValuesOfAxes
|
||||
plt.xticks(ticks)
|
||||
@ -65,7 +62,6 @@ allInterestingIntensitiesOfAxes = list(flattenDictValues(INTERESTING_PROFILES_OF
|
||||
allInterestingIntensitiesOfAxesMin = min(allInterestingIntensitiesOfAxes)
|
||||
allInterestingIntensitiesOfAxesMax = max(allInterestingIntensitiesOfAxes)
|
||||
plt.ylim(allInterestingIntensitiesOfAxesMin, allInterestingIntensitiesOfAxesMax)
|
||||
'''
|
||||
|
||||
plt.legend()
|
||||
plt.show()
|
Loading…
Reference in New Issue
Block a user