Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion qd_rdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,18 @@ def get_dots(file,microns=2,compare=False,size=2,spacing=5):
i1 = filters.gaussian(image,sigma=.7)
i1 = ndimage.maximum_filter(i1,size=size,mode='constant')
coordinates = peak_local_max(i1, min_distance=spacing,indices=False)

# Encapsulated the comparison section, as it is not specific to a particular file -@s-e-pooley
def comparison():
if compare:
io.imshow(image -coordinates)
label_img = measure.label(coordinates)
centroids = []
for region in measure.regionprops(label_img):
centroids.append(region.centroid)
# converting from image pixel coordinates to actual physical coordinates


# converting from image pixel coordinates to actual physical coordinates
scaled = microns*np.asarray(centroids)/image.shape - [microns/2,microns/2]
# by subtracting the center of the image, we are dictating new origin
# center of the image now in cartesin coordinate system
Expand Down
1 change: 1 addition & 0 deletions test2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
testing out sarah2