{"id":35045804,"url":"https://github.com/iverks/crysm","last_synced_at":"2026-05-18T20:35:34.886Z","repository":{"id":268301003,"uuid":"884845883","full_name":"iverks/crysm","owner":"iverks","description":"Helper CLI for analysis of continuous rotation electron diffraction (cRED) data","archived":false,"fork":false,"pushed_at":"2025-06-11T11:51:42.000Z","size":13463,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-11T12:46:00.314Z","etag":null,"topics":["cli","continuous-rotation-electron-diffraction","cred","electron-diffraction"],"latest_commit_sha":null,"homepage":"https://iverks.github.io/crysm/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iverks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-11-07T13:49:36.000Z","updated_at":"2025-06-11T11:51:04.000Z","dependencies_parsed_at":"2024-12-15T22:26:41.746Z","dependency_job_id":"eb8ae4f2-f7b7-4eff-81b6-77e360f05559","html_url":"https://github.com/iverks/crysm","commit_stats":null,"previous_names":["iverks/crysm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iverks/crysm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iverks%2Fcrysm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iverks%2Fcrysm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iverks%2Fcrysm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iverks%2Fcrysm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iverks","download_url":"https://codeload.github.com/iverks/crysm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iverks%2Fcrysm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33190174,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["cli","continuous-rotation-electron-diffraction","cred","electron-diffraction"],"created_at":"2025-12-27T08:53:34.665Z","updated_at":"2026-05-18T20:35:34.881Z","avatar_url":"https://github.com/iverks.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CRYSM\n\n## Installation\n\nThe package can be installed from PyPI using \n\n```bash\npip install crysm\n```\n\nThis exposes the `crysm` command. To see available commands, run `crysm --help`. The commands correspond to the decorated functions in `src/main.py`.\n\n## Installation of uv\n\nIn this package, `uv` is used for package management. To install on linux/mac, run\n\n```bash\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n```\n\nand on windows (in powershell)\n\n```bash\npowershell -ExecutionPolicy ByPass -c \"irm https://astral.sh/uv/install.ps1 | iex\"\n```\n\n## Usage\n\nThe functionality of this library can be found by typing `crysm --help` or reading the functions in `src/main.py`. Below are some examples.\n\n### Example 1: Finding correction factors for the central cross from a flatfield image\n\n```bash\ncrysm find-center-cross-correction 24bit/flatfield_200kV_24bit.mib\n\u003e For image: 24bit/flatfield_200kV_24bit.mib:\n\u003e   Mean value of cross: 40151.59\n\u003e   Mean value of central four pixels: 74076.75\n\u003e   Mean value of rest of image: 18284.44\n\u003e Suggested arguments for correction:\n\u003e  --additional-pixels 4 --correction-factor 2.196 --central-four-factor 4.051\n\u003e Number of additional pixels should be verified with detector manufacturer\n```\n\nThis command can also take multiple images, but they should be collected with the same parameters (unlike the example below):\n\n```bash\ncrysm find-center-cross-correction 24bit/flatfield_200kV_24bit.mib 12bit/flatfield_200kV_12bit.mib 6bit/flatfield_200kV_6bit.mib                                          3.11   17:08:04\n\u003e For image: 24bit/flatfield_200kV_24bit.mib:\n\u003e   Mean value of cross: 40151.59\n\u003e   Mean value of central four pixels: 74076.75\n\u003e   Mean value of rest of image: 18284.44\n\u003e   Additional pixels: 4\n\u003e   Correction factor: 2.196\n\u003e   Central four factor: 4.051\n\u003e For image: 12bit/flatfield_200kV_12bit.mib:\n\u003e   Mean value of cross: 2013.16\n\u003e   Mean value of central four pixels: 3716.25\n\u003e   Mean value of rest of image: 916.51\n\u003e   Additional pixels: 4\n\u003e   Correction factor: 2.197\n\u003e   Central four factor: 4.055\n\u003e For image: 6bit/flatfield_200kV_6bit.mib:\n\u003e   Mean value of cross: 39.97\n\u003e   Mean value of central four pixels: 63.00\n\u003e   Mean value of rest of image: 18.22\n\u003e   Additional pixels: 4\n\u003e   Correction factor: 2.194\n\u003e   Central four factor: 3.457\n\u003e Suggested arguments for correction:\n\u003e  --additional-pixels 4 --correction-factor 2.195 --central-four-factor 3.854\n\u003e Number of additional pixels should be verified with detector manufacturer\n```\n\n### Example 2: Correcting the central cross of a calibration image\n\n```bash\ncrysm pets-correct-center-cross-calibration --additional-pixels 4 --correction-factor 2.196 --central-four-factor 4.051 SAED_150cm.mib WIDE_150cm.tiff\n\u003e Wrote corrected image to WIDE_150cm.tiff\n```\n\n### Example 3: Correcting the central cross of a pets project\n\n```bash\ncrysm pets-correct-center-cross --additional-pixels 4 --correction-factor 2.196 --central-four-factor 4.051\n\u003e Using cred project C:\\Users\\iverks\\progging\\master\\cRED_070325\\experiment_5\n\u003e 100%|█████████████████████████████████████████████████████████████████████████████| 1093/1093 [00:10\u003c00:00, 109.19it/s]\n\u003e Wrote 1093 corrected images to C:\\Users\\iverks\\progging\\master\\cRED_070325\\experiment_5\\tiff_corr\n```\n\n## Developers\n\nIn order to install the package locally, run \n\n```bash\nuv tool install -e .\n```\n\nThe `crysm` command is then available globally.\n\n- `pets/run_shelx.py` depends on the internal format of .pts2-files, future updates might break\n- `lib/find_cred_project.py` depends on the existence of cRED_log.txt, which Stef Smeets has hinted at removing in the future. Beware.\n- To publish a new update to PyPi, bump the version number in pyproject.toml, then run `uv publish`. Developer permissions must be acquired first. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiverks%2Fcrysm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiverks%2Fcrysm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiverks%2Fcrysm/lists"}