{"id":13654533,"url":"https://github.com/tbezo/pymcc","last_synced_at":"2025-04-23T09:33:32.004Z","repository":{"id":118687871,"uuid":"396764107","full_name":"tbezo/pymcc","owner":"tbezo","description":"module that reads and analyzes mephisto mcc files from watertank scans","archived":false,"fork":false,"pushed_at":"2024-05-30T14:23:51.000Z","size":101,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-10T06:32:36.858Z","etag":null,"topics":["medical-physics","pandas","python","qatrack"],"latest_commit_sha":null,"homepage":"","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/tbezo.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}},"created_at":"2021-08-16T11:30:31.000Z","updated_at":"2024-10-07T06:00:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0acf867-05c9-428e-a13a-ad4ffcc8cf90","html_url":"https://github.com/tbezo/pymcc","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbezo%2Fpymcc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbezo%2Fpymcc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbezo%2Fpymcc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbezo%2Fpymcc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tbezo","download_url":"https://codeload.github.com/tbezo/pymcc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250407718,"owners_count":21425550,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["medical-physics","pandas","python","qatrack"],"created_at":"2024-08-02T03:00:36.688Z","updated_at":"2025-04-23T09:33:31.704Z","avatar_url":"https://github.com/tbezo.png","language":"Python","funding_links":[],"categories":["Libraries"],"sub_categories":[],"readme":"# pymcc\nModule that reads PTW mephisto mcc files from watertank scans or array files. pymcc relies on Pandas \nand uses a Pandas DataFrame to store the measurement values within the class objects. \n\nAt the moment the tests implemented are the ones used at the University Medical Center Mainz \n(mainly the default PTW Data Analyze Varian profile ones). pymcc is able to handle Photon (FF \nand FFF) as well as electron water tank measurements, Starcheck (files with options to analyze \nthe four main profiles) as well as Octavius 729 measurement files (measurement is put into an \ninterpolated Pandas DataFrame - no further analysis possible).\n\npymcc was created to analyze mcc files from within [QATrack+](https://github.com/qatrackplus/qatrackplus) \nthrough an upload test that creates a dict (of dicts), followed by composite tests that grab the \nindividual results from that dict.\n\nOnly symmetric fields (X=Y) are validated, asymmetric fields should work.\n\n## Installation\n\nIt is now possible to install pymcc with pip directly from github. This should be easier than copying \nthe source files to your local venv or inside the QATrack+ project folder and will also check the dependencies.\n\n    source ~/venvs/qatrack31/bin/activate #optional\n    pip install git+https://github.com/tbezo/pymcc\n\t\nIf you do not want to have pymcc inside your environment (a.e you customize the code to your needs) \nyou can also put it inside the QATrack+ directory as described by Randy here: \n[Import Code](https://groups.google.com/g/qatrack/c/n5x8osAj0eY/m/yHrQq7HzAQAJ)\n\n## Examples for QATrack+\n\nUsing pymcc.wtscans profile and pdd curves can be analyzed. \n\n### Water Tank Profile\n*File Upload Test: read_mcc_6x_10x10 (macro name)*\n```Python\nimport pymcc\n\n# read mcc file and return list of measurement objects (PDD and/or Profiles)\nmymcc = pymcc.readmcc.read_file(FILE.name)\n\nmcc_dict = {}\nfor i in mymcc:\n    mcc_dict[i.curve_type] = i.calc_results()\n\n# provide object dict for composite tests\nread_mcc_6x_10x10 = mcc_dict\n```\n\n*Access single result from dict in composite test: flat_10x10_x_py (macro name)*\n```Python\nflat_10x10_x_py = read_mcc_6x_10x10[\"CROSSPLANE_PROFILE\"][\"Flatness\"]\n```\n\nA complete mcc_dict can looks like this (here electrons, 20 x 20 cm²):\n\n{'PDD': {'Type': 'PDD', 'R80': 19.986482881280565, 'R50': {'R50 (DIN)': 24.940544317729188, 'R50': 23.788279990789775}, 'Rp': 29.794591153821518}, \n'INPLANE_PROFILE': {'Type': 'INPLANE_PROFILE', 'CaxDev': 0.3168300690775254, 'FWHM': {'fwhm (nominal)': 204.02442621763075, 'fwhm': 201.42603042514637}, 'Flatness': 1.9405358627975489, 'Symmetry': 0.9219008965810869}, \n'CROSSPLANE_PROFILE': {'Type': 'CROSSPLANE_PROFILE', 'CaxDev': 0.49851535225756294, 'FWHM': {'fwhm (nominal)': 203.39409918216086, 'fwhm': 200.8037310515953}, 'Flatness': 1.6065593462425587, 'Symmetry': -0.2758778417071142}}\n\nFor a single photon pdd the dict contains the following:\n{'PDD': {'Type': 'PDD', 'Q Index': 0.6671976734598629, 'Surface Dose': 47.71301033726637, 'D100': 67.11913960530438, 'D200': 38.52406807977445}}\n\n### Starcheck\n*File Upload Test: read_mcc_0_6x (macro name)*\n```Python\nimport pymcc\n\n# read Starcheck mcc file\nmystar = pymcc.readmcc.read_file(FILE.name)\n# analyze center inplane and crossplane profiles\nmcc_dict = mystar.analyze_center()\n\n# provide object dict for composite tests\nread_mcc_0_6x = mcc_dict\n\n```\n*Access single result from dict in composite test: fs_0_y_py (macro name)*\n```Python\nfs_0_y_py = read_mcc_0_6x[\"INPLANE_PROFILE\"][\"FWHM\"][\"fwhm\"]\n```\n\nThe two diagonals are labeled TLGR_PROFILE and TRGL_PROFILE. The dict from mystar.analyze_diagonal() looks like this:\n\n{'TLGR_PROFILE': {'Type': 'INPLANE_PROFILE', 'CaxDev': -1.7500384951353993, 'FWHM': {'fwhm (nominal)': 276.49675566173937, 'fwhm': 276.49675566173937}, 'Flatness': 2.118534052326748, 'Symmetry': -0.7116183813665132}, 'TRGL_PROFILE': {'Type': 'INPLANE_PROFILE', 'CaxDev': 0.12798456264559377, 'FWHM': {'fwhm (nominal)': 275.69602807162545, 'fwhm': 275.69602807162545}, 'Flatness': 2.20840822848013, 'Symmetry': -0.8215006262255542}}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbezo%2Fpymcc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftbezo%2Fpymcc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbezo%2Fpymcc/lists"}