Skip to content

Commit

Permalink
Merge pull request #34 from hayatoikoma/fix
Browse files Browse the repository at this point in the history
Fix a few minor bugs and a typo
  • Loading branch information
HazenBabcock authored Aug 14, 2018
2 parents 9778b08 + 44a90ad commit 835a5c1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions storm_analysis/diagnostics/collate.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def collateDAO(dirs, settings, calc_width_error = True):
measured_h5,
pixel_size = settings.pixel_size,
max_distance = max_distance)
if dx is not None:
if dx.size != 0:
all_dx.append([numpy.std(dx), math.sqrt(numpy.mean(dx*dx))])
all_dy.append([numpy.std(dy), math.sqrt(numpy.mean(dy*dy))])
else:
Expand Down Expand Up @@ -177,14 +177,14 @@ def collateSpliner(dirs, settings):
pixel_size = settings.pixel_size,
max_distance = max_distance)

if dx is not None:
if dx.size != 0:
all_dx.append([numpy.std(dx), math.sqrt(numpy.mean(dx*dx))])
all_dy.append([numpy.std(dy), math.sqrt(numpy.mean(dy*dy))])
all_dz.append([numpy.std(dz), math.sqrt(numpy.mean(dz*dz))])
else:
all_dx.append(0)
all_dy.append(0)
all_dz.append(0)
all_dx.append([0,0])
all_dy.append([0,0])
all_dz.append([0,0])


print()
Expand Down
2 changes: 1 addition & 1 deletion storm_analysis/diagnostics/spliner/analyze_data.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
"""
Analyze test data using Spiner
Analyze test data using Spliner
Hazen 10/17
"""
Expand Down
2 changes: 1 addition & 1 deletion storm_analysis/spliner/measure_psf_beads.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def measurePSFBeads(movie_name, zfile_name, beads_file, psf_name, aoi_size = 12,
# we don't this almost surely means something is wrong.
if (i == 0):
for j in range(samples.size):
assert(samples[i] > 0), "No data for PSF z section " + str(i)
assert(samples[j] > 0), "No data for PSF z section " + str(j)

# Normalize by the number of sample per z section.
#for j in range(samples.size):
Expand Down

0 comments on commit 835a5c1

Please sign in to comment.