Skip to content
Snippets Groups Projects
Commit 456e8533 authored by William Roberts's avatar William Roberts
Browse files

Update from aeri_docker 64bit

parent 9284fb48
No related branches found
Tags m64_r20200630
No related merge requests found
......@@ -29,7 +29,7 @@ def save_quality(frame, qc_path, checklist):
Save the DataFrame (frame) to a netCDF at (qc_path)
"""
# First select only rows corresponding to records from the sum file
frame = frame.ix[pd.notnull(frame.sum_index)].set_index('sum_index').sort_index()
frame = frame.loc[pd.notnull(frame.sum_index)].set_index('sum_index').sort_index()
# Define the netcdf
handle, temp = mkstemp()
......@@ -185,7 +185,7 @@ def read_frame(cxs_file, sum_file):
# Fill in any missing scenesMirrorPositions
cxs['sceneMirrorPosition'] = fill_na_sceneMirrorPosition(cxs.sceneMirrorPosition)
# Find all non-calibration views
non_cal_records = cxs.ix[~cxs.sceneMirrorPosition.isin([ord('H'), ord('A')])].copy()
non_cal_records = cxs.loc[~cxs.sceneMirrorPosition.isin([ord('H'), ord('A')])].copy()
non_cal_records.reset_index(inplace=True)
non_cal_records.index.name = 'sum_index'
......@@ -197,7 +197,7 @@ def read_frame(cxs_file, sum_file):
# Combine extra data from SUM into CXS
# also non_cal_records may have a different number of records than the sum, so limit by the sum
non_cal_records = non_cal_records.combine_first(sum_).ix[sum_.index]
non_cal_records = non_cal_records.combine_first(sum_).loc[sum_.index]
hk = cxs.combine_first(non_cal_records.reset_index().set_index('cxs_index')).reset_index()
with warnings.catch_warnings():
warnings.simplefilter('ignore')
......
......@@ -45,7 +45,7 @@ def hbb_stable_check(frame, parameters):
Check that the HBB temperature does not change faster than 0.002 K/s
"""
# convert changes in datetime from nanoseconds to seconds
interval_seconds = frame['datetime'].diff().astype(np.int64) / 1e9
interval_seconds = frame['datetime'].diff().dropna().astype(np.int64) / 1e9
# calculate change in temp/seconds
hbbb_diff = frame['HBBbottomTemp'].diff() / interval_seconds
hbba_diff = frame['HBBapexTemp'].diff() / interval_seconds
......
#!/usr/bin/env python3
import argparse
import os
import time
......
#!/usr/bin/env python3
import numpy as np
np.seterr(all='raise')
......
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