Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
18e6a13
update documentation
anschaible Nov 12, 2025
6ece6f3
Merge branch 'main' into prepare_publish
Dec 1, 2025
78b555a
Update license information in README to MIT License
Dec 1, 2025
de46508
rename source to docs to move Rubix documentation under the docs folder.
Dec 1, 2025
5a8dc77
Update Python version in CI workflow to 3.13 and remove duplicate bad…
Dec 1, 2025
3d3e927
Fix typo in Contributing.md for clarity in setup instructions
Dec 1, 2025
2850d0d
rename contributing to all upper case
Dec 1, 2025
cc6411a
Add CONTRIBUTING.md to provide guidelines for contributions
Dec 1, 2025
49a3052
Add unit tests for FITS file handling and visualization functions
Dec 1, 2025
1445b48
Add unit tests for dusty datacube calculation and improve error handling
Dec 1, 2025
92644b0
Add detailed dummy classes and enhance visualization tests for cube s…
Dec 1, 2025
14cb4d7
Enhance unit tests for input handler and SSP template functions, addi…
Dec 1, 2025
67be73d
Add coverage pragma to handle None devices case in RubixPipeline
Dec 1, 2025
c0588f7
Add citation formatting for research papers in README
Dec 1, 2025
58c2ef0
Add Contributor Covenant Code of Conduct
Dec 2, 2025
3a02921
Enhance tests and utility functions across multiple modules
Dec 2, 2025
2d8a767
Merge pull request #180 from AstroAI-Lab/main
TobiBu Dec 2, 2025
101903b
Update installation instructions and configuration details in README …
Dec 3, 2025
5e6b410
Update installation instructions and dependencies; modify data handli…
Dec 3, 2025
5ba131a
remove vi notebook for the first version of the code, it is not in a …
anschaible Dec 3, 2025
478f7c4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 3, 2025
1878f01
remove not needed : in the documentation
anschaible Dec 3, 2025
f3dcba0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 3, 2025
946af20
Update installation instructions to include 'dev' dependencies for de…
Dec 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: "3.11"
python-version: "3.13"

- name: Install Python package
run: |
Expand Down
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant 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, 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
Tobias Buck, astroai@iwr.uni-heidelberg.de.
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.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
40 changes: 0 additions & 40 deletions FILESTRUCTURE.md

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
SOURCEDIR = docs
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
Expand Down
48 changes: 31 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/AstroAI-Lab/rubix/blob/main/docs/CONTRIBUTING.md)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/AstroAI-Lab/rubix/ci.yml?branch=main)](https://github.com/AstroAI-Lab/rubix/actions/workflows/ci.yml)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/AstroAI-Lab/rubix/CI?label=build)](https://github.com/AstroAI-Lab/rubix/actions/workflows/ci.yml)
[![Documentation Status](https://readthedocs.org/projects/rubix/badge/)](https://astro-rubix.web.app)
[![codecov](https://codecov.io/gh/AstroAI-Lab/rubix/branch/main/graph/badge.svg)](https://codecov.io/gh/AstroAI-Lab/rubix)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
Expand All @@ -26,14 +25,16 @@ Key features include:

## Installation

The Python package `rubix` can be downloades from git and can be installed:
The Python package `rubix` is published on GitHub and can be installed alongside its runtime dependencies (including JAX) by choosing the relevant extras. For a CPU-only environment, install with:

```
git clone https://github.com/AstroAI-Lab/rubix.git
cd rubix
pip install .
pip install .[cpu]
```

If you need GPU acceleration, replace `[cpu]` with `[cuda]` (or install `jax[cuda]` following the [JAX instructions](https://github.com/google/jax#installation) before installing Rubix). The plain `pip install .` command installs the minimal package without JAX and will raise `ImportError` if you try to import `rubix` before adding `jax` manually.

## Development installation

If you want to contribute to the development of `rubix`, we recommend
Expand All @@ -42,7 +43,7 @@ the following editable installation from this repository:
```
git clone https://github.com/AstroAI-Lab/rubix.git
cd rubix
python -m pip install --editable .[tests]
python -m pip install --editable .[cpu,tests,dev]
```

Having done so, the test suite can be run using `pytest`:
Expand All @@ -51,9 +52,21 @@ Having done so, the test suite can be run using `pytest`:
python -m pytest
```

This project depends on [jax](https://github.com/google/jax). It only installed for cpu computations with the testing dependencies. For installation instructions with gpu support,
please refer to [here](https://github.com/google/jax?tab=readme-ov-file#installation).
This project depends on [jax](https://github.com/google/jax). For the pytests we only test the `cpu` version.
For installation instructions with gpu support,
please refer to [here](https://github.com/google/jax?tab=readme-ov-file#installation) or simply use the `cuda` option when pip installing.

## Configuration overview

Rubix ships with two YAML files in `rubix/config/`: `rubix_config.yml` (constants, SSP templates, dust recipes, handler mappings, etc.) and `pipeline_config.yml` (pipeline graphs such as `calc_ifu` and `calc_dusty_ifu`). There is no configuration wizard — your runtime settings must supply a dictionary with the following blocks:

- `pipeline.name`: Identifies the pipeline from `pipeline_config.yml` (e.g., `calc_ifu`, `calc_dusty_ifu`, or `calc_gradient`).
- `galaxy`: Must provide `dist_z` and a `rotation` section (`type` or explicit `alpha`, `beta`, `gamma`).
- `telescope`: Requires `name`, `psf` (currently only the `gaussian` kernel with `size` and `sigma`), `lsf` (`sigma`), and `noise` (`signal_to_noise` plus `noise_distribution`, choose from `normal` or `uniform`).
- `ssp.dust`: Must declare `extinction_model` and `Rv` before calling the dusty pipeline (see `rubix/spectra/dust/extinction_models.py` for the supported models such as `Cardelli89`).
- `data.args.particle_type`: Should include `"stars"` (and `"gas"` if you want the gas branch) so the filters and rotation functions know which components exist.

The tutorials and notebooks assume square spaxels, so the default telescope factory currently only supports `pixel_type: square`. For a working example, inspect `notebooks/rubix_pipeline_single_function_shard_map.ipynb`, which runs the exact pipeline used in the tests.

## Documentation
Sphinx Documentation of all the functions is currently available under [this link](https://astro-rubix.web.app/).
Expand All @@ -63,15 +76,16 @@ Sphinx Documentation of all the functions is currently available under [this lin
Contributions to `rubix` are welcome and greatly appreciated!
Whether you're fixing bugs, improving documentation, or suggesting new features, your help is valuable to us.

Please see [here](source/CONTRIBUTING.md) for contribution guidelines.
Please see [here](docs/CONTRIBUTING.md) for contribution guidelines.

Thank you for helping improve `rubix`!

## Citation & Acknowledgement

Please cite **both** of the following papers ([Cakir et al. 2024](https://arxiv.org/abs/2412.08265), [Schaible et al. 2025](https://arxiv.org/abs/2511.17110)) if you use Rubix in your research:

@ARTICLE{2024arXiv241208265C,
```
@ARTICLE{2024arXiv241208265C,
author = {{{\c{C}}ak{\i}r}, Ufuk and {Schaible}, Anna Lena and {Buck}, Tobias},
title = "{Fast GPU-Powered and Auto-Differentiable Forward Modeling of IFU Data Cubes}",
journal = {arXiv e-prints},
Expand All @@ -81,14 +95,14 @@ Please cite **both** of the following papers ([Cakir et al. 2024](https://arxiv.
eid = {arXiv:2412.08265},
pages = {arXiv:2412.08265},
doi = {10.48550/arXiv.2412.08265},
archivePrefix = {arXiv},
archivePrefix = {arXiv},
eprint = {2412.08265},
primaryClass = {astro-ph.IM},
primaryClass = {astro-ph.IM},
adsurl = {https://ui.adsabs.harvard.edu/abs/2024arXiv241208265C},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
}

@ARTICLE{2025arXiv251117110S,
@ARTICLE{2025arXiv251117110S,
author = {{Schaible}, Anna Lena and {{\c{C}}ak{\i}r}, Ufuk and {Buck}, Tobias and {Mack}, Harald and {Obreja}, Aura and {Oguz}, Nihat and {Oliver}, William H. and {C{\u{a}}r{\u{a}}mizaru}, Horea-Alexandru},
title = "{RUBIX: Differentiable forward modelling of galaxy spectral data cubes for gradient-based parameter estimation}",
journal = {arXiv e-prints},
Expand All @@ -98,13 +112,13 @@ archivePrefix = {arXiv},
eid = {arXiv:2511.17110},
pages = {arXiv:2511.17110},
doi = {10.48550/arXiv.2511.17110},
archivePrefix = {arXiv},
archivePrefix = {arXiv},
eprint = {2511.17110},
primaryClass = {astro-ph.GA},
primaryClass = {astro-ph.GA},
adsurl = {https://ui.adsabs.harvard.edu/abs/2025arXiv251117110S},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

}
```



Expand Down Expand Up @@ -138,7 +152,7 @@ archivePrefix = {arXiv},

## Licence

[GNU General Public License v3.0](https://github.com/synthesizer-project/synthesizer/blob/main/LICENSE.md)
[MIT License](https://github.com/AstroAI-Lab/rubix/blob/main/LICENSE.md)

## Acknowledgments

Expand Down
9 changes: 5 additions & 4 deletions source/Contributing.md → docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ at the root of the repo to activate the pre-commit hooks.

If you would like to test whether it works you can run `pre-commit run --all-files` to run the pre-commit hook on the whole repo. You should see each stage complete without issue in a clean clone.


## Using Black

We use [Black](https://black.readthedocs.io/en/stable/) for code formatting. Assuming you installed the development dependencies (if not you can install `black` with pip: `pip install black`), you can run the linting with `black {source_file_or_directory}`. For more details see the [Black documentation](https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html).
Expand Down Expand Up @@ -105,13 +106,13 @@ Adding content should be relatively simple if you follow the instructions below.

To add Jupyter notebooks to the documentation:

1. Add your Jupyter notebook to the `notebooks` directory under the `docs/source` folder. Make sure that you 'Restart Kernel and run all cells' to ensure that the notebook is producing up to date, consistent outputs.
2. Add your notebook to the relevant toctree. See below for an example toctree. Each toctree is contained within a Sphinx `.rst` file in each documentation source directory. The top-level file is `source/index.rst`. If your file is in a subfolder, you need to update the `.rst` file in that directory.
1. Add your Jupyter notebook to the `notebooks` directory under the `docs` folder. Make sure that you 'Restart Kernel and run all cells' to ensure that the notebook is producing up to date, consistent outputs.
2. Add your notebook to the relevant toctree. See below for an example toctree. Each toctree is contained within a Sphinx `.rst` file in each documentation source directory. The top-level file is `docs/index.rst`. If your file is in a subfolder, you need to update the `.rst` file in that directory.

- If you're creating a new sub-directory of documentation, you will need to carry out a couple more steps:

1. Create a new `.rst` file in that directory
2. Update `source/index.rst` with the path to that `.rst` file
2. Update `docs/index.rst` with the path to that `.rst` file
3. Currently we do not run pytests on jupyter notebooks. So please make sure your notebooks are actually working fine.

Example toctree:
Expand Down Expand Up @@ -164,7 +165,7 @@ sphinx-quickstart

#### Configuration and Content

The core of the documentation setup resides in the source folder:
The core of the documentation setup resides in the `docs` folder:

- `conf.py`: This is the main configuration file where you define extensions (like myst_nb for notebooks), set the theme, and manage global build settings.

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions source/conf.py → docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "rubix"
copyright = "2024, Ufuk, Tobias, Anna Lena"
author = "Ufuk, Tobias, Anna Lena"
project = "Rubix"
copyright = "2025, Anna Lena Schaible, Ufuk Cakir, Tobias Buck"
author = "Anna Lena Schaible, Ufuk Cakir, Tobias Buck"
release = "0.1"

# -- General configuration ---------------------------------------------------
Expand Down
File renamed without changes.
Loading