From f3c716bdb9c29bc0a607c8e09fe70a7c8fff69e6 Mon Sep 17 00:00:00 2001 From: SarahPooley Date: Tue, 27 Apr 2021 13:07:59 -0600 Subject: [PATCH 1/2] committing to sarah2 --- test2.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test2.txt diff --git a/test2.txt b/test2.txt new file mode 100644 index 0000000..0a7f3e1 --- /dev/null +++ b/test2.txt @@ -0,0 +1 @@ +testing out sarah2 From 6247ed10507aa5eae8d96bca8af63ac2be727b8b Mon Sep 17 00:00:00 2001 From: SarahPooley Date: Sun, 2 May 2021 13:30:56 -0600 Subject: [PATCH 2/2] Encapsulated a section on comparison for bundle 9 --- qd_rdf.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qd_rdf.py b/qd_rdf.py index 883fce7..6d2d52e 100644 --- a/qd_rdf.py +++ b/qd_rdf.py @@ -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