{"id":49790531,"url":"https://github.com/MadsLorentzen/superposed-folds","last_synced_at":"2026-05-28T18:00:57.816Z","repository":{"id":356308688,"uuid":"1228914165","full_name":"MadsLorentzen/superposed-folds","owner":"MadsLorentzen","description":"Interactive Python toolkit for visualizing superposed folds (Ramsay \u0026 Lisle 2000; Grasemann et al. 2004). Python port of UCD's MATLAB educational resource.","archived":false,"fork":false,"pushed_at":"2026-05-20T15:38:44.000Z","size":22476,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-20T19:36:49.965Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MadsLorentzen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-04T14:04:29.000Z","updated_at":"2026-05-20T15:40:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/MadsLorentzen/superposed-folds","commit_stats":null,"previous_names":["madslorentzen/superposed-folds"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MadsLorentzen/superposed-folds","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadsLorentzen%2Fsuperposed-folds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadsLorentzen%2Fsuperposed-folds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadsLorentzen%2Fsuperposed-folds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadsLorentzen%2Fsuperposed-folds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MadsLorentzen","download_url":"https://codeload.github.com/MadsLorentzen/superposed-folds/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadsLorentzen%2Fsuperposed-folds/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33619972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-12T04:00:23.939Z","updated_at":"2026-05-28T18:00:57.807Z","avatar_url":"https://github.com/MadsLorentzen.png","language":"Python","funding_links":[],"categories":["Software"],"sub_categories":["Structural Geology"],"readme":"# superposed-folds\n\nInteractive Python toolkit for visualizing superposed folds. A modern Python\nport of Martin Schöpfer's MATLAB papermodel resource at the\n[UCD Fault Analysis Group](https://www.fault-analysis-group.ucd.ie/SuperPosedFolds/Superposed_PM_Index.html),\nimplementing the plane-strain superposed-folding equations from Ramsay \u0026 Lisle\n(2000) and the extended Grasemann et al. (2004) classification.\n\n[![Open in Streamlit](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://superposed-folds.streamlit.app/)\n\n![demo](assets/demo.gif)\n\nPick a Grasemann (2004) preset on the left or move the sliders to explore\ncustom amplitudes, stretches, wavelengths, and F2 orientations. The 3D\nfold stack, the 2D interference map at z = 0, the stereonet, and the\nclassification readout all update together. Toggle the block-diagram cube\nview to render the model as a painted ±5 km box (Schöpfer papermodel style)\ninstead of separate layer horizons. Optionally enable a cylindrical drill\ncore to see the same interference pattern intersecting a borehole at any\ncollar position, azimuth, and plunge, rendered both embedded in the 3D\nview and unrolled flat as a depth-vs-circumference strip.\n\n![drill-core demo](assets/streamlit-demo.gif)\n\n## What's inside\n\n- A small Python library (`superposed_folds`) implementing:\n  - `FoldParameters` (amplitude, stretch, orientation, wavelength) and\n    the Ramsay \u0026 Lisle plane-strain equations\n  - Forward (`apply_superposed_fold`) and inverse (`initial_z_at`) maps\n  - All 21 canonical Grasemann (2004) preset configurations\n  - `DrillCoreParameters` and `sample_layers_on_cylinder` for sampling the\n    folded model on the curved surface of a cylindrical borehole at any\n    orientation\n  - Plotly figure builders: 3D fold stack with optional drill-core trace,\n    2D interference map at z = 0 with optional collar/line/toe overlay,\n    stereonet, an unrolled drill-core section, and a painted-cube block\n    diagram (Schöpfer papermodel style) that paints the deformed layer\n    pattern on each face of the ±5 km model domain\n- A Streamlit app (`streamlit_app.py`) for the interactive playground.\n- pytest suite with parity checks against the original UCD MATLAB code.\n\n## Install\n\n```bash\ngit clone \u003crepo\u003e\ncd superposed-folds\nuv venv\nuv pip install -e \".[app,dev]\"\n```\n\n## Run the web app locally\n\n```bash\nuv run streamlit run streamlit_app.py\n```\n\n## Run the tests\n\n```bash\nuv run pytest\n```\n\n## Credits and references\n\n- **Original MATLAB resource and educational content**: Martin Schöpfer, UCD Fault Analysis Group ([page](https://www.fault-analysis-group.ucd.ie/SuperPosedFolds/Superposed_PM_Index.html))\n- **Plane-strain equations**: Ramsay, J. G. and Lisle, R. J. (2000) *The Techniques of Modern Structural Geology, Volume 3*. Academic Press, p. 955.\n- **Classification (original)**: Ramsay, J. G. (1962) *J. Geol.* 70, 466-481.\n- **Classification (extended)**: Grasemann, B. et al. (2004) *J. Geol.* 112, 119-125.\n- Project surfaced via the [Software Underground](https://softwareunderground.org) Mattermost.\n\n## License\n\nMIT. See `LICENSE`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMadsLorentzen%2Fsuperposed-folds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMadsLorentzen%2Fsuperposed-folds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMadsLorentzen%2Fsuperposed-folds/lists"}