# Community guidelines¶

PRISM is an open-source and free-to-use software package (and it always will be), provided under the BSD-3 license (see below for the full license).

Users are highly encouraged to make contributions to the package or request new features by opening a GitHub issue. If you would like to contribute to the package, but do not know what, then there are quite a few ToDos in the code that may give you some inspiration. As with contributions, if you find a problem or issue with PRISM, please do not hesitate to open a GitHub issue about it or post it on Gitter.

And, finally, if you use PRISM as part of your workflow in a scientific publication, please consider including an acknowledgement like “Parts of the results in this work were derived using the PRISM Python package.” and citing the PRISM pipeline paper using the BibTeX-entry below.

BSD 3-Clause License

Copyright (c) 2019-2020, Ellert van der Velden

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


## Citation¶

This BibTeX-entry is also available in PRISM using get_bibtex() (available as prism.get_bibtex()).

@ARTICLE{2019ApJS..242...22V,
author = {{van der Velden}, Ellert and {Duffy}, Alan R. and {Croton}, Darren and
{Mutch}, Simon J. and {Sinha}, Manodeep},
title = "{Model Dispersion with PRISM: An Alternative to MCMC for Rapid Analysis of Models}",
journal = {\apjs},
keywords = {methods: data analysis, methods: numerical,
Astrophysics - Instrumentation and Methods for Astrophysics, Physics - Computational Physics},
year = 2019,
month = jun,
volume = {242},
number = {2},
eid = {22},
pages = {22},
doi = {10.3847/1538-4365/ab1f7d},
archivePrefix = {arXiv},
eprint = {1901.08725},
primaryClass = {astro-ph.IM},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}


Below are some bigger ideas/improvements that may be added to PRISM if there is demand:

• Add a developer’s guide to the docs, describing the inner workings and structures of PRISM;

• Low-level MPI implementation (probably by using D2O);

With 6 emulator systems and 4 processes, the three different MPI levels would be:

• No level: 6-0-0-0;
• High-level: 2-2-1-1;
• Low-level: 1.5-1.5-1.5-1.5.
• Dynamic implausibility cut-offs;

• Allow for a master projection figure to be made (kind of like a double corner plot);

• Allow for user-provided methods in the ModelLink subclass to be executed at specific points in the emulator construction;

• Implement multi-variate implausibilities;

• Allow for no ModelLink object to be provided, which blocks construction but enables everything emulator-only related;

• Allow for old PRISM master files to be provided when making a new emulator, recycling work done previously;

• If MPI_call is False for the ModelLink subclass, use all MPI ranks to evaluate a part of sam_set in the model simultaneously. This will require a check or flag that the model can be called in multiple instances simultaneously (to accommodate for models that, for example, need to read files during evaluations). Added benefit of this is that it would become possible to add the option for the user to set a preferred number of MPI processes calling the model (in MPI), allowing PRISM to split up the available processes if more efficient;

• GPU acceleration;

• Adding the theory behind PRISM to the docs;

• Adding the possibility to evaluate the derivatives of the emulated model outputs, which could be used as approximations of the gradient field of a model for certain MCMC methods;

• Replace the list of lists data system with a list of dicts system. This would remove the need for converting global indices to/from local indices in several cases, and make it easier for users to understand. However, as indexing dicts is more complicated, this may require a lot of rewriting;

• Code objects can be made pickleable by importing the codeutil module. This package could be added to the requirements or an equivalent function could be written, which is then automatically imported/executed upon importing PRISM;