# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# ## Diagnostics for Pupil Function

# ### Configure environment

# +
import os
os.chdir("/home/hbabcock/Data/storm_analysis/sa_diagnostics/pupilfn")
print(os.getcwd())

import numpy
numpy.random.seed(1)
# -

import storm_analysis.diagnostics.pupilfn.settings as settings
import storm_analysis.diagnostics.pupilfn.configure as configure
import storm_analysis.diagnostics.pupilfn.make_data as makeData
import storm_analysis.diagnostics.pupilfn.analyze_data as analyzeData
import storm_analysis.diagnostics.pupilfn.collate as collate


# +
settings.photons = [[20, 500], [20, 1000]]
print(settings.photons)

settings.iterations = 20
settings.n_frames = 10
settings.peak_locations = None
# -

# ### Configure

configure.configure()

# ### Make Data

makeData.makeData()

# ### Analyze data

# %time analyzeData.analyzeData()

# ### Collate data

collate.collate()

# ### Reference results

# + active=""
# 2019-06-20
# commit 71a03cc3af8e7c197c1877cc9c781b7318ce2047
#
# Processing test_01
# Using max_distance 200.0 nm for error calcuations.
# Processing test_02
# Using max_distance 200.0 nm for error calcuations.
#
# Analysis Summary:
# Processed 2428 localizations in 5.29 seconds, 459.09/sec
# Recall 0.51984
# Noise 0.48016
# XYZ Error Standard Deviation (nm):
# test_01	37.10	36.55	61.87
# test_02	21.96	22.60	33.16
#
# XYZ RMSE Accuracy (nm):
# test_01	37.10	36.56	61.89
# test_02	21.99	22.60	33.16

StarcoderdataJupyterScriptsDedupFiltered