Skip to content
Snippets Groups Projects
Commit d5663e42 authored by Coda Phillips's avatar Coda Phillips
Browse files

Add algorithm_version

parent 72ea95f9
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ from tempfile import mkstemp
from shutil import move
from datetime import datetime
from aeri_qc.igm_checks import spike_check
from aeri_qc import bomem_file
def save_quality(frame, qc_path, checklist):
"""
......@@ -24,6 +25,7 @@ def save_quality(frame, qc_path, checklist):
handle, temp = mkstemp()
os.close(handle)
ncdf = netCDF4.Dataset(temp, 'w')
ncdf.algorithm_version = '0.1.0'
ncdf.createDimension('time', len(frame))
time = ncdf.createVariable('time', 'f8', ('time',))
time.units = 'nanoseconds since 1970-01-01 00:00:00'
......@@ -125,14 +127,15 @@ def read_igms(spc_zip_path):
# Read the data
with spc_zip.open(name) as igm:
inS = BytesIO(igm.read())
for index, subfile in enumerate(read_stream(inS)):
for index, subfile in enumerate(bomem_file.read_stream(inS)):
# yield row
yield {
'datetime':datetime.utcfromtimestamp(subfile['UTCTime']),
'DataA':subfile['DataA'].squeeze(),
'DataB':subfile['DataB'].squeeze(),
'sceneMirrorPosition':ord(name[0]),
'subfile':index
'subfile':index,
'scene_index':re.search('[A-Z]([0-9]+)M_[0-9]{8}_[0-9]{6}_.*[.]Igm', name).group(1)
}
def check_frame(frame, parameters, checklist):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment