Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few minor bugs and a typo #34

Merged
merged 3 commits into from
Aug 14, 2018
Merged
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
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