Skip to content

Instantly share code, notes, and snippets.

'''drillerslog2wellcad.py - convert GD logs to WellCAD formats
This script converts drillers logs (also in the future lithological,
hydrostratigraphic, and stratigraphic) from the Groundwater Data (GD) section of
the WaterConnect website into formats suitable for direct import into
WellCAD software.
Usage is pretty straightforward. The easiest way is to download the CSV file
from GD, which produces a file by default called ``WellDownload.csv``. Then run
this script in that folder, and it will produce a file titled
@kinverarity1
kinverarity1 / mem.py
Last active July 23, 2017 07:08
benchmarking lasio for speed and memory usage
from ctypes import *
from ctypes.wintypes import *
from collections import namedtuple
__all__ = ['query_working_set', 'working_set_size']
kernel32 = WinDLL('kernel32', use_last_error=True)
psapi = WinDLL('psapi', use_last_error=True)
PROCESS_VM_READ = 0x0010
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kinverarity1
kinverarity1 / geophysical_logger.ino
Last active January 12, 2017 10:16
geophysical logger code for Ardunio Uno
#include <AltSoftSerial.h>
/*
Arduino geophysical logger
v1 2016-09-30 17:00
Arduino hardware setup:
Pin 8 - wire to RS232 Shield RXD pin on left side
Pin 9 - wire to RS232 Shield TXD pin on left side
~Version Information
VERS. 1.20: CWLS log ASCII Standard - version 1.20
WRAP. NO: one line per depth step
~Well Information
#MNEM.UNIT Data Type Information
#_________ _________ ________________________
STRT.M 0.000:
STOP.M 120.000:
STEP.M 0.050:
NULL. -0.0:
@kinverarity1
kinverarity1 / rotary_encoder.ino
Last active March 30, 2021 16:08
Read incremental rotary encoder (optical) using Arduino Uno
/*
Read optical incremental rotary encoder output.
Serial output columns:
1. Absolute encoder position (pulses, integer)
2. Change in encoder position (pulses, integer)
3. Time since Arduino start in (microseconds, integer)
4. Change in time (microseconds, integer)
5. Speed (pulses per second, float)
@kinverarity1
kinverarity1 / Break up unit numbers for searching WaterConnect.ipynb
Created August 6, 2015 09:04
Break up unit numbers for searching WaterConnect
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kinverarity1
kinverarity1 / qt.py
Last active August 29, 2015 14:01
Wrappers for common Qt tasks.
import logging
import os
# Choose which library to use.
QT_LIBRARY = 'PySide'
if QT_LIBRARY == 'PySide':
from PySide import QtGui, QtCore
elif QT_LIBRARY == 'PyQt4':
from PyQt4 import QtGui, QtCore
from __future__ import print_function
import matplotlib.pyplot as plt
import bhlogging
inch2mm = lambda x: x * 25.4
mm2inch = lambda x: x / 25.4
fig_size = (8, 10)