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

BlueFors: make driver compatible with old and new log files #239

Merged
Merged
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
8 changes: 6 additions & 2 deletions qcodes_contrib_drivers/drivers/BlueFors/BlueFors.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,12 @@ def get_temperature(self, channel: int) -> float:
names = ['date', 'time', 'y'],
header = None)

# There is no space before the day with BlueFors Control Software v2.2
df.index = pd.to_datetime(df['date']+'-'+df['time'], format='%d-%m-%y-%H:%M:%S')
try:
# There is a space before the day for old BlueFors Control Sofware versions
df.index = pd.to_datetime(df['date']+'-'+df['time'], format=' %d-%m-%y-%H:%M:%S')
except:
# There is no space before the day with BlueFors Control Software v2.2
df.index = pd.to_datetime(df['date']+'-'+df['time'], format='%d-%m-%y-%H:%M:%S')

return df.iloc[-1]['y']
except (PermissionError, OSError) as err:
Expand Down