Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR to track changes on the dev branch #246

Merged
merged 52 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
bc2ba7c
Exploring the moving of propagation code into utils, unifying Fresenl…
LouisDesdoigts Aug 8, 2023
ee4d071
Renaming Image.image -> PSF.data
LouisDesdoigts Aug 8, 2023
6032bb7
Removing observation, making dither a subclass of instrument, still n…
LouisDesdoigts Aug 8, 2023
cef46ea
Adds the get_pixel_scale flag to the various modelling methods, allow…
LouisDesdoigts Aug 9, 2023
fc98bf1
Adds Scene and code required for it to be used in the rest of the pac…
LouisDesdoigts Aug 9, 2023
fab13ef
Working through the tutorials squashing bugs
LouisDesdoigts Aug 9, 2023
75ad362
Changing _to_ to 2
LouisDesdoigts Sep 6, 2023
9d45659
Changing _to_ to 2
LouisDesdoigts Sep 6, 2023
20b49df
Moving fourier rotate to dev, Moving downsample to utils/array
LouisDesdoigts Sep 6, 2023
eade605
Adding fourier rotate to dev
LouisDesdoigts Sep 6, 2023
537b3fe
Adds arrays utils with pad_to, crop_to, resize and downsample
LouisDesdoigts Sep 6, 2023
776b167
Adds source utils for parametric binary sources
LouisDesdoigts Sep 6, 2023
e6049bb
Adds eval_basis to utils/math.py
LouisDesdoigts Sep 6, 2023
b175716
Adds wavenumber, changes _to_ to 2, reworks all other function into f…
LouisDesdoigts Sep 6, 2023
2256fd9
Moves zernike functionality to utils/polynomial
LouisDesdoigts Sep 6, 2023
ca62924
Adds propagation to utils
LouisDesdoigts Sep 6, 2023
732f2b4
First pass at code done. All doc notebooks working
LouisDesdoigts Sep 6, 2023
49d7cfd
Updating notebooks to slightly new syntax
LouisDesdoigts Sep 6, 2023
e45bde9
Initial refactor, code base is looking very simple and well strcutred…
LouisDesdoigts Sep 6, 2023
5189f1a
Major backedn changes allowing the native input/output of wavefronts,…
LouisDesdoigts Sep 7, 2023
4f22176
Fix a small bug giving incorrect fluxes
LouisDesdoigts Sep 7, 2023
833c49d
Progressive update to notebooks
LouisDesdoigts Sep 7, 2023
909952e
A bunch of new utils functionality
LouisDesdoigts Sep 8, 2023
1e47cb8
Main re-work is done. On to testing next
LouisDesdoigts Sep 8, 2023
7786bb2
Simplify, tidy, restructure, etc
LouisDesdoigts Sep 8, 2023
9fe1690
All notebooks working now. Tests next up
LouisDesdoigts Sep 9, 2023
5058e62
Progressive notebook update
LouisDesdoigts Sep 9, 2023
d5f9e3d
Main code overhaul done, working with tests
LouisDesdoigts Sep 19, 2023
d813519
Complete test re-work
LouisDesdoigts Sep 19, 2023
24ba14e
Working tutorial notebooks
LouisDesdoigts Sep 19, 2023
0f8bf83
Fixes for nan-checks in tests
LouisDesdoigts Sep 19, 2023
d3e8dea
Updating workflow tests for new format
LouisDesdoigts Sep 19, 2023
29f75d1
Running tests individually, stopping 3.8 testing
LouisDesdoigts Sep 19, 2023
7dda828
Fixes to BasisLayer for apertures, removing python 3.9 from test matrix
LouisDesdoigts Sep 19, 2023
9c4a0c2
Fixing typo is testing workflow
LouisDesdoigts Sep 19, 2023
ceee24d
Fixing typo in test file name
LouisDesdoigts Sep 19, 2023
3509800
Completed all utils docstrings
LouisDesdoigts Sep 19, 2023
fcf6715
Utils docs update complete
LouisDesdoigts Sep 19, 2023
ab70cd7
adding files that shoudl have been in the last commit
LouisDesdoigts Sep 19, 2023
97368cb
Progressive update of all the docstrings... almost done now
LouisDesdoigts Sep 20, 2023
ae540da
All docstrings updated, tests passing
LouisDesdoigts Sep 21, 2023
af5a837
Adding test fixes that should have been in last commit
LouisDesdoigts Sep 21, 2023
26486cc
First pass at docs re-build
LouisDesdoigts Sep 22, 2023
e6d39fd
Transitioning all .ipynb files to .md files
LouisDesdoigts Sep 22, 2023
d1cd396
Reducing figure dpi to make files smaller
LouisDesdoigts Sep 22, 2023
0e8f66e
Small fix to tutorial figure
LouisDesdoigts Sep 22, 2023
82968a5
Adding more introductory tutorials
LouisDesdoigts Sep 23, 2023
ee694a0
Adds Source and Scene tutorial
LouisDesdoigts Sep 24, 2023
d1280b4
Adding more docs, small changes
LouisDesdoigts Oct 3, 2023
681a2c6
Re-adding tests that should have been in the last commit
LouisDesdoigts Oct 3, 2023
5fc620b
Fixing small test bug
LouisDesdoigts Oct 3, 2023
1806be9
Small README update for package versions
LouisDesdoigts Oct 4, 2023
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
3 changes: 3 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
pip install mkdocstrings[python]
pip install mkdocs-material

- name: build umls
run: docs/generate_umls.py

- name: generate and deploy documentation
run: mkdocs gh-deploy -d https://louisdesdoigts.github.io/dLux

119 changes: 78 additions & 41 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11"]

steps:
- name: checkout
Expand All @@ -25,50 +25,87 @@ jobs:
pip install --quiet pytest

# ===== Tests =====
- name: install tests
- name: tests install
run: pytest --quiet tests/test_installation.py


- name: wavefront tests
run: pytest --quiet tests/test_wavefronts.py

- name: optical layer tests
run: pytest --quiet tests/test_optical_layers.py

- name: aperture tests
run: pytest --quiet tests/test_apertures.py

- name: aperture tests
run: pytest --quiet tests/test_aberrations.py

- name: propagator tests
run: pytest --quiet tests/test_propagators.py

- name: optics tests
run: pytest --quiet tests/test_optics.py


- name: image tests
run: pytest --quiet tests/test_images.py
- name: test utils array_ops
run: pytest --quiet tests/utils/test_array_ops.py

- name: test utils coordinates
run: pytest --quiet tests/utils/test_coordinates.py

- name: test utils geometry
run: pytest --quiet tests/utils/test_geometry.py

- name: test utils helpers
run: pytest --quiet tests/utils/test_helpers.py

- name: test utils interpolation
run: pytest --quiet tests/utils/test_interpolation.py

- name: test utils math
run: pytest --quiet tests/utils/test_math.py

- name: detector layer tests
run: pytest --quiet tests/test_detector_layers.py
- name: test utils optics
run: pytest --quiet tests/utils/test_optics.py

- name: test utils propagation
run: pytest --quiet tests/utils/test_propagation.py

- name: test utils source
run: pytest --quiet tests/utils/test_source.py

- name: test utils units
run: pytest --quiet tests/utils/test_units.py

- name: test utils zernike
run: pytest --quiet tests/utils/test_zernike.py

- name: test layers aberrations
run: pytest --quiet tests/layers/test_aberrations.py

- name: test layers apertures
run: pytest --quiet tests/layers/test_apertures.py

- name: test layers detector_layers
run: pytest --quiet tests/layers/test_detector_layers.py

- name: test layers optical_layers
run: pytest --quiet tests/layers/test_optical_layers.py

- name: test layers optics
run: pytest --quiet tests/layers/test_optics.py

- name: test layers propagators
run: pytest --quiet tests/layers/test_propagators.py

- name: test layers unified_layers
run: pytest --quiet tests/layers/test_unified_layers.py

- name: detector tests
- name: test transformations
run: pytest --quiet tests/test_transformations.py

- name: test detectors
run: pytest --quiet tests/test_detectors.py


- name: spectra tests
run: pytest --quiet tests/test_spectra.py

- name: source tests
run: pytest --quiet tests/test_sources.py

- name: instrument tests

- name: test instruments
run: pytest --quiet tests/test_instruments.py

- name: test optical_systems
run: pytest --quiet tests/test_optical_systems.py

- name: test psfs
run: pytest --quiet tests/test_psfs.py

- name: test sources
run: pytest --quiet tests/test_sources.py

- name: test spectra
run: pytest --quiet tests/test_spectra.py

- name: test wavefronts
run: pytest --quiet tests/test_wavefronts.py



- name: observations tests
run: pytest --quiet tests/test_observations.py

- name: utils tests
run: pytest --quiet tests/test_utils.py

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
**/__pycache__/
**/.ipynb_checkpoints/
**.DS_Store
**.ipynb
**.npy
dist/
.vscode/
build/
Expand Down
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ repos:
rev: 22.3.0
hooks:
- id: black
args: [--line-length=79]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.278
hooks:
- id: ruff
args: [--fix]
args: [--fix, --line-length=88]
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

# ChangeLog

Project changes will be tracked here once the 1.0 version is released. We will not track changes during the development phase.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing Guide

dLux is an open-source framework and as such is very welcoming to contributions via pull requests! If you would like to contribute but are unfamiliar with any of this process, as I imagine many coming from a science background will be, please feel free to reach out to me at my [email]([email protected]) or on [twitter](https://twitter.com/gradientrider) and I will be happy to help you through the process!
dLux is an open-source framework and as such is very welcoming to contributions via pull requests! If you would like to contribute but are unfamiliar with any of this process, as I imagine many coming from a science background will be, please feel free to reach out to me at my [email](mailto:[email protected]) or on [twitter](https://twitter.com/gradientrider) and I will be happy to help you through the process!

---

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![alt text](docs/assets/logo.jpg?raw=true)
![alt text](assets/logo.jpg?raw=true)

# ∂Lux

Expand All @@ -25,21 +25,21 @@ The ∂Lux framework is built in [Zodiax](https://github.com/LouisDesdoigts/zodi
>
> - [Automatic Vectorisation](https://jax.readthedocs.io/en/latest/jax-101/03-vectorization.html): Allows for simple parallelism across hardware and asynchronous execution
>
> - [Path-Based Pytree Interface](docs/usage.md): Path based indexing allows for easy interfacing with large and highly nested physical models
<!-- > - [Path-Based Pytree Interface](usage.md): Path based indexing allows for easy interfacing with large and highly nested physical models -->

For an overview of these capabilities and different optimisation methods in [Zodiax](https://github.com/LouisDesdoigts/zodiax), please go through this [Zodiax Tutorial](https://louisdesdoigts.github.io/zodiax/docs/usage/).

Documentation: [https://louisdesdoigts.github.io/dLux/](https://louisdesdoigts.github.io/dLux/)

Requires: Python 3.8+, Jax 0.4.3+, Zodiax 0.4+
Requires: Python 3.10+, Jax 0.4.13+, Zodiax 0.4+

Installation: ```pip install dLux```

If you want to run the tutorials locally, you can install the 'extra' dependencies like so: ```pip install 'dLux[extras]'```

## Collaboration & Development

We are always looking to collaborate and further develop this software! We have focused on flexibility and ease of development, so if you have a project you want to use ∂Lux for, but it currently does not have the required capabilities, have general questions, thoughts or ideas, don't hesitate to [email me]([email protected]) or contact me on [twitter](https://twitter.com/gradientrider)! More details about contributing can be found in our [contributing guide](CONTRIBUTING.md).
We are always looking to collaborate and further develop this software! We have focused on flexibility and ease of development, so if you have a project you want to use ∂Lux for, but it currently does not have the required capabilities, have general questions, thoughts or ideas, don't hesitate to [email me](mailto:[email protected]) or contact me on [twitter](https://twitter.com/gradientrider)! More details about contributing can be found in our [contributing guide](CONTRIBUTING.md).

## Publications

Expand Down
120 changes: 0 additions & 120 deletions dLux/__init__.py

This file was deleted.

Loading