{"id":30754130,"url":"https://github.com/uvegege/touchstoneparser.jl","last_synced_at":"2026-02-11T07:33:24.632Z","repository":{"id":310407359,"uuid":"1036941954","full_name":"uvegege/TouchstoneParser.jl","owner":"uvegege","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-14T18:46:38.000Z","size":6674,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-16T23:45:35.732Z","etag":null,"topics":["julia","touchstone"],"latest_commit_sha":null,"homepage":"https://uvegege.github.io/TouchstoneParser.jl/dev/","language":"Julia","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/uvegege.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"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":"2025-08-12T20:16:28.000Z","updated_at":"2025-12-14T18:27:09.000Z","dependencies_parsed_at":"2025-08-17T23:28:25.294Z","dependency_job_id":"cfc413e9-b0f2-4e70-9d09-516fc5d90f64","html_url":"https://github.com/uvegege/TouchstoneParser.jl","commit_stats":null,"previous_names":["uvegege/touchstoneparser.jl"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/uvegege/TouchstoneParser.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uvegege%2FTouchstoneParser.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uvegege%2FTouchstoneParser.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uvegege%2FTouchstoneParser.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uvegege%2FTouchstoneParser.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uvegege","download_url":"https://codeload.github.com/uvegege/TouchstoneParser.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uvegege%2FTouchstoneParser.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29329493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["julia","touchstone"],"created_at":"2025-09-04T09:05:19.446Z","updated_at":"2026-02-11T07:33:24.617Z","avatar_url":"https://github.com/uvegege.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TouchstoneParser\n\n[![](https://img.shields.io/badge/docs-latest-blue.svg)](https://uvegege.github.io/TouchstoneParser.jl/dev/)\n\n`TouchstoneParser.jl` is a Julia package for reading [Touchstone](https://ibis.org/touchstone_ver2.1/touchstone_ver2_1.pdf) files.  \nIt implements the specification (versions **1.0, 1.1, 2.0 and 2.1**) and provides a simple API to access data and metadata.\n\n## Notes\n\nWhile the core functionality has been tested using examples from the official Touchstone specification, it has **not been extensively validated** against a wide variety of real-world files. Contributions or bug reports are welcome.\n\nAnother option you can consider is [Touchstone.jl](https://github.com/mpichl87/Touchstone.jl), which to the best of my knowledge is fully functional.\n\n## Features\n\n- [x] Parse Touchstone files in **v1.0, v1.1, v2.0, v2.1** (`read_touchstone`). \n- [x] Automatically detect format even if the filename does not contain the `.sNp` extension  \n- [x] Write Touchstone files in the desired format (`write_touchstone`)  \n- [x] Handle non-standard versions of the format (e.g., files generated by **HFSS**. Used **skrf** as reference because I didn't found other resources.)  \n- [x] Support for comments.\n- [x] Convenient access to data via `ts.data`, `ts.frequency`, `ts.noise_data`, `ts.noise_frequency`. \n\n## Roadmap\n\n- [ ] Better validation to ensure Touchstone files strictly comply with the official specification.\n- [ ] Enhanced customization options for writing files, including units, formatting, and ordering.\n- [ ] Batch reading/writing for entire directories of Touchstone files.\n\n## Installation\n\n```julia\n] add TouchstoneParser\n```\n\n## Usage\n\nIt's easy to write and read Touchstone files:\n\n```julia\nusing TouchstoneParser\n\n# Example 18\nf = [2.0, 22.0]\nS = [\n    [[0.95 * cis(deg2rad(-26)), 3.57 * cis(deg2rad(157))];;\n    [0.04 * cis(deg2rad(76 )), 0.66 *cis(deg2rad(-14))]], \n    [[0.60 * cis(deg2rad(-144 )), 1.30 * cis(deg2rad(40))];;\n    [0.14 * cis(deg2rad(40)), 0.56 * cis(deg2rad(-85))]]\n]\n\nz0 = [50, 25.0]\n\nnoise_f = [4.0, 18.0]\nnoise_data = [NoiseData(0.7, 0.64 * cis(deg2rad(69)), 19), NoiseData(0.7, 0.46 * cis(deg2rad(-33)), 20)]\n\nTouchstoneParser.write_touchstone(\"Example.s2p\", f, S, z0; \n    version = \"1.0\", noise_data = noise_data, noise_f = noise_f, twoportorder = \"21_12\")\n\nTouchstoneParser.write_touchstone(\"Example.ts\", f, S, z0; \n    version = \"2.1\", noise_data = noise_data, noise_f = noise_f, twoportorder = \"21_12\")\n\nex_10 = read_touchstone(\"Example.s2p\")\nex_21 = read_touchstone(\"Example.ts\")\n\n```\n\nYou can access the data like this:\n\n```julia\nex_21.frequency        # Vector of frequencies [ts.units]\nex_21.data             # {ts.type} - parameters (Array{ComplexF64,3})\nex_21.noise_frequency  # Noise frequency points (if present)\nex_21.noise_data       # Noise data (if present)\n\nex_10.data == stack(S)\nex_21.data == stack(S)\n\nex_10.noise_data == noise_data\nex_21.noise_data == noise_data\n```\n\n## Metadata\n\nIt is possible to inspect the metadata of the read file with some key fields of the TSParser struct. \n\nFor example, the `comments` field stores tuples containing the line where it was read and a string with the comment. This allows, for example, to extract the variables written in the touchstone by programs such as HFSS or CST using the `simvariables(ts)` function.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuvegege%2Ftouchstoneparser.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuvegege%2Ftouchstoneparser.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuvegege%2Ftouchstoneparser.jl/lists"}