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

frankie_edits_pickled_data #25

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/tests/test_data
/tests/test_data/13112023_MW2_FF
*.pyc
*.DS_Store
*__pycache__*
Binary file added tests/test_data/tr_after.pkl
Binary file not shown.
Binary file added tests/test_data/tr_before.pkl
Binary file not shown.
18 changes: 8 additions & 10 deletions tests/test_herg_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import string
import unittest
import pickle

import numpy as np
from syncropatch_export.trace import Trace
Expand All @@ -11,25 +12,22 @@

class TestHergQC(unittest.TestCase):
def setUp(self):
filepath = os.path.join('tests', 'test_data', '13112023_MW2_FF',
'staircaseramp (2)_2kHz_15.01.07')
filepath = os.path.join('tests', 'test_data')

self.all_wells = [
lab + str(i).zfill(2) for lab in string.ascii_uppercase[:16]
for i in range(1, 25)]

filepath2 = os.path.join('tests', 'test_data', '13112023_MW2_FF',
'staircaseramp (2)_2kHz_15.11.33')

json_file = "staircaseramp (2)_2kHz_15.01.07"
json_file2 = "staircaseramp (2)_2kHz_15.11.33"

self.output_dir = os.path.join('test_output', 'test_herg_qc')

if not os.path.exists(self.output_dir):
os.makedirs(self.output_dir)
self.test_trace_before = Trace(filepath, json_file)
self.test_trace_after = Trace(filepath2, json_file2)

with open(f'{filepath}/tr_before.pkl', 'rb') as f:
self.test_trace_before = pickle.load(f)

with open(f'{filepath}/tr_after.pkl', 'rb') as f:
self.test_trace_after = pickle.load(f)

def test_run_qc(self):
tr_before = self.test_trace_before
Expand Down
Loading