Skip to content

rubind/host_unity

Repository files navigation

Unity with Host Galaxy Properties

This project is an adaption of UNITY that allows for standardization of Type Ia supernovae with the addition of a full treatment of host properties.

Installing UNITY

Installation is poorly tested and documented after one reinstall. Bellow there be errors.

With the repo downloaded and a conda installation working, from inside the root directory of UNITY:

conda env create -f unity.yaml
conda activate unity
pip install .

The full list of pinned dependencies can be found in unity-lock.yaml. Installing unity can also be done in editable mode: `` pip install -e .``. Currently only the unity application is supported; it is not accessible as an importable module.

Previous and still possible installation instructions, if if you change the pyproject.toml and setup.py files :

This application was maintained via via Poetry and the pyproject.toml file. Its depends on Python 3 (tested with 3.7) and most of the typical scientific software stack.

The latest instructions to Install Poetry are avaialble via its documentation. It should be something like curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python

With this package on your computer (latest from GitHub), Poetry installed, and any desired virtual environments activated, install UNITY via :command:poetry install. By default, this will also include the development dependencies.

If there is a ImportError: Python is not installed as a framework. error, this is likely fixed by creating a file ~/.matplotlib/matplotlibrc containing: backend: TkAgg

How to use it

Information can be found via unity --help (or poetry run unity --help if installed inside a Poetry virtual environment). Examples of using UNITY can be see in some of the associated analysis scripts.

From a pre-compiled model, with 1000 SNe, it takes ~ 45 mins. For 100 SNe it takes 10-20 mins. This assumes a chain does not get stuck, then it can take hours. This was with 8 chains, 1000 iterations, on an 8 core Intel Xeon 2018 iMac Pro.

Data

The data input files need to be a pickled dictionary containing all the expected UNITY variables. This file will be better documented, but for now, you can find some information in the docs_input_data.rst file. As an example, build_test_dataset.py``_ builds and saves this python object in a ``pickle.dump() command at the end of the file.

A full documentation of these values is to come.

Development & Contributing Instructions

This is mostly used for our scientific research as such we will only passively maintain this project. You may submit and issue or a pull request, but a response from us will be dependent on our availability and how closely your issue/PR relates to our own research. We are not currently looking to maintain the next great open source project.

More detailed contribution instructions will be published soon, but are currently available upon request.

Code of Conduct

If you do wish to contribute then we ask you to follow the Astropy Community Code of Conduct.

Licensing

This code is released under the MIT license as documented in the :file:LICENSE file.

Maintainers

  • David Rubin, @rubind
  • Benjamin Rose, @benjaminrose
  • Sam Dixon, @sam-dixon

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •