Skip to main content

imlresi

Tools for dealing with IML-Resi PowerDrill data using python.

THIS PACKAGE IS UNOFFICAL AND HAS BEEN DEVELOPED INDEPENDENT OF IML

Current limitations:

  1. Focus is on actual measurements made by the tool rather than meta-info.
  2. Poor support for data generated in PD-Tools (e.g. "assessments").

Install

https://pypi.org/project/imlresi/

pip install imlresi

Optional extras:

extra for
imlresi[delta] Delta Lake export with the pure-Python delta-rs engine
imlresi[spark] Delta Lake export through PySpark (e.g. Microsoft Fabric notebooks)
imlresi[plot] Trace.plot()
imlresi[test] running the test suite

Use

Traces

Trace reads a single measurement in any of IML's formats: binary .rgp (firmware up to 1.32), JSON .rgp (later firmware), .pdc (IML's iPad app) and the two PD-Tools text exports.

from imlresi import Trace

tr = Trace()
tr.read('trace.rgp')
tr.drill, tr.feed            # drill and feed amplitude profiles
tr.get_drilltime()           # instrument clock time
tr.get_latlon()              # from a .pdc location stamp
tr.to_json()                 # as IML's JSON trace format
tr.hash()                    # md5 of to_json(), e.g. as a database key

Trace.process_using_resiapi(uri) sends the trace to a Resi API server and keeps the result, which is then available as e.g. tr.get_ubdia().

.Resi files

A .Resi file is the project file of the FWPA web app: an R list saved with saveRDS(), holding a summary table (df) plus the traces and results for each measurement.

from imlresi import ResiResultSet, save_traces_to_dotresi, change_instrument_id

rs = ResiResultSet('project.Resi')
for r in rs:
    r.FileName, r.TreeID, r.DOB, r.drill
    r.recompute_den_trace()  # recompute the density profile

rs.to_dotresi('copy.Resi')

# build a .Resi file from raw traces, e.g. to upload to the web app
save_traces_to_dotresi([tr], 'new.Resi')

change_instrument_id('project.Resi', 'PD500-0755', output_filepath='fixed.Resi')

The same conversion from the command line:

traces2resi *.rgp -o new.Resi

Databases

rs.to_duckdb('resi.duckdb')                      # traces, results, rings, boards tables
rs = ResiResultSet.from_duckdb('resi.duckdb')

rs.to_deltalake('Tables/resi', mode='merge')     # needs imlresi[delta] or imlresi[spark]

to_deltalake uses PySpark when a Spark session is active and delta-rs otherwise. Merging never replaces an existing table; only mode='overwrite' does.

Units

FeedSpeed is stored in mm/min in .Resi files, DuckDB and Delta tables, as the web app does. Traces report it in cm/min (Trace.get_feedspeed()). See CHANGELOG.md about data written by 0.0.45 and earlier.

Development

pip install -e '.[test,spark]'
pytest

The Spark tests need a JDK and are skipped without PySpark.

Metadata

Release files for imlresi 0.0.46

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for imlresi 0.0.46
File Size Uploaded Provenance Actions
imlresi-0.0.46.tar.gz 63.5 kB Without provenance Details for imlresi-0.0.46.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for imlresi 0.0.46
File Interpreter ABI Platform Actions
imlresi-0.0.46-py3-none-any.whl Python 3 none any Details for imlresi-0.0.46-py3-none-any.whl

Total release size: 102.9 kB

Release files / imlresi-0.0.46.tar.gz

Download URL imlresi-0.0.46.tar.gz
Size 63.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a164b0f108626bb79bbc7c860d55ccfada429228101496e550de1fef7cf966c6
BLAKE2b-256 checksum
How to use checksums
72b7aad1e6fda519e369be759809c77d41ec228511a75f70dbcce18f864145fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / imlresi-0.0.46-py3-none-any.whl

Download URL imlresi-0.0.46-py3-none-any.whl
Size 39.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1dc0152d286ae3e41a2c14c83b413f95df760042022037e336d6ea061d94dc2f
BLAKE2b-256 checksum
How to use checksums
cb15efb38c22c3c9ee804138474d3e7d40b94943043e729b7321ed6dacd5b3d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for imlresi 0.0.46

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.46 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page