mirror of
https://github.com/Athemis/PyDSF.git
synced 2025-07-03 02:31:08 +00:00
Move Instrument specific code to class (WIP)
This commit is contained in:
parent
71c25f902b
commit
5e275d57e5
4 changed files with 79 additions and 48 deletions
31
instruments/analytikJenaqTower2.py
Normal file
31
instruments/analytikJenaqTower2.py
Normal file
|
@ -0,0 +1,31 @@
|
|||
#! /usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import csv
|
||||
import numpy as np
|
||||
|
||||
|
||||
class AnalytikJenaqTower2:
|
||||
|
||||
def __init__(self):
|
||||
self.name = "Analytik Jena qTower 2.0/2.2"
|
||||
self.providesTempRange = False
|
||||
self.providesDeltaT = False
|
||||
|
||||
def loadData(self, filename, reads, wells):
|
||||
with open(filename, 'r') as f:
|
||||
reader = csv.reader(f, delimiter=';', quoting=csv.QUOTE_NONE)
|
||||
i = 0
|
||||
for row in reader:
|
||||
temp = np.zeros(reads, dtype=float)
|
||||
for read in range(reads + 1):
|
||||
if read > 0:
|
||||
try:
|
||||
temp[read - 1] = row[read]
|
||||
except (IndexError, ValueError):
|
||||
temp[read - 1] = 0.0
|
||||
elif read == 0:
|
||||
wells[i].name = row[read]
|
||||
wells[i].raw = temp
|
||||
i += 1
|
||||
return wells
|
Loading…
Add table
Add a link
Reference in a new issue