0% found this document useful (0 votes)
31 views3 pages

Python Resistivity Data Processing Module

This document contains a list of modules, classes, and methods for a Python project called ResistPy. It describes the RawData class for handling file reading and parsing of raw data. It also describes the ProcessData class for processing data and writing output files by inheriting from RawData. Additionally, it outlines the PseudoPositions class for calculating pseudo positions for data measurements based on electrode configurations.

Uploaded by

AyubUnved
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views3 pages

Python Resistivity Data Processing Module

This document contains a list of modules, classes, and methods for a Python project called ResistPy. It describes the RawData class for handling file reading and parsing of raw data. It also describes the ProcessData class for processing data and writing output files by inheriting from RawData. Additionally, it outlines the PseudoPositions class for calculating pseudo positions for data measurements based on electrode configurations.

Uploaded by

AyubUnved
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Module/Class/Method list for Python

Project
ResistPy
- Dummy file/testing file. Likely that this will end up as the main code for the GUI (Header file)

RawData

 RawData
RawData class handles file reading & parsing of raw data

o __init__

o read_file
general file reader

o electrode_positions
reads an n,x,y,z file of electrode positions. N is the electrode identifier, y and z are optional

o positions2identifers
given the electrode configuration (P+ P- C+ C-) in terms of positions and the electrode position and
identifier (as read by electrode_positions), will map the identifiers to the configuration, giving the
electrode configuration in terms of electrode identifiers

o _parse_prosys
Reads prosys data format (ASCII, space/tab separated)

o _parse_syscal
Possibly will never work (binary file, Iris won’t tell the format…)

o _parse_protocol
Reads a protocol file

ProcessData

 ProcessData
Handles processing of data and writing of data files. Inherits from RawData

o __init__

o error_from_reciprocals
Calculates the absolute error between a set of dipole dipole measurements (2d) and it’s reciprocals.

88! Need to write searching functions to find dipole dipole measurements and reciprocals!!!
o median_filter_3d
Moving average (median actually) filter which traverses the 3D ‘pseudo’ data space in a window of
size xl, yl ,zl. Within each window it can:

- calculate the median error of each set of unique configurations and reject data whose error is
above that.
- calculate the median value of each set of unique configurations and replace data whose value is
outside the median (+/- some limits) with the median value. I.E it is a smoothing filter. Useful
when there are no errors calculated for the data…

o res_filter
rejects data whose resistivity/resistance value falls outside the given limits

o error_filter
rejects data whose error falls outside the given limits

o write_protocol
Writes a protocol file. Determines from the input if it can write a 2D or 3D file (and with or without
errors, with or without data (for a fwd response))

PseudoPositions

 PseudoPositions
This class calculates pseudo positions for data measurements. It takes the electrode configuration
for each measurement (in terms of positions) as input

o __init__

o midpoints
Calculates the midpoints of each configuration as max(|AM|, |AN|, |BM|, |BN|)/2

o elec_distances
Calculates the absolute distances between P+ and C+ electrodes (AM), P+ and C- (AN), P- and C+ (BM)
and P- and C- (BN)

o has_ypos
determines whether the input configuration has y positions aswell as x positions

o has_xpos
determines whether the input configuration has x positions (i.e. was a configuration input at all!)

o pseudo_positions
The actual calculation of the pseudo positions takes place here. It calculates xf, zf and yf (if the
electrodes have y positions

o _focus_depth
Calculate the focus depth based on the 1D integrated frechet kernel
o _fr1dpp
1D integrated frechet kernel

ModelData

Plot2D

Recipes
o is_number
is the input a number? (also accounts for complex numbers)

o has_positions
Have electrode positions been read in/calculated

o has_3d_positions
Does the input have y positions aswell as x and z

o is_3d
Does the input configuration contain 3D measurements (not implemented)

o verify_column_data
given a row of column data, verifys that the number of columns do not exceed a given limit

o dist_bt_points
calculates the distance between 2 co-ordinates (x,y) as: sqrt((x1-x2)^2+(y1-y2)^2)

You might also like