{"id":25736928,"url":"https://github.com/phdenzel/model-zapper","last_synced_at":"2026-04-16T18:43:59.848Z","repository":{"id":43250732,"uuid":"152627636","full_name":"phdenzel/model-zapper","owner":"phdenzel","description":"Zapp through GLASS lens models","archived":false,"fork":false,"pushed_at":"2022-11-22T03:04:03.000Z","size":662,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-24T07:35:42.108Z","etag":null,"topics":["analysis","gravitational-lensing","macos-app","python"],"latest_commit_sha":null,"homepage":"https://git.io/fxViB","language":"Python","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/phdenzel.png","metadata":{"files":{"readme":"README.org","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}},"created_at":"2018-10-11T17:09:14.000Z","updated_at":"2020-09-13T17:13:30.000Z","dependencies_parsed_at":"2023-01-23T00:01:10.068Z","dependency_job_id":null,"html_url":"https://github.com/phdenzel/model-zapper","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phdenzel%2Fmodel-zapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phdenzel%2Fmodel-zapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phdenzel%2Fmodel-zapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phdenzel%2Fmodel-zapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phdenzel","download_url":"https://codeload.github.com/phdenzel/model-zapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240807262,"owners_count":19860762,"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":["analysis","gravitational-lensing","macos-app","python"],"created_at":"2025-02-26T06:31:47.681Z","updated_at":"2026-04-16T18:43:59.777Z","avatar_url":"https://github.com/phdenzel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+TITLE: ModelZapper\n#+AUTHOR: phdenzel\n\nModelZapper is a supplementary app to [[https://github.com/jpcoles/glass][GLASS]] which can inspect, analyze, and\nfilter GLASS \"states\".\nFree-form gravitational lens modelling techniques which are used in GLASS,\ngenerally try to deal with the mass-sheet degeneracy (an intrinsic problem in\ngravitational lens modelling) by exploring the solution space in a Monte-Carlo\nsampling approach. Every lens model is therefore built out of many different\nmodels that solve the lens equation with the given priors.\nSuch an /ensemble model/ usually looks fine on average, but not all models in\nthe ensemble might be valid or realistic solutions to the observed lens.\nThis is where ModelZapper comes in. With this app, one can manually go through\nthe GLASS ensemble and select realistic models, filter out the unrealistic\nsolutions, and save the filtered ensemble in a new GLASS state.\n\nBinaries can be directly downloaded [[https://github.com/phdenzel/model-zapper/releases][here]] (currently only for macOS).\n\n** Setup\n\nGenerally, ~modelzapper.py~ should be runnable without installation.\nJust make sure to properly add the pre-installed glass paths to the ~PYTHONPATH~\n(for an example see: [[https://github.com/phdenzel/glass/blob/master/setenv][setenv]]) before running\n#+BEGIN_SRC shell\n  python modelzapper.py\n#+END_SRC\n\n*** Install\n\n    To properly install ~modelzapper.py~ (in order to build the app yourself\n    or to run the app within a virtual python environment), first run\n    ~configure~ in the root directory of the repo.\n    #+BEGIN_SRC shell\n      ./configure\n    #+END_SRC\n    This will set up a virtual python environment and download all required\n    libraries.\n    After the environment and required libraries are downloaded, use ~install~\n    #+BEGIN_SRC shell\n      ./install\n    #+END_SRC\n    This will compile the ~glass~ source code into ~src~, and move the build\n    into ~libs~ and ~includes~ directories.\n    If ~glass~ was compiled without errors, ~modelzapper.py~ should be able to\n    run (without setting any ~PYTHONPATH~ or ~PATH~) as\n    #+BEGIN_SRC shell\n      python modelzapper.py [gls.state]\n    #+END_SRC\n\n*** Build the app\n\n    Once you configured and installed ~modelzapper.py~, building the app is\n    easy! Enter the virtual environment and run ~py2app~ with\n    #+BEGIN_SRC shell\n      source activate\n      python setup.py py2app\n    #+END_SRC\n    or alternatively use\n    #+BEGIN_SRC shell\n      ./rebuild\n    #+END_SRC\n    After the command(s) finish, you should find two new directories in your repo,\n    ~dist~ and ~build~. In ~dist~ you'll find your standalone macOS app that is\n    ready to be double-clicked.\n\n*** Requirements\n    \n    To build the app yourself, you need a Python framework with an integrated\n    Tkinter library (or linked to Tcl/Tk frameworks).\n    The app relies on several python modules which are installable\n    via e.g. ~pip~.\n    Since the app interfaces with ~glass~, a runnable version of ~glass~ is\n    essential.\n    To summarize (also see requirements.txt):\n\n    - Python framework (==2.7)\n    - Tkinter (built-in or linked to Tcl and Tk frameworks (\u003e= 8.6))\n    - [[https://github.com/phdenzel/glass][glass]]\n    - virtualenv\n    - numpy\n    - scipy\n    - matplotlib\n    - PIL\n\n*** More\n\n    Since it is not really easy to install ~glass~, let alone automatically,\n    chances are you might have problems running the app.\n    If so, try building it yourself. In order to be able to build the app though,\n    ~python~ must be installed as a framework.\n    It is also recommended to install a newer Tcl/Tk framework than the one that\n    comes with the macOS system.\n    For more details see [[https://github.com/phdenzel/local-python-install][https://github.com/phdenzel/local-python-install]]\n    (try installing the frameworks in standard locations though,\n    e.g. ~/Library/Frameworks/~).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphdenzel%2Fmodel-zapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphdenzel%2Fmodel-zapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphdenzel%2Fmodel-zapper/lists"}