Skip to content

Commit

Permalink
Respond to JOSS review (#79)
Browse files Browse the repository at this point in the history
* Science summary / references
* Conribution guide and code of conduct
* define LOSVD

closes #78
closes #76
closes #77
  • Loading branch information
prashjet authored Apr 27, 2023
1 parent 61d52f9 commit 321d9ca
Show file tree
Hide file tree
Showing 9 changed files with 307 additions and 14 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ python -m pip install -e .
Check out the user guide and API docs on [the docs
page](https://popkinmocks.readthedocs.io/) for example usage and much more info.

## Contributing

All types of community contributions are very welcome! Please check the [contribution page](https://popkinmocks.readthedocs.io/en/stable/user/contributing.html) for more information.
12 changes: 6 additions & 6 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
except DistributionNotFound:
__version__ = "unknown version"

project = 'popkinmocks'
copyright = '2023, Prashin Jethwa'
author = 'Prashin Jethwa'
project = "popkinmocks"
copyright = "2023, Prashin Jethwa"
author = "Prashin Jethwa"

# The full version, including alpha/beta/rc tags
version = __version__
Expand All @@ -43,19 +43,19 @@
"sphinx.ext.napoleon",
"sphinx.ext.mathjax",
"sphinx.ext.inheritance_diagram",
'sphinx.ext.graphviz',
"sphinx.ext.graphviz",
"myst_nb",
"IPython.sphinxext.ipython_console_highlighting",
]

myst_enable_extensions = ["dollarmath", "colon_fence"]

mathjax3_config = {
'TeX': {'equationNumbers': {'autoNumber': 'AMS', 'useLabelIds': True}},
"TeX": {"equationNumbers": {"autoNumber": "AMS", "useLabelIds": True}},
}

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
13 changes: 11 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ popkinmocks
Models in `popkinmocks` are distributions over stellar population and kinematic parameters. These can be created either using particle data from simulations, or a provided library of parametric galactic components. Given a model, `popkinmocks` provides tools to evaluate the stellar integrated-light contribution to the IFU datacube, and derived properties of the distribution such as (mass or light weighted) moments, and conditional and marginal probability functions.

`popkinmocks` is being actively developed in `a public repository on GitHub
<https://github.com/prashjet/popkinmocks>`_ so if you have any trouble, `open
an issue <https://github.com/prashjet/popkinmocks/issues>`_ there.
<https://github.com/prashjet/popkinmocks>`_. If you have any trouble, `open
an issue <https://github.com/prashjet/popkinmocks/issues>`_.
Information about contributing can be found `here
<user/contributing.html>`_.

Contents
---------------------
Expand All @@ -23,6 +25,13 @@ Contents

user/install
user/citation.md
user/contributing.md
user/code_of_conduct.md

.. toctree::
:maxdepth: 1
:caption: Tutorials:

user/background.md
user/constructing_models.md
user/moments_prob_func.md
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user/background.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ $$
\end{equation}
$$

This is the forward-model is used in most typical analyses of binned spectra from IFU datacubes i.e. a binned spectrum extracted at a position $\textbf{x}$ is modelled as a superposition of SSPs weighted by $p(t,z|\textbf{x})$ and convolved with a single LOSVD $p(v|\textbf{x})$ which is independent of stellar populations.
This is the forward-model is used in most typical analyses of binned spectra from IFU datacubes i.e. a binned spectrum extracted at a position $\textbf{x}$ is modelled as a superposition of SSPs weighted by $p(t,z|\textbf{x})$ and convolved with a single line-of-sight velocity distribution (LOSVD) $p(v|\textbf{x})$ which is independent of stellar populations.

## Evaluating datacubes using FFTs

Expand Down
132 changes: 132 additions & 0 deletions docs/source/user/code_of_conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
`prashin dot jethwa at univie dot ac dot at`.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][mozilla coc].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][faq]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
[mozilla coc]: https://github.com/mozilla/diversity
[faq]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
82 changes: 82 additions & 0 deletions docs/source/user/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Contributing

Contributions are welcome and greatly appreciated!
Please ensure that all contributions adhere to the [code of conduct](code_of_conduct.md).

## Types of Contributions

### Report Bugs

Report bugs on the `popkinmocks` [GitHub issues page](https://github.com/prashjet/popkinmocks/issues). Please report bugs including:

* Your operating system name and version.
* Any details about your Python environment.
* Detailed steps to reproduce the bug.

### Propose New Features

The best way to send feedback is to create an issue on the `popkinmocks` [GitHub issues page](https://github.com/prashjet/popkinmocks/issues) with tag _enhancement_.

If you are proposing a new feature:

* Explain in detail how it should work.
* Keep the scope as narrow as possible, to make it easier to implement.

### Implement Features
Look through the Git issues for feature requests.
Anything tagged with *enhancement* is open to whoever wants to
implement it.

### Add Examples or improve Documentation
Writing new features is not the only way to get involved and
contribute. Create examples with existing features as well
as improving the documentation very much encouraged.

## Getting Started to contribute

Ready to contribute?

1. Follow the [installation instructions](install.rst).

2. Create a feature branch for local development:
```
git checkout -b feature/name-of-your-branch
```
Now you can make your changes locally.
3. When you're done making changes, run the tests (old and new) from the main directory and check that they pass successfully:
```
cd popkinmocks/
pytest
```
4. Install the [Black][black] code formatter and run it from the main directory:
```
cd popkinmocks/
black .
```
5. Commit your changes and push your branch to GitHub::
```
git add .
git commit -m "Your detailed description of your changes."
git push origin feature/name-of-your-branch
```
Remember to add ``-u`` when pushing the branch for the first time.
6. Submit a pull request through the GitHub website.
### Pull Request Guidelines
Before you submit a pull request, check that it meets these guidelines:
1. The pull request should include new tests for all the core routines that have been developed.
2. If the pull request adds functionality, the docs should be updated accordingly.
## Attribution
This code of conduct has been adapted from the [PyAutoLens][pyautolens] project.
[black]: https://black.readthedocs.io/en/stable/
[pyautolens]: https://github.com/Jammy2211/PyAutoLens
71 changes: 70 additions & 1 deletion joss/paper.bib
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,73 @@ @ARTICLE{SAMI_Croom2021
primaryClass = {astro-ph.GA},
adsurl = {https://ui.adsabs.harvard.edu/abs/2021MNRAS.505..991C},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
}

@ARTICLE{Emsellem_2007,
author = {{Emsellem}, Eric and {Cappellari}, Michele and {Krajnovi{\'c}}, Davor and {van de Ven}, Glenn and {Bacon}, R. and {Bureau}, M. and {Davies}, Roger L. and {de Zeeuw}, P.~T. and {Falc{\'o}n-Barroso}, Jes{\'u}s and {Kuntschner}, Harald and {McDermid}, Richard and {Peletier}, Reynier F. and {Sarzi}, Marc},
title = "{The SAURON project - IX. A kinematic classification for early-type galaxies}",
journal = {\mnras},
keywords = {galaxies: elliptical and lenticular, cD, galaxies: evolution, galaxies: formation, galaxies: kinematics and dynamics, galaxies: structure, Astrophysics},
year = 2007,
month = aug,
volume = {379},
number = {2},
pages = {401-417},
doi = {10.1111/j.1365-2966.2007.11752.x},
archivePrefix = {arXiv},
eprint = {astro-ph/0703531},
primaryClass = {astro-ph},
adsurl = {https://ui.adsabs.harvard.edu/abs/2007MNRAS.379..401E},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@article{Emsellem_2011,
doi = {10.1111/j.1365-2966.2011.18496.x},
url = {https://doi.org/10.1111%2Fj.1365-2966.2011.18496.x},
year = 2011,
month = {may},
publisher = {Oxford University Press ({OUP})},
volume = {414},
number = {2},
pages = {888--912},
author = {Eric Emsellem and Michele Cappellari and Davor Krajnovi{\'{c}
} and Katherine Alatalo and Leo Blitz and Maxime Bois and Fr{\'{e}}d{\'{e}}ric Bournaud and Martin Bureau and Roger L. Davies and Timothy A. Davis and P. T. de Zeeuw and Sadegh Khochfar and Harald Kuntschner and Pierre-Yves Lablanche and Richard M. McDermid and Raffaella Morganti and Thorsten Naab and Tom Oosterloo and Marc Sarzi and Nicholas Scott and Paolo Serra and Glenn van de Ven and Anne-Marie Weijmans and Lisa M. Young},
title = {The {ATLAS}3D project - {III}. A census of the stellar angular momentum within the effective radius of early-type galaxies: unveiling the distribution of fast and slow rotators},
journal = {Monthly Notices of the Royal Astronomical Society}
}

@ARTICLE{perez_2013,
author = {{P{\'e}rez}, E. and {Cid Fernandes}, R. and {Gonz{\'a}lez Delgado}, R.~M. and {Garc{\'\i}a-Benito}, R. and {S{\'a}nchez}, S.~F. and {Husemann}, B. and {Mast}, D. and {Rod{\'o}n}, J.~R. and {Kupko}, D. and {Backsmann}, N. and {de Amorim}, A.~L. and {van de Ven}, G. and {Walcher}, J. and {Wisotzki}, L. and {Cortijo-Ferrero}, C. and {CALIFA Collaboration}},
title = "{The Evolution of Galaxies Resolved in Space and Time: A View of Inside-out Growth from the CALIFA Survey}",
journal = {\apjl},
keywords = {galaxies: bulges, galaxies: evolution, galaxies: fundamental parameters, galaxies: stellar content, galaxies: structure, Astrophysics - Cosmology and Extragalactic Astrophysics},
year = 2013,
month = feb,
volume = {764},
number = {1},
eid = {L1},
pages = {L1},
doi = {10.1088/2041-8205/764/1/L1},
archivePrefix = {arXiv},
eprint = {1301.1679},
primaryClass = {astro-ph.CO},
adsurl = {https://ui.adsabs.harvard.edu/abs/2013ApJ...764L...1P},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{zhu_2018,
author = {{Zhu}, Ling and {van de Ven}, Glenn and {van den Bosch}, Remco and {Rix}, Hans-Walter and {Lyubenova}, Mariya and {Falc{\'o}n-Barroso}, Jes{\'u}s and {Martig}, Marie and {Mao}, Shude and {Xu}, Dandan and {Jin}, Yunpeng and {Obreja}, Aura and {Grand}, Robert J.~J. and {Dutton}, Aaron A. and {Macci{\`o}}, Andrea V. and {G{\'o}mez}, Facundo A. and {Walcher}, Jakob C. and {Garc{\'\i}a-Benito}, Rub{\'e}n and {Zibetti}, Stefano and {S{\'a}nchez}, Sebastian F.},
title = "{The stellar orbit distribution in present-day galaxies inferred from the CALIFA survey}",
journal = {Nature Astronomy},
keywords = {Astrophysics - Astrophysics of Galaxies},
year = 2018,
month = jan,
volume = {2},
pages = {233-238},
doi = {10.1038/s41550-017-0348-1},
archivePrefix = {arXiv},
eprint = {1711.06728},
primaryClass = {astro-ph.GA},
adsurl = {https://ui.adsabs.harvard.edu/abs/2018NatAs...2..233Z},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
2 changes: 1 addition & 1 deletion joss/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ bibliography: paper.bib

# Summary

Integral Field Units (IFUs) are a type of detector which measure both spatial and spectral information. These detectors output 3D data-products known as datacubes: 2D images with a spectrum associated with each image pixel. Beyond the very local Universe where individual stars can be resolved, IFU datacubes are our most information-rich datasets of galaxies, and large samples of these have been observed [e.g. @SAMI_Croom2021].
Integral Field Units (IFUs) are a type of detector which measure both spatial and spectral information. These detectors output 3D data-products known as datacubes: 2D images with a spectrum associated with each image pixel. Beyond the very local Universe where individual stars can be resolved, IFU datacubes are our most information-rich datasets of galaxies, and large samples of these have been observed [e.g. @SAMI_Croom2021]. Major results from galaxy IFU studies include the discovery of the fast versus slow rotator dichotomy [@Emsellem_2011], evidence for inside-out galaxy growth [@perez_2013], and the ubiquity of warm orbits across galaxy types [@zhu_2018].

Galaxies are built from stars, gas, dust and dark matter. Stars are an especially useful observational probe as many physical properties can be inferred from their spectra. _Stellar populations_ are intrinsic properties such as a star's age or chemical composition, which affect the strengths of spectral absorption lines. _Stellar kinematics_ are the positions and velocities of stars within the galaxy. The component of velocity along the line-of-sight produces Doppler shifting of absorption lines. In the past, stellar populations and kinematics of external galaxies have been modelled separately; often thought of as distinct subfields. Recent work has demonstrated the power of moving beyond this dichotomy to study galaxy evolution [e.g. @Poci2019]. `popkinmocks` is software to create mock observations of IFU datacubes of galaxy stellar light for the era of combined population-kinematic analyses.

Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,5 @@
"ipython",
],
},
package_data={
"popkinmocks": ["../data/MILES_BASTI_CH_baseFe/*"]
},
package_data={"popkinmocks": ["../data/MILES_BASTI_CH_baseFe/*"]},
)

0 comments on commit 321d9ca

Please sign in to comment.